We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
unreachable_unchecked
1 parent e70e4d4 commit 7675a50Copy full SHA for 7675a50
library/core/src/hint.rs
@@ -46,6 +46,7 @@ use crate::intrinsics;
46
#[stable(feature = "unreachable", since = "1.27.0")]
47
#[rustc_const_stable(feature = "const_unreachable_unchecked", since = "1.57.0")]
48
pub const unsafe fn unreachable_unchecked() -> ! {
49
+ debug_assert!(false, "entered unreachable code");
50
// SAFETY: the safety contract for `intrinsics::unreachable` must
51
// be upheld by the caller.
52
unsafe { intrinsics::unreachable() }
0 commit comments