Commit b9139d2
committed
Auto merge of #57321 - petrochenkov:atokens, r=<try>
Implement basic input validation for built-in attributes + Stabilize `unrestricted_attribute_tokens`
Based on #57272
---
In accordance with the plan in https://internals.rust-lang.org/t/unrestricted-attribute-tokens-feature-status/8561:
- The correct top-level shape (`#[attr]` vs `#[attr(...)]` vs `#[attr = ...]`) is enforced for built-in attributes.
- For non-built-in non-macro attributes:
- The key-value form is restricted to bare minimum required to support what we support on stable - unsuffixed literals (#34981).
- Arbitrary token streams in remaining forms (`#[attr(token_stream)]`, `#[attr{token_stream}]`, `#[attr[token_stream]]` ) are now allowed without a feature gate, like in macro attributes.
This will close #55208 once completed.
Need to go through crater first.File tree
161 files changed
+1563
-1599
lines changed- src
- librustc_driver
- librustc_lint
- librustc_plugin
- librustc_typeck
- librustc
- hir
- lint
- middle
- traits
- ty
- libsyntax_ext
- libsyntax
- attr
- ext
- parse
- libterm/terminfo
- test
- run-pass/proc-macro
- ui
- conditional-compilation
- derives
- error-codes
- feature-gates
- feature-gate
- issues
- lint
- macros
- malformed
- marker_trait_attr
- nll/user-annotations
- on-unimplemented
- parser
- proc-macro
- rfc-2008-non-exhaustive
- span
- stability-attribute
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
161 files changed
+1563
-1599
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1180 | 1180 | | |
1181 | 1181 | | |
1182 | 1182 | | |
1183 | | - | |
1184 | | - | |
1185 | | - | |
1186 | | - | |
1187 | | - | |
1188 | | - | |
1189 | | - | |
1190 | | - | |
1191 | | - | |
1192 | | - | |
1193 | | - | |
1194 | | - | |
1195 | | - | |
1196 | | - | |
1197 | | - | |
1198 | | - | |
1199 | | - | |
1200 | | - | |
1201 | | - | |
1202 | | - | |
1203 | | - | |
1204 | 1183 | | |
1205 | 1184 | | |
1206 | 1185 | | |
| |||
2093 | 2072 | | |
2094 | 2073 | | |
2095 | 2074 | | |
2096 | | - | |
2097 | | - | |
2098 | | - | |
2099 | | - | |
2100 | | - | |
2101 | | - | |
2102 | | - | |
2103 | | - | |
2104 | | - | |
2105 | | - | |
2106 | | - | |
2107 | | - | |
2108 | | - | |
2109 | | - | |
2110 | 2075 | | |
2111 | 2076 | | |
2112 | 2077 | | |
| |||
2138 | 2103 | | |
2139 | 2104 | | |
2140 | 2105 | | |
| 2106 | + | |
2141 | 2107 | | |
2142 | 2108 | | |
2143 | 2109 | | |
| |||
2180 | 2146 | | |
2181 | 2147 | | |
2182 | 2148 | | |
| 2149 | + | |
2183 | 2150 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | 140 | | |
150 | 141 | | |
151 | 142 | | |
| |||
160 | 151 | | |
161 | 152 | | |
162 | 153 | | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | 154 | | |
170 | 155 | | |
171 | 156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
208 | | - | |
209 | 207 | | |
210 | 208 | | |
211 | 209 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 14 | + | |
| 15 | + | |
18 | 16 | | |
19 | 17 | | |
20 | | - | |
21 | | - | |
| 18 | + | |
22 | 19 | | |
23 | 20 | | |
24 | 21 | | |
| |||
30 | 27 | | |
31 | 28 | | |
32 | 29 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | 30 | | |
38 | 31 | | |
39 | 32 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
| 160 | + | |
164 | 161 | | |
165 | 162 | | |
166 | 163 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2801 | 2801 | | |
2802 | 2802 | | |
2803 | 2803 | | |
2804 | | - | |
| 2804 | + | |
2805 | 2805 | | |
2806 | 2806 | | |
2807 | 2807 | | |
2808 | 2808 | | |
2809 | 2809 | | |
2810 | 2810 | | |
2811 | 2811 | | |
2812 | | - | |
2813 | | - | |
2814 | 2812 | | |
2815 | 2813 | | |
2816 | 2814 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1101 | 1101 | | |
1102 | 1102 | | |
1103 | 1103 | | |
1104 | | - | |
| 1104 | + | |
1105 | 1105 | | |
1106 | | - | |
1107 | | - | |
| 1106 | + | |
1108 | 1107 | | |
1109 | 1108 | | |
1110 | 1109 | | |
1111 | | - | |
1112 | | - | |
1113 | | - | |
1114 | | - | |
1115 | | - | |
1116 | | - | |
1117 | | - | |
1118 | | - | |
1119 | | - | |
1120 | | - | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
1121 | 1118 | | |
1122 | 1119 | | |
1123 | 1120 | | |
| |||
1530 | 1527 | | |
1531 | 1528 | | |
1532 | 1529 | | |
1533 | | - | |
1534 | | - | |
1535 | | - | |
1536 | | - | |
1537 | | - | |
1538 | | - | |
1539 | | - | |
| 1530 | + | |
1540 | 1531 | | |
1541 | 1532 | | |
1542 | 1533 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
752 | 753 | | |
753 | 754 | | |
754 | 755 | | |
755 | | - | |
| 756 | + | |
756 | 757 | | |
757 | 758 | | |
758 | 759 | | |
| |||
771 | 772 | | |
772 | 773 | | |
773 | 774 | | |
774 | | - | |
| 775 | + | |
775 | 776 | | |
776 | 777 | | |
777 | 778 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
| 235 | + | |
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
259 | | - | |
| 259 | + | |
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 53 | + | |
57 | 54 | | |
58 | 55 | | |
59 | 56 | | |
| |||
0 commit comments