Skip to content

core::panicking module docs are outdated #66689

Closed
@RalfJung

Description

@RalfJung

The module docs at the top of https://github.com/rust-lang/rust/blob/e41ced3f8d8e2f3f377ef931458e612d5f3d1f3f/src/libcore/panicking.rs seem outdated: they mention fn panic_impl(fmt: fmt::Arguments, file_line_col: &(&'static str, u32, u32)) -> ! as the signature for the panic_impl, but the actual signature at the bottom of the same file is fn panic_impl(pi: &PanicInfo<'_>) -> !.

The comment also says that it does not allow failing with a Box<Any> value, but PanicInfo contains something very similar, a &'a (dyn Any + Send).

I would send a PR adjusting the signature, but the second makes be belief someone with some actual knowledge of our panicking infrastructure should look at this.

Cc @alexcrichton

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsC-bugCategory: This is a bug.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