Auto merge of #120904 - Nadrieril:match-lowering-intermediate-repr, r=matthewjasper

match lowering: eagerly simplify match pairs

This removes one important complication from match lowering. Before this, match pair simplification (which includes collecting bindings and type ascriptions) was intertwined with the whole match lowering algorithm.

I'm avoiding this by storing in each `MatchPair` the sub-`MatchPair`s that correspond to its subfields. This makes it possible to simplify everything (except or-patterns) in `Candidate::new()`.

This should open up further simplifications. It will also give us proper control over the order of bindings.

r? `@matthewjasper`
This commit is contained in:
bors 2024-02-21 01:11:34 +00:00
commit bf7ef98d43

Diff content is not available