error[E0080]: entering unreachable code --> $DIR/interpret-in-promoted.rs:15:28 | LL | let _x: &'static () = &ub(); | ^^^^ evaluation of `FOO` failed inside this call | note: inside `ub` --> $DIR/interpret-in-promoted.rs:9:5 | LL | std::hint::unreachable_unchecked(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the failure occurred here note: erroneous constant encountered --> $DIR/interpret-in-promoted.rs:15:27 | LL | let _x: &'static () = &ub(); | ^^^^^ error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0080`.