-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlT-langRelevant to the language teamRelevant to the language team
Milestone
Description
Before #107844, assignments of Drop
types were modeled using replaced the DropAndReplace
MIR terminator. That PR changed the behaviour to use a plain Drop
followed by a plain Assign
.
This made more code compile, for instance (#107844 (comment)):
struct Foo<'a> {
v: &'a mut (),
}
impl Drop for Foo<'_> {
fn drop(&mut self) {}
}
fn bar() {
let mut v = ();
let mut x = Foo { v: &mut v };
drop(x);
x = Foo { v: &mut v };
}
Steps:
- List the changes in behaviour;
- Propose to t-lang to ratify them.
Metadata
Metadata
Assignees
Labels
A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlT-langRelevant to the language teamRelevant to the language team