Skip to content
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

Exit arm scopes #62233

Merged
merged 2 commits into from
Jul 9, 2019
Merged

Exit arm scopes #62233

merged 2 commits into from
Jul 9, 2019

Conversation

matthewjasper
Copy link
Contributor

Due to a bug in the HIR CFG construction, borrows for arm scopes were incorrectly leaking into other arms.
This PR also includes some drive-by improvements to -Zunpretty=hir,identified that would have been helpful while investigating this.

Closes #62107

@rust-highfive
Copy link
Collaborator

r? @eddyb

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 29, 2019
@matthewjasper
Copy link
Contributor Author

r? @pnkfelix

@rust-highfive rust-highfive assigned pnkfelix and unassigned eddyb Jun 29, 2019
@bors
Copy link
Contributor

bors commented Jul 5, 2019

☔ The latest upstream changes (presumably #62099) made this pull request unmergeable. Please resolve the merge conflicts.

When a match evaluates to false we jump to the next arm, when we do so
we need to make sure that we exit the scope for that arm.
@pnkfelix
Copy link
Member

pnkfelix commented Jul 9, 2019

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jul 9, 2019

📌 Commit de5c6ec has been approved by pnkfelix

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 9, 2019
@bors
Copy link
Contributor

bors commented Jul 9, 2019

⌛ Testing commit de5c6ec with merge b8ec4c4...

bors added a commit that referenced this pull request Jul 9, 2019
Exit arm scopes

Due to a bug in the HIR CFG construction, borrows for arm scopes were incorrectly leaking into other arms.
This PR also includes some drive-by improvements to `-Zunpretty=hir,identified` that would have been helpful while investigating this.

Closes #62107
@bors
Copy link
Contributor

bors commented Jul 9, 2019

☀️ Test successful - checks-azure, checks-travis, status-appveyor
Approved by: pnkfelix
Pushing b8ec4c4 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 9, 2019
@bryanburgers-bot
Copy link

bryanburgers-bot commented Jul 9, 2019

☔ The latest upstream changes made this pull request unmergeable. Please resolve the merge conflicts.

Edit: Sorry, this was mistakenly posted.

@bors bors merged commit de5c6ec into rust-lang:master Jul 9, 2019
@rust-highfive
Copy link
Collaborator

📣 Toolstate changed by #62233!

Tested on commit b8ec4c4.
Direct link to PR: #62233

🎉 rls on linux: test-fail → test-pass (cc @Xanewok, @rust-lang/infra).

rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Jul 9, 2019
Tested on commit rust-lang/rust@b8ec4c4.
Direct link to PR: <rust-lang/rust#62233>

🎉 rls on linux: test-fail → test-pass (cc @Xanewok, @rust-lang/infra).
@matthewjasper matthewjasper deleted the exit-arm-scopes branch July 10, 2019 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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.

ICE with borrow checker in nightly
6 participants