You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| ^^^^^^ patterns `..isize::MIN` and `isize::MAX..` not covered
21
21
|
22
22
= note: the matched value is of type `isize`
23
-
= note: `isize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
23
+
= note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
24
24
= help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `isize` matching
25
-
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
25
+
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
| ^^^^^^ patterns `..isize::MIN` and `isize::MAX..` not covered
21
21
|
22
22
= note: the matched value is of type `isize`
23
-
= note: `isize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
23
+
= note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
24
24
= help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `isize` matching
25
-
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
25
+
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
| ^^^^^^^^^^^^^^^^ patterns `(..isize::MIN, _)` and `(isize::MAX.., _)` not covered
36
36
|
37
37
= note: the matched value is of type `(isize, usize)`
38
-
= note: `isize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
38
+
= note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
39
39
= help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `isize` matching
40
-
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
40
+
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
= note: the matched value is of type `B<isize, usize>`
140
-
= note: `isize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
140
+
= note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
141
141
= help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `isize` matching
142
-
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
142
+
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
= note: `usize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
14
-
= help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching
15
-
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
13
+
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
error[E0004]: non-exhaustive patterns: `Color::Red` not covered
@@ -35,52 +33,54 @@ LL | Red,
35
33
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
36
34
|
37
35
LL ~ Color::Green => (),
38
-
LL + Color::Red => todo!()
36
+
LL ~ Color::Red => todo!(),
39
37
|
40
38
41
39
error[E0004]: non-exhaustive patterns: `Direction::East`, `Direction::South` and `Direction::West` not covered
42
-
--> $DIR/non-exhaustive-pattern-witness.rs:35:11
40
+
--> $DIR/non-exhaustive-pattern-witness.rs:38:11
43
41
|
44
42
LL | match Direction::North {
45
43
| ^^^^^^^^^^^^^^^^ patterns `Direction::East`, `Direction::South` and `Direction::West` not covered
46
44
|
47
45
note: `Direction` defined here
48
-
--> $DIR/non-exhaustive-pattern-witness.rs:31:12
46
+
--> $DIR/non-exhaustive-pattern-witness.rs:32:5
49
47
|
50
48
LL | enum Direction {
51
49
| ---------
52
-
LL | North, East, South, West
53
-
| ^^^^ ^^^^^ ^^^^ not covered
54
-
| | |
55
-
| | not covered
56
-
| not covered
50
+
LL | North,
51
+
LL | East,
52
+
| ^^^^ not covered
53
+
LL | South,
54
+
| ^^^^^ not covered
55
+
LL | West,
56
+
| ^^^^ not covered
57
57
= note: the matched value is of type `Direction`
58
58
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
Copy file name to clipboardExpand all lines: tests/ui/pattern/usefulness/tuple-struct-nonexhaustive.stderr
+4-6
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,19 @@
1
-
error[E0004]: non-exhaustive patterns: `Foo(_, _)` not covered
1
+
error[E0004]: non-exhaustive patterns: `Foo(..=0_isize, _)` and `Foo(3_isize.., _)` not covered
2
2
--> $DIR/tuple-struct-nonexhaustive.rs:5:11
3
3
|
4
4
LL | match x {
5
-
| ^ pattern `Foo(_, _)` not covered
5
+
| ^ patterns `Foo(..=0_isize, _)` and `Foo(3_isize.., _)` not covered
6
6
|
7
7
note: `Foo` defined here
8
8
--> $DIR/tuple-struct-nonexhaustive.rs:1:8
9
9
|
10
10
LL | struct Foo(isize, isize);
11
11
| ^^^
12
12
= note: the matched value is of type `Foo`
13
-
= note: `isize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
14
-
= help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `isize` matching
15
-
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
13
+
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
0 commit comments