-
Notifications
You must be signed in to change notification settings - Fork 13.3k
fix a comment in UnsafeCell::new #104002
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
fix a comment in UnsafeCell::new #104002
Conversation
(rustbot has picked a reviewer for you, use r? to override) |
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
Sounds sensible! |
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#103012 (Suggest use .. to fill in the rest of the fields of Struct) - rust-lang#103851 (Fix json flag in bootstrap doc) - rust-lang#103990 (rustdoc: clean up `.logo-container` layout CSS) - rust-lang#104002 (fix a comment in UnsafeCell::new) - rust-lang#104014 (Migrate test-arrow to CSS variables) - rust-lang#104016 (Add internal descriptions to a few queries) - rust-lang#104035 (Add 'closure match' test to weird-exprs.rs.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
There are several safe methods that access the inner value:
into_inner
has existed since forever andget_mut
also exists since recently. So this comment seems just wrong. But&self
methods return raw pointers and thus require unsafe code (though the methods themselves are still safe).