Commit 939a224
committed
Point at assoc fn definition on type param divergence
When the number of type parameters in the associated function of an impl
and its trait differ, we now *always* point at the trait one, even if it
comes from a foreign crate. When it is local, we point at the specific
params, when it is foreign, we point at the whole associated item.
Fix #69944.1 parent cc705b8 commit 939a224
File tree
2 files changed
+11
-20
lines changed- compiler/rustc_hir_analysis/src/check
- tests/ui/typeck
2 files changed
+11
-20
lines changedLines changed: 5 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1557 | 1557 | | |
1558 | 1558 | | |
1559 | 1559 | | |
1560 | | - | |
1561 | | - | |
| 1560 | + | |
| 1561 | + | |
1562 | 1562 | | |
1563 | 1563 | | |
1564 | 1564 | | |
1565 | | - | |
1566 | | - | |
1567 | | - | |
1568 | | - | |
1569 | | - | |
1570 | | - | |
1571 | | - | |
1572 | | - | |
1573 | | - | |
| 1565 | + | |
1574 | 1566 | | |
1575 | 1567 | | |
1576 | 1568 | | |
1577 | 1569 | | |
1578 | 1570 | | |
1579 | | - | |
| 1571 | + | |
1580 | 1572 | | |
1581 | 1573 | | |
1582 | 1574 | | |
1583 | 1575 | | |
1584 | 1576 | | |
1585 | | - | |
1586 | | - | |
1587 | | - | |
1588 | | - | |
1589 | | - | |
1590 | | - | |
1591 | | - | |
| 1577 | + | |
1592 | 1578 | | |
1593 | 1579 | | |
1594 | 1580 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
6 | 11 | | |
7 | 12 | | |
8 | 13 | | |
| |||
0 commit comments