1 // aux-build:two_macros.rs
2 
3 extern crate two_macros; // two identity macros `m` and `n`
4 
5 mod foo {
6     pub use two_macros::n as m;
7 }
8 
9 mod m1 {
10     m!(use two_macros::*;);
11     use foo::m; // This shadows the glob import
12 }
13 
14 mod m2 {
15     use two_macros::*;
16     m! { //~ ERROR ambiguous
17          //~| ERROR ambiguous
18         use foo::m;
19     }
20 }
21 
22 mod m3 {
23     use two_macros::m;
24     fn f() {
25         use two_macros::n as m; // This shadows the above import
26         m!();
27     }
28 
29     fn g() {
30         m! { //~ ERROR ambiguous
31             use two_macros::n as m;
32         }
33     }
34 }
35 
36 mod m4 {
37     macro_rules! m { () => {} }
38     use two_macros::m;
39     m!();
40 }
41 
42 fn main() {}
43