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