Skip to content

Commit 48efd89

Browse files
committedOct 3, 2023
Auto merge of #116391 - Nadrieril:constructorset, r=<try>
exhaustiveness: Rework constructor splitting `SplitWildcard` was pretty opaque. I replaced it with a more legible abstraction: `ConstructorSet` represents the set of constructors for patterns of a given type. This clarifies responsibilities: `ConstructorSet` handles one clear task, and diagnostic-related shenanigans can be done separately. I'm quite excited, I had has this in mind for years but could never quite introduce it. This opens up possibilities, including type-specific optimisations (like using a `FxHashSet` to collect enum variants, which had been [hackily attempted some years ago](#76918)), my one-pass rewrite (#116042), and future librarification.
2 parents e3c631b + fda0301 commit 48efd89

File tree

2 files changed

+645
-582
lines changed

2 files changed

+645
-582
lines changed
 

0 commit comments

Comments
 (0)