Commit b17a82d
committed
Remove
Currently, we don't remove `#[cfg]` attributes from a target when the
predicates pass. This PR removes all 'passing' `#[cfg]` attributes
during cfg-expansion, which causes derive proc-macros to never see any
`#[cfg]` attributes in the input token stream.
With #82608 merged, we can now do
this without losing spans.#[cfg] attributes during cfg-expansion1 parent 7953910 commit b17a82d
File tree
8 files changed
+27
-272
lines changed- compiler/rustc_expand/src
- src/test/ui
- conditional-compilation
- proc-macro
- rust-2018
8 files changed
+27
-272
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| 249 | + | |
249 | 250 | | |
250 | 251 | | |
251 | 252 | | |
| |||
267 | 268 | | |
268 | 269 | | |
269 | 270 | | |
270 | | - | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
271 | 277 | | |
272 | 278 | | |
273 | 279 | | |
| |||
294 | 300 | | |
295 | 301 | | |
296 | 302 | | |
297 | | - | |
298 | 303 | | |
299 | | - | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
300 | 307 | | |
301 | 308 | | |
302 | 309 | | |
| |||
535 | 542 | | |
536 | 543 | | |
537 | 544 | | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
| |||
Lines changed: 1 addition & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
| 66 | + | |
78 | 67 | | |
79 | 68 | | |
80 | 69 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
11 | 11 | | |
12 | 12 | | |
13 | 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 | 14 | | |
45 | 15 | | |
46 | 16 | | |
| |||
83 | 53 | | |
84 | 54 | | |
85 | 55 | | |
86 | | - | |
| 56 | + | |
87 | 57 | | |
88 | 58 | | |
89 | 59 | | |
| |||
103 | 73 | | |
104 | 74 | | |
105 | 75 | | |
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 | 76 | | |
137 | 77 | | |
138 | 78 | | |
| |||
0 commit comments