rust/tests/ui/pattern/usefulness/integer-ranges/precise_pointer_matching-message.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
1.4 KiB
Plaintext
Raw Normal View History

2023-10-12 22:20:06 +00:00
error[E0004]: non-exhaustive patterns: `usize::MAX..` not covered
2020-11-20 19:03:56 +00:00
--> $DIR/precise_pointer_matching-message.rs:3:11
|
LL | match 0usize {
2023-10-12 22:20:06 +00:00
| ^^^^^^ pattern `usize::MAX..` not covered
|
= note: the matched value is of type `usize`
2023-10-12 22:20:06 +00:00
= 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
|
2023-02-27 17:43:39 +00:00
LL ~ 0..=usize::MAX => {},
2023-10-12 22:20:06 +00:00
LL + usize::MAX.. => todo!()
|
2023-10-12 22:20:06 +00:00
error[E0004]: non-exhaustive patterns: `..isize::MIN` and `isize::MAX..` not covered
2020-11-20 19:03:56 +00:00
--> $DIR/precise_pointer_matching-message.rs:11:11
|
LL | match 0isize {
2023-10-12 22:20:06 +00:00
| ^^^^^^ patterns `..isize::MIN` and `isize::MAX..` not covered
|
= note: the matched value is of type `isize`
2023-10-12 22:20:06 +00:00
= 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
|
2023-02-27 17:43:39 +00:00
LL ~ isize::MIN..=isize::MAX => {},
2023-10-12 22:20:06 +00:00
LL + ..isize::MIN | isize::MAX.. => todo!()
|
2020-11-20 19:03:56 +00:00
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0004`.