}
// An incomplete set of values.
- match x { //~ ERROR non-exhaustive patterns: `128u8...255u8` not covered
+ match x { //~ ERROR non-exhaustive patterns
0 .. 128 => {}
}
-128 ..= 127 => {} // ok
}
+ match 0i8 { //~ ERROR non-exhaustive patterns
+ -127 ..= 127 => {}
+ }
+
match 0i16 {
i16::MIN ..= i16::MAX => {} // ok
}
+ match 0i16 { //~ ERROR non-exhaustive patterns
+ i16::MIN ..= -1 => {}
+ 1 ..= i16::MAX => {}
+ }
+
match 0i32 {
i32::MIN ..= i32::MAX => {} // ok
}
error[E0004]: non-exhaustive patterns: `128u8...255u8` not covered
--> $DIR/exhaustive_integer_patterns.rs:37:11
|
-LL | match x { //~ ERROR non-exhaustive patterns: `128u8...255u8` not covered
+LL | match x { //~ ERROR non-exhaustive patterns
| ^ pattern `128u8...255u8` not covered
error[E0004]: non-exhaustive patterns: `11u8...19u8`, `31u8...34u8`, `36u8...69u8` and 1 more not covered
LL | match x { //~ ERROR non-exhaustive patterns
| ^ patterns `-128i8...-6i8` and `122i8...127i8` not covered
-error: aborting due to 5 previous errors
+error[E0004]: non-exhaustive patterns: `-128i8` not covered
+ --> $DIR/exhaustive_integer_patterns.rs:99:11
+ |
+LL | match 0i8 { //~ ERROR non-exhaustive patterns
+ | ^^^ pattern `-128i8` not covered
+
+error[E0004]: non-exhaustive patterns: `0i16` not covered
+ --> $DIR/exhaustive_integer_patterns.rs:107:11
+ |
+LL | match 0i16 { //~ ERROR non-exhaustive patterns
+ | ^^^^ pattern `0i16` not covered
+
+error: aborting due to 7 previous errors
For more information about this error, try `rustc --explain E0004`.