Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve UnsafeCell docs #82372

Merged
merged 1 commit into from
Feb 22, 2021
Merged

improve UnsafeCell docs #82372

merged 1 commit into from
Feb 22, 2021

Conversation

RalfJung
Copy link
Member

Sometimes questions like this come up because the UnsafeCell docs say "it's the only legal way to obtain aliasable data that is considered mutable". That is not entirely correct, since raw pointers also provide that option. So I propose we focus the docs on the interaction of UnsafeCell and shared references specifically, which is really where they are needed.

@rust-highfive
Copy link
Collaborator

r? @KodrAus

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 21, 2021
Copy link
Contributor

@danielhenrymantilla danielhenrymantilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I like the new phrasing 🙂

@KodrAus
Copy link
Contributor

KodrAus commented Feb 21, 2021

This looks like a great improvement thanks @RalfJung!

@bors r+

@bors
Copy link
Contributor

bors commented Feb 21, 2021

📌 Commit 1260883 has been approved by KodrAus

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 21, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 22, 2021
Rollup of 9 pull requests

Successful merges:

 - rust-lang#82098 (Add internal `collect_into_array[_unchecked]` to remove duplicate code)
 - rust-lang#82228 (Provide NonZero_c_* integers)
 - rust-lang#82287 (Make "missing field" error message more natural)
 - rust-lang#82351 (Use the first paragraph, instead of cookie-cutter text, for rustdoc descriptions)
 - rust-lang#82353 (rustdoc: Remove unnecessary `Cell` around `param_env`)
 - rust-lang#82367 (remove redundant option/result wrapping of return values)
 - rust-lang#82372 (improve UnsafeCell docs)
 - rust-lang#82379 (Fix sizes of repr(C) enums on hexagon)
 - rust-lang#82382 (rustdoc: Remove `fake_def_ids` RefCell)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 7958166 into rust-lang:master Feb 22, 2021
@rustbot rustbot added this to the 1.52.0 milestone Feb 22, 2021
@RalfJung RalfJung deleted the unsafe-cell branch February 27, 2021 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants