summaryrefslogtreecommitdiffstats
path: root/tests/ui/hygiene/extern-prelude-from-opaque-fail-2018.rs
blob: 40c5eacee3bad4f5ea6d983e1900e0cc3e52eacc (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
29
// edition:2018
#![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() {}