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/pattern/usefulness/empty-types.never_pats.stderr
+1-187
Original file line number
Diff line number
Diff line change
@@ -43,30 +43,6 @@ LL + _ => todo!(),
43
43
LL + }
44
44
|
45
45
46
-
error: unreachable pattern
47
-
--> $DIR/empty-types.rs:70:9
48
-
|
49
-
LL | (_, _) => {}
50
-
| ^^^^^^ matches no values because `(u32, !)` is uninhabited
51
-
|
52
-
= note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
53
-
54
-
error: unreachable pattern
55
-
--> $DIR/empty-types.rs:76:9
56
-
|
57
-
LL | _ => {}
58
-
| ^ matches no values because `(!, !)` is uninhabited
59
-
|
60
-
= note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
61
-
62
-
error: unreachable pattern
63
-
--> $DIR/empty-types.rs:79:9
64
-
|
65
-
LL | (_, _) => {}
66
-
| ^^^^^^ matches no values because `(!, !)` is uninhabited
67
-
|
68
-
= note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
69
-
70
46
error: unreachable pattern
71
47
--> $DIR/empty-types.rs:83:9
72
48
|
@@ -94,22 +70,6 @@ LL + Ok(_) => todo!(),
94
70
LL + }
95
71
|
96
72
97
-
error: unreachable pattern
98
-
--> $DIR/empty-types.rs:94:9
99
-
|
100
-
LL | Err(_) => {}
101
-
| ^^^^^^ matches no values because `!` is uninhabited
102
-
|
103
-
= note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
104
-
105
-
error: unreachable pattern
106
-
--> $DIR/empty-types.rs:99:9
107
-
|
108
-
LL | Err(_) => {}
109
-
| ^^^^^^ matches no values because `!` is uninhabited
110
-
|
111
-
= note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
112
-
113
73
error[E0004]: non-exhaustive patterns: `Ok(1_u32..=u32::MAX)` not covered
114
74
--> $DIR/empty-types.rs:96:11
115
75
|
@@ -156,54 +116,6 @@ help: you might want to use `let else` to handle the variant that isn't matched
156
116
LL | let Ok(_x) = &res_u32_never else { todo!() };
157
117
| ++++++++++++++++
158
118
159
-
error: unreachable pattern
160
-
--> $DIR/empty-types.rs:112:9
161
-
|
162
-
LL | _ => {}
163
-
| ^ matches no values because `Result<!, !>` is uninhabited
164
-
|
165
-
= note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
166
-
167
-
error: unreachable pattern
168
-
--> $DIR/empty-types.rs:115:9
169
-
|
170
-
LL | Ok(_) => {}
171
-
| ^^^^^ matches no values because `Result<!, !>` is uninhabited
172
-
|
173
-
= note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
174
-
175
-
error: unreachable pattern
176
-
--> $DIR/empty-types.rs:118:9
177
-
|
178
-
LL | Ok(_) => {}
179
-
| ^^^^^ matches no values because `Result<!, !>` is uninhabited
180
-
|
181
-
= note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
182
-
183
-
error: unreachable pattern
184
-
--> $DIR/empty-types.rs:119:9
185
-
|
186
-
LL | _ => {}
187
-
| ^ matches no values because `Result<!, !>` is uninhabited
188
-
|
189
-
= note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
190
-
191
-
error: unreachable pattern
192
-
--> $DIR/empty-types.rs:122:9
193
-
|
194
-
LL | Ok(_) => {}
195
-
| ^^^^^ matches no values because `Result<!, !>` is uninhabited
196
-
|
197
-
= note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
198
-
199
-
error: unreachable pattern
200
-
--> $DIR/empty-types.rs:123:9
201
-
|
202
-
LL | Err(_) => {}
203
-
| ^^^^^^ matches no values because `Result<!, !>` is uninhabited
204
-
|
205
-
= note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
206
-
207
119
error: unreachable pattern
208
120
--> $DIR/empty-types.rs:132:13
209
121
|
@@ -220,22 +132,6 @@ LL | _ if false => {}
220
132
|
221
133
= note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
222
134
223
-
error: unreachable pattern
224
-
--> $DIR/empty-types.rs:143:13
225
-
|
226
-
LL | Some(_) => {}
227
-
| ^^^^^^^ matches no values because `Void` is uninhabited
228
-
|
229
-
= note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
230
-
231
-
error: unreachable pattern
232
-
--> $DIR/empty-types.rs:147:13
233
-
|
234
-
LL | None => {}
235
-
| ---- matches all the relevant values
236
-
LL | _ => {}
237
-
| ^ no value can reach this
238
-
239
135
error[E0004]: non-exhaustive patterns: `Some(!)` not covered
240
136
--> $DIR/empty-types.rs:156:15
241
137
|
@@ -303,30 +199,6 @@ LL | _ => {}
303
199
|
304
200
= note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
305
201
306
-
error: unreachable pattern
307
-
--> $DIR/empty-types.rs:284:9
308
-
|
309
-
LL | (_, _) => {}
310
-
| ^^^^^^ matches no values because `(!, !)` is uninhabited
311
-
|
312
-
= note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
313
-
314
-
error: unreachable pattern
315
-
--> $DIR/empty-types.rs:287:9
316
-
|
317
-
LL | Ok(_) => {}
318
-
| ^^^^^ matches no values because `Result<!, !>` is uninhabited
319
-
|
320
-
= note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
321
-
322
-
error: unreachable pattern
323
-
--> $DIR/empty-types.rs:288:9
324
-
|
325
-
LL | Err(_) => {}
326
-
| ^^^^^^ matches no values because `Result<!, !>` is uninhabited
327
-
|
328
-
= note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
329
-
330
202
error[E0005]: refutable pattern in local binding
331
203
--> $DIR/empty-types.rs:297:13
332
204
|
@@ -474,30 +346,6 @@ LL + _ => todo!(),
474
346
LL + }
475
347
|
476
348
477
-
error: unreachable pattern
478
-
--> $DIR/empty-types.rs:368:9
479
-
|
480
-
LL | _ => {}
481
-
| ^ matches no values because `[!; 3]` is uninhabited
482
-
|
483
-
= note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
484
-
485
-
error: unreachable pattern
486
-
--> $DIR/empty-types.rs:371:9
487
-
|
488
-
LL | [_, _, _] => {}
489
-
| ^^^^^^^^^ matches no values because `[!; 3]` is uninhabited
490
-
|
491
-
= note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
492
-
493
-
error: unreachable pattern
494
-
--> $DIR/empty-types.rs:374:9
495
-
|
496
-
LL | [_, ..] => {}
497
-
| ^^^^^^^ matches no values because `[!; 3]` is uninhabited
498
-
|
499
-
= note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
500
-
501
349
error[E0004]: non-exhaustive patterns: type `[!; 0]` is non-empty
502
350
--> $DIR/empty-types.rs:388:11
503
351
|
@@ -534,40 +382,6 @@ LL ~ [..] if false => {},
534
382
LL + [] => todo!()
535
383
|
536
384
537
-
error: unreachable pattern
538
-
--> $DIR/empty-types.rs:416:9
539
-
|
540
-
LL | Some(_) => {}
541
-
| ^^^^^^^ matches no values because `!` is uninhabited
542
-
|
543
-
= note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
544
-
545
-
error: unreachable pattern
546
-
--> $DIR/empty-types.rs:421:9
547
-
|
548
-
LL | Some(_a) => {}
549
-
| ^^^^^^^^ matches no values because `!` is uninhabited
550
-
|
551
-
= note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
552
-
553
-
error: unreachable pattern
554
-
--> $DIR/empty-types.rs:426:9
555
-
|
556
-
LL | None => {}
557
-
| ---- matches all the relevant values
558
-
LL | // !useful, !reachable
559
-
LL | _ => {}
560
-
| ^ no value can reach this
561
-
562
-
error: unreachable pattern
563
-
--> $DIR/empty-types.rs:431:9
564
-
|
565
-
LL | None => {}
566
-
| ---- matches all the relevant values
567
-
LL | // !useful, !reachable
568
-
LL | _a => {}
569
-
| ^^ no value can reach this
570
-
571
385
error[E0004]: non-exhaustive patterns: `&Some(!)` not covered
572
386
--> $DIR/empty-types.rs:451:11
573
387
|
@@ -744,7 +558,7 @@ LL ~ None => {},
744
558
LL + Some(!)
745
559
|
746
560
747
-
error: aborting due to 65 previous errors; 1 warning emitted
561
+
error: aborting due to 42 previous errors; 1 warning emitted
748
562
749
563
Some errors have detailed explanations: E0004, E0005.
750
564
For more information about an error, try `rustc --explain E0004`.
0 commit comments