diff options
| author | klensy <klensy@users.noreply.github.com> | 2025-01-13 21:00:57 +0300 |
|---|---|---|
| committer | klensy <klensy@users.noreply.github.com> | 2025-01-13 21:11:42 +0300 |
| commit | 3a0554a44578afb2f69babdae39f8880d23560ae (patch) | |
| tree | 5a7765eff9306336099d878bc5920306f5fe5307 | |
| parent | f17cf744f5f757ef9dc5f45508332c75d74ffad0 (diff) | |
| download | rust-3a0554a44578afb2f69babdae39f8880d23560ae.tar.gz rust-3a0554a44578afb2f69babdae39f8880d23560ae.zip | |
further improve panic_immediate_abort by removing rtprintpanic messages
| -rw-r--r-- | library/std/src/rt.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/library/std/src/rt.rs b/library/std/src/rt.rs index b2492238bd3..b08ce4ed089 100644 --- a/library/std/src/rt.rs +++ b/library/std/src/rt.rs @@ -32,9 +32,14 @@ use crate::{mem, panic, sys}; // - nothing (so this macro is a no-op) macro_rules! rtprintpanic { ($($t:tt)*) => { + #[cfg(not(feature = "panic_immediate_abort"))] if let Some(mut out) = crate::sys::stdio::panic_output() { let _ = crate::io::Write::write_fmt(&mut out, format_args!($($t)*)); } + #[cfg(feature = "panic_immediate_abort")] + { + let _ = format_args!($($t)*); + } } } |
