Commit 0ad2026
committed
Auto merge of #25171 - quantheory:associated_time_long_paths, r=nikomatsakis
It is currently broken to use syntax such as `<T as Foo>::U::static_method()` where `<T as Foo>::U` is an associated type. I was able to fix this and simplify the parser a bit at the same time.
This also fixes the corresponding issue with associated types (#22139), but that's somewhat irrelevant because #22519 is still open, so this syntax still causes an error in type checking.
Similarly, although this fix applies to associated consts, #25046 forbids associated constants from using type parameters or `Self`, while #19559 means that associated types have to always have one of those two. Therefore, I think that you can't use an associated const from an associated type anyway.File tree
3 files changed
+83
-45
lines changed- src
- librustc_resolve
- libsyntax/parse
- test/run-pass
3 files changed
+83
-45
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2688 | 2688 | | |
2689 | 2689 | | |
2690 | 2690 | | |
| 2691 | + | |
| 2692 | + | |
2691 | 2693 | | |
2692 | | - | |
2693 | | - | |
2694 | | - | |
| 2694 | + | |
| 2695 | + | |
| 2696 | + | |
| 2697 | + | |
| 2698 | + | |
| 2699 | + | |
| 2700 | + | |
| 2701 | + | |
| 2702 | + | |
| 2703 | + | |
| 2704 | + | |
2695 | 2705 | | |
2696 | | - | |
2697 | | - | |
2698 | | - | |
2699 | | - | |
2700 | | - | |
2701 | | - | |
2702 | | - | |
2703 | 2706 | | |
2704 | 2707 | | |
2705 | 2708 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | 112 | | |
122 | 113 | | |
123 | 114 | | |
| |||
1359 | 1350 | | |
1360 | 1351 | | |
1361 | 1352 | | |
1362 | | - | |
| 1353 | + | |
1363 | 1354 | | |
1364 | 1355 | | |
1365 | 1356 | | |
| |||
1578 | 1569 | | |
1579 | 1570 | | |
1580 | 1571 | | |
1581 | | - | |
| 1572 | + | |
1582 | 1573 | | |
1583 | 1574 | | |
1584 | 1575 | | |
| |||
1599 | 1590 | | |
1600 | 1591 | | |
1601 | 1592 | | |
1602 | | - | |
1603 | | - | |
1604 | | - | |
1605 | | - | |
1606 | | - | |
1607 | | - | |
1608 | | - | |
1609 | | - | |
1610 | | - | |
1611 | | - | |
1612 | | - | |
1613 | | - | |
1614 | | - | |
1615 | | - | |
1616 | | - | |
1617 | | - | |
1618 | | - | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
1619 | 1602 | | |
1620 | 1603 | | |
1621 | | - | |
1622 | | - | |
1623 | | - | |
1624 | | - | |
| 1604 | + | |
1625 | 1605 | | |
1626 | 1606 | | |
1627 | 1607 | | |
| |||
2096 | 2076 | | |
2097 | 2077 | | |
2098 | 2078 | | |
2099 | | - | |
| 2079 | + | |
2100 | 2080 | | |
2101 | 2081 | | |
2102 | 2082 | | |
| |||
3176 | 3156 | | |
3177 | 3157 | | |
3178 | 3158 | | |
3179 | | - | |
| 3159 | + | |
3180 | 3160 | | |
3181 | 3161 | | |
3182 | 3162 | | |
| |||
3270 | 3250 | | |
3271 | 3251 | | |
3272 | 3252 | | |
3273 | | - | |
| 3253 | + | |
3274 | 3254 | | |
3275 | 3255 | | |
3276 | 3256 | | |
| |||
| 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 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
0 commit comments