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
Copy file name to clipboardExpand all lines: tests/ui/loop-match/invalid.stderr
+26-2Lines changed: 26 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -86,6 +86,30 @@ error: match arms that are part of a `#[loop_match]` cannot have guards
86
86
LL | State::B if cond => break 'a,
87
87
| ^^^^
88
88
89
-
error: aborting due to 12 previous errors
89
+
error[E0004]: non-exhaustive patterns: `State::B` and `State::C` not covered
90
+
--> $DIR/invalid.rs:168:19
91
+
|
92
+
LL | match state {
93
+
| ^^^^^ patterns `State::B` and `State::C` not covered
94
+
|
95
+
note: `State` defined here
96
+
--> $DIR/invalid.rs:7:6
97
+
|
98
+
LL | enum State {
99
+
| ^^^^^
100
+
LL | A,
101
+
LL | B,
102
+
| - not covered
103
+
LL | C,
104
+
| - not covered
105
+
= note: the matched value is of type `State`
106
+
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
107
+
|
108
+
LL ~ State::A => State::B,
109
+
LL ~ State::B | State::C => todo!(),
110
+
|
111
+
112
+
error: aborting due to 13 previous errors
90
113
91
-
For more information about this error, try `rustc --explain E0308`.
114
+
Some errors have detailed explanations: E0004, E0308.
115
+
For more information about an error, try `rustc --explain E0004`.
0 commit comments