From eb3fd6d208da80147430fea4be740acea687d8aa Mon Sep 17 00:00:00 2001 From: Reagan McFarland Date: Sun, 6 Jun 2021 16:21:47 -0400 Subject: [PATCH] Default panic message should print Box Prior to this patch, the default panic message (resulting from calling `panic_any(42);` for example), would print the following error message: ``` thread 'main' panicked at 'Box', ... ``` However, this should be `Box` instead. --- library/std/src/panicking.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/std/src/panicking.rs b/library/std/src/panicking.rs index 02957e75a740..e591e073e7bb 100644 --- a/library/std/src/panicking.rs +++ b/library/std/src/panicking.rs @@ -193,7 +193,7 @@ fn default_hook(info: &PanicInfo<'_>) { Some(s) => *s, None => match info.payload().downcast_ref::() { Some(s) => &s[..], - None => "Box", + None => "Box", }, }; let thread = thread_info::current_thread();