Debian Codegraph @

gcc/testsuite/rust/compile/name_resolution8.rs

raw
1 // { dg-options "-frust-name-resolution-2.0" }
2
3 // check that macros by example get exported to the crate's root with #[macro_export]
4 pub mod foo {
5 pub mod bar {
6 pub mod baz {
7 pub mod qux {
8 #[macro_export]
9 macro_rules! foo {
10 (one) => {};
11 }
12 }
13 }
14 }
15 }
16
17 crate::foo!(one); // ok
18 foo!(one); // ok
19
20 mod a {
21 mod b {
22 mod c {
23 super::super::super::foo!(one); // ok
24 }
25 }
26 }