unhelpful error when match pattern upper bound literal is converted to less than lower bound #38634
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
This triggers error E0030, and the error message states that the lower bound is larger than the upper bound, presumably because 256 is converted to 0u8. The overflowing_literals warning could have hinted at the real issue, but the error takes precedence and the root cause is thus not highlighted.
The text was updated successfully, but these errors were encountered: