summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/test/ui/proc-macro/issue-75930-derive-cfg.rs42
-rw-r--r--src/test/ui/proc-macro/issue-75930-derive-cfg.stdout1616
2 files changed, 1652 insertions, 6 deletions
diff --git a/src/test/ui/proc-macro/issue-75930-derive-cfg.rs b/src/test/ui/proc-macro/issue-75930-derive-cfg.rs
index e0f248c..a051d23 100644
--- a/src/test/ui/proc-macro/issue-75930-derive-cfg.rs
+++ b/src/test/ui/proc-macro/issue-75930-derive-cfg.rs
@@ -1,29 +1,65 @@
1// check-pass 1// check-pass
2// compile-flags: -Z span-debug 2// compile-flags: -Z span-debug --error-format human
3// aux-build:test-macros.rs 3// aux-build:test-macros.rs
4 4
5// Regression test for issue #75930 5// Regression test for issue #75930
6// Tests that we cfg-strip all targets before invoking 6// Tests that we cfg-strip all targets before invoking
7// a derive macro 7// a derive macro
8// We need '--error-format human' to stop compiletest from
9// trying to interpret proc-macro output as JSON messages
10// (a pretty-printed struct may cause a line to start with '{' )
11// FIXME: We currently lose spans here (see issue #43081)
8 12
9#[macro_use] 13#[macro_use]
10extern crate test_macros; 14extern crate test_macros;
11 15
16#[print_helper(a)]
17#[cfg_attr(not(FALSE), allow(dead_code))]
18#[print_attr]
12#[derive(Print)] 19#[derive(Print)]
20#[print_helper(b)]
13struct Foo<#[cfg(FALSE)] A, B> { 21struct Foo<#[cfg(FALSE)] A, B> {
14 #[cfg(FALSE)] first: String, 22 #[cfg(FALSE)] first: String,
15 second: bool, 23 #[cfg_attr(FALSE, deny(warnings))] second: bool,
16 third: [u8; { 24 third: [u8; {
17 #[cfg(FALSE)] struct Bar; 25 #[cfg(FALSE)] struct Bar;
18 #[cfg(not(FALSE))] struct Inner; 26 #[cfg(not(FALSE))] struct Inner;
19 #[cfg(FALSE)] let a = 25; 27 #[cfg(FALSE)] let a = 25;
20 match true { 28 match true {
21 #[cfg(FALSE)] true => {}, 29 #[cfg(FALSE)] true => {},
22 false => {}, 30 #[cfg_attr(not(FALSE), allow(warnings))] false => {},
23 _ => {} 31 _ => {}
24 }; 32 };
33
34 #[print_helper(should_be_removed)]
35 fn removed_fn() {
36 #![cfg(FALSE)]
37 }
38
39 #[print_helper(c)] #[cfg(not(FALSE))] fn kept_fn() {
40 #![cfg(not(FALSE))]
41 let my_val = true;
42 }
43
44 enum TupleEnum {
45 Foo(
46 #[cfg(FALSE)] u8,
47 #[cfg(FALSE)] bool,
48 #[cfg(not(FALSE))] i32,
49 #[cfg(FALSE)] String, u8
50 )
51 }
52
53 struct TupleStruct(
54 #[cfg(FALSE)] String,
55 #[cfg(not(FALSE))] i32,
56 #[cfg(FALSE)] bool,
57 u8
58 );
59
25 0 60 0
26 }], 61 }],
62 #[print_helper(d)]
27 fourth: B 63 fourth: B
28} 64}
29 65
diff --git a/src/test/ui/proc-macro/issue-75930-derive-cfg.stdout b/src/test/ui/proc-macro/issue-75930-derive-cfg.stdout
index 0371133..f3daa56 100644
--- a/src/test/ui/proc-macro/issue-75930-derive-cfg.stdout
+++ b/src/test/ui/proc-macro/issue-75930-derive-cfg.stdout
@@ -1,13 +1,1288 @@
1PRINT-DERIVE INPUT (DISPLAY): struct Foo < B > 1PRINT-ATTR INPUT (DISPLAY): #[allow(dead_code)] #[derive(Print)] #[print_helper(b)] #[print_helper(a)]
2struct Foo < #[cfg(FALSE)] A, B >
3{
4 #[cfg(FALSE)] first : String, #[cfg_attr(FALSE, deny(warnings))] second :
5 bool, third :
6 [u8 ;
7 {
8 #[cfg(FALSE)] struct Bar ; #[cfg(not(FALSE))] struct Inner ;
9 #[cfg(FALSE)] let a = 25 ; match true
10 {
11 #[cfg(FALSE)] true => { },
12 #[cfg_attr(not(FALSE), allow(warnings))] false => { }, _ => { }
13 } ; #[print_helper(should_be_removed)] fn removed_fn()
14 { # ! [cfg(FALSE)] } #[print_helper(c)] #[cfg(not(FALSE))] fn
15 kept_fn() { # ! [cfg(not(FALSE))] let my_val = true ; } enum
16 TupleEnum
17 {
18 Foo(#[cfg(FALSE)] u8, #[cfg(FALSE)] bool, #[cfg(not(FALSE))] i32,
19 #[cfg(FALSE)] String, u8)
20 } struct
21 TupleStruct(#[cfg(FALSE)] String, #[cfg(not(FALSE))] i32,
22 #[cfg(FALSE)] bool, u8) ; 0
23 }], #[print_helper(d)] fourth : B
24}
25PRINT-ATTR INPUT (DEBUG): TokenStream [
26 Punct {
27 ch: '#',
28 spacing: Alone,
29 span: $DIR/issue-75930-derive-cfg.rs:17:24: 17:40 (#0),
30 },
31 Group {
32 delimiter: Bracket,
33 stream: TokenStream [
34 Ident {
35 ident: "allow",
36 span: $DIR/issue-75930-derive-cfg.rs:17:24: 17:29 (#0),
37 },
38 Group {
39 delimiter: Parenthesis,
40 stream: TokenStream [
41 Ident {
42 ident: "dead_code",
43 span: $DIR/issue-75930-derive-cfg.rs:17:30: 17:39 (#0),
44 },
45 ],
46 span: $DIR/issue-75930-derive-cfg.rs:17:29: 17:40 (#0),
47 },
48 ],
49 span: $DIR/issue-75930-derive-cfg.rs:17:24: 17:40 (#0),
50 },
51 Punct {
52 ch: '#',
53 spacing: Alone,
54 span: $DIR/issue-75930-derive-cfg.rs:19:1: 19:17 (#0),
55 },
56 Group {
57 delimiter: Bracket,
58 stream: TokenStream [
59 Ident {
60 ident: "derive",
61 span: $DIR/issue-75930-derive-cfg.rs:19:3: 19:9 (#0),
62 },
63 Group {
64 delimiter: Parenthesis,
65 stream: TokenStream [
66 Ident {
67 ident: "Print",
68 span: $DIR/issue-75930-derive-cfg.rs:19:10: 19:15 (#0),
69 },
70 ],
71 span: $DIR/issue-75930-derive-cfg.rs:19:9: 19:16 (#0),
72 },
73 ],
74 span: $DIR/issue-75930-derive-cfg.rs:19:1: 19:17 (#0),
75 },
76 Punct {
77 ch: '#',
78 spacing: Alone,
79 span: $DIR/issue-75930-derive-cfg.rs:20:1: 20:19 (#0),
80 },
81 Group {
82 delimiter: Bracket,
83 stream: TokenStream [
84 Ident {
85 ident: "print_helper",
86 span: $DIR/issue-75930-derive-cfg.rs:20:3: 20:15 (#0),
87 },
88 Group {
89 delimiter: Parenthesis,
90 stream: TokenStream [
91 Ident {
92 ident: "b",
93 span: $DIR/issue-75930-derive-cfg.rs:20:16: 20:17 (#0),
94 },
95 ],
96 span: $DIR/issue-75930-derive-cfg.rs:20:15: 20:18 (#0),
97 },
98 ],
99 span: $DIR/issue-75930-derive-cfg.rs:20:1: 20:19 (#0),
100 },
101 Punct {
102 ch: '#',
103 spacing: Alone,
104 span: $DIR/issue-75930-derive-cfg.rs:16:1: 16:19 (#0),
105 },
106 Group {
107 delimiter: Bracket,
108 stream: TokenStream [
109 Ident {
110 ident: "print_helper",
111 span: $DIR/issue-75930-derive-cfg.rs:16:3: 16:15 (#0),
112 },
113 Group {
114 delimiter: Parenthesis,
115 stream: TokenStream [
116 Ident {
117 ident: "a",
118 span: $DIR/issue-75930-derive-cfg.rs:16:16: 16:17 (#0),
119 },
120 ],
121 span: $DIR/issue-75930-derive-cfg.rs:16:15: 16:18 (#0),
122 },
123 ],
124 span: $DIR/issue-75930-derive-cfg.rs:16:1: 16:19 (#0),
125 },
126 Ident {
127 ident: "struct",
128 span: $DIR/issue-75930-derive-cfg.rs:21:1: 21:7 (#0),
129 },
130 Ident {
131 ident: "Foo",
132 span: $DIR/issue-75930-derive-cfg.rs:21:8: 21:11 (#0),
133 },
134 Punct {
135 ch: '<',
136 spacing: Joint,
137 span: $DIR/issue-75930-derive-cfg.rs:21:11: 21:12 (#0),
138 },
139 Punct {
140 ch: '#',
141 spacing: Alone,
142 span: $DIR/issue-75930-derive-cfg.rs:21:12: 21:13 (#0),
143 },
144 Group {
145 delimiter: Bracket,
146 stream: TokenStream [
147 Ident {
148 ident: "cfg",
149 span: $DIR/issue-75930-derive-cfg.rs:21:14: 21:17 (#0),
150 },
151 Group {
152 delimiter: Parenthesis,
153 stream: TokenStream [
154 Ident {
155 ident: "FALSE",
156 span: $DIR/issue-75930-derive-cfg.rs:21:18: 21:23 (#0),
157 },
158 ],
159 span: $DIR/issue-75930-derive-cfg.rs:21:17: 21:24 (#0),
160 },
161 ],
162 span: $DIR/issue-75930-derive-cfg.rs:21:13: 21:25 (#0),
163 },
164 Ident {
165 ident: "A",
166 span: $DIR/issue-75930-derive-cfg.rs:21:26: 21:27 (#0),
167 },
168 Punct {
169 ch: ',',
170 spacing: Alone,
171 span: $DIR/issue-75930-derive-cfg.rs:21:27: 21:28 (#0),
172 },
173 Ident {
174 ident: "B",
175 span: $DIR/issue-75930-derive-cfg.rs:21:29: 21:30 (#0),
176 },
177 Punct {
178 ch: '>',
179 spacing: Alone,
180 span: $DIR/issue-75930-derive-cfg.rs:21:30: 21:31 (#0),
181 },
182 Group {
183 delimiter: Brace,
184 stream: TokenStream [
185 Punct {
186 ch: '#',
187 spacing: Alone,
188 span: $DIR/issue-75930-derive-cfg.rs:22:5: 22:6 (#0),
189 },
190 Group {
191 delimiter: Bracket,
192 stream: TokenStream [
193 Ident {
194 ident: "cfg",
195 span: $DIR/issue-75930-derive-cfg.rs:22:7: 22:10 (#0),
196 },
197 Group {
198 delimiter: Parenthesis,
199 stream: TokenStream [
200 Ident {
201 ident: "FALSE",
202 span: $DIR/issue-75930-derive-cfg.rs:22:11: 22:16 (#0),
203 },
204 ],
205 span: $DIR/issue-75930-derive-cfg.rs:22:10: 22:17 (#0),
206 },
207 ],
208 span: $DIR/issue-75930-derive-cfg.rs:22:6: 22:18 (#0),
209 },
210 Ident {
211 ident: "first",
212 span: $DIR/issue-75930-derive-cfg.rs:22:19: 22:24 (#0),
213 },
214 Punct {
215 ch: ':',
216 spacing: Alone,
217 span: $DIR/issue-75930-derive-cfg.rs:22:24: 22:25 (#0),
218 },
219 Ident {
220 ident: "String",
221 span: $DIR/issue-75930-derive-cfg.rs:22:26: 22:32 (#0),
222 },
223 Punct {
224 ch: ',',
225 spacing: Alone,
226 span: $DIR/issue-75930-derive-cfg.rs:22:32: 22:33 (#0),
227 },
228 Punct {
229 ch: '#',
230 spacing: Alone,
231 span: $DIR/issue-75930-derive-cfg.rs:23:5: 23:6 (#0),
232 },
233 Group {
234 delimiter: Bracket,
235 stream: TokenStream [
236 Ident {
237 ident: "cfg_attr",
238 span: $DIR/issue-75930-derive-cfg.rs:23:7: 23:15 (#0),
239 },
240 Group {
241 delimiter: Parenthesis,
242 stream: TokenStream [
243 Ident {
244 ident: "FALSE",
245 span: $DIR/issue-75930-derive-cfg.rs:23:16: 23:21 (#0),
246 },
247 Punct {
248 ch: ',',
249 spacing: Alone,
250 span: $DIR/issue-75930-derive-cfg.rs:23:21: 23:22 (#0),
251 },
252 Ident {
253 ident: "deny",
254 span: $DIR/issue-75930-derive-cfg.rs:23:23: 23:27 (#0),
255 },
256 Group {
257 delimiter: Parenthesis,
258 stream: TokenStream [
259 Ident {
260 ident: "warnings",
261 span: $DIR/issue-75930-derive-cfg.rs:23:28: 23:36 (#0),
262 },
263 ],
264 span: $DIR/issue-75930-derive-cfg.rs:23:27: 23:37 (#0),
265 },
266 ],
267 span: $DIR/issue-75930-derive-cfg.rs:23:15: 23:38 (#0),
268 },
269 ],
270 span: $DIR/issue-75930-derive-cfg.rs:23:6: 23:39 (#0),
271 },
272 Ident {
273 ident: "second",
274 span: $DIR/issue-75930-derive-cfg.rs:23:40: 23:46 (#0),
275 },
276 Punct {
277 ch: ':',
278 spacing: Alone,
279 span: $DIR/issue-75930-derive-cfg.rs:23:46: 23:47 (#0),
280 },
281 Ident {
282 ident: "bool",
283 span: $DIR/issue-75930-derive-cfg.rs:23:48: 23:52 (#0),
284 },
285 Punct {
286 ch: ',',
287 spacing: Alone,
288 span: $DIR/issue-75930-derive-cfg.rs:23:52: 23:53 (#0),
289 },
290 Ident {
291 ident: "third",
292 span: $DIR/issue-75930-derive-cfg.rs:24:5: 24:10 (#0),
293 },
294 Punct {
295 ch: ':',
296 spacing: Alone,
297 span: $DIR/issue-75930-derive-cfg.rs:24:10: 24:11 (#0),
298 },
299 Group {
300 delimiter: Bracket,
301 stream: TokenStream [
302 Ident {
303 ident: "u8",
304 span: $DIR/issue-75930-derive-cfg.rs:24:13: 24:15 (#0),
305 },
306 Punct {
307 ch: ';',
308 spacing: Alone,
309 span: $DIR/issue-75930-derive-cfg.rs:24:15: 24:16 (#0),
310 },
311 Group {
312 delimiter: Brace,
313 stream: TokenStream [
314 Punct {
315 ch: '#',
316 spacing: Alone,
317 span: $DIR/issue-75930-derive-cfg.rs:25:9: 25:10 (#0),
318 },
319 Group {
320 delimiter: Bracket,
321 stream: TokenStream [
322 Ident {
323 ident: "cfg",
324 span: $DIR/issue-75930-derive-cfg.rs:25:11: 25:14 (#0),
325 },
326 Group {
327 delimiter: Parenthesis,
328 stream: TokenStream [
329 Ident {
330 ident: "FALSE",
331 span: $DIR/issue-75930-derive-cfg.rs:25:15: 25:20 (#0),
332 },
333 ],
334 span: $DIR/issue-75930-derive-cfg.rs:25:14: 25:21 (#0),
335 },
336 ],
337 span: $DIR/issue-75930-derive-cfg.rs:25:10: 25:22 (#0),
338 },
339 Ident {
340 ident: "struct",
341 span: $DIR/issue-75930-derive-cfg.rs:25:23: 25:29 (#0),
342 },
343 Ident {
344 ident: "Bar",
345 span: $DIR/issue-75930-derive-cfg.rs:25:30: 25:33 (#0),
346 },
347 Punct {
348 ch: ';',
349 spacing: Alone,
350 span: $DIR/issue-75930-derive-cfg.rs:25:33: 25:34 (#0),
351 },
352 Punct {
353 ch: '#',
354 spacing: Alone,
355 span: $DIR/issue-75930-derive-cfg.rs:26:9: 26:10 (#0),
356 },
357 Group {
358 delimiter: Bracket,
359 stream: TokenStream [
360 Ident {
361 ident: "cfg",
362 span: $DIR/issue-75930-derive-cfg.rs:26:11: 26:14 (#0),
363 },
364 Group {
365 delimiter: Parenthesis,
366 stream: TokenStream [
367 Ident {
368 ident: "not",
369 span: $DIR/issue-75930-derive-cfg.rs:26:15: 26:18 (#0),
370 },
371 Group {
372 delimiter: Parenthesis,
373 stream: TokenStream [
374 Ident {
375 ident: "FALSE",
376 span: $DIR/issue-75930-derive-cfg.rs:26:19: 26:24 (#0),
377 },
378 ],
379 span: $DIR/issue-75930-derive-cfg.rs:26:18: 26:25 (#0),
380 },
381 ],
382 span: $DIR/issue-75930-derive-cfg.rs:26:14: 26:26 (#0),
383 },
384 ],
385 span: $DIR/issue-75930-derive-cfg.rs:26:10: 26:27 (#0),
386 },
387 Ident {
388 ident: "struct",
389 span: $DIR/issue-75930-derive-cfg.rs:26:28: 26:34 (#0),
390 },
391 Ident {
392 ident: "Inner",
393 span: $DIR/issue-75930-derive-cfg.rs:26:35: 26:40 (#0),
394 },
395 Punct {
396 ch: ';',
397 spacing: Alone,
398 span: $DIR/issue-75930-derive-cfg.rs:26:40: 26:41 (#0),
399 },
400 Punct {
401 ch: '#',
402 spacing: Alone,
403 span: $DIR/issue-75930-derive-cfg.rs:27:9: 27:10 (#0),
404 },
405 Group {
406 delimiter: Bracket,
407 stream: TokenStream [
408 Ident {
409 ident: "cfg",
410 span: $DIR/issue-75930-derive-cfg.rs:27:11: 27:14 (#0),
411 },
412 Group {
413 delimiter: Parenthesis,
414 stream: TokenStream [
415 Ident {
416 ident: "FALSE",
417 span: $DIR/issue-75930-derive-cfg.rs:27:15: 27:20 (#0),
418 },
419 ],
420 span: $DIR/issue-75930-derive-cfg.rs:27:14: 27:21 (#0),
421 },
422 ],
423 span: $DIR/issue-75930-derive-cfg.rs:27:10: 27:22 (#0),
424 },
425 Ident {
426 ident: "let",
427 span: $DIR/issue-75930-derive-cfg.rs:27:23: 27:26 (#0),
428 },
429 Ident {
430 ident: "a",
431 span: $DIR/issue-75930-derive-cfg.rs:27:27: 27:28 (#0),
432 },
433 Punct {
434 ch: '=',
435 spacing: Alone,
436 span: $DIR/issue-75930-derive-cfg.rs:27:29: 27:30 (#0),
437 },
438 Literal {
439 kind: Integer,
440 symbol: "25",
441 suffix: None,
442 span: $DIR/issue-75930-derive-cfg.rs:27:31: 27:33 (#0),
443 },
444 Punct {
445 ch: ';',
446 spacing: Alone,
447 span: $DIR/issue-75930-derive-cfg.rs:27:33: 27:34 (#0),
448 },
449 Ident {
450 ident: "match",
451 span: $DIR/issue-75930-derive-cfg.rs:28:9: 28:14 (#0),
452 },
453 Ident {
454 ident: "true",
455 span: $DIR/issue-75930-derive-cfg.rs:28:15: 28:19 (#0),
456 },
457 Group {
458 delimiter: Brace,
459 stream: TokenStream [
460 Punct {
461 ch: '#',
462 spacing: Alone,
463 span: $DIR/issue-75930-derive-cfg.rs:29:13: 29:14 (#0),
464 },
465 Group {
466 delimiter: Bracket,
467 stream: TokenStream [
468 Ident {
469 ident: "cfg",
470 span: $DIR/issue-75930-derive-cfg.rs:29:15: 29:18 (#0),
471 },
472 Group {
473 delimiter: Parenthesis,
474 stream: TokenStream [
475 Ident {
476 ident: "FALSE",
477 span: $DIR/issue-75930-derive-cfg.rs:29:19: 29:24 (#0),
478 },
479 ],
480 span: $DIR/issue-75930-derive-cfg.rs:29:18: 29:25 (#0),
481 },
482 ],
483 span: $DIR/issue-75930-derive-cfg.rs:29:14: 29:26 (#0),
484 },
485 Ident {
486 ident: "true",
487 span: $DIR/issue-75930-derive-cfg.rs:29:27: 29:31 (#0),
488 },
489 Punct {
490 ch: '=',
491 spacing: Joint,
492 span: $DIR/issue-75930-derive-cfg.rs:29:32: 29:34 (#0),
493 },
494 Punct {
495 ch: '>',
496 spacing: Alone,
497 span: $DIR/issue-75930-derive-cfg.rs:29:32: 29:34 (#0),
498 },
499 Group {
500 delimiter: Brace,
501 stream: TokenStream [],
502 span: $DIR/issue-75930-derive-cfg.rs:29:35: 29:37 (#0),
503 },
504 Punct {
505 ch: ',',
506 spacing: Alone,
507 span: $DIR/issue-75930-derive-cfg.rs:29:37: 29:38 (#0),
508 },
509 Punct {
510 ch: '#',
511 spacing: Alone,
512 span: $DIR/issue-75930-derive-cfg.rs:30:13: 30:14 (#0),
513 },
514 Group {
515 delimiter: Bracket,
516 stream: TokenStream [
517 Ident {
518 ident: "cfg_attr",
519 span: $DIR/issue-75930-derive-cfg.rs:30:15: 30:23 (#0),
520 },
521 Group {
522 delimiter: Parenthesis,
523 stream: TokenStream [
524 Ident {
525 ident: "not",
526 span: $DIR/issue-75930-derive-cfg.rs:30:24: 30:27 (#0),
527 },
528 Group {
529 delimiter: Parenthesis,
530 stream: TokenStream [
531 Ident {
532 ident: "FALSE",
533 span: $DIR/issue-75930-derive-cfg.rs:30:28: 30:33 (#0),
534 },
535 ],
536 span: $DIR/issue-75930-derive-cfg.rs:30:27: 30:34 (#0),
537 },
538 Punct {
539 ch: ',',
540 spacing: Alone,
541 span: $DIR/issue-75930-derive-cfg.rs:30:34: 30:35 (#0),
542 },
543 Ident {
544 ident: "allow",
545 span: $DIR/issue-75930-derive-cfg.rs:30:36: 30:41 (#0),
546 },
547 Group {
548 delimiter: Parenthesis,
549 stream: TokenStream [
550 Ident {
551 ident: "warnings",
552 span: $DIR/issue-75930-derive-cfg.rs:30:42: 30:50 (#0),
553 },
554 ],
555 span: $DIR/issue-75930-derive-cfg.rs:30:41: 30:51 (#0),
556 },
557 ],
558 span: $DIR/issue-75930-derive-cfg.rs:30:23: 30:52 (#0),
559 },
560 ],
561 span: $DIR/issue-75930-derive-cfg.rs:30:14: 30:53 (#0),
562 },
563 Ident {
564 ident: "false",
565 span: $DIR/issue-75930-derive-cfg.rs:30:54: 30:59 (#0),
566 },
567 Punct {
568 ch: '=',
569 spacing: Joint,
570 span: $DIR/issue-75930-derive-cfg.rs:30:60: 30:62 (#0),
571 },
572 Punct {
573 ch: '>',
574 spacing: Alone,
575 span: $DIR/issue-75930-derive-cfg.rs:30:60: 30:62 (#0),
576 },
577 Group {
578 delimiter: Brace,
579 stream: TokenStream [],
580 span: $DIR/issue-75930-derive-cfg.rs:30:63: 30:65 (#0),
581 },
582 Punct {
583 ch: ',',
584 spacing: Alone,
585 span: $DIR/issue-75930-derive-cfg.rs:30:65: 30:66 (#0),
586 },
587 Ident {
588 ident: "_",
589 span: $DIR/issue-75930-derive-cfg.rs:31:13: 31:14 (#0),
590 },
591 Punct {
592 ch: '=',
593 spacing: Joint,
594 span: $DIR/issue-75930-derive-cfg.rs:31:15: 31:17 (#0),
595 },
596 Punct {
597 ch: '>',
598 spacing: Alone,
599 span: $DIR/issue-75930-derive-cfg.rs:31:15: 31:17 (#0),
600 },
601 Group {
602 delimiter: Brace,
603 stream: TokenStream [],
604 span: $DIR/issue-75930-derive-cfg.rs:31:18: 31:20 (#0),
605 },
606 ],
607 span: $DIR/issue-75930-derive-cfg.rs:28:20: 32:10 (#0),
608 },
609 Punct {
610 ch: ';',
611 spacing: Alone,
612 span: $DIR/issue-75930-derive-cfg.rs:32:10: 32:11 (#0),
613 },
614 Punct {
615 ch: '#',
616 spacing: Alone,
617 span: $DIR/issue-75930-derive-cfg.rs:34:9: 34:10 (#0),
618 },
619 Group {
620 delimiter: Bracket,
621 stream: TokenStream [
622 Ident {
623 ident: "print_helper",
624 span: $DIR/issue-75930-derive-cfg.rs:34:11: 34:23 (#0),
625 },
626 Group {
627 delimiter: Parenthesis,
628 stream: TokenStream [
629 Ident {
630 ident: "should_be_removed",
631 span: $DIR/issue-75930-derive-cfg.rs:34:24: 34:41 (#0),
632 },
633 ],
634 span: $DIR/issue-75930-derive-cfg.rs:34:23: 34:42 (#0),
635 },
636 ],
637 span: $DIR/issue-75930-derive-cfg.rs:34:10: 34:43 (#0),
638 },
639 Ident {
640 ident: "fn",
641 span: $DIR/issue-75930-derive-cfg.rs:35:9: 35:11 (#0),
642 },
643 Ident {
644 ident: "removed_fn",
645 span: $DIR/issue-75930-derive-cfg.rs:35:12: 35:22 (#0),
646 },
647 Group {
648 delimiter: Parenthesis,
649 stream: TokenStream [],
650 span: $DIR/issue-75930-derive-cfg.rs:35:22: 35:24 (#0),
651 },
652 Group {
653 delimiter: Brace,
654 stream: TokenStream [
655 Punct {
656 ch: '#',
657 spacing: Joint,
658 span: $DIR/issue-75930-derive-cfg.rs:36:13: 36:14 (#0),
659 },
660 Punct {
661 ch: '!',
662 spacing: Alone,
663 span: $DIR/issue-75930-derive-cfg.rs:36:14: 36:15 (#0),
664 },
665 Group {
666 delimiter: Bracket,
667 stream: TokenStream [
668 Ident {
669 ident: "cfg",
670 span: $DIR/issue-75930-derive-cfg.rs:36:16: 36:19 (#0),
671 },
672 Group {
673 delimiter: Parenthesis,
674 stream: TokenStream [
675 Ident {
676 ident: "FALSE",
677 span: $DIR/issue-75930-derive-cfg.rs:36:20: 36:25 (#0),
678 },
679 ],
680 span: $DIR/issue-75930-derive-cfg.rs:36:19: 36:26 (#0),
681 },
682 ],
683 span: $DIR/issue-75930-derive-cfg.rs:36:15: 36:27 (#0),
684 },
685 ],
686 span: $DIR/issue-75930-derive-cfg.rs:35:25: 37:10 (#0),
687 },
688 Punct {
689 ch: '#',
690 spacing: Alone,
691 span: $DIR/issue-75930-derive-cfg.rs:39:9: 39:10 (#0),
692 },
693 Group {
694 delimiter: Bracket,
695 stream: TokenStream [
696 Ident {
697 ident: "print_helper",
698 span: $DIR/issue-75930-derive-cfg.rs:39:11: 39:23 (#0),
699 },
700 Group {
701 delimiter: Parenthesis,
702 stream: TokenStream [
703 Ident {
704 ident: "c",
705 span: $DIR/issue-75930-derive-cfg.rs:39:24: 39:25 (#0),
706 },
707 ],
708 span: $DIR/issue-75930-derive-cfg.rs:39:23: 39:26 (#0),
709 },
710 ],
711 span: $DIR/issue-75930-derive-cfg.rs:39:10: 39:27 (#0),
712 },
713 Punct {
714 ch: '#',
715 spacing: Alone,
716 span: $DIR/issue-75930-derive-cfg.rs:39:28: 39:29 (#0),
717 },
718 Group {
719 delimiter: Bracket,
720 stream: TokenStream [
721 Ident {
722 ident: "cfg",
723 span: $DIR/issue-75930-derive-cfg.rs:39:30: 39:33 (#0),
724 },
725 Group {
726 delimiter: Parenthesis,
727 stream: TokenStream [
728 Ident {
729 ident: "not",
730 span: $DIR/issue-75930-derive-cfg.rs:39:34: 39:37 (#0),
731 },
732 Group {
733 delimiter: Parenthesis,
734 stream: TokenStream [
735 Ident {
736 ident: "FALSE",
737 span: $DIR/issue-75930-derive-cfg.rs:39:38: 39:43 (#0),
738 },
739 ],
740 span: $DIR/issue-75930-derive-cfg.rs:39:37: 39:44 (#0),
741 },
742 ],
743 span: $DIR/issue-75930-derive-cfg.rs:39:33: 39:45 (#0),
744 },
745 ],
746 span: $DIR/issue-75930-derive-cfg.rs:39:29: 39:46 (#0),
747 },
748 Ident {
749 ident: "fn",
750 span: $DIR/issue-75930-derive-cfg.rs:39:47: 39:49 (#0),
751 },
752 Ident {
753 ident: "kept_fn",
754 span: $DIR/issue-75930-derive-cfg.rs:39:50: 39:57 (#0),
755 },
756 Group {
757 delimiter: Parenthesis,
758 stream: TokenStream [],
759 span: $DIR/issue-75930-derive-cfg.rs:39:57: 39:59 (#0),
760 },
761 Group {
762 delimiter: Brace,
763 stream: TokenStream [
764 Punct {
765 ch: '#',
766 spacing: Joint,
767 span: $DIR/issue-75930-derive-cfg.rs:40:13: 40:14 (#0),
768 },
769 Punct {
770 ch: '!',
771 spacing: Alone,
772 span: $DIR/issue-75930-derive-cfg.rs:40:14: 40:15 (#0),
773 },
774 Group {
775 delimiter: Bracket,
776 stream: TokenStream [
777 Ident {
778 ident: "cfg",
779 span: $DIR/issue-75930-derive-cfg.rs:40:16: 40:19 (#0),
780 },
781 Group {
782 delimiter: Parenthesis,
783 stream: TokenStream [
784 Ident {
785 ident: "not",
786 span: $DIR/issue-75930-derive-cfg.rs:40:20: 40:23 (#0),
787 },
788 Group {
789 delimiter: Parenthesis,
790 stream: TokenStream [
791 Ident {
792 ident: "FALSE",
793 span: $DIR/issue-75930-derive-cfg.rs:40:24: 40:29 (#0),
794 },
795 ],
796 span: $DIR/issue-75930-derive-cfg.rs:40:23: 40:30 (#0),
797 },
798 ],
799 span: $DIR/issue-75930-derive-cfg.rs:40:19: 40:31 (#0),
800 },
801 ],
802 span: $DIR/issue-75930-derive-cfg.rs:40:15: 40:32 (#0),
803 },
804 Ident {
805 ident: "let",
806 span: $DIR/issue-75930-derive-cfg.rs:41:13: 41:16 (#0),
807 },
808 Ident {
809 ident: "my_val",
810 span: $DIR/issue-75930-derive-cfg.rs:41:17: 41:23 (#0),
811 },
812 Punct {
813 ch: '=',
814 spacing: Alone,
815 span: $DIR/issue-75930-derive-cfg.rs:41:24: 41:25 (#0),
816 },
817 Ident {
818 ident: "true",
819 span: $DIR/issue-75930-derive-cfg.rs:41:26: 41:30 (#0),
820 },
821 Punct {
822 ch: ';',
823 spacing: Alone,
824 span: $DIR/issue-75930-derive-cfg.rs:41:30: 41:31 (#0),
825 },
826 ],
827 span: $DIR/issue-75930-derive-cfg.rs:39:60: 42:10 (#0),
828 },
829 Ident {
830 ident: "enum",
831 span: $DIR/issue-75930-derive-cfg.rs:44:9: 44:13 (#0),
832 },
833 Ident {
834 ident: "TupleEnum",
835 span: $DIR/issue-75930-derive-cfg.rs:44:14: 44:23 (#0),
836 },
837 Group {
838 delimiter: Brace,
839 stream: TokenStream [
840 Ident {
841 ident: "Foo",
842 span: $DIR/issue-75930-derive-cfg.rs:45:13: 45:16 (#0),
843 },
844 Group {
845 delimiter: Parenthesis,
846 stream: TokenStream [
847 Punct {
848 ch: '#',
849 spacing: Alone,
850 span: $DIR/issue-75930-derive-cfg.rs:46:17: 46:18 (#0),
851 },
852 Group {
853 delimiter: Bracket,
854 stream: TokenStream [
855 Ident {
856 ident: "cfg",
857 span: $DIR/issue-75930-derive-cfg.rs:46:19: 46:22 (#0),
858 },
859 Group {
860 delimiter: Parenthesis,
861 stream: TokenStream [
862 Ident {
863 ident: "FALSE",
864 span: $DIR/issue-75930-derive-cfg.rs:46:23: 46:28 (#0),
865 },
866 ],
867 span: $DIR/issue-75930-derive-cfg.rs:46:22: 46:29 (#0),
868 },
869 ],
870 span: $DIR/issue-75930-derive-cfg.rs:46:18: 46:30 (#0),
871 },
872 Ident {
873 ident: "u8",
874 span: $DIR/issue-75930-derive-cfg.rs:46:31: 46:33 (#0),
875 },
876 Punct {
877 ch: ',',
878 spacing: Alone,
879 span: $DIR/issue-75930-derive-cfg.rs:46:33: 46:34 (#0),
880 },
881 Punct {
882 ch: '#',
883 spacing: Alone,
884 span: $DIR/issue-75930-derive-cfg.rs:47:17: 47:18 (#0),
885 },
886 Group {
887 delimiter: Bracket,
888 stream: TokenStream [
889 Ident {
890 ident: "cfg",
891 span: $DIR/issue-75930-derive-cfg.rs:47:19: 47:22 (#0),
892 },
893 Group {
894 delimiter: Parenthesis,
895 stream: TokenStream [
896 Ident {
897 ident: "FALSE",
898 span: $DIR/issue-75930-derive-cfg.rs:47:23: 47:28 (#0),
899 },
900 ],
901 span: $DIR/issue-75930-derive-cfg.rs:47:22: 47:29 (#0),
902 },
903 ],
904 span: $DIR/issue-75930-derive-cfg.rs:47:18: 47:30 (#0),
905 },
906 Ident {
907 ident: "bool",
908 span: $DIR/issue-75930-derive-cfg.rs:47:31: 47:35 (#0),
909 },
910 Punct {
911 ch: ',',
912 spacing: Alone,
913 span: $DIR/issue-75930-derive-cfg.rs:47:35: 47:36 (#0),
914 },
915 Punct {
916 ch: '#',
917 spacing: Alone,
918 span: $DIR/issue-75930-derive-cfg.rs:48:17: 48:18 (#0),
919 },
920 Group {
921 delimiter: Bracket,
922 stream: TokenStream [
923 Ident {
924 ident: "cfg",
925 span: $DIR/issue-75930-derive-cfg.rs:48:19: 48:22 (#0),
926 },
927 Group {
928 delimiter: Parenthesis,
929 stream: TokenStream [
930 Ident {
931 ident: "not",
932 span: $DIR/issue-75930-derive-cfg.rs:48:23: 48:26 (#0),
933 },
934 Group {
935 delimiter: Parenthesis,
936 stream: TokenStream [
937 Ident {
938 ident: "FALSE",
939 span: $DIR/issue-75930-derive-cfg.rs:48:27: 48:32 (#0),
940 },
941 ],
942 span: $DIR/issue-75930-derive-cfg.rs:48:26: 48:33 (#0),
943 },
944 ],
945 span: $DIR/issue-75930-derive-cfg.rs:48:22: 48:34 (#0),
946 },
947 ],
948 span: $DIR/issue-75930-derive-cfg.rs:48:18: 48:35 (#0),
949 },
950 Ident {
951 ident: "i32",
952 span: $DIR/issue-75930-derive-cfg.rs:48:36: 48:39 (#0),
953 },
954 Punct {
955 ch: ',',
956 spacing: Alone,
957 span: $DIR/issue-75930-derive-cfg.rs:48:39: 48:40 (#0),
958 },
959 Punct {
960 ch: '#',
961 spacing: Alone,
962 span: $DIR/issue-75930-derive-cfg.rs:49:17: 49:18 (#0),
963 },
964 Group {
965 delimiter: Bracket,
966 stream: TokenStream [
967 Ident {
968 ident: "cfg",
969 span: $DIR/issue-75930-derive-cfg.rs:49:19: 49:22 (#0),
970 },
971 Group {
972 delimiter: Parenthesis,
973 stream: TokenStream [
974 Ident {
975 ident: "FALSE",
976 span: $DIR/issue-75930-derive-cfg.rs:49:23: 49:28 (#0),
977 },
978 ],
979 span: $DIR/issue-75930-derive-cfg.rs:49:22: 49:29 (#0),
980 },
981 ],
982 span: $DIR/issue-75930-derive-cfg.rs:49:18: 49:30 (#0),
983 },
984 Ident {
985 ident: "String",
986 span: $DIR/issue-75930-derive-cfg.rs:49:31: 49:37 (#0),
987 },
988 Punct {
989 ch: ',',
990 spacing: Alone,
991 span: $DIR/issue-75930-derive-cfg.rs:49:37: 49:38 (#0),
992 },
993 Ident {
994 ident: "u8",
995 span: $DIR/issue-75930-derive-cfg.rs:49:39: 49:41 (#0),
996 },
997 ],
998 span: $DIR/issue-75930-derive-cfg.rs:45:16: 50:14 (#0),
999 },
1000 ],
1001 span: $DIR/issue-75930-derive-cfg.rs:44:24: 51:10 (#0),
1002 },
1003 Ident {
1004 ident: "struct",
1005 span: $DIR/issue-75930-derive-cfg.rs:53:9: 53:15 (#0),
1006 },
1007 Ident {
1008 ident: "TupleStruct",
1009 span: $DIR/issue-75930-derive-cfg.rs:53:16: 53:27 (#0),
1010 },
1011 Group {
1012 delimiter: Parenthesis,
1013 stream: TokenStream [
1014 Punct {
1015 ch: '#',
1016 spacing: Alone,
1017 span: $DIR/issue-75930-derive-cfg.rs:54:13: 54:14 (#0),
1018 },
1019 Group {
1020 delimiter: Bracket,
1021 stream: TokenStream [
1022 Ident {
1023 ident: "cfg",
1024 span: $DIR/issue-75930-derive-cfg.rs:54:15: 54:18 (#0),
1025 },
1026 Group {
1027 delimiter: Parenthesis,
1028 stream: TokenStream [
1029 Ident {
1030 ident: "FALSE",
1031 span: $DIR/issue-75930-derive-cfg.rs:54:19: 54:24 (#0),
1032 },
1033 ],
1034 span: $DIR/issue-75930-derive-cfg.rs:54:18: 54:25 (#0),
1035 },
1036 ],
1037 span: $DIR/issue-75930-derive-cfg.rs:54:14: 54:26 (#0),
1038 },
1039 Ident {
1040 ident: "String",
1041 span: $DIR/issue-75930-derive-cfg.rs:54:27: 54:33 (#0),
1042 },
1043 Punct {
1044 ch: ',',
1045 spacing: Alone,
1046 span: $DIR/issue-75930-derive-cfg.rs:54:33: 54:34 (#0),
1047 },
1048 Punct {
1049 ch: '#',
1050 spacing: Alone,
1051 span: $DIR/issue-75930-derive-cfg.rs:55:13: 55:14 (#0),
1052 },
1053 Group {
1054 delimiter: Bracket,
1055 stream: TokenStream [
1056 Ident {
1057 ident: "cfg",
1058 span: $DIR/issue-75930-derive-cfg.rs:55:15: 55:18 (#0),
1059 },
1060 Group {
1061 delimiter: Parenthesis,
1062 stream: TokenStream [
1063 Ident {
1064 ident: "not",
1065 span: $DIR/issue-75930-derive-cfg.rs:55:19: 55:22 (#0),
1066 },
1067 Group {
1068 delimiter: Parenthesis,
1069 stream: TokenStream [
1070 Ident {
1071 ident: "FALSE",
1072 span: $DIR/issue-75930-derive-cfg.rs:55:23: 55:28 (#0),
1073 },
1074 ],
1075 span: $DIR/issue-75930-derive-cfg.rs:55:22: 55:29 (#0),
1076 },
1077 ],
1078 span: $DIR/issue-75930-derive-cfg.rs:55:18: 55:30 (#0),
1079 },
1080 ],
1081 span: $DIR/issue-75930-derive-cfg.rs:55:14: 55:31 (#0),
1082 },
1083 Ident {
1084 ident: "i32",
1085 span: $DIR/issue-75930-derive-cfg.rs:55:32: 55:35 (#0),
1086 },
1087 Punct {
1088 ch: ',',
1089 spacing: Alone,
1090 span: $DIR/issue-75930-derive-cfg.rs:55:35: 55:36 (#0),
1091 },
1092 Punct {
1093 ch: '#',
1094 spacing: Alone,
1095 span: $DIR/issue-75930-derive-cfg.rs:56:13: 56:14 (#0),
1096 },
1097 Group {
1098 delimiter: Bracket,
1099 stream: TokenStream [
1100 Ident {
1101 ident: "cfg",
1102 span: $DIR/issue-75930-derive-cfg.rs:56:15: 56:18 (#0),
1103 },
1104 Group {
1105 delimiter: Parenthesis,
1106 stream: TokenStream [
1107 Ident {
1108 ident: "FALSE",
1109 span: $DIR/issue-75930-derive-cfg.rs:56:19: 56:24 (#0),
1110 },
1111 ],
1112 span: $DIR/issue-75930-derive-cfg.rs:56:18: 56:25 (#0),
1113 },
1114 ],
1115 span: $DIR/issue-75930-derive-cfg.rs:56:14: 56:26 (#0),
1116 },
1117 Ident {
1118 ident: "bool",
1119 span: $DIR/issue-75930-derive-cfg.rs:56:27: 56:31 (#0),
1120 },
1121 Punct {
1122 ch: ',',
1123 spacing: Alone,
1124 span: $DIR/issue-75930-derive-cfg.rs:56:31: 56:32 (#0),
1125 },
1126 Ident {
1127 ident: "u8",
1128 span: $DIR/issue-75930-derive-cfg.rs:57:13: 57:15 (#0),
1129 },
1130 ],
1131 span: $DIR/issue-75930-derive-cfg.rs:53:27: 58:10 (#0),
1132 },
1133 Punct {
1134 ch: ';',
1135 spacing: Alone,
1136 span: $DIR/issue-75930-derive-cfg.rs:58:10: 58:11 (#0),
1137 },
1138 Literal {
1139 kind: Integer,
1140 symbol: "0",
1141 suffix: None,
1142 span: $DIR/issue-75930-derive-cfg.rs:60:9: 60:10 (#0),
1143 },
1144 ],
1145 span: $DIR/issue-75930-derive-cfg.rs:24:17: 61:6 (#0),
1146 },
1147 ],
1148 span: $DIR/issue-75930-derive-cfg.rs:24:12: 61:7 (#0),
1149 },
1150 Punct {
1151 ch: ',',
1152 spacing: Alone,
1153 span: $DIR/issue-75930-derive-cfg.rs:61:7: 61:8 (#0),
1154 },
1155 Punct {
1156 ch: '#',
1157 spacing: Alone,
1158 span: $DIR/issue-75930-derive-cfg.rs:62:5: 62:6 (#0),
1159 },
1160 Group {
1161 delimiter: Bracket,
1162 stream: TokenStream [
1163 Ident {
1164 ident: "print_helper",
1165 span: $DIR/issue-75930-derive-cfg.rs:62:7: 62:19 (#0),
1166 },
1167 Group {
1168 delimiter: Parenthesis,
1169 stream: TokenStream [
1170 Ident {
1171 ident: "d",
1172 span: $DIR/issue-75930-derive-cfg.rs:62:20: 62:21 (#0),
1173 },
1174 ],
1175 span: $DIR/issue-75930-derive-cfg.rs:62:19: 62:22 (#0),
1176 },
1177 ],
1178 span: $DIR/issue-75930-derive-cfg.rs:62:6: 62:23 (#0),
1179 },
1180 Ident {
1181 ident: "fourth",
1182 span: $DIR/issue-75930-derive-cfg.rs:63:5: 63:11 (#0),
1183 },
1184 Punct {
1185 ch: ':',
1186 spacing: Alone,
1187 span: $DIR/issue-75930-derive-cfg.rs:63:11: 63:12 (#0),
1188 },
1189 Ident {
1190 ident: "B",
1191 span: $DIR/issue-75930-derive-cfg.rs:63:13: 63:14 (#0),
1192 },
1193 ],
1194 span: $DIR/issue-75930-derive-cfg.rs:21:32: 64:2 (#0),
1195 },
1196]
1197PRINT-DERIVE INPUT (DISPLAY): #[allow(dead_code)] #[print_helper(b)] #[print_helper(a)] struct Foo < B >
2{ 1198{
3 second : bool, third : 1199 second : bool, third :
4 [u8 ; 1200 [u8 ;
5 { 1201 {
6 #[cfg(not(FALSE))] struct Inner ; match true 1202 #[cfg(not(FALSE))] struct Inner ; match true
7 { false => { } _ => { } } ; 0 1203 { #[allow(warnings)] false => { } _ => { } } ; #[print_helper(c)]
8 }], fourth : B, 1204 #[cfg(not(FALSE))] fn kept_fn()
1205 { # ! [cfg(not(FALSE))] let my_val = true ; } enum TupleEnum
1206 { Foo(#[cfg(not(FALSE))] i32, u8), } struct
1207 TupleStruct(#[cfg(not(FALSE))] i32, u8) ; 0
1208 }], #[print_helper(d)] fourth : B,
9} 1209}
10PRINT-DERIVE INPUT (DEBUG): TokenStream [ 1210PRINT-DERIVE INPUT (DEBUG): TokenStream [
1211 Punct {
1212 ch: '#',
1213 spacing: Alone,
1214 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1215 },
1216 Group {
1217 delimiter: Bracket,
1218 stream: TokenStream [
1219 Ident {
1220 ident: "allow",
1221 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1222 },
1223 Group {
1224 delimiter: Parenthesis,
1225 stream: TokenStream [
1226 Ident {
1227 ident: "dead_code",
1228 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1229 },
1230 ],
1231 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1232 },
1233 ],
1234 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1235 },
1236 Punct {
1237 ch: '#',
1238 spacing: Alone,
1239 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1240 },
1241 Group {
1242 delimiter: Bracket,
1243 stream: TokenStream [
1244 Ident {
1245 ident: "print_helper",
1246 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1247 },
1248 Group {
1249 delimiter: Parenthesis,
1250 stream: TokenStream [
1251 Ident {
1252 ident: "b",
1253 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1254 },
1255 ],
1256 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1257 },
1258 ],
1259 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1260 },
1261 Punct {
1262 ch: '#',
1263 spacing: Alone,
1264 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1265 },
1266 Group {
1267 delimiter: Bracket,
1268 stream: TokenStream [
1269 Ident {
1270 ident: "print_helper",
1271 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1272 },
1273 Group {
1274 delimiter: Parenthesis,
1275 stream: TokenStream [
1276 Ident {
1277 ident: "a",
1278 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1279 },
1280 ],
1281 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1282 },
1283 ],
1284 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1285 },
11 Ident { 1286 Ident {
12 ident: "struct", 1287 ident: "struct",
13 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0), 1288 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
@@ -134,6 +1409,31 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [
134 Group { 1409 Group {
135 delimiter: Brace, 1410 delimiter: Brace,
136 stream: TokenStream [ 1411 stream: TokenStream [
1412 Punct {
1413 ch: '#',
1414 spacing: Alone,
1415 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1416 },
1417 Group {
1418 delimiter: Bracket,
1419 stream: TokenStream [
1420 Ident {
1421 ident: "allow",
1422 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1423 },
1424 Group {
1425 delimiter: Parenthesis,
1426 stream: TokenStream [
1427 Ident {
1428 ident: "warnings",
1429 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1430 },
1431 ],
1432 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1433 },
1434 ],
1435 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1436 },
137 Ident { 1437 Ident {
138 ident: "false", 1438 ident: "false",
139 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0), 1439 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
@@ -180,6 +1480,291 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [
180 spacing: Alone, 1480 spacing: Alone,
181 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0), 1481 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
182 }, 1482 },
1483 Punct {
1484 ch: '#',
1485 spacing: Alone,
1486 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1487 },
1488 Group {
1489 delimiter: Bracket,
1490 stream: TokenStream [
1491 Ident {
1492 ident: "print_helper",
1493 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1494 },
1495 Group {
1496 delimiter: Parenthesis,
1497 stream: TokenStream [
1498 Ident {
1499 ident: "c",
1500 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1501 },
1502 ],
1503 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1504 },
1505 ],
1506 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1507 },
1508 Punct {
1509 ch: '#',
1510 spacing: Alone,
1511 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1512 },
1513 Group {
1514 delimiter: Bracket,
1515 stream: TokenStream [
1516 Ident {
1517 ident: "cfg",
1518 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1519 },
1520 Group {
1521 delimiter: Parenthesis,
1522 stream: TokenStream [
1523 Ident {
1524 ident: "not",
1525 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1526 },
1527 Group {
1528 delimiter: Parenthesis,
1529 stream: TokenStream [
1530 Ident {
1531 ident: "FALSE",
1532 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1533 },
1534 ],
1535 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1536 },
1537 ],
1538 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1539 },
1540 ],
1541 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1542 },
1543 Ident {
1544 ident: "fn",
1545 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1546 },
1547 Ident {
1548 ident: "kept_fn",
1549 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1550 },
1551 Group {
1552 delimiter: Parenthesis,
1553 stream: TokenStream [],
1554 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1555 },
1556 Group {
1557 delimiter: Brace,
1558 stream: TokenStream [
1559 Punct {
1560 ch: '#',
1561 spacing: Joint,
1562 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1563 },
1564 Punct {
1565 ch: '!',
1566 spacing: Alone,
1567 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1568 },
1569 Group {
1570 delimiter: Bracket,
1571 stream: TokenStream [
1572 Ident {
1573 ident: "cfg",
1574 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1575 },
1576 Group {
1577 delimiter: Parenthesis,
1578 stream: TokenStream [
1579 Ident {
1580 ident: "not",
1581 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1582 },
1583 Group {
1584 delimiter: Parenthesis,
1585 stream: TokenStream [
1586 Ident {
1587 ident: "FALSE",
1588 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1589 },
1590 ],
1591 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1592 },
1593 ],
1594 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1595 },
1596 ],
1597 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1598 },
1599 Ident {
1600 ident: "let",
1601 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1602 },
1603 Ident {
1604 ident: "my_val",
1605 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1606 },
1607 Punct {
1608 ch: '=',
1609 spacing: Alone,
1610 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1611 },
1612 Ident {
1613 ident: "true",
1614 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1615 },
1616 Punct {
1617 ch: ';',
1618 spacing: Alone,
1619 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1620 },
1621 ],
1622 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1623 },
1624 Ident {
1625 ident: "enum",
1626 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1627 },
1628 Ident {
1629 ident: "TupleEnum",
1630 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1631 },
1632 Group {
1633 delimiter: Brace,
1634 stream: TokenStream [
1635 Ident {
1636 ident: "Foo",
1637 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1638 },
1639 Group {
1640 delimiter: Parenthesis,
1641 stream: TokenStream [
1642 Punct {
1643 ch: '#',
1644 spacing: Alone,
1645 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1646 },
1647 Group {
1648 delimiter: Bracket,
1649 stream: TokenStream [
1650 Ident {
1651 ident: "cfg",
1652 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1653 },
1654 Group {
1655 delimiter: Parenthesis,
1656 stream: TokenStream [
1657 Ident {
1658 ident: "not",
1659 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1660 },
1661 Group {
1662 delimiter: Parenthesis,
1663 stream: TokenStream [
1664 Ident {
1665 ident: "FALSE",
1666 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1667 },
1668 ],
1669 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1670 },
1671 ],
1672 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1673 },
1674 ],
1675 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1676 },
1677 Ident {
1678 ident: "i32",
1679 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1680 },
1681 Punct {
1682 ch: ',',
1683 spacing: Alone,
1684 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1685 },
1686 Ident {
1687 ident: "u8",
1688 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1689 },
1690 ],
1691 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1692 },
1693 Punct {
1694 ch: ',',
1695 spacing: Alone,
1696 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1697 },
1698 ],
1699 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1700 },
1701 Ident {
1702 ident: "struct",
1703 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1704 },
1705 Ident {
1706 ident: "TupleStruct",
1707 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1708 },
1709 Group {
1710 delimiter: Parenthesis,
1711 stream: TokenStream [
1712 Punct {
1713 ch: '#',
1714 spacing: Alone,
1715 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1716 },
1717 Group {
1718 delimiter: Bracket,
1719 stream: TokenStream [
1720 Ident {
1721 ident: "cfg",
1722 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1723 },
1724 Group {
1725 delimiter: Parenthesis,
1726 stream: TokenStream [
1727 Ident {
1728 ident: "not",
1729 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1730 },
1731 Group {
1732 delimiter: Parenthesis,
1733 stream: TokenStream [
1734 Ident {
1735 ident: "FALSE",
1736 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1737 },
1738 ],
1739 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1740 },
1741 ],
1742 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1743 },
1744 ],
1745 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1746 },
1747 Ident {
1748 ident: "i32",
1749 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1750 },
1751 Punct {
1752 ch: ',',
1753 spacing: Alone,
1754 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1755 },
1756 Ident {
1757 ident: "u8",
1758 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1759 },
1760 ],
1761 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1762 },
1763 Punct {
1764 ch: ';',
1765 spacing: Alone,
1766 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1767 },
183 Literal { 1768 Literal {
184 kind: Integer, 1769 kind: Integer,
185 symbol: "0", 1770 symbol: "0",
@@ -197,6 +1782,31 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [
197 spacing: Alone, 1782 spacing: Alone,
198 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0), 1783 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
199 }, 1784 },
1785 Punct {
1786 ch: '#',
1787 spacing: Alone,
1788 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1789 },
1790 Group {
1791 delimiter: Bracket,
1792 stream: TokenStream [
1793 Ident {
1794 ident: "print_helper",
1795 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1796 },
1797 Group {
1798 delimiter: Parenthesis,
1799 stream: TokenStream [
1800 Ident {
1801 ident: "d",
1802 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1803 },
1804 ],
1805 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1806 },
1807 ],
1808 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),
1809 },
200 Ident { 1810 Ident {
201 ident: "fourth", 1811 ident: "fourth",
202 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0), 1812 span: $DIR/issue-75930-derive-cfg.rs:1:1: 1:1 (#0),