-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Rename ManuallyDrop::take to read #62198
Conversation
r? @dtolnay (rust_highfive has picked a reviewer for you, use r? to override) |
r? @SimonSapin |
cc @RalfJung |
This is more consistent with |
It's surprising to me that a method called |
It doesn't actually mutate the container, just like I only used The other option where we use |
Good point, now I wonder if |
Relevant note: this method has just been mentioned in a blog post as |
The link seems to be broken? |
@RalfJung fixed (missing http:// messed up GitHub's URL parser) |
I'm sure @pnkfelix could change that if need be when we decide. :) |
ping from triage @SimonSapin any updates on this? |
Per #55422 (comment), I'm happy to remove the rename if we can agree |
Ping from triage. @SimonSapin any updates on this? Thanks. |
can anyone from @rust-lang/libs review this? |
…ark-Simulacrum Stabilize ManuallyDrop::take Tracking issue: closes #55422 FCP merge: #55422 (comment) Reclaims the doc improvements from closed #62198. ----- Stable version is a simple change if necessary. Proposal: [relnotes] (this changes how to best take advantage of `ManuallyDrop`, esp. wrt. `Drop::drop` and finalize-by-value members)
Tracking issue: #55422
Renames
ManuallyDrop::take
to matchptr::read
andMaybeUninit::read
, and updates the documentation to more mirrorMaybeUninit::read
's documentation.