We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When I try to compile this code:
fn main() { let t: u8 = 3; match t { 0x00...0x100 => (), } }
I got the following error:
src/main.rs:36:5: 38:6 error: non-exhaustive patterns: `_` not covered [E0004] src/main.rs:36 match t { src/main.rs:37 0x00...0x100 => (), src/main.rs:38 }
while 0x00 to 0x100 covers all possible values for a u8. Why is that?
0x00
0x100
u8
The text was updated successfully, but these errors were encountered:
This is just not implemented. Last time this was brought up, it was closed in favor of an RFC.
(0x100 is too large for u8 by the way - you want 0xff since ... is inclusive)
0xff
...
Sorry, something went wrong.
Yes, this is a duplicate of #12483, and would require an RFC.
No branches or pull requests
When I try to compile this code:
I got the following error:
while
0x00
to0x100
covers all possible values for au8
.Why is that?
The text was updated successfully, but these errors were encountered: