rust-lang / rust-lang/reference

Document panic-in-panic ("double panic") behavior

Open
#1,712 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-panic
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:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.