]> git.lizzy.rs Git - rust.git/blob - src/test/ui/traits/item-inside-macro.rs
:arrow_up: rust-analyzer
[rust.git] / src / test / ui / traits / item-inside-macro.rs
1 // run-pass
2 // Issue #34183
3
4 macro_rules! foo {
5     () => {
6         fn foo() { }
7     }
8 }
9
10 macro_rules! bar {
11     () => {
12         fn bar();
13     }
14 }
15
16 trait Bleh {
17     foo!();
18     bar!();
19 }
20
21 struct Test;
22
23 impl Bleh for Test {
24     fn bar() {}
25 }
26
27 fn main() {
28     Test::bar();
29     Test::foo();
30 }