-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Range bound error in match has bad error message when integer literal wraps #68972
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'd like to fix this @rustbot claim |
Triage: I'm going to release assignment due to inactivity. |
Explanation on how to solve this in #81903 (comment):
|
Detect out of bounds range pattern value Fix rust-lang#68972.
For a match where I'm matching on a
u8
, I put251..=256
on accident, and then rather than saying that 256 is out of range foru8
, it decided to wrap 256 to 0 and then error that 251 is lower than the end of the range:Clearly this is not a good situation.
The text was updated successfully, but these errors were encountered: