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