Commit f468fd1
authored
Rollup merge of #81496 - guswynn:expected_async_block, r=oli-obk
name async generators something more human friendly in type error diagnostic
fixes #81457
Some details:
1. I opted to load the generator kind from the hir in TyCategory. I also use 1 impl in the hir for the descr
2. I named both the source of the future, in addition to the general type (`future`), not sure what is preferred
3. I am not sure what is required to make sure "generator" is not referred to anywhere. A brief `rg "\"generator\"" showed me that most diagnostics correctly distinguish from generators and async generator, but the `descr` of `DefKind` is pretty general (not sure how thats used)
4. should the descr impl of AsyncGeneratorKind use its display impl instead of copying the string?File tree
8 files changed
+104
-17
lines changed- compiler
- rustc_hir/src
- rustc_infer/src/infer/error_reporting
- rustc_middle/src/ty
- rustc_trait_selection/src/traits/error_reporting
- rustc_typeck/src/check/method
- src/test/ui/async-await
8 files changed
+104
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
1280 | 1281 | | |
1281 | 1282 | | |
1282 | 1283 | | |
1283 | | - | |
| 1284 | + | |
1284 | 1285 | | |
1285 | 1286 | | |
1286 | 1287 | | |
| |||
1298 | 1299 | | |
1299 | 1300 | | |
1300 | 1301 | | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
1301 | 1311 | | |
1302 | 1312 | | |
1303 | 1313 | | |
1304 | 1314 | | |
1305 | 1315 | | |
1306 | | - | |
| 1316 | + | |
1307 | 1317 | | |
1308 | 1318 | | |
1309 | 1319 | | |
| |||
1325 | 1335 | | |
1326 | 1336 | | |
1327 | 1337 | | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
1328 | 1348 | | |
1329 | 1349 | | |
1330 | 1350 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1509 | 1509 | | |
1510 | 1510 | | |
1511 | 1511 | | |
1512 | | - | |
| 1512 | + | |
1513 | 1513 | | |
1514 | 1514 | | |
1515 | 1515 | | |
| |||
1582 | 1582 | | |
1583 | 1583 | | |
1584 | 1584 | | |
1585 | | - | |
| 1585 | + | |
1586 | 1586 | | |
1587 | 1587 | | |
1588 | 1588 | | |
1589 | | - | |
| 1589 | + | |
1590 | 1590 | | |
1591 | 1591 | | |
1592 | 1592 | | |
| |||
2489 | 2489 | | |
2490 | 2490 | | |
2491 | 2491 | | |
2492 | | - | |
| 2492 | + | |
2493 | 2493 | | |
2494 | 2494 | | |
2495 | 2495 | | |
| |||
2498 | 2498 | | |
2499 | 2499 | | |
2500 | 2500 | | |
2501 | | - | |
| 2501 | + | |
2502 | 2502 | | |
2503 | 2503 | | |
2504 | 2504 | | |
2505 | 2505 | | |
2506 | | - | |
| 2506 | + | |
2507 | 2507 | | |
2508 | 2508 | | |
2509 | 2509 | | |
2510 | | - | |
| 2510 | + | |
| 2511 | + | |
| 2512 | + | |
2511 | 2513 | | |
2512 | 2514 | | |
2513 | 2515 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
386 | | - | |
| 386 | + | |
387 | 387 | | |
388 | 388 | | |
389 | 389 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
273 | | - | |
| 273 | + | |
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
291 | | - | |
| 291 | + | |
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
317 | | - | |
| 317 | + | |
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1368 | 1368 | | |
1369 | 1369 | | |
1370 | 1370 | | |
1371 | | - | |
1372 | | - | |
| 1371 | + | |
| 1372 | + | |
1373 | 1373 | | |
1374 | 1374 | | |
1375 | 1375 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
393 | | - | |
| 393 | + | |
394 | 394 | | |
395 | 395 | | |
396 | 396 | | |
| |||
732 | 732 | | |
733 | 733 | | |
734 | 734 | | |
735 | | - | |
| 735 | + | |
736 | 736 | | |
737 | 737 | | |
738 | 738 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 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 | + | |
| 48 | + | |
| 49 | + | |
0 commit comments