]> git.lizzy.rs Git - rust.git/blob - src/test/ui/imports/extern-prelude-extern-crate-fail.rs
Sync portable-simd to rust-lang/portable-simd@72df4c45056a8bc0d1b3f06fdc828722177f0763
[rust.git] / src / test / ui / imports / extern-prelude-extern-crate-fail.rs
1 // aux-build:two_macros.rs
2 // compile-flags:--extern non_existent
3
4 mod n {
5     extern crate two_macros;
6 }
7
8 mod m {
9     fn check() {
10         two_macros::m!(); //~ ERROR failed to resolve: use of undeclared crate or module `two_macros`
11     }
12 }
13
14 macro_rules! define_std_as_non_existent {
15     () => {
16         extern crate std as non_existent;
17         //~^ ERROR `extern crate` items cannot shadow names passed with `--extern`
18     }
19 }
20 define_std_as_non_existent!();
21
22 fn main() {}