use panic_fmt_nounwind for assert_unsafe_precondition

This commit is contained in:
Ralf Jung 2022-10-06 12:40:56 +02:00
parent 66282cb47d
commit b61e742a39

View File

@ -2210,8 +2210,8 @@ macro_rules! assert_unsafe_precondition {
#[inline(always)]
fn runtime$(<$($tt)*>)?($($i:$ty),*) {
if !$e {
// abort instead of panicking to reduce impact on code size
::core::intrinsics::abort();
// don't unwind to reduce impact on code size
::core::panicking::panic_str_nounwind("unsafe precondition violated");
}
}
#[allow(non_snake_case)]