Skip to content

Commit

Permalink
Rollup merge of rust-lang#66330 - Nadrieril:nonexhaustive-constructor…
Browse files Browse the repository at this point in the history
…, r=varkor

Improve non-exhaustiveness handling in usefulness checking

The comments around code paths for the `non_exhaustive` feature mention stuff like "we act as if the type had an extra unmatcheable constructor". So I thought I'd make this explicit by defining a special constructor that does exactly this.
This makes those code paths a bit more legible and less prone to error.
  • Loading branch information
JohnTitor authored Nov 13, 2019
2 parents 1cbd34f + e398d89 commit 60ba5c7
Showing 1 changed file with 185 additions and 182 deletions.
Loading

0 comments on commit 60ba5c7

Please sign in to comment.