-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
For box expressions, use NZ drop instead of a free block #43772
Conversation
This falls naturally out of making drop elaboration work with `box` expressions, which is probably required for sane MIR borrow-checking. This is a pure refactoring with no intentional functional effects.
@@ -805,9 +726,8 @@ fn build_scope_drops<'tcx>(cfg: &mut CFG<'tcx>, | |||
block.unit() | |||
} | |||
|
|||
fn build_diverge_scope<'a, 'gcx, 'tcx>(tcx: TyCtxt<'a, 'gcx, 'tcx>, | |||
fn build_diverge_scope<'a, 'gcx, 'tcx>(_tcx: TyCtxt<'a, 'gcx, 'tcx>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would go ahead and remove this parameter.
@bors r+ Feel free to bors r=nagisa if you fix the nit yourself. |
📌 Commit 17d2bcd has been approved by |
For box expressions, use NZ drop instead of a free block This falls naturally out of making drop elaboration work with `box` expressions, which is probably required for sane MIR borrow-checking. This is a pure refactoring with no intentional functional effects. r? @nagisa
☀️ Test successful - status-appveyor, status-travis |
I think this caused
Is this intended? |
No. |
I think the difference is that we started emitting StorageDead, rather than stopping emitting StorageLive. |
emit StorageLive for box temporaries We started emitting StorageDead, so we better emit the corrseponding StorageLive to avoid problems. cc #43772 rust-lang/miri#303
refactor(mir): remove unused argument Small cleanup that shouldn't have any impact, as it's a small thing introduced in rust-lang#43772
This falls naturally out of making drop elaboration work with
box
expressions, which is probably required for sane MIR borrow-checking.
This is a pure refactoring with no intentional functional effects.
r? @nagisa