about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-07-12 03:43:34 +0200
committerGitHub <noreply@github.com>2024-07-12 03:43:34 +0200
commit58fe37f2c395a172ada84d8c792b63dc6cb5c3ec (patch)
treecfd90776998f2b12523e8c16c9e0b3719f710c2e /compiler/rustc_pattern_analysis/src
parent5e311f933d844b6922256a0c0aa49b86159534f5 (diff)
parent42772e98e0d1d3ca0f6660c697e881f5de4b392e (diff)
downloadrust-58fe37f2c395a172ada84d8c792b63dc6cb5c3ec.tar.gz
rust-58fe37f2c395a172ada84d8c792b63dc6cb5c3ec.zip
Rollup merge of #127164 - Nadrieril:clean-lowering-loop, r=matthewjasper
match lowering: Clarify the main loop of the algorithm

Now that we expand or-patterns in a single place in the algorithm, we can move it (back) to the main part of the loop. This makes the call-graph of the main loop rather simple: `match_candidates` has three branches that each call back to `match_candidates`. The remaining tricky part is `finalize_or_candidate`.

I also factored out the whole "process a prefix of the candidates then process the rest" thing which I think helps legibility.

The first two commits are a fix for an indexing mistake I introduced in https://github.com/rust-lang/rust/pull/126553, already sumitted in https://github.com/rust-lang/rust/pull/127028 but feel free to merge this first.

r? `@matthewjasper`
Diffstat (limited to 'compiler/rustc_pattern_analysis/src')
0 files changed, 0 insertions, 0 deletions