Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #71930 - Nadrieril:exhaustiveness-remove-tyerr, r=varkor
De-abuse TyKind::Error in exhaustiveness checking Replaces #71074. Context: #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
- Loading branch information