Skip to content

Commit

Permalink
Convert all other debug_assert_nounwind
Browse files Browse the repository at this point in the history
  • Loading branch information
saethlin committed Feb 10, 2024
1 parent a715c46 commit 8707370
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/core/src/panic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,14 @@ pub macro unreachable_2021 {
#[rustc_macro_transparency = "semitransparent"]
pub macro debug_assert_nounwind {
($cond:expr $(,)?) => {
if $crate::cfg!(debug_assertions) {
if $crate::intrinsics::debug_assertions() {
if !$cond {
$crate::panicking::panic_nounwind($crate::concat!("assertion failed: ", $crate::stringify!($cond)));
}
}
},
($cond:expr, $($arg:tt)+) => {
if $crate::cfg!(debug_assertions) {
if $crate::intrinsics::debug_assertions() {
if !$cond {
$crate::panicking::panic_nounwind_fmt($crate::const_format_args!($($arg)+), false);
}
Expand Down

0 comments on commit 8707370

Please sign in to comment.