Rollup merge of #86074 - reaganmcf:iss-86039, r=jyn514
Default panic message should print Box<dyn Any> Closes #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 😄
This commit is contained in:
commit
b7d05f8165
@ -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();
|
||||
|
@ -1,5 +1,5 @@
|
||||
// run-fail
|
||||
// error-pattern:panicked at 'Box<Any>'
|
||||
// error-pattern:panicked at 'Box<dyn Any>'
|
||||
// ignore-emscripten no processes
|
||||
|
||||
#![allow(non_fmt_panic)]
|
||||
|
@ -1,5 +1,5 @@
|
||||
// run-fail
|
||||
// error-pattern:panicked at 'Box<Any>'
|
||||
// error-pattern:panicked at 'Box<dyn Any>'
|
||||
// ignore-emscripten no processes
|
||||
|
||||
#![feature(box_syntax)]
|
||||
|
Loading…
x
Reference in New Issue
Block a user