1 // Regression test for #58490
2 
3 macro_rules! a {
4     ( @1 $i:item ) => {
5         a! { @2 $i }
6     };
7     ( @2 $i:item ) => {
8         $i
9     };
10 }
11 mod b {
12     a! {
13         @1
14         #[macro_export]
15         macro_rules! b { () => () }
16     }
17     #[macro_export]
18     macro_rules! b { () => () }
19     //~^ ERROR: the name `b` is defined multiple times
20 }
21 mod c {
22     #[allow(unused_imports)]
23     use crate::b;
24 }
25 
main()26 fn main() {}
27