Commit aaf3e31
committed
Do not emit type errors on recovered blocks
When a parse error occurs on a block, the parser will recover and create
a block with the statements collected until that point. Now a flag
stating that a recovery has been performed in this block is propagated
so that the type checker knows that the type of the block (which will be
identified as `()`) shouldn't be checked against the expectation to
reduce the amount of irrelevant diagnostic errors shown to the user.1 parent b7b52cc commit aaf3e31
File tree
25 files changed
+111
-40
lines changed- src
- librustc_driver
- librustc_typeck/check
- librustc
- hir
- ich
- libsyntax_ext/deriving
- libsyntax
- ext
- parse
- test
- compile-fail
- parse-fail
- run-pass-fulldeps
- ui
- mismatched_types
- resolve
25 files changed
+111
-40
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
362 | | - | |
363 | | - | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
364 | 365 | | |
365 | | - | |
366 | | - | |
367 | | - | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
368 | 369 | | |
369 | | - | |
370 | | - | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
371 | 373 | | |
372 | | - | |
373 | | - | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
374 | 377 | | |
375 | 378 | | |
376 | 379 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1835 | 1835 | | |
1836 | 1836 | | |
1837 | 1837 | | |
| 1838 | + | |
1838 | 1839 | | |
1839 | 1840 | | |
1840 | 1841 | | |
| |||
2691 | 2692 | | |
2692 | 2693 | | |
2693 | 2694 | | |
| 2695 | + | |
2694 | 2696 | | |
2695 | 2697 | | |
2696 | 2698 | | |
| |||
3507 | 3509 | | |
3508 | 3510 | | |
3509 | 3511 | | |
| 3512 | + | |
3510 | 3513 | | |
3511 | 3514 | | |
3512 | 3515 | | |
| |||
3610 | 3613 | | |
3611 | 3614 | | |
3612 | 3615 | | |
| 3616 | + | |
3613 | 3617 | | |
3614 | 3618 | | |
3615 | 3619 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
625 | 625 | | |
626 | 626 | | |
627 | 627 | | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
628 | 633 | | |
629 | 634 | | |
630 | 635 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
| 381 | + | |
381 | 382 | | |
382 | 383 | | |
383 | 384 | | |
384 | 385 | | |
385 | 386 | | |
386 | 387 | | |
| 388 | + | |
387 | 389 | | |
388 | 390 | | |
389 | 391 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
729 | 729 | | |
730 | 730 | | |
731 | 731 | | |
| 732 | + | |
732 | 733 | | |
733 | 734 | | |
734 | 735 | | |
| |||
744 | 745 | | |
745 | 746 | | |
746 | 747 | | |
| 748 | + | |
747 | 749 | | |
748 | 750 | | |
749 | 751 | | |
750 | 752 | | |
751 | 753 | | |
752 | | - | |
| 754 | + | |
753 | 755 | | |
754 | 756 | | |
755 | 757 | | |
756 | 758 | | |
757 | 759 | | |
758 | 760 | | |
759 | 761 | | |
760 | | - | |
| 762 | + | |
761 | 763 | | |
762 | 764 | | |
763 | 765 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4279 | 4279 | | |
4280 | 4280 | | |
4281 | 4281 | | |
4282 | | - | |
| 4282 | + | |
| 4283 | + | |
| 4284 | + | |
| 4285 | + | |
| 4286 | + | |
| 4287 | + | |
4283 | 4288 | | |
4284 | 4289 | | |
4285 | 4290 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
468 | 468 | | |
469 | 469 | | |
470 | 470 | | |
| 471 | + | |
471 | 472 | | |
472 | 473 | | |
473 | 474 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
594 | 594 | | |
595 | 595 | | |
596 | 596 | | |
| 597 | + | |
597 | 598 | | |
598 | 599 | | |
599 | 600 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
851 | 851 | | |
852 | 852 | | |
853 | 853 | | |
854 | | - | |
| 854 | + | |
855 | 855 | | |
856 | 856 | | |
857 | 857 | | |
858 | 858 | | |
| 859 | + | |
859 | 860 | | |
860 | 861 | | |
861 | 862 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
931 | 931 | | |
932 | 932 | | |
933 | 933 | | |
| 934 | + | |
934 | 935 | | |
935 | 936 | | |
936 | 937 | | |
| |||
0 commit comments