From 3c485795517d1f5a6ebfff6368dfae7a7cd85b85 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 25 Nov 2019 12:24:39 +0100 Subject: more panicking comments --- src/libstd/panicking.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/libstd') diff --git a/src/libstd/panicking.rs b/src/libstd/panicking.rs index a16eec45b9a..cb035f48d90 100644 --- a/src/libstd/panicking.rs +++ b/src/libstd/panicking.rs @@ -455,7 +455,9 @@ fn rust_panic_with_hook(payload: &mut dyn BoxMeUp, match HOOK { // Some platforms know that printing to stderr won't ever actually // print anything, and if that's the case we can skip the default - // hook. + // hook. Since string formatting happens lazily when calling `payload` + // methods, this means that with libpanic_abort, we don't format + // the string at all! Hook::Default if panic_output().is_none() => {} Hook::Default => { info.set_payload(payload.get()); -- cgit 1.4.1-3-g733a5