transparent enum diagnostic should suppress field count when >1 variant #68420
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
D-verbose
Diagnostics: Too much output caused by a single piece of incorrect code.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Consider this code:
When you try to compile this, you get two error diagnostics:
The first diagnostic is exactly describing the problem.
The second diagnostic is irrelevant, and arguably confusing (at least in my mental model of enums, the field count of one variant should be considered independently of the counts for all of the enum's other variants).
The text was updated successfully, but these errors were encountered: