rust/tests/ui/traits/item-inside-macro.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
290 B
Rust
Raw Normal View History

// run-pass
// Issue #34183
macro_rules! foo {
() => {
fn foo() { }
}
}
macro_rules! bar {
() => {
fn bar();
}
}
trait Bleh {
foo!();
bar!();
}
struct Test;
impl Bleh for Test {
fn bar() {}
}
fn main() {
Test::bar();
Test::foo();
}