Skip to content

Default panic message prints the type Box<dyn Any> as Box<Any>  #86039

Closed
@steffahn

Description

@steffahn
use std::panic::panic_any;
fn main() {
    panic_any(42);
}
   Compiling playground v0.0.1 (/playground)
    Finished dev [unoptimized + debuginfo] target(s) in 1.48s
     Running `target/debug/playground`
thread 'main' panicked at 'Box<Any>', src/main.rs:3:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

(playground)

I would’ve expected it to say

thread 'main' panicked at 'Box<dyn Any>', src/main.rs:3:5

Relevant point in std seems to be here.

@rustbot label C-enhancement, T-libs

Metadata

Metadata

Assignees

Labels

A-error-handlingArea: Error handlingC-enhancementCategory: An issue proposing an enhancement or a PR with one.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions