Skip to content

Commit 25d37d2

Browse files
authored
Rollup merge of rust-lang#86074 - reaganmcf:iss-86039, r=jyn514
Default panic message should print Box<dyn Any> Closes rust-lang#86039 Prior to this patch, the panic message from running the following code would be `thread 'main' panicked at 'Box<Any>'...` ```rust use std::panic::panic_any; fn main() { panic_any(42); } ``` This patch updates the phrasing to be more consistent. It now instead shows the following panic message: ``` thread 'main' panicked at 'Box<dyn Any>', ... ``` It's a very small fix 😄
2 parents 52a4709 + 38eb7ac commit 25d37d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

std/src/panicking.rs

Lines changed: 1 addition & 1 deletion
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)