rust/compiler/rustc_mir_build
bors 6df1d82869 Auto merge of #88950 - Nadrieril:deconstruct-pat, r=oli-obk
Add an intermediate representation to exhaustiveness checking

The exhaustiveness checking algorithm keeps deconstructing patterns into a `Constructor` and some `Fields`, but does so a bit all over the place. This PR introduces a new representation for patterns that already has that information, so we only compute it once at the start.
I find this makes code easier to follow. In particular `DeconstructedPat::specialize` is a lot simpler than what happened before, and more closely matches the description of the algorithm. I'm also hoping this could help for the project of librarifying exhaustiveness for rust_analyzer since it decouples the algorithm from `rustc_middle::Pat`.
2021-09-29 00:16:17 +00:00
..
src Auto merge of #88950 - Nadrieril:deconstruct-pat, r=oli-obk 2021-09-29 00:16:17 +00:00
Cargo.toml Migrate to 2021 2021-09-20 22:21:42 -04:00