rust-lang / rust-lang/reference
Document panic-in-panic ("double panic") behavior
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.6k
- Forks
- 607
- PR merge metrics
- PR metrics pending
Description
I can't find any documentation about double panic behavior (other than https://doc.rust-lang.org/std/ops/trait.Drop.html#panics, which currently just says "will likely abort the program"). There are some subtleties about this, because some handlers will cause a hang (see https://github.com/rust-lang/rust/issues/97146).
I'm not sure exactly where or how to document this. Some thoughts:
- Would be good to add to the new panic chapter in https://github.com/rust-lang/reference/pull/1226
- Might be good to include a note for
panic_handlerattribute - See also https://github.com/rust-lang/reference/issues/348 which is essentially the same thing. It might be good to include a note in https://doc.rust-lang.org/nightly/reference/destructors.html for that one.
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
Review the proposed panic chapter in reference PR 1226, the panic_handler attribute section, and the destructors section, then compare related issues 97146 and 348. Decide where the double-panic behavior belongs and document the relevant abort or hang cases; done means the Reference clearly covers the behavior in the appropriate sections.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100