Skip to content

Commit eb3fd6d

Browse files
committedJun 6, 2021
Default panic message should print Box<dyn Any>
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<Any>', ... ``` However, this should be `Box<dyn Any>` instead.
1 parent 6c2dd25 commit eb3fd6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎library/std/src/panicking.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ fn default_hook(info: &PanicInfo<'_>) {
193193
Some(s) => *s,
194194
None => match info.payload().downcast_ref::<String>() {
195195
Some(s) => &s[..],
196-
None => "Box<Any>",
196+
None => "Box<dyn Any>",
197197
},
198198
};
199199
let thread = thread_info::current_thread();

0 commit comments

Comments
 (0)
Please sign in to comment.