Skip to content

Commit 9310e3b

Browse files
committed
Auto merge of rust-lang#71930 - Nadrieril:exhaustiveness-remove-tyerr, r=varkor
De-abuse TyKind::Error in exhaustiveness checking Replaces rust-lang#71074. Context: rust-lang#70866. In order to remove the use of `TyKind::Error`, I had to make sure we skip over those fields whose inhabitedness should not be observed. This is potentially error-prone however, since we must be careful not to mix filtered and unfiltered lists of patterns. I managed to hide away most of the filtering behind a new `Fields` struct, that I used everywhere relevant. I quite like the result; I think the twin concepts of `Constructor` and `Fields` make a good mental model. As usual, I tried to separate commits that shuffle code around from commits that require more thought to review. cc @varkor @Centril
2 parents 148c125 + d7e1d5f commit 9310e3b

File tree

4 files changed

+427
-260
lines changed

4 files changed

+427
-260
lines changed

0 commit comments

Comments
 (0)