Debian Codegraph @

gcc/testsuite/rust/compile/name_resolution6.rs

raw
1 // { dg-options "-frust-name-resolution-2.0 -frust-compile-until=lowering" }
2
3 pub mod foo {
4 pub mod bar {
5 pub mod baz {
6 pub mod qux {
7 #[macro_export]
8 macro_rules! foo {
9 (one) => {};
10 }
11
12 pub fn foo() {}
13 }
14 }
15
16 fn f() {
17 fn inner() {
18 macro_rules! foo {
19 (two) => {};
20 }
21
22 foo!(two); // ok, textual scope
23 crate::foo!(one); // ok, path res
24 super::super::foo!(one); // ok, path res
25 }
26 }
27 }
28 }