about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2019-11-25 12:24:39 +0100
committerRalf Jung <post@ralfj.de>2019-11-25 23:55:54 +0100
commit3c485795517d1f5a6ebfff6368dfae7a7cd85b85 (patch)
treea82b02113c7c47a5c7945a20f361bedc978cd2d4 /src/libstd
parent08f779cb4b481be58eeb5ecc421f69503780e8b1 (diff)
downloadrust-3c485795517d1f5a6ebfff6368dfae7a7cd85b85.tar.gz
rust-3c485795517d1f5a6ebfff6368dfae7a7cd85b85.zip
more panicking comments
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/panicking.rs4
1 files changed, 3 insertions, 1 deletions
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());