diff options
| author | Reagan McFarland <reagan.mcfarland1059@gmail.com> | 2021-06-06 16:21:47 -0400 |
|---|---|---|
| committer | Reagan McFarland <reagan.mcfarland1059@gmail.com> | 2021-06-06 16:21:47 -0400 |
| commit | eb3fd6d208da80147430fea4be740acea687d8aa (patch) | |
| tree | 7dac511b6fae884181cca25ca4428d3590f92e47 | |
| parent | 6c2dd251bbff03c7a3092d43fb5b637eca0810e3 (diff) | |
| download | rust-eb3fd6d208da80147430fea4be740acea687d8aa.tar.gz rust-eb3fd6d208da80147430fea4be740acea687d8aa.zip | |
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.
| -rw-r--r-- | library/std/src/panicking.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/panicking.rs b/library/std/src/panicking.rs index 02957e75a74..e591e073e7b 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::<String>() { Some(s) => &s[..], - None => "Box<Any>", + None => "Box<dyn Any>", }, }; let thread = thread_info::current_thread(); |
