Commit 050610e
authored
Rollup merge of rust-lang#121326 - fmease:detect-empty-leading-where-clauses-on-ty-aliases, r=compiler-errors
Detect empty leading where clauses on type aliases
1. commit: refactor the AST of type alias where clauses
* I could no longer bear the look of `.0.1` and `.1.0`
* Arguably moving `split` out of `TyAlias` into a substruct might not make that much sense from a semantic standpoint since it reprs an index into `TyAlias.predicates` but it's alright and it cleans up the usage sites of `TyAlias`
2. commit: fix an oversight: An empty leading where clause is still a leading where clause
* semantically reject empty leading where clauses on lazy type aliases
* e.g., on `#![feature(lazy_type_alias)] type X where = ();`
* make empty leading where clauses on assoc types trigger lint `deprecated_where_clause_location`
* e.g., `impl Trait for () { type X where = (); }`1 file changed
+6
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1651 | 1651 | | |
1652 | 1652 | | |
1653 | 1653 | | |
1654 | | - | |
1655 | | - | |
| 1654 | + | |
1656 | 1655 | | |
1657 | 1656 | | |
1658 | 1657 | | |
| |||
1672 | 1671 | | |
1673 | 1672 | | |
1674 | 1673 | | |
1675 | | - | |
1676 | 1674 | | |
1677 | 1675 | | |
1678 | 1676 | | |
1679 | 1677 | | |
1680 | 1678 | | |
1681 | 1679 | | |
1682 | 1680 | | |
1683 | | - | |
1684 | | - | |
1685 | | - | |
1686 | | - | |
1687 | | - | |
1688 | | - | |
1689 | | - | |
1690 | | - | |
1691 | | - | |
| 1681 | + | |
1692 | 1682 | | |
1693 | 1683 | | |
1694 | 1684 | | |
| |||
1724 | 1714 | | |
1725 | 1715 | | |
1726 | 1716 | | |
1727 | | - | |
1728 | | - | |
1729 | | - | |
1730 | | - | |
1731 | | - | |
1732 | | - | |
1733 | | - | |
1734 | | - | |
1735 | | - | |
| 1717 | + | |
1736 | 1718 | | |
1737 | 1719 | | |
1738 | 1720 | | |
1739 | | - | |
| 1721 | + | |
1740 | 1722 | | |
1741 | 1723 | | |
1742 | 1724 | | |
| |||
1771 | 1753 | | |
1772 | 1754 | | |
1773 | 1755 | | |
1774 | | - | |
| 1756 | + | |
1775 | 1757 | | |
1776 | 1758 | | |
1777 | 1759 | | |
| |||
1795 | 1777 | | |
1796 | 1778 | | |
1797 | 1779 | | |
1798 | | - | |
| 1780 | + | |
1799 | 1781 | | |
1800 | 1782 | | |
1801 | 1783 | | |
| |||
0 commit comments