fork/rust

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

borsAuto merge of #71868 - Mark-Simulacrum:stable-1.43.1, r=pietroalbini8d69840ab92

1.43.1
1.3 KiB35 linesraw
1error: macro-expanded `extern crate` items cannot shadow names passed with `--extern`
2  --> $DIR/extern-prelude-extern-crate-restricted-shadowing.rs:23:9
3   |
4LL |         extern crate std as core;
5   |         ^^^^^^^^^^^^^^^^^^^^^^^^^
6...
7LL | define_other_core!();
8   | --------------------- in this macro invocation
9   |
10   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
11
12error[E0659]: `Vec` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution)
13  --> $DIR/extern-prelude-extern-crate-restricted-shadowing.rs:17:9
14   |
15LL |         Vec::panic!();
16   |         ^^^ ambiguous name
17   |
18note: `Vec` could refer to the crate imported here
19  --> $DIR/extern-prelude-extern-crate-restricted-shadowing.rs:9:9
20   |
21LL |         extern crate std as Vec;
22   |         ^^^^^^^^^^^^^^^^^^^^^^^^
23...
24LL | define_vec!();
25   | -------------- in this macro invocation
26note: `Vec` could also refer to the struct defined here
27  --> $SRC_DIR/libstd/prelude/v1.rs:LL:COL
28   |
29LL | pub use crate::vec::Vec;
30   |         ^^^^^^^^^^^^^^^
31   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
32
33error: aborting due to 2 previous errors
34
35For more information about this error, try `rustc --explain E0659`.