Skip to content

Commit b61e742

Browse files
committed
use panic_fmt_nounwind for assert_unsafe_precondition
1 parent 66282cb commit b61e742

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: library/core/src/intrinsics.rs

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

0 commit comments

Comments
 (0)