Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #122046 - Nadrieril:integrate-or-pats2, r=matthewjasper
Browse files Browse the repository at this point in the history
match lowering: handle or-patterns one layer at a time

`create_or_subcandidates` and `merge_trivial_subcandidates` both call themselves recursively to handle nested or-patterns, which is hard to follow. In this PR I avoid the need for that; we now process a single "layer" of or-patterns at a time.

By calling back into `match_candidates`, we only need to expand one layer at a time. Conversely, since we always try to simplify a layer that we just expanded (thanks to rust-lang/rust#123067), we only have to merge one layer at a time.

r? `@matthewjasper`
bors committed Apr 1, 2024
2 parents 55be64c + b622f52 commit fb8d669
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit fb8d669

Please sign in to comment.