diff --git a/library/core/src/ub_checks.rs b/library/core/src/ub_checks.rs index 60306389b18dd..159010c611e8b 100644 --- a/library/core/src/ub_checks.rs +++ b/library/core/src/ub_checks.rs @@ -68,7 +68,7 @@ macro_rules! assert_unsafe_precondition { #[track_caller] const fn precondition_check($($name:$ty),*) { if !$e { - ::core::panicking::panic_nounwind_fmt( + ::core::panicking::panic_nounwind( concat!("unsafe precondition(s) violated: ", $message) ); } @@ -150,7 +150,7 @@ pub(crate) const fn is_nonoverlapping( let src_usize = src.addr(); let dst_usize = dst.addr(); let Some(size) = size.checked_mul(count) else { - crate::panicking::panic_nounwind_fmt( + crate::panicking::panic_nounwind( "is_nonoverlapping: `size_of::() * count` overflows a usize", ) };