aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/name_resolution7.rs
blob: fa84e2ffb8394963a83653fe651ff10447f52cb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// { dg-options "-frust-name-resolution-2.0" }

// check that macros by example do not get inserted in ribs like regular items
pub mod foo {
    pub mod bar {
        pub mod baz {
            pub mod qux {
                macro_rules! foo {
                    (one) => {};
                }
            }
        }
    }
}

crate::foo::bar::baz::qux::foo!(); // { dg-error "could not resolve macro invocation" }
foo::bar::baz::qux::foo!(); // { dg-error "could not resolve macro invocation" }