Diagnostics emitted for disallowed exhaustive matches on types that contain a usize
lack information about why the match cannot be considered exhaustive
#85222
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-exhaustiveness-checking
Relating to exhaustiveness / usefulness checking of patterns
A-patterns
Relating to patterns and pattern matching
D-terse
Diagnostics: An error or lint that doesn't give enough information about the problem at hand.
E-mentor
Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Sorry about the long title 😅
Given the following code (playground):
The current output is:
Note how the first diagnostic, emitted when matching on a
usize
, contains additional information about why this exhaustive match does not pass the exhaustiveness check. Ideally, this information should be added to the second diagnostic as well:@rustbot modify labels: +A-exhaustiveness-checking +A-patterns +D-terse
The text was updated successfully, but these errors were encountered: