summaryrefslogtreecommitdiffstats
path: root/tests/ui/hygiene/extern-prelude-from-opaque-fail.rs
blob: 571017df4d7db8af6f9422d3d02389fb6d65cc25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#![feature(decl_macro)]

macro a() {
    extern crate core as my_core;
    mod v {
        // Early resolution.
        use my_core; //~ ERROR unresolved import `my_core`
    }
    mod u {
        // Late resolution.
        fn f() { my_core::mem::drop(0); }
        //~^ ERROR failed to resolve: use of undeclared crate or module `my_core`
    }
}

a!();

mod v {
    // Early resolution.
    use my_core; //~ ERROR unresolved import `my_core`
}
mod u {
    // Late resolution.
    fn f() { my_core::mem::drop(0); }
    //~^ ERROR failed to resolve: use of undeclared crate or module `my_core`
}

fn main() {}