Uh oh!
There was an error while loading. Please reload this page.
Add ManuallyDrop::take - #55421
Conversation
rust-highfive
commented
Oct 27, 2018
r? @kennytm (rust_highfive has picked a reviewer for you, use r? to override) |
CAD97
commented
Oct 27, 2018
Tracking issue currently points to this PR, that will need to be updated if this is accepted to be merged. cc @scottmcm |
rust-highfive
commented
Oct 27, 2018
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
rust-highfive
commented
Oct 27, 2018
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
scottmcm
commented
Oct 28, 2018
Thanks for the ccs, but I don't have anything to add 😅 Seems logical to me. |
kennytm
commented
Oct 28, 2018
r=me after squashing everything down to 1 commit. cc @rust-lang/libs and @rust-lang/wg-unsafe-code-guidelines in case there's any problems caused by this function. |
CAD97
commented
Oct 28, 2018
Squashed. |
kennytm
commented
Oct 28, 2018
@bors r+ rollup |
bors
commented
Oct 28, 2018
📌 Commit 0757c0f has been approved by |
Add ManuallyDrop::take Tracking issue: rust-lang#55422 Proposed in this form in https://internals.rust-lang.org/t/mini-rfc-manuallydrop-take/8679, see that thread for some history. A small convenience wrapper for `ManuallyDrop` that makes a pattern (taking ownership of the contained data in drop) more obvious.
Rollup of 11 pull requests Successful merges: - #55148 (Implement FromStr for PathBuf) - #55185 (path suggestions in Rust 2018 should point out the change in semantics) - #55191 (Fix sub-variant doc display) - #55199 (Impl items have generics) - #55244 (Don't rerun MIR passes when inlining) - #55252 (Add MaybeUninit::new) - #55257 (Allow extern statics with an extern type) - #55389 (Remove unnecessary mut in iterator.find_map documentation example, R…) - #55406 (Update string.rs) - #55412 (Fix an ICE in the min_const_fn analysis) - #55421 (Add ManuallyDrop::take)
SimonSapin
commented
Oct 28, 2018
I expected the definition to be |
scottmcm
commented
Nov 1, 2018
@SimonSapin I think it ended up this way because the code snippit on IRLO that became this was written as an external function. The alternative implementation sounds good too. |
Tracking issue: #55422
Proposed in this form in https://internals.rust-lang.org/t/mini-rfc-manuallydrop-take/8679,
see that thread for some history.
A small convenience wrapper for
ManuallyDropthat makes a pattern (taking ownership of the contained data in drop) more obvious.