aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/name_resolution9.rs
blob: 93adb46d278a69ebea7d7c21e7f130a1c5336d87 (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" }

pub mod foo {
    pub mod bar {
        fn f() {
            super::super::super::foo!(); // { dg-error "too many leading .super. keywords" }
                                         // { dg-error "could not resolve macro invocation" "" { target *-*-* } .-1 }

            super::crate::foo!(); // { dg-error "leading path segment .crate. can only be used" }
                                  // { dg-error "could not resolve macro invocation" "" { target *-*-* } .-1 }

			
            crate::foo::bar::super::foo!(); // { dg-error "leading path segment .super. can only be used" }
		                                    // { dg-error "could not resolve macro invocation" "" { target *-*-* } .-1 }
        }
    }
}