-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Revert #85176 addition of clone_from
for ManuallyDrop
#85758
Revert #85176 addition of clone_from
for ManuallyDrop
#85758
Conversation
Forwarding `clone_from` to the inner value changes the observable behavior, as previously the inner value would *not* be dropped by the default implementation.
(rust-highfive has picked a reviewer for you, use r? to override) |
Could you add a test for this behaviour? |
Where sould a test for this go?
…On May 28, 2021 4:45:41 PM EDT, Simonas Kazlauskas ***@***.***> wrote:
Could you add a test for this behaviour?
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#85758 (comment)
|
ping from triage: @rustbot label: -S-waiting-on-review +S-waiting-on-author |
The test can be written as either an unit test inside the crate that defines this datatype or as a |
We should discuss this issue to decide what behaviour we want. I'll open an issue for it. Once that decision is made, we should add a test for that behaviour to make sure it stays that way. But for now let's merge and backport this to avoid breakage. Thanks! @bors r+ rollup |
📌 Commit 5b2076f has been approved by |
☀️ Test successful - checks-actions |
Note: not backporting to 1.53, as #85176 is a 1.54 PR, so 1.53 did not have the override to revert. |
…ulacrum [beta] Bootstrap from stable This is the follow up to master/beta promotion, as well as the first round of backports: * Revert "Allow specifying alignment for functions rust-lang#81234" * Revert rust-lang#85176 addition of clone_from for ManuallyDrop rust-lang#85758 * rustdoc: revert deref recur to resume inclusion of impl ExtTrait<Local> for ExtType rust-lang#84867 * [beta] Update cargo rust-lang#86563 r? `@Mark-Simulacrum`
Forwarding
clone_from
to the inner value changes the observable behavior, as previously the inner value would not be dropped by the default implementation.Frankly, this is a super-niche case, so #85176 is welcome to argue the behavior should be otherwise! But if we overrride it, IMO documenting the behavior would be good.
Example: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=c5d0856686fa850c1d7ee16891014efb