about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2018-01-23 18:19:21 +0100
committerSimon Sapin <simon.sapin@exyr.org>2018-01-23 18:31:09 +0100
commitf15c8169327244730f8e68598bf85d288e16fd70 (patch)
tree601e2a0f076fb55a6616769d33a0310a50c05943 /src/libcore
parent0e60287b4136bcede0c5eae8ab4e5de8496a16f0 (diff)
downloadrust-f15c8169327244730f8e68598bf85d288e16fd70.tar.gz
rust-f15c8169327244730f8e68598bf85d288e16fd70.zip
Make PanicInfo::message available for std::panic! with a formatting string.
This enables PanicInfo’s Display impl to show the panic message in those cases.
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/panic.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/panic.rs b/src/libcore/panic.rs
index cf8ceff6cda..14eb68d9b95 100644
--- a/src/libcore/panic.rs
+++ b/src/libcore/panic.rs
@@ -130,8 +130,8 @@ impl<'a> fmt::Display for PanicInfo<'a> {
         }
         // NOTE: we cannot use downcast_ref::<String>() here
         // since String is not available in libcore!
-        // A String payload and no message is what we’d get from `std::panic!`
-        // called with multiple arguments.
+        // The payload is a String when `std::panic!` is called with multiple arguments,
+        // but in that case the message is also available.
 
         self.location.fmt(formatter)
     }