rust-lang / rust-lang/rust

Document when references (both shared and exclusive) implement `RefUnwindSafe`

Open
#150,218 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-docs T-libs
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Location (URL)

https://doc.rust-lang.org/std/panic/trait.RefUnwindSafe.html

and

https://doc.rust-lang.org/std/primitive.reference.html

Summary

The prose of the Primitive Type reference page documents when various traits are implemented for references (both shared and exclusive). Notably it includes some auto traits, such as Send and Sync—but not others, such as Unpin, UnwindSafe or RefUnwindSafe.

Fortunately, the pages for those traits do document when they are implemented for reference types—except in the case of RefUnwindSafe! Indeed I cannot find it documented anywhere when RefUnwindSafe is implemented for &T or &mut T (I assume, in both cases, when T: RefUnwindSafe though I am not 100% certain).

At the very least, the RefUnwindSafe page should include the implementations for reference types.

Furthermore, for completeness, the prose of the Primitive Type reference page should probably include Unpin, UnwindSafe and RefUnwindSafe.

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

Start with the RefUnwindSafe and primitive reference documentation pages named in the issue, and compare their existing auto-trait prose with the relevant reference implementations. Verify the conditions for RefUnwindSafe on shared and exclusive references, then document them and add the missing Unpin, UnwindSafe, and RefUnwindSafe coverage to the primitive reference page. Done means both locations consistently explain these implementations.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.