fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

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