2021-06-18 12:31:56 -05:00
|
|
|
error[E0080]: evaluation of constant value failed
|
2020-06-11 21:31:49 -05:00
|
|
|
--> $SRC_DIR/core/src/hint.rs:LL:COL
|
2020-07-17 15:03:33 -05:00
|
|
|
|
|
2022-12-09 09:56:23 -06:00
|
|
|
= note: entering unreachable code
|
2022-11-29 07:10:42 -06:00
|
|
|
|
|
|
|
|
note: inside `unreachable_unchecked`
|
|
|
|
--> $SRC_DIR/core/src/hint.rs:LL:COL
|
|
|
|
note: inside `foo`
|
|
|
|
--> $DIR/const_unsafe_unreachable_ub.rs:6:18
|
2020-07-17 15:03:33 -05:00
|
|
|
|
|
2021-06-18 12:31:56 -05:00
|
|
|
LL | false => std::hint::unreachable_unchecked(),
|
2022-11-29 07:10:42 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
note: inside `BAR`
|
|
|
|
--> $DIR/const_unsafe_unreachable_ub.rs:10:28
|
|
|
|
|
|
2020-07-17 15:03:33 -05:00
|
|
|
LL | const BAR: bool = unsafe { foo(false) };
|
2022-11-29 07:10:42 -06:00
|
|
|
| ^^^^^^^^^^
|
2020-07-17 15:03:33 -05:00
|
|
|
|
2021-06-18 12:31:56 -05:00
|
|
|
error: aborting due to previous error
|
2020-07-17 15:03:33 -05:00
|
|
|
|
2020-07-17 19:27:41 -05:00
|
|
|
For more information about this error, try `rustc --explain E0080`.
|