add a few more assert_unsafe_precondition

This commit is contained in:
Ralf Jung 2022-09-26 16:54:22 +02:00
parent 4bd30785eb
commit 6f6433428f
4 changed files with 12 additions and 6 deletions

View file

@ -4,6 +4,7 @@
// known to be `1` after inlining).
// compile-flags: -C no-prepopulate-passes -Zinline-mir=no
// ignore-debug: the debug assertions get in the way
#![crate_type = "lib"]

View file

@ -1,11 +1,11 @@
error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/hint.rs:LL:COL
|
LL | unsafe { intrinsics::unreachable() }
| ^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| entering unreachable code
| inside `unreachable_unchecked` at $SRC_DIR/core/src/hint.rs:LL:COL
LL | intrinsics::unreachable()
| ^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| entering unreachable code
| inside `unreachable_unchecked` at $SRC_DIR/core/src/hint.rs:LL:COL
|
::: $DIR/const_unsafe_unreachable_ub.rs:6:18
|