Commit 085744b
committed
Auto merge of #130036 - weiznich:diagnostic_unstable_tracking, r=compiler-errors
Correctly handle stability of `#[diagnostic]` attributes This commit changes the way we treat the stability of attributes in the `#[diagnostic]` namespace. Instead of relaying on ad-hoc checks to ensure at call side that a certain attribute is really usable at that location it centralises the logic to one place. For diagnostic attributes comming from other crates it just skips serializing attributes that are not stable and that do not have the corresponding feature enabled. For attributes from the current crate we can just use the feature information provided by `TyCtx`. r? `@compiler-errors`File tree
6 files changed
+51
-9
lines changed- compiler
- rustc_feature/src
- rustc_hir_analysis/src
- rustc_metadata/src/rmeta
- rustc_middle/src/ty
6 files changed
+51
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1186 | 1186 | | |
1187 | 1187 | | |
1188 | 1188 | | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
134 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
135 | 136 | | |
136 | 137 | | |
137 | 138 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1698 | 1698 | | |
1699 | 1699 | | |
1700 | 1700 | | |
1701 | | - | |
1702 | | - | |
1703 | 1701 | | |
1704 | 1702 | | |
1705 | 1703 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
797 | 798 | | |
798 | 799 | | |
799 | 800 | | |
800 | | - | |
| 801 | + | |
801 | 802 | | |
802 | 803 | | |
| 804 | + | |
803 | 805 | | |
804 | 806 | | |
805 | 807 | | |
| |||
812 | 814 | | |
813 | 815 | | |
814 | 816 | | |
815 | | - | |
| 817 | + | |
816 | 818 | | |
817 | 819 | | |
818 | 820 | | |
| |||
837 | 839 | | |
838 | 840 | | |
839 | 841 | | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
840 | 845 | | |
841 | 846 | | |
842 | 847 | | |
| |||
1343 | 1348 | | |
1344 | 1349 | | |
1345 | 1350 | | |
| 1351 | + | |
1346 | 1352 | | |
1347 | 1353 | | |
1348 | 1354 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3183 | 3183 | | |
3184 | 3184 | | |
3185 | 3185 | | |
3186 | | - | |
3187 | | - | |
| 3186 | + | |
3188 | 3187 | | |
3189 | 3188 | | |
3190 | 3189 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
266 | | - | |
267 | 266 | | |
268 | 267 | | |
269 | 268 | | |
| |||
1797 | 1796 | | |
1798 | 1797 | | |
1799 | 1798 | | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
| 1812 | + | |
| 1813 | + | |
| 1814 | + | |
| 1815 | + | |
| 1816 | + | |
| 1817 | + | |
| 1818 | + | |
| 1819 | + | |
| 1820 | + | |
| 1821 | + | |
| 1822 | + | |
| 1823 | + | |
| 1824 | + | |
| 1825 | + | |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
| 1829 | + | |
1800 | 1830 | | |
1801 | 1831 | | |
1802 | 1832 | | |
| |||
0 commit comments