Commit 717a117
committed
Correctly handle stability of
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`.#[diagnostic] attributes1 parent 59d4114 commit 717a117
File tree
5 files changed
+51
-6
lines changed- compiler
- rustc_feature/src
- rustc_metadata/src/rmeta
- rustc_middle/src/ty
5 files changed
+51
-6
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 | |
|---|---|---|---|
| |||
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 | |
|---|---|---|---|
| |||
1797 | 1797 | | |
1798 | 1798 | | |
1799 | 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 | + | |
| 1830 | + | |
1800 | 1831 | | |
1801 | 1832 | | |
1802 | 1833 | | |
| |||
0 commit comments