Skip to content

Conversation

LeSeulArtichaut
Copy link
Contributor

Currently, each candidate for a match arm uses separate locals for the bindings in the if-let guard, causing problems (#88015) when those branches converge in the arm body.

Fixes #88015 (🤞)

@rustbot
Copy link
Collaborator

rustbot commented Nov 21, 2022

r? @cjgillot

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

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 21, 2022
@cjgillot
Copy link
Contributor

Ugh, the code in that file really deserves a refactor, but probably for another PR.
In the mean time: @bors r+

@bors
Copy link
Collaborator

bors commented Nov 21, 2022

📌 Commit baa59d1 has been approved by cjgillot

It is now in the queue for this repository.

@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 Nov 21, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 22, 2022
Rollup of 6 pull requests

Successful merges:

 - rust-lang#104295 (Check generics parity before collecting return-position `impl Trait`s in trait)
 - rust-lang#104464 (Reduce exceptions overallocation on non Windows x86_64)
 - rust-lang#104615 (Create def_id for async fns during lowering)
 - rust-lang#104669 (Only declare bindings for if-let guards once per arm)
 - rust-lang#104701 (Remove a lifetime resolution hack from `compare_predicate_entailment`)
 - rust-lang#104710 (disable strict-provenance-violating doctests in Miri)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit d29491a into rust-lang:master Nov 22, 2022
@rustbot rustbot added this to the 1.67.0 milestone Nov 22, 2022
@LeSeulArtichaut LeSeulArtichaut deleted the 88015-if-let-guard-bindings branch November 22, 2022 18:15
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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Locals aren't introduced properly in if-let guards on or-patterns
4 participants