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:
Yuki Okushi 2021-06-08 13:26:31 +09:00 committed by GitHub
commit b7d05f8165
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -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();

View File

@ -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)]

View File

@ -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)]