Commit 3ce34f4
committed
Remove a second
Instead of taking `seq` as a mutable reference,
`maybe_recover_struct_lit_bad_delims` now consumes `seq` on the recovery
path, and returns `seq` unchanged on the non-recovery path. The commit
also combines an `if` and a `match` to merge two identical paths.
Also change `recover_seq_parse_error` so it receives a `PErr` instead of
a `PResult`, because all the call sites now handle the `Ok`/`Err`
distinction themselves.DiagnosticBuilder::emit_without_consuming call.1 parent 1881055 commit 3ce34f4
2 files changed
+30
-39
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
2044 | 2044 | | |
2045 | 2045 | | |
2046 | 2046 | | |
2047 | | - | |
| 2047 | + | |
2048 | 2048 | | |
2049 | | - | |
2050 | | - | |
2051 | | - | |
2052 | | - | |
2053 | | - | |
2054 | | - | |
2055 | | - | |
2056 | | - | |
2057 | | - | |
| 2049 | + | |
| 2050 | + | |
| 2051 | + | |
| 2052 | + | |
2058 | 2053 | | |
2059 | 2054 | | |
2060 | 2055 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1272 | 1272 | | |
1273 | 1273 | | |
1274 | 1274 | | |
1275 | | - | |
| 1275 | + | |
1276 | 1276 | | |
1277 | 1277 | | |
1278 | | - | |
1279 | | - | |
1280 | | - | |
1281 | | - | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
1282 | 1281 | | |
1283 | | - | |
1284 | 1282 | | |
1285 | 1283 | | |
1286 | 1284 | | |
| |||
1290 | 1288 | | |
1291 | 1289 | | |
1292 | 1290 | | |
1293 | | - | |
| 1291 | + | |
1294 | 1292 | | |
1295 | | - | |
1296 | | - | |
1297 | | - | |
1298 | | - | |
1299 | | - | |
1300 | | - | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
1301 | 1296 | | |
1302 | 1297 | | |
1303 | 1298 | | |
| |||
1315 | 1310 | | |
1316 | 1311 | | |
1317 | 1312 | | |
1318 | | - | |
| 1313 | + | |
| 1314 | + | |
1319 | 1315 | | |
1320 | 1316 | | |
1321 | | - | |
1322 | | - | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
1323 | 1320 | | |
1324 | 1321 | | |
1325 | 1322 | | |
| |||
1332 | 1329 | | |
1333 | 1330 | | |
1334 | 1331 | | |
1335 | | - | |
1336 | | - | |
1337 | | - | |
1338 | | - | |
1339 | | - | |
| 1332 | + | |
| 1333 | + | |
1340 | 1334 | | |
1341 | | - | |
| 1335 | + | |
1342 | 1336 | | |
1343 | | - | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
1344 | 1343 | | |
1345 | | - | |
1346 | | - | |
1347 | 1344 | | |
1348 | 1345 | | |
1349 | | - | |
| 1346 | + | |
1350 | 1347 | | |
1351 | | - | |
1352 | 1348 | | |
1353 | 1349 | | |
1354 | 1350 | | |
| |||
1552 | 1548 | | |
1553 | 1549 | | |
1554 | 1550 | | |
1555 | | - | |
| 1551 | + | |
1556 | 1552 | | |
1557 | 1553 | | |
1558 | 1554 | | |
| |||
0 commit comments