Commit f4bbd0e
authored
Rollup merge of rust-lang#74337 - estebank:ty-parse-recovery, r=varkor
Handle case of incomplete local ty more gracefully
When encountering a local binding with a type that isn't completed, the
parser will reach a `=` token. When this happen, consider the type
"complete" as far as the parser is concerned to avoid further errors
being emitted by parse recovery logic.File tree
3 files changed
+20
-55
lines changed- src
- librustc_parse/parser
- test/ui/issues
3 files changed
+20
-55
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | 165 | | |
169 | 166 | | |
170 | 167 | | |
171 | | - | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
172 | 178 | | |
173 | 179 | | |
174 | 180 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | 4 | | |
10 | | - | |
| 5 | + | |
11 | 6 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | 1 | | |
14 | 2 | | |
15 | 3 | | |
16 | 4 | | |
17 | | - | |
18 | | - | |
19 | | - | |
| 5 | + | |
| 6 | + | |
20 | 7 | | |
21 | 8 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 9 | + | |
| 10 | + | |
48 | 11 | | |
49 | 12 | | |
50 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
51 | 16 | | |
52 | | - | |
| 17 | + | |
53 | 18 | | |
54 | | - | |
55 | | - | |
| 19 | + | |
0 commit comments