-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Commit 6bd3273
authored
Rollup merge of #143607 - JonathanBrouwer:proc_macro_attrs, r=jdonszelmann,traviscross
Port the proc macro attributes to the new attribute parsing infrastructure
Ports `#[proc_macro]`, `#[proc_macro_attribute]`, `#[proc_macro_derive]` and `#[rustc_builtin_macro]` to the new attribute parsing infrastructure for #131229 (comment)
I've split this PR into commits for reviewability, and left some comments to clarify things
I did 4 related attributes in one PR because they share a lot of their code and logic, and doing them separately is kind of annoying as I need to leave both the old and new parsing in place then.
r? ``@oli-obk``
cc ``@jdonszelmann``File tree
26 files changed
+520
-393
lines changed- compiler
- rustc_attr_data_structures/src
- rustc_attr_parsing/src
- attributes
- rustc_builtin_macros/src
- rustc_expand
- src
- rustc_hir/src
- rustc_metadata/src/rmeta
- rustc_middle/src/ty
- rustc_passes/src
- src
- librustdoc/clean
- tools/clippy/clippy_lints/src
- tests/ui
- attributes
- unsafe
- feature-gates
- proc-macro
26 files changed
+520
-393
lines changedLines changed: 12 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
416 | 416 |
| |
417 | 417 |
| |
418 | 418 |
| |
419 | + | ||
420 | + | ||
421 | + | ||
422 | + | ||
423 | + | ||
424 | + | ||
425 | + | ||
426 | + | ||
427 | + | ||
419 | 428 |
| |
420 | 429 |
| |
421 | 430 |
| |
422 | 431 |
| |
423 | 432 |
| |
424 | 433 |
| |
434 | + | ||
435 | + | ||
436 | + | ||
425 | 437 |
| |
426 | 438 |
| |
427 | 439 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
61 | 61 |
| |
62 | 62 |
| |
63 | 63 |
| |
64 | + | ||
65 | + | ||
66 | + | ||
64 | 67 |
| |
65 | 68 |
| |
69 | + | ||
66 | 70 |
| |
67 | 71 |
| |
68 | 72 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
41 | 41 |
| |
42 | 42 |
| |
43 | 43 |
| |
44 | + | ||
44 | 45 |
| |
45 | 46 |
| |
46 | 47 |
| |
|
Lines changed: 139 additions & 0 deletions
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 | + | ||
56 | + | ||
57 | + | ||
58 | + | ||
59 | + | ||
60 | + | ||
61 | + | ||
62 | + | ||
63 | + | ||
64 | + | ||
65 | + | ||
66 | + | ||
67 | + | ||
68 | + | ||
69 | + | ||
70 | + | ||
71 | + | ||
72 | + | ||
73 | + | ||
74 | + | ||
75 | + | ||
76 | + | ||
77 | + | ||
78 | + | ||
79 | + | ||
80 | + | ||
81 | + | ||
82 | + | ||
83 | + | ||
84 | + | ||
85 | + | ||
86 | + | ||
87 | + | ||
88 | + | ||
89 | + | ||
90 | + | ||
91 | + | ||
92 | + | ||
93 | + | ||
94 | + | ||
95 | + | ||
96 | + | ||
97 | + | ||
98 | + | ||
99 | + | ||
100 | + | ||
101 | + | ||
102 | + | ||
103 | + | ||
104 | + | ||
105 | + | ||
106 | + | ||
107 | + | ||
108 | + | ||
109 | + | ||
110 | + | ||
111 | + | ||
112 | + | ||
113 | + | ||
114 | + | ||
115 | + | ||
116 | + | ||
117 | + | ||
118 | + | ||
119 | + | ||
120 | + | ||
121 | + | ||
122 | + | ||
123 | + | ||
124 | + | ||
125 | + | ||
126 | + | ||
127 | + | ||
128 | + | ||
129 | + | ||
130 | + | ||
131 | + | ||
132 | + | ||
133 | + | ||
134 | + | ||
135 | + | ||
136 | + | ||
137 | + | ||
138 | + | ||
139 | + |
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
38 | 38 |
| |
39 | 39 |
| |
40 | 40 |
| |
41 | + | ||
42 | + | ||
43 | + | ||
41 | 44 |
| |
42 | 45 |
| |
43 | 46 |
| |
| |||
154 | 157 |
| |
155 | 158 |
| |
156 | 159 |
| |
160 | + | ||
161 | + | ||
157 | 162 |
| |
158 | 163 |
| |
159 | 164 |
| |
| |||
186 | 191 |
| |
187 | 192 |
| |
188 | 193 |
| |
194 | + | ||
195 | + | ||
189 | 196 |
| |
190 | 197 |
| |
191 | 198 |
| |
|
Lines changed: 21 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | - | ||
1 | + | ||
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
5 | - | ||
5 | + | ||
6 | 6 |
| |
7 | + | ||
8 | + | ||
7 | 9 |
| |
8 | - | ||
10 | + | ||
9 | 11 |
| |
10 | 12 |
| |
11 | 13 |
| |
| |||
22 | 24 |
| |
23 | 25 |
| |
24 | 26 |
| |
25 | - | ||
27 | + | ||
26 | 28 |
| |
27 | 29 |
| |
28 | 30 |
| |
| |||
41 | 43 |
| |
42 | 44 |
| |
43 | 45 |
| |
46 | + | ||
44 | 47 |
| |
45 | 48 |
| |
46 | 49 |
| |
| |||
63 | 66 |
| |
64 | 67 |
| |
65 | 68 |
| |
69 | + | ||
66 | 70 |
| |
67 | 71 |
| |
68 | 72 |
| |
| |||
98 | 102 |
| |
99 | 103 |
| |
100 | 104 |
| |
101 | - | ||
102 | - | ||
105 | + | ||
106 | + | ||
107 | + | ||
108 | + | ||
109 | + | ||
110 | + | ||
111 | + | ||
112 | + | ||
113 | + | ||
114 | + | ||
115 | + | ||
116 | + | ||
103 | 117 |
| |
104 | 118 |
| |
105 | 119 |
| |
| |||
110 | 124 |
| |
111 | 125 |
| |
112 | 126 |
| |
113 | - | ||
127 | + | ||
114 | 128 |
| |
115 | 129 |
| |
116 | 130 |
| |
|
Lines changed: 0 additions & 27 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | - | ||
2 | - | ||
3 | - | ||
4 | - | ||
5 | - | ||
6 | - | ||
7 | - | ||
8 | - | ||
9 | - | ||
10 | - | ||
11 | - | ||
12 | - | ||
13 | 1 |
| |
14 | 2 |
| |
15 | 3 |
| |
16 | 4 |
| |
17 | 5 |
| |
18 | - | ||
19 | - | ||
20 | - | ||
21 | - | ||
22 | - | ||
23 | - | ||
24 | 6 |
| |
25 | 7 |
| |
26 | 8 |
| |
| |||
71 | 53 |
| |
72 | 54 |
| |
73 | 55 |
| |
74 | - | ||
75 | - | ||
76 | - | ||
77 | 56 |
| |
78 | 57 |
| |
79 | 58 |
| |
| |||
165 | 144 |
| |
166 | 145 |
| |
167 | 146 |
| |
168 | - | ||
169 | - | ||
170 | - | ||
171 | - | ||
172 | - | ||
173 | - | ||
174 | 147 |
| |
175 | 148 |
| |
176 | 149 |
| |
|
0 commit comments