fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

1.40.0
1.1 KiB32 linesraw
1error: macro-expanded `extern crate` items cannot shadow names passed with `--extern`
2  --> $DIR/extern-prelude-extern-crate-restricted-shadowing.rs:21:9
3   |
4LL |         extern crate std as core;
5   |         ^^^^^^^^^^^^^^^^^^^^^^^^^
6...
7LL | define_other_core!();
8   | --------------------- in this macro invocation
9
10error[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:15:9
12   |
13LL |         Vec::panic!();
14   |         ^^^ ambiguous name
15   |
16note: `Vec` could refer to the crate imported here
17  --> $DIR/extern-prelude-extern-crate-restricted-shadowing.rs:7:9
18   |
19LL |         extern crate std as Vec;
20   |         ^^^^^^^^^^^^^^^^^^^^^^^^
21...
22LL | define_vec!();
23   | -------------- in this macro invocation
24note: `Vec` could also refer to the struct defined here
25  --> $SRC_DIR/libstd/prelude/v1.rs:LL:COL
26   |
27LL | pub use crate::vec::Vec;
28   |         ^^^^^^^^^^^^^^^
29
30error: aborting due to 2 previous errors
31
32For more information about this error, try `rustc --explain E0659`.