Commit a90c5a3
authored
Rollup merge of rust-lang#97823 - compiler-errors:missing-comma-match-arm, r=estebank
Recover missing comma after match arm
If we're missing a comma after a match arm expression, try parsing another pattern and a following `=>`. If we find both of those, then recover by suggesting to insert a `,`.
Fixes rust-lang#80112File tree
3 files changed
+44
-23
lines changed- compiler/rustc_parse/src/parser
- src/test/ui/parser
3 files changed
+44
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2718 | 2718 | | |
2719 | 2719 | | |
2720 | 2720 | | |
2721 | | - | |
2722 | | - | |
2723 | | - | |
2724 | | - | |
2725 | | - | |
2726 | | - | |
2727 | | - | |
| 2721 | + | |
| 2722 | + | |
| 2723 | + | |
| 2724 | + | |
| 2725 | + | |
| 2726 | + | |
2728 | 2727 | | |
2729 | 2728 | | |
2730 | 2729 | | |
| |||
2743 | 2742 | | |
2744 | 2743 | | |
2745 | 2744 | | |
| 2745 | + | |
2746 | 2746 | | |
2747 | | - | |
2748 | | - | |
2749 | | - | |
2750 | | - | |
2751 | | - | |
| 2747 | + | |
| 2748 | + | |
| 2749 | + | |
| 2750 | + | |
| 2751 | + | |
| 2752 | + | |
| 2753 | + | |
| 2754 | + | |
| 2755 | + | |
| 2756 | + | |
| 2757 | + | |
| 2758 | + | |
| 2759 | + | |
| 2760 | + | |
| 2761 | + | |
| 2762 | + | |
| 2763 | + | |
| 2764 | + | |
| 2765 | + | |
| 2766 | + | |
| 2767 | + | |
| 2768 | + | |
| 2769 | + | |
| 2770 | + | |
| 2771 | + | |
| 2772 | + | |
| 2773 | + | |
| 2774 | + | |
| 2775 | + | |
2752 | 2776 | | |
2753 | 2777 | | |
2754 | | - | |
| 2778 | + | |
| 2779 | + | |
2755 | 2780 | | |
2756 | 2781 | | |
2757 | 2782 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | | - | |
| 55 | + | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
| 59 | + | |
64 | 60 | | |
65 | 61 | | |
66 | 62 | | |
| |||
0 commit comments