-
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
Exit arm scopes #62233
Exit arm scopes #62233
Conversation
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
r? @pnkfelix |
☔ 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.
9f1ed45
to
de5c6ec
Compare
@bors r+ rollup |
📌 Commit de5c6ec has been approved by |
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
☀️ Test successful - checks-azure, checks-travis, status-appveyor |
☔ The latest upstream changes made this pull request unmergeable. Please resolve the merge conflicts. Edit: Sorry, this was mistakenly posted. |
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).
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