rust-lang / rust-lang/rust

UnsafePinned should provide the same guarantee layouts as UnsafeCell

Open Beginner friendly
#156,163 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

As discussed with @RalfJung here, it seems like the documentation for UnsafePinned<T> should guarantee the same layout as T, like UnsafeCell does.

I didn't mention it in that comment, but I think this also makes sense given that the documentation says that UnsafePinned is intended to subsume UnsafeCell.

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 UnsafePinned documentation linked in the issue and compare its layout guarantees with the UnsafeCell documentation. Update the UnsafePinned documentation so it explicitly provides the same guarantee as T, then verify that the resulting wording matches the intended relationship between the two types.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
70/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.