Commit 0237aa3
committed
Auto merge of rust-lang#116045 - notriddle:notriddle/issue-83556, r=cjgillot
diagnostics: avoid mismatch between variance index and hir generic
This happens because variances are constructed from ty generics, and ty generics are always constructed with lifetimes first.
https://github.com/rust-lang/rust/blob/b3aa8e7168a3d940122db3561289ffbf3f587262/compiler/rustc_hir_analysis/src/collect/generics_of.rs#L248-L269
Fixes rust-lang#83556File tree
3 files changed
+31
-3
lines changed- compiler/rustc_hir_analysis/src/check
- tests/ui/generics
3 files changed
+31
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1755 | 1755 | | |
1756 | 1756 | | |
1757 | 1757 | | |
| 1758 | + | |
| 1759 | + | |
1758 | 1760 | | |
1759 | 1761 | | |
1760 | 1762 | | |
1761 | 1763 | | |
1762 | 1764 | | |
1763 | 1765 | | |
1764 | 1766 | | |
1765 | | - | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
1766 | 1782 | | |
1767 | | - | |
| 1783 | + | |
1768 | 1784 | | |
1769 | 1785 | | |
1770 | 1786 | | |
1771 | | - | |
| 1787 | + | |
1772 | 1788 | | |
1773 | 1789 | | |
1774 | 1790 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
0 commit comments