rust/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.deny.stderr

163 lines
8.1 KiB
Plaintext

error[E0004]: non-exhaustive patterns: `usize::MAX..` not covered
--> $DIR/pointer-sized-int.rs:12:11
|
LL | match 0usize {
| ^^^^^^ pattern `usize::MAX..` not covered
|
= note: the matched value is of type `usize`
= note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
LL ~ 0..=usize::MAX => {},
LL + usize::MAX.. => todo!()
|
error[E0004]: non-exhaustive patterns: `..isize::MIN` and `isize::MAX..` not covered
--> $DIR/pointer-sized-int.rs:17:11
|
LL | match 0isize {
| ^^^^^^ patterns `..isize::MIN` and `isize::MAX..` not covered
|
= note: the matched value is of type `isize`
= note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
|
LL ~ isize::MIN..=isize::MAX => {},
LL + ..isize::MIN | isize::MAX.. => todo!()
|
error[E0004]: non-exhaustive patterns: `usize::MAX..` not covered
--> $DIR/pointer-sized-int.rs:22:8
|
LL | m!(0usize, 0..=usize::MAX);
| ^^^^^^ pattern `usize::MAX..` not covered
|
= note: the matched value is of type `usize`
= note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
LL | match $s { $($t)+ => {}, usize::MAX.. => todo!() }
| +++++++++++++++++++++++++
error[E0004]: non-exhaustive patterns: `usize::MAX..` not covered
--> $DIR/pointer-sized-int.rs:24:8
|
LL | m!(0usize, 0..5 | 5..=usize::MAX);
| ^^^^^^ pattern `usize::MAX..` not covered
|
= note: the matched value is of type `usize`
= note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
LL | match $s { $($t)+ => {}, usize::MAX.. => todo!() }
| +++++++++++++++++++++++++
error[E0004]: non-exhaustive patterns: `usize::MAX..` not covered
--> $DIR/pointer-sized-int.rs:26:8
|
LL | m!(0usize, 0..usize::MAX | usize::MAX);
| ^^^^^^ pattern `usize::MAX..` not covered
|
= note: the matched value is of type `usize`
= note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
LL | match $s { $($t)+ => {}, usize::MAX.. => todo!() }
| +++++++++++++++++++++++++
error[E0004]: non-exhaustive patterns: `(usize::MAX.., _)` not covered
--> $DIR/pointer-sized-int.rs:28:8
|
LL | m!((0usize, true), (0..5, true) | (5..=usize::MAX, true) | (0..=usize::MAX, false));
| ^^^^^^^^^^^^^^ pattern `(usize::MAX.., _)` not covered
|
= note: the matched value is of type `(usize, bool)`
= note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
LL | match $s { $($t)+ => {}, (usize::MAX.., _) => todo!() }
| ++++++++++++++++++++++++++++++
error[E0004]: non-exhaustive patterns: `..isize::MIN` and `isize::MAX..` not covered
--> $DIR/pointer-sized-int.rs:37:8
|
LL | m!(0isize, isize::MIN..=isize::MAX);
| ^^^^^^ patterns `..isize::MIN` and `isize::MAX..` not covered
|
= note: the matched value is of type `isize`
= note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
|
LL | match $s { $($t)+ => {}, ..isize::MIN | isize::MAX.. => todo!() }
| ++++++++++++++++++++++++++++++++++++++++
error[E0004]: non-exhaustive patterns: `..isize::MIN` and `isize::MAX..` not covered
--> $DIR/pointer-sized-int.rs:39:8
|
LL | m!(0isize, isize::MIN..5 | 5..=isize::MAX);
| ^^^^^^ patterns `..isize::MIN` and `isize::MAX..` not covered
|
= note: the matched value is of type `isize`
= note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
|
LL | match $s { $($t)+ => {}, ..isize::MIN | isize::MAX.. => todo!() }
| ++++++++++++++++++++++++++++++++++++++++
error[E0004]: non-exhaustive patterns: `..isize::MIN` and `isize::MAX..` not covered
--> $DIR/pointer-sized-int.rs:41:8
|
LL | m!(0isize, isize::MIN..=-1 | 0 | 1..=isize::MAX);
| ^^^^^^ patterns `..isize::MIN` and `isize::MAX..` not covered
|
= note: the matched value is of type `isize`
= note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
|
LL | match $s { $($t)+ => {}, ..isize::MIN | isize::MAX.. => todo!() }
| ++++++++++++++++++++++++++++++++++++++++
error[E0004]: non-exhaustive patterns: `..isize::MIN` and `isize::MAX..` not covered
--> $DIR/pointer-sized-int.rs:43:8
|
LL | m!(0isize, isize::MIN..isize::MAX | isize::MAX);
| ^^^^^^ patterns `..isize::MIN` and `isize::MAX..` not covered
|
= note: the matched value is of type `isize`
= note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
|
LL | match $s { $($t)+ => {}, ..isize::MIN | isize::MAX.. => todo!() }
| ++++++++++++++++++++++++++++++++++++++++
error[E0004]: non-exhaustive patterns: `(..isize::MIN, _)` and `(isize::MAX.., _)` not covered
--> $DIR/pointer-sized-int.rs:46:9
|
LL | (0isize, true),
| ^^^^^^^^^^^^^^ patterns `(..isize::MIN, _)` and `(isize::MAX.., _)` not covered
|
= note: the matched value is of type `(isize, bool)`
= note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
|
LL | match $s { $($t)+ => {}, (..isize::MIN, _) | (isize::MAX.., _) => todo!() }
| ++++++++++++++++++++++++++++++++++++++++++++++++++
error[E0004]: non-exhaustive patterns: type `usize` is non-empty
--> $DIR/pointer-sized-int.rs:57:11
|
LL | match 7usize {}
| ^^^^^^
|
= note: the matched value is of type `usize`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
|
LL ~ match 7usize {
LL + _ => todo!(),
LL + }
|
error: aborting due to 12 previous errors
For more information about this error, try `rustc --explain E0004`.