Skip to content

Commit adb1048

Browse files
klensygitbot
authored and
gitbot
committed
further improve panic_immediate_abort by removing rtprintpanic messages
1 parent 02e23d0 commit adb1048

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

std/src/rt.rs

+5
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,14 @@ use crate::{mem, panic, sys};
3232
// - nothing (so this macro is a no-op)
3333
macro_rules! rtprintpanic {
3434
($($t:tt)*) => {
35+
#[cfg(not(feature = "panic_immediate_abort"))]
3536
if let Some(mut out) = crate::sys::stdio::panic_output() {
3637
let _ = crate::io::Write::write_fmt(&mut out, format_args!($($t)*));
3738
}
39+
#[cfg(feature = "panic_immediate_abort")]
40+
{
41+
let _ = format_args!($($t)*);
42+
}
3843
}
3944
}
4045

0 commit comments

Comments
 (0)