Commit d8e961e
committed
Account for non-exhausitve match expression coming from macro expansion
```
error[E0004]: non-exhaustive patterns: `u8::MAX` not covered
--> $DIR/exhaustiveness.rs:47:8
|
LL | m!(0u8, 0..255);
| ^^^ pattern `u8::MAX` not covered
|
= note: the matched value is of type `u8`
note: within macro `m`, this `match` expression doesn't expand to cover all patterns
--> $DIR/exhaustiveness.rs:7:9
|
LL | / macro_rules! m {
LL | | ($s:expr, $($t:tt)+) => {
LL | | match $s { $($t)+ => {} }
| | ^^^^^^^^^^^^^^^^^^^^^^^^^
LL | | }
LL | | }
| |_-
= help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern
```1 parent abc0533 commit d8e961e
File tree
7 files changed
+1519
-537
lines changed- compiler/rustc_mir_build/src/thir/pattern
- tests/ui
- half-open-range-patterns
- pattern/usefulness
- integer-ranges
7 files changed
+1519
-537
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
543 | 543 | | |
544 | 544 | | |
545 | 545 | | |
| 546 | + | |
546 | 547 | | |
547 | 548 | | |
548 | 549 | | |
| |||
1210 | 1211 | | |
1211 | 1212 | | |
1212 | 1213 | | |
| 1214 | + | |
1213 | 1215 | | |
1214 | 1216 | | |
1215 | 1217 | | |
| |||
1350 | 1352 | | |
1351 | 1353 | | |
1352 | 1354 | | |
1353 | | - | |
| 1355 | + | |
1354 | 1356 | | |
1355 | 1357 | | |
1356 | 1358 | | |
1357 | | - | |
1358 | 1359 | | |
1359 | 1360 | | |
1360 | 1361 | | |
| |||
1383 | 1384 | | |
1384 | 1385 | | |
1385 | 1386 | | |
1386 | | - | |
| 1387 | + | |
1387 | 1388 | | |
1388 | 1389 | | |
1389 | 1390 | | |
| |||
1418 | 1419 | | |
1419 | 1420 | | |
1420 | 1421 | | |
1421 | | - | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
1422 | 1441 | | |
1423 | 1442 | | |
1424 | 1443 | | |
| |||
0 commit comments