|
1 |
| -error: any use of this value will cause an error |
| 1 | +warning: any use of this value will cause an error |
2 | 2 | --> $SRC_DIR/libcore/hint.rs:LL:COL
|
3 | 3 | |
|
4 | 4 | LL | unsafe { intrinsics::unreachable() }
|
5 | 5 | | ^^^^^^^^^^^^^^^^^^^^^^^^^
|
6 | 6 | | |
|
7 | 7 | | entering unreachable code
|
8 | 8 | | inside `std::hint::unreachable_unchecked` at $SRC_DIR/libcore/hint.rs:LL:COL
|
9 |
| - | inside `foo` at $DIR/const_unsafe_unreachable_ub.rs:7:18 |
10 |
| - | inside `BAR` at $DIR/const_unsafe_unreachable_ub.rs:11:28 |
| 9 | + | inside `foo` at $DIR/const_unsafe_unreachable_ub.rs:9:18 |
| 10 | + | inside `BAR` at $DIR/const_unsafe_unreachable_ub.rs:14:28 |
11 | 11 | |
|
12 |
| - ::: $DIR/const_unsafe_unreachable_ub.rs:11:1 |
| 12 | + ::: $DIR/const_unsafe_unreachable_ub.rs:14:1 |
13 | 13 | |
|
14 | 14 | LL | const BAR: bool = unsafe { foo(false) };
|
15 | 15 | | ----------------------------------------
|
16 | 16 | |
|
| 17 | +note: the lint level is defined here |
| 18 | + --> $DIR/const_unsafe_unreachable_ub.rs:13:8 |
| 19 | + | |
| 20 | +LL | #[warn(const_err)] |
| 21 | + | ^^^^^^^^^ |
| 22 | + |
| 23 | +error[E0080]: evaluation of constant expression failed |
| 24 | + --> $DIR/const_unsafe_unreachable_ub.rs:17:3 |
| 25 | + | |
| 26 | +LL | assert_eq!(BAR, true); |
| 27 | + | ^^^^^^^^^^^---^^^^^^^^ |
| 28 | + | | |
| 29 | + | referenced constant has errors |
| 30 | + | |
| 31 | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) |
| 32 | + |
| 33 | +error: erroneous constant used |
| 34 | + --> $DIR/const_unsafe_unreachable_ub.rs:17:3 |
| 35 | + | |
| 36 | +LL | assert_eq!(BAR, true); |
| 37 | + | ^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors |
| 38 | + | |
17 | 39 | = note: `#[deny(const_err)]` on by default
|
| 40 | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) |
18 | 41 |
|
19 |
| -error: aborting due to previous error |
| 42 | +error: aborting due to 2 previous errors; 1 warning emitted |
20 | 43 |
|
| 44 | +For more information about this error, try `rustc --explain E0080`. |
0 commit comments