]>
Commit | Line | Data |
---|---|---|
60c5eb7d XL |
1 | error[E0004]: non-exhaustive patterns: `_` not covered |
2 | --> $DIR/match-empty.rs:45:18 | |
3 | | | |
4 | LL | enum Foo {} | |
5 | | ----------- `Foo` defined here | |
6 | ... | |
7 | LL | match_false!(x); // Not detected as unreachable nor exhaustive. | |
8 | | ^ pattern `_` not covered | |
9 | | | |
10 | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms | |
ba9703b0 | 11 | = note: the matched value is of type `Foo` |
60c5eb7d XL |
12 | |
13 | error[E0004]: non-exhaustive patterns: type `u8` is non-empty | |
14 | --> $DIR/match-empty.rs:63:18 | |
15 | | | |
16 | LL | match_empty!(0u8); | |
17 | | ^^^ | |
18 | | | |
19 | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms | |
ba9703b0 | 20 | = note: the matched value is of type `u8` |
60c5eb7d XL |
21 | |
22 | error[E0004]: non-exhaustive patterns: type `NonEmptyStruct` is non-empty | |
23 | --> $DIR/match-empty.rs:65:18 | |
24 | | | |
25 | LL | struct NonEmptyStruct(bool); | |
26 | | ---------------------------- `NonEmptyStruct` defined here | |
27 | ... | |
28 | LL | match_empty!(NonEmptyStruct(true)); | |
29 | | ^^^^^^^^^^^^^^^^^^^^ | |
30 | | | |
31 | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms | |
ba9703b0 | 32 | = note: the matched value is of type `NonEmptyStruct` |
60c5eb7d XL |
33 | |
34 | error[E0004]: non-exhaustive patterns: type `NonEmptyUnion1` is non-empty | |
35 | --> $DIR/match-empty.rs:67:18 | |
36 | | | |
37 | LL | / union NonEmptyUnion1 { | |
38 | LL | | foo: (), | |
39 | LL | | } | |
40 | | |_- `NonEmptyUnion1` defined here | |
41 | ... | |
42 | LL | match_empty!((NonEmptyUnion1 { foo: () })); | |
43 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
44 | | | |
45 | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms | |
ba9703b0 | 46 | = note: the matched value is of type `NonEmptyUnion1` |
60c5eb7d XL |
47 | |
48 | error[E0004]: non-exhaustive patterns: type `NonEmptyUnion2` is non-empty | |
49 | --> $DIR/match-empty.rs:69:18 | |
50 | | | |
51 | LL | / union NonEmptyUnion2 { | |
52 | LL | | foo: (), | |
53 | LL | | bar: (), | |
54 | LL | | } | |
55 | | |_- `NonEmptyUnion2` defined here | |
56 | ... | |
57 | LL | match_empty!((NonEmptyUnion2 { foo: () })); | |
58 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
59 | | | |
60 | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms | |
ba9703b0 | 61 | = note: the matched value is of type `NonEmptyUnion2` |
60c5eb7d XL |
62 | |
63 | error[E0004]: non-exhaustive patterns: `Foo(_)` not covered | |
64 | --> $DIR/match-empty.rs:71:18 | |
65 | | | |
66 | LL | / enum NonEmptyEnum1 { | |
67 | LL | | Foo(bool), | |
68 | | | --- not covered | |
69 | LL | | | |
70 | LL | | | |
71 | LL | | } | |
72 | | |_- `NonEmptyEnum1` defined here | |
73 | ... | |
74 | LL | match_empty!(NonEmptyEnum1::Foo(true)); | |
75 | | ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `Foo(_)` not covered | |
76 | | | |
77 | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms | |
ba9703b0 | 78 | = note: the matched value is of type `NonEmptyEnum1` |
60c5eb7d XL |
79 | |
80 | error[E0004]: non-exhaustive patterns: `Foo(_)` and `Bar` not covered | |
81 | --> $DIR/match-empty.rs:73:18 | |
82 | | | |
83 | LL | / enum NonEmptyEnum2 { | |
84 | LL | | Foo(bool), | |
85 | | | --- not covered | |
86 | LL | | | |
87 | LL | | | |
88 | LL | | Bar, | |
89 | | | --- not covered | |
90 | LL | | | |
91 | LL | | | |
92 | LL | | } | |
93 | | |_- `NonEmptyEnum2` defined here | |
94 | ... | |
95 | LL | match_empty!(NonEmptyEnum2::Foo(true)); | |
96 | | ^^^^^^^^^^^^^^^^^^^^^^^^ patterns `Foo(_)` and `Bar` not covered | |
97 | | | |
98 | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms | |
ba9703b0 | 99 | = note: the matched value is of type `NonEmptyEnum2` |
60c5eb7d XL |
100 | |
101 | error[E0004]: non-exhaustive patterns: `V1`, `V2`, `V3` and 2 more not covered | |
102 | --> $DIR/match-empty.rs:75:18 | |
103 | | | |
104 | LL | / enum NonEmptyEnum5 { | |
105 | LL | | V1, V2, V3, V4, V5, | |
106 | LL | | } | |
107 | | |_- `NonEmptyEnum5` defined here | |
108 | ... | |
109 | LL | match_empty!(NonEmptyEnum5::V1); | |
110 | | ^^^^^^^^^^^^^^^^^ patterns `V1`, `V2`, `V3` and 2 more not covered | |
111 | | | |
112 | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms | |
ba9703b0 | 113 | = note: the matched value is of type `NonEmptyEnum5` |
60c5eb7d XL |
114 | |
115 | error[E0004]: non-exhaustive patterns: `_` not covered | |
116 | --> $DIR/match-empty.rs:78:18 | |
117 | | | |
118 | LL | match_false!(0u8); | |
119 | | ^^^ pattern `_` not covered | |
120 | | | |
121 | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms | |
ba9703b0 | 122 | = note: the matched value is of type `u8` |
60c5eb7d XL |
123 | |
124 | error[E0004]: non-exhaustive patterns: `NonEmptyStruct(_)` not covered | |
125 | --> $DIR/match-empty.rs:80:18 | |
126 | | | |
127 | LL | struct NonEmptyStruct(bool); | |
128 | | ---------------------------- `NonEmptyStruct` defined here | |
129 | ... | |
130 | LL | match_false!(NonEmptyStruct(true)); | |
131 | | ^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyStruct(_)` not covered | |
132 | | | |
133 | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms | |
ba9703b0 | 134 | = note: the matched value is of type `NonEmptyStruct` |
60c5eb7d XL |
135 | |
136 | error[E0004]: non-exhaustive patterns: `NonEmptyUnion1 { .. }` not covered | |
137 | --> $DIR/match-empty.rs:82:18 | |
138 | | | |
139 | LL | / union NonEmptyUnion1 { | |
140 | LL | | foo: (), | |
141 | LL | | } | |
142 | | |_- `NonEmptyUnion1` defined here | |
143 | ... | |
144 | LL | match_false!((NonEmptyUnion1 { foo: () })); | |
145 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion1 { .. }` not covered | |
146 | | | |
147 | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms | |
ba9703b0 | 148 | = note: the matched value is of type `NonEmptyUnion1` |
60c5eb7d XL |
149 | |
150 | error[E0004]: non-exhaustive patterns: `NonEmptyUnion2 { .. }` not covered | |
151 | --> $DIR/match-empty.rs:84:18 | |
152 | | | |
153 | LL | / union NonEmptyUnion2 { | |
154 | LL | | foo: (), | |
155 | LL | | bar: (), | |
156 | LL | | } | |
157 | | |_- `NonEmptyUnion2` defined here | |
158 | ... | |
159 | LL | match_false!((NonEmptyUnion2 { foo: () })); | |
160 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion2 { .. }` not covered | |
161 | | | |
162 | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms | |
ba9703b0 | 163 | = note: the matched value is of type `NonEmptyUnion2` |
60c5eb7d XL |
164 | |
165 | error[E0004]: non-exhaustive patterns: `Foo(_)` not covered | |
166 | --> $DIR/match-empty.rs:86:18 | |
167 | | | |
168 | LL | / enum NonEmptyEnum1 { | |
169 | LL | | Foo(bool), | |
170 | | | --- not covered | |
171 | LL | | | |
172 | LL | | | |
173 | LL | | } | |
174 | | |_- `NonEmptyEnum1` defined here | |
175 | ... | |
176 | LL | match_false!(NonEmptyEnum1::Foo(true)); | |
177 | | ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `Foo(_)` not covered | |
178 | | | |
179 | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms | |
ba9703b0 | 180 | = note: the matched value is of type `NonEmptyEnum1` |
60c5eb7d XL |
181 | |
182 | error[E0004]: non-exhaustive patterns: `Foo(_)` and `Bar` not covered | |
183 | --> $DIR/match-empty.rs:88:18 | |
184 | | | |
185 | LL | / enum NonEmptyEnum2 { | |
186 | LL | | Foo(bool), | |
187 | | | --- not covered | |
188 | LL | | | |
189 | LL | | | |
190 | LL | | Bar, | |
191 | | | --- not covered | |
192 | LL | | | |
193 | LL | | | |
194 | LL | | } | |
195 | | |_- `NonEmptyEnum2` defined here | |
196 | ... | |
197 | LL | match_false!(NonEmptyEnum2::Foo(true)); | |
198 | | ^^^^^^^^^^^^^^^^^^^^^^^^ patterns `Foo(_)` and `Bar` not covered | |
199 | | | |
200 | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms | |
ba9703b0 | 201 | = note: the matched value is of type `NonEmptyEnum2` |
60c5eb7d XL |
202 | |
203 | error[E0004]: non-exhaustive patterns: `V1`, `V2`, `V3` and 2 more not covered | |
204 | --> $DIR/match-empty.rs:90:18 | |
205 | | | |
206 | LL | / enum NonEmptyEnum5 { | |
207 | LL | | V1, V2, V3, V4, V5, | |
208 | LL | | } | |
209 | | |_- `NonEmptyEnum5` defined here | |
210 | ... | |
211 | LL | match_false!(NonEmptyEnum5::V1); | |
212 | | ^^^^^^^^^^^^^^^^^ patterns `V1`, `V2`, `V3` and 2 more not covered | |
213 | | | |
214 | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms | |
ba9703b0 | 215 | = note: the matched value is of type `NonEmptyEnum5` |
60c5eb7d XL |
216 | |
217 | error: aborting due to 15 previous errors | |
218 | ||
219 | For more information about this error, try `rustc --explain E0004`. |