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