Closed
Description
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?
Metadata
Metadata
Assignees
Labels
No labels