`core::panic::PanicInfo`'s `location` method show incorrect usage with `std::panic::set_hook`, even though that functionality has been split
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Location
https://doc.rust-lang.org/beta/core/panic/struct.PanicInfo.html#method.location
https://github.com/rust-lang/rust/blob/9bad7ba324099d124c77c5b06aebf68e11763f7b/library/core/src/panic/panic_info.rs#L65-L95
Summary
since #115974 the PanicInfo and PanicHookInfo structs have been split up, but the docs for PanicInfo still show how to use it with a panic hook, even though it is now exclusively for the #[panic_handler] and the panic hook functionality has been moved into PanicHookInfo
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the documentation around the location method in library/core/src/panic/panic_info.rs at the referenced lines. Update the example so panic-hook usage refers to PanicHookInfo rather than PanicInfo, then verify the rendered documentation no longer shows the outdated usage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 65/100