]> git.lizzy.rs Git - rust.git/blob - src/test/ui/imports/extern-prelude-extern-crate-restricted-shadowing.stderr
Rollup merge of #57132 - daxpedda:master, r=steveklabnik
[rust.git] / src / test / ui / imports / extern-prelude-extern-crate-restricted-shadowing.stderr
1 error: macro-expanded `extern crate` items cannot shadow names passed with `--extern`
2   --> $DIR/extern-prelude-extern-crate-restricted-shadowing.rs:19:9
3    |
4 LL |         extern crate std as core;
5    |         ^^^^^^^^^^^^^^^^^^^^^^^^^
6 ...
7 LL | define_other_core!();
8    | --------------------- in this macro invocation
9
10 error[E0659]: `Vec` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution)
11   --> $DIR/extern-prelude-extern-crate-restricted-shadowing.rs:13:9
12    |
13 LL |         Vec::panic!(); //~ ERROR `Vec` is ambiguous
14    |         ^^^ ambiguous name
15    |
16    = note: `Vec` could refer to a struct from prelude
17 note: `Vec` could also refer to the extern crate imported here
18   --> $DIR/extern-prelude-extern-crate-restricted-shadowing.rs:5:9
19    |
20 LL |         extern crate std as Vec;
21    |         ^^^^^^^^^^^^^^^^^^^^^^^^
22 ...
23 LL | define_vec!();
24    | -------------- in this macro invocation
25
26 error: aborting due to 2 previous errors
27
28 For more information about this error, try `rustc --explain E0659`.