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

#![feature(decl_macro)]

pub mod foo {
    pub mod bar {
        pub mod baz {
            // macros 2.0 get inserted in Ribs like items
            pub macro boof() {}
        }
    }
}

#[macro_export]
fn main() {
    foo::bar::baz::boof!();
    crate::foo::bar::baz::boof!();
    self::foo::bar::baz::boof!();
}