Commit 19b7192
committed
Fix assertion failure for some
In #120699 I moved some code dealing with `has_future_breakage` earlier
in `emit_diagnostic`. Issue #126521 identified a case where that
reordering was invalid (leading to an assertion failure) for some `Expect`
diagnostics.
This commit partially undoes the change, by moving the handling of
unstable `Expect` diagnostics earlier again. This makes
`emit_diagnostic` a bit uglier, but is necessary to fix the problem.
Fixes #126521.Expect diagnostics.1 parent 894f7a4 commit 19b7192
File tree
3 files changed
+33
-10
lines changed- compiler/rustc_errors/src
- tests/ui/lint
3 files changed
+33
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1437 | 1437 | | |
1438 | 1438 | | |
1439 | 1439 | | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
1440 | 1458 | | |
1441 | 1459 | | |
1442 | 1460 | | |
| |||
1512 | 1530 | | |
1513 | 1531 | | |
1514 | 1532 | | |
1515 | | - | |
1516 | | - | |
1517 | | - | |
1518 | | - | |
1519 | 1533 | | |
1520 | | - | |
1521 | | - | |
1522 | | - | |
1523 | | - | |
1524 | | - | |
| 1534 | + | |
1525 | 1535 | | |
1526 | 1536 | | |
1527 | 1537 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
| |||
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
0 commit comments