Closed
Description
fn foo(x: usize) -> u32 {
match x {
0 ..= usize::MAX => 0
}
}
fn main() {}
Gives:
error[E0004]: non-exhaustive patterns: `_` not covered
--> ...\test.rs:2:11
|
2 | match x {
| ^ pattern `_` not covered
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
= note: the matched value is of type `usize`