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

@@ -100,7 +100,10 @@ use crate::intrinsics;
pub const unsafe fn unreachable_unchecked() -> ! {
// SAFETY: the safety contract for `intrinsics::unreachable` must
// be upheld by the caller.
unsafe { intrinsics::unreachable() }
unsafe {
intrinsics::assert_unsafe_precondition!(() => false);
intrinsics::unreachable()
}
}
/// Emits a machine instruction to signal the processor that it is running in