summaryrefslogtreecommitdiffstats
path: root/src/test/ui/imports/extern-prelude-extern-crate-fail.rs
blob: feb1ab09dc9e212fdbacbddd51a3dbd096e48dfb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// aux-build:two_macros.rs
// compile-flags:--extern non_existent

mod n {
    extern crate two_macros;
}

mod m {
    fn check() {
        two_macros::m!(); //~ ERROR failed to resolve: use of undeclared crate or module `two_macros`
    }
}

macro_rules! define_std_as_non_existent {
    () => {
        extern crate std as non_existent;
        //~^ ERROR `extern crate` items cannot shadow names passed with `--extern`
    }
}
define_std_as_non_existent!();

fn main() {}