Commit 3bd42d3
committed
Auto merge of #17948 - ShoyuVanilla:parent-self-sized, r=Veykril
fix: Wrong `Self: Sized` predicate for trait assoc items
Again while implementing object safety like #17939 😅
If we call `generic_predicates_query` on `fn foo` in the following code;
```
trait Foo {
fn foo();
}
```
It returns implicit bound `Self: Sized`, even though `Self` is not appearing as a generic parameter inside angle brackets, but as a parent generic parameter, "trait self".
This PR prevent pushing "implicit" `Self: Sized` predicates in such cases1 file changed
+32
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1743 | 1743 | | |
1744 | 1744 | | |
1745 | 1745 | | |
1746 | | - | |
1747 | | - | |
1748 | 1746 | | |
1749 | 1747 | | |
1750 | | - | |
| 1748 | + | |
1751 | 1749 | | |
1752 | | - | |
1753 | | - | |
1754 | | - | |
| 1750 | + | |
| 1751 | + | |
| 1752 | + | |
| 1753 | + | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
1755 | 1779 | | |
1756 | 1780 | | |
1757 | 1781 | | |
1758 | 1782 | | |
1759 | 1783 | | |
1760 | 1784 | | |
1761 | 1785 | | |
1762 | | - | |
1763 | | - | |
| 1786 | + | |
| 1787 | + | |
1764 | 1788 | | |
1765 | 1789 | | |
1766 | 1790 | | |
| |||
0 commit comments