-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsC-bugCategory: This is a bug.Category: This is a bug.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
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.
Metadata
Metadata
Assignees
Labels
A-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsC-bugCategory: This is a bug.Category: This is a bug.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.