aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/name_resolution8.rs
blob: 6fb5170338243393901f1e0deb066c4a83839bb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// { dg-options "-frust-name-resolution-2.0" }

// check that macros by example get exported to the crate's root with #[macro_export]
pub mod foo {
    pub mod bar {
        pub mod baz {
            pub mod qux {
				#[macro_export]
                macro_rules! foo {
                    (one) => {};
                }
            }
        }
    }
}

crate::foo!(one); // ok
foo!(one); // ok

mod a {
	mod b {
		mod c {
			super::super::super::foo!(one); // ok
		}
	}
}