This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit 6e1f7b5
committed
Auto merge of rust-lang#121587 - ShoyuVanilla:fix-issue-121267, r=TaKO8Ki
Fix bad span for explicit lifetime suggestions
Fixes rust-lang#121267
Current explicit lifetime suggestions are not showing correct spans for some lifetimes - e.g. elided lifetime generic parameters;
This should be done correctly regarding elided lifetime kind like the following code
https://github.com/rust-lang/rust/blob/43fdd4916d19f4004e23d422b5547637ad67ab21/compiler/rustc_resolve/src/late/diagnostics.rs#L3015-L3044File tree
11 files changed
+167
-83
lines changed- compiler
- rustc_ast_lowering/src
- rustc_hir_analysis/src/check
- rustc_hir/src
- rustc_infer/src
- infer/error_reporting/nice_region_error
- rustc_resolve/src
- late
- src/librustdoc/clean
- tests/ui/suggestions/lifetimes
11 files changed
+167
-83
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
59 | 61 | | |
60 | 62 | | |
61 | 63 | | |
| |||
797 | 799 | | |
798 | 800 | | |
799 | 801 | | |
800 | | - | |
| 802 | + | |
801 | 803 | | |
802 | 804 | | |
803 | 805 | | |
| |||
808 | 810 | | |
809 | 811 | | |
810 | 812 | | |
811 | | - | |
| 813 | + | |
812 | 814 | | |
813 | 815 | | |
814 | 816 | | |
| |||
1605 | 1607 | | |
1606 | 1608 | | |
1607 | 1609 | | |
1608 | | - | |
1609 | | - | |
| 1610 | + | |
| 1611 | + | |
1610 | 1612 | | |
1611 | | - | |
| 1613 | + | |
1612 | 1614 | | |
1613 | 1615 | | |
1614 | | - | |
| 1616 | + | |
1615 | 1617 | | |
1616 | 1618 | | |
1617 | 1619 | | |
| |||
1651 | 1653 | | |
1652 | 1654 | | |
1653 | 1655 | | |
| 1656 | + | |
1654 | 1657 | | |
1655 | 1658 | | |
1656 | 1659 | | |
| |||
1668 | 1671 | | |
1669 | 1672 | | |
1670 | 1673 | | |
1671 | | - | |
1672 | | - | |
1673 | | - | |
1674 | | - | |
1675 | | - | |
1676 | | - | |
1677 | | - | |
1678 | | - | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
1679 | 1688 | | |
1680 | | - | |
1681 | | - | |
1682 | | - | |
1683 | | - | |
1684 | | - | |
1685 | | - | |
1686 | | - | |
1687 | | - | |
1688 | | - | |
1689 | | - | |
1690 | | - | |
1691 | | - | |
| 1689 | + | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
1692 | 1701 | | |
1693 | 1702 | | |
1694 | 1703 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
810 | 810 | | |
811 | 811 | | |
812 | 812 | | |
| 813 | + | |
| 814 | + | |
813 | 815 | | |
814 | 816 | | |
815 | 817 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
456 | 456 | | |
457 | 457 | | |
458 | 458 | | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
459 | 471 | | |
460 | 472 | | |
461 | 473 | | |
| |||
464 | 476 | | |
465 | 477 | | |
466 | 478 | | |
467 | | - | |
| 479 | + | |
468 | 480 | | |
469 | 481 | | |
470 | 482 | | |
| |||
512 | 524 | | |
513 | 525 | | |
514 | 526 | | |
515 | | - | |
| 527 | + | |
516 | 528 | | |
517 | 529 | | |
518 | 530 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1305 | 1305 | | |
1306 | 1306 | | |
1307 | 1307 | | |
1308 | | - | |
| 1308 | + | |
1309 | 1309 | | |
1310 | 1310 | | |
1311 | 1311 | | |
| |||
Lines changed: 55 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
| 16 | + | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
355 | 355 | | |
356 | 356 | | |
357 | 357 | | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
| 358 | + | |
| 359 | + | |
372 | 360 | | |
373 | 361 | | |
374 | 362 | | |
| |||
430 | 418 | | |
431 | 419 | | |
432 | 420 | | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
433 | 472 | | |
434 | 473 | | |
435 | 474 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | | - | |
49 | | - | |
| 47 | + | |
50 | 48 | | |
51 | 49 | | |
52 | 50 | | |
| |||
1637 | 1635 | | |
1638 | 1636 | | |
1639 | 1637 | | |
1640 | | - | |
1641 | | - | |
1642 | | - | |
1643 | | - | |
1644 | | - | |
1645 | | - | |
1646 | | - | |
1647 | | - | |
1648 | | - | |
1649 | | - | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
1650 | 1642 | | |
1651 | 1643 | | |
1652 | 1644 | | |
1653 | 1645 | | |
1654 | 1646 | | |
1655 | | - | |
| 1647 | + | |
1656 | 1648 | | |
1657 | 1649 | | |
1658 | 1650 | | |
| |||
1744 | 1736 | | |
1745 | 1737 | | |
1746 | 1738 | | |
1747 | | - | |
| 1739 | + | |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
| 1743 | + | |
| 1744 | + | |
1748 | 1745 | | |
1749 | 1746 | | |
1750 | 1747 | | |
1751 | 1748 | | |
1752 | 1749 | | |
1753 | | - | |
| 1750 | + | |
1754 | 1751 | | |
1755 | 1752 | | |
1756 | 1753 | | |
| |||
1844 | 1841 | | |
1845 | 1842 | | |
1846 | 1843 | | |
| 1844 | + | |
| 1845 | + | |
| 1846 | + | |
| 1847 | + | |
| 1848 | + | |
1847 | 1849 | | |
1848 | 1850 | | |
1849 | 1851 | | |
1850 | | - | |
1851 | | - | |
1852 | | - | |
1853 | | - | |
1854 | | - | |
| 1852 | + | |
1855 | 1853 | | |
1856 | 1854 | | |
1857 | 1855 | | |
| |||
1897 | 1895 | | |
1898 | 1896 | | |
1899 | 1897 | | |
1900 | | - | |
| 1898 | + | |
1901 | 1899 | | |
1902 | 1900 | | |
1903 | 1901 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | 112 | | |
125 | 113 | | |
126 | 114 | | |
| |||
0 commit comments