]> git.proxmox.com Git - rustc.git/blob - src/test/ui/traits/trait-item-inside-macro.rs
New upstream version 1.51.0+dfsg1
[rustc.git] / src / test / ui / traits / trait-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 }