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.
This commit is contained in:
parent
6c2dd251bb
commit
eb3fd6d208
1 changed files with 1 additions and 1 deletions
|
@ -193,7 +193,7 @@ fn default_hook(info: &PanicInfo<'_>) {
|
|||
Some(s) => *s,
|
||||
None => match info.payload().downcast_ref::<String>() {
|
||||
Some(s) => &s[..],
|
||||
None => "Box<Any>",
|
||||
None => "Box<dyn Any>",
|
||||
},
|
||||
};
|
||||
let thread = thread_info::current_thread();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue