Skip to content

Fix a few bugs in drop generation #45359

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

Merged
merged 3 commits into from
Oct 20, 2017
Merged

Conversation

arielb1
Copy link
Contributor

@arielb1 arielb1 commented Oct 18, 2017

This fixes a few bugs in drop generation, one of which causes spurious MIR borrowck errors.

Fixes #44832.

r? @eddyb

The previous code would leak data on a drop panic if the immediate next
drop was a StorageDead that was followed by another drop.
Improves rust-lang#44832

borrowck-overloaded-index-move-index.rs - fixed
borrowck-multiple-captures.rs - still ICE
borrowck-issue-2657-1.rs - fixed
borrowck-loan-blocks-move.rs - fixed
borrowck-move-from-subpath-of-borrowed-path.rs - fixed
borrowck-mut-borrow-linear-errors.rs - still ICE
borrowck-no-cycle-in-exchange-heap.rs - fixed
borrowck-unary-move.rs - fixed
borrowck-loan-blocks-move-cc.rs - fixed
borrowck-vec-pattern-element-loan.rs - still broken
@eddyb
Copy link
Member

eddyb commented Oct 18, 2017

@bors r+

@bors
Copy link
Collaborator

bors commented Oct 18, 2017

📌 Commit 0caba17 has been approved by eddyb

@kennytm kennytm added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Oct 18, 2017
@arielb1
Copy link
Contributor Author

arielb1 commented Oct 18, 2017

Please don't roll this up - this PR changes translation and I would like to keep bisectability.

@bors
Copy link
Collaborator

bors commented Oct 20, 2017

⌛ Testing commit 0caba17 with merge 87a8e8e...

bors added a commit that referenced this pull request Oct 20, 2017
Fix a few bugs in drop generation

This fixes a few bugs in drop generation, one of which causes spurious MIR borrowck errors.

Fixes #44832.

r? @eddyb
@bors
Copy link
Collaborator

bors commented Oct 20, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: eddyb
Pushing 87a8e8e to master...

@bors bors merged commit 0caba17 into rust-lang:master Oct 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MIR-borrowck: identify cause of (and fix) extra "move out"/"assign to" errors signalled by mir-borrowck
5 participants