Repository navigation
fix immediate rvalues - #9902
Conversation
There was a problem hiding this comment.
Does this want the #[unsafe_no_drop_flag] back?
|
I can't see a way around doing this, but it seems like it was intended for this to be unnecessary. |
|
cc @metajack - this probably fixes the servo bug |
|
This makes me a bit nervous. I don't understand what you mean by "a reference cannot alter the value in a way the destructor will observe". The change to ensure zeroable memory was there for a reason, though -- I have to refresh my memory of the precise details. |
|
(Also, as an aside, I have a complete overhaul of the cleanup code bitrotting away on my branch for #3511 -- not that this should stop you from landing this patch) |
|
OK, I think I see what's going on now. The fix seems not unreasonable. r+ from me pending a better comment. |
|
This didn't end up fixing the actual issue with |
The code generation previously assumed a reference could not alter the value in a way the destructor would notice. This is an incorrect assumption for `&mut`, and is also incorrect for an `&` pointer to a non-`Freeze` type. Closes #7972
The code generation previously assumed a reference could not alter the value in a way the destructor would notice. This is an incorrect assumption for `&mut`, and is also incorrect for an `&` pointer to a non-`Freeze` type. Closes #7972
9902: minor: move functionality to a better place r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
The code generation previously assumed a reference could not alter the
value in a way the destructor would notice. This is an incorrect
assumption for
&mut, and is also incorrect for an&pointer to anon-
Freezetype.Closes #7972