|
| 1 | +error[E0425]: cannot find value `unknown_item` in this scope |
| 2 | + --> $DIR/ambiguous-panic-re-emit.rs:22:13 |
| 3 | + | |
| 4 | +LL | let _ = unknown_item; |
| 5 | + | ^^^^^^^^^^^^ not found in this scope |
| 6 | + |
| 7 | +warning: `panic` is ambiguous |
| 8 | + --> $DIR/ambiguous-panic-re-emit.rs:16:5 |
| 9 | + | |
| 10 | +LL | panic!(); |
| 11 | + | ^^^^^ ambiguous name |
| 12 | + | |
| 13 | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! |
| 14 | + = note: for more information, see issue #147319 <https://github.com/rust-lang/rust/issues/147319> |
| 15 | + = note: ambiguous because of a conflict between a name from a glob import and an outer scope during import or macro resolution |
| 16 | +note: `panic` could refer to the macro imported here |
| 17 | + --> $DIR/ambiguous-panic-re-emit.rs:11:9 |
| 18 | + | |
| 19 | +LL | use std::prelude::v1::*; |
| 20 | + | ^^^^^^^^^^^^^^^^^^^ |
| 21 | + = help: consider adding an explicit import of `panic` to disambiguate |
| 22 | + = help: or use `crate::panic` to refer to this macro unambiguously |
| 23 | +note: `panic` could also refer to a macro from prelude |
| 24 | + --> $SRC_DIR/core/src/prelude/mod.rs:LL:COL |
| 25 | + = note: `#[warn(ambiguous_panic_imports)]` (part of `#[warn(future_incompatible)]`) on by default |
| 26 | + |
| 27 | +error: aborting due to 1 previous error; 1 warning emitted |
| 28 | + |
| 29 | +For more information about this error, try `rustc --explain E0425`. |
| 30 | +Future incompatibility report: Future breakage diagnostic: |
| 31 | +warning: `panic` is ambiguous |
| 32 | + --> $DIR/ambiguous-panic-re-emit.rs:16:5 |
| 33 | + | |
| 34 | +LL | panic!(); |
| 35 | + | ^^^^^ ambiguous name |
| 36 | + | |
| 37 | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! |
| 38 | + = note: for more information, see issue #147319 <https://github.com/rust-lang/rust/issues/147319> |
| 39 | + = note: ambiguous because of a conflict between a name from a glob import and an outer scope during import or macro resolution |
| 40 | +note: `panic` could refer to the macro imported here |
| 41 | + --> $DIR/ambiguous-panic-re-emit.rs:11:9 |
| 42 | + | |
| 43 | +LL | use std::prelude::v1::*; |
| 44 | + | ^^^^^^^^^^^^^^^^^^^ |
| 45 | + = help: consider adding an explicit import of `panic` to disambiguate |
| 46 | + = help: or use `crate::panic` to refer to this macro unambiguously |
| 47 | +note: `panic` could also refer to a macro from prelude |
| 48 | + --> $SRC_DIR/core/src/prelude/mod.rs:LL:COL |
| 49 | + = note: `#[warn(ambiguous_panic_imports)]` (part of `#[warn(future_incompatible)]`) on by default |
| 50 | + |
0 commit comments