-
-
Notifications
You must be signed in to change notification settings - Fork 313
/
Copy pathvisit_mut.rs
3781 lines (3780 loc) · 111 KB
/
visit_mut.rs
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// This file is @generated by syn-internal-codegen.
// It is not intended for manual editing.
#![allow(unused_variables)]
#[cfg(any(feature = "full", feature = "derive"))]
use crate::gen::helper::visit_mut::*;
#[cfg(any(feature = "full", feature = "derive"))]
use crate::punctuated::Punctuated;
use crate::*;
use proc_macro2::Span;
#[cfg(feature = "full")]
macro_rules! full {
($e:expr) => {
$e
};
}
#[cfg(all(feature = "derive", not(feature = "full")))]
macro_rules! full {
($e:expr) => {
unreachable!()
};
}
macro_rules! skip {
($($tt:tt)*) => {};
}
/// Syntax tree traversal to mutate an exclusive borrow of a syntax tree in
/// place.
///
/// See the [module documentation] for details.
///
/// [module documentation]: self
///
/// *This trait is available only if Syn is built with the `"visit-mut"` feature.*
pub trait VisitMut {
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_abi_mut(&mut self, i: &mut Abi) {
visit_abi_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_angle_bracketed_generic_arguments_mut(
&mut self,
i: &mut AngleBracketedGenericArguments,
) {
visit_angle_bracketed_generic_arguments_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_arm_mut(&mut self, i: &mut Arm) {
visit_arm_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_attr_style_mut(&mut self, i: &mut AttrStyle) {
visit_attr_style_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_attribute_mut(&mut self, i: &mut Attribute) {
visit_attribute_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_bare_fn_arg_mut(&mut self, i: &mut BareFnArg) {
visit_bare_fn_arg_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_bin_op_mut(&mut self, i: &mut BinOp) {
visit_bin_op_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_binding_mut(&mut self, i: &mut Binding) {
visit_binding_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_block_mut(&mut self, i: &mut Block) {
visit_block_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_bound_lifetimes_mut(&mut self, i: &mut BoundLifetimes) {
visit_bound_lifetimes_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_const_param_mut(&mut self, i: &mut ConstParam) {
visit_const_param_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_constraint_mut(&mut self, i: &mut Constraint) {
visit_constraint_mut(self, i)
}
#[cfg(feature = "derive")]
fn visit_data_mut(&mut self, i: &mut Data) {
visit_data_mut(self, i)
}
#[cfg(feature = "derive")]
fn visit_data_enum_mut(&mut self, i: &mut DataEnum) {
visit_data_enum_mut(self, i)
}
#[cfg(feature = "derive")]
fn visit_data_struct_mut(&mut self, i: &mut DataStruct) {
visit_data_struct_mut(self, i)
}
#[cfg(feature = "derive")]
fn visit_data_union_mut(&mut self, i: &mut DataUnion) {
visit_data_union_mut(self, i)
}
#[cfg(feature = "derive")]
fn visit_derive_input_mut(&mut self, i: &mut DeriveInput) {
visit_derive_input_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_expr_mut(&mut self, i: &mut Expr) {
visit_expr_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_expr_array_mut(&mut self, i: &mut ExprArray) {
visit_expr_array_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_expr_assign_mut(&mut self, i: &mut ExprAssign) {
visit_expr_assign_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_expr_assign_op_mut(&mut self, i: &mut ExprAssignOp) {
visit_expr_assign_op_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_expr_async_mut(&mut self, i: &mut ExprAsync) {
visit_expr_async_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_expr_await_mut(&mut self, i: &mut ExprAwait) {
visit_expr_await_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_expr_binary_mut(&mut self, i: &mut ExprBinary) {
visit_expr_binary_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_expr_block_mut(&mut self, i: &mut ExprBlock) {
visit_expr_block_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_expr_box_mut(&mut self, i: &mut ExprBox) {
visit_expr_box_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_expr_break_mut(&mut self, i: &mut ExprBreak) {
visit_expr_break_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_expr_call_mut(&mut self, i: &mut ExprCall) {
visit_expr_call_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_expr_cast_mut(&mut self, i: &mut ExprCast) {
visit_expr_cast_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_expr_closure_mut(&mut self, i: &mut ExprClosure) {
visit_expr_closure_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_expr_continue_mut(&mut self, i: &mut ExprContinue) {
visit_expr_continue_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_expr_field_mut(&mut self, i: &mut ExprField) {
visit_expr_field_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_expr_for_loop_mut(&mut self, i: &mut ExprForLoop) {
visit_expr_for_loop_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_expr_group_mut(&mut self, i: &mut ExprGroup) {
visit_expr_group_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_expr_if_mut(&mut self, i: &mut ExprIf) {
visit_expr_if_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_expr_index_mut(&mut self, i: &mut ExprIndex) {
visit_expr_index_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_expr_let_mut(&mut self, i: &mut ExprLet) {
visit_expr_let_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_expr_lit_mut(&mut self, i: &mut ExprLit) {
visit_expr_lit_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_expr_loop_mut(&mut self, i: &mut ExprLoop) {
visit_expr_loop_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_expr_macro_mut(&mut self, i: &mut ExprMacro) {
visit_expr_macro_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_expr_match_mut(&mut self, i: &mut ExprMatch) {
visit_expr_match_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_expr_method_call_mut(&mut self, i: &mut ExprMethodCall) {
visit_expr_method_call_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_expr_paren_mut(&mut self, i: &mut ExprParen) {
visit_expr_paren_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_expr_path_mut(&mut self, i: &mut ExprPath) {
visit_expr_path_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_expr_range_mut(&mut self, i: &mut ExprRange) {
visit_expr_range_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_expr_reference_mut(&mut self, i: &mut ExprReference) {
visit_expr_reference_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_expr_repeat_mut(&mut self, i: &mut ExprRepeat) {
visit_expr_repeat_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_expr_return_mut(&mut self, i: &mut ExprReturn) {
visit_expr_return_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_expr_struct_mut(&mut self, i: &mut ExprStruct) {
visit_expr_struct_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_expr_try_mut(&mut self, i: &mut ExprTry) {
visit_expr_try_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_expr_try_block_mut(&mut self, i: &mut ExprTryBlock) {
visit_expr_try_block_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_expr_tuple_mut(&mut self, i: &mut ExprTuple) {
visit_expr_tuple_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_expr_type_mut(&mut self, i: &mut ExprType) {
visit_expr_type_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_expr_unary_mut(&mut self, i: &mut ExprUnary) {
visit_expr_unary_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_expr_unsafe_mut(&mut self, i: &mut ExprUnsafe) {
visit_expr_unsafe_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_expr_while_mut(&mut self, i: &mut ExprWhile) {
visit_expr_while_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_expr_yield_mut(&mut self, i: &mut ExprYield) {
visit_expr_yield_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_field_mut(&mut self, i: &mut Field) {
visit_field_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_field_pat_mut(&mut self, i: &mut FieldPat) {
visit_field_pat_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_field_value_mut(&mut self, i: &mut FieldValue) {
visit_field_value_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_fields_mut(&mut self, i: &mut Fields) {
visit_fields_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_fields_named_mut(&mut self, i: &mut FieldsNamed) {
visit_fields_named_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_fields_unnamed_mut(&mut self, i: &mut FieldsUnnamed) {
visit_fields_unnamed_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_file_mut(&mut self, i: &mut File) {
visit_file_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_fn_arg_mut(&mut self, i: &mut FnArg) {
visit_fn_arg_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_foreign_item_mut(&mut self, i: &mut ForeignItem) {
visit_foreign_item_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_foreign_item_fn_mut(&mut self, i: &mut ForeignItemFn) {
visit_foreign_item_fn_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_foreign_item_macro_mut(&mut self, i: &mut ForeignItemMacro) {
visit_foreign_item_macro_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_foreign_item_static_mut(&mut self, i: &mut ForeignItemStatic) {
visit_foreign_item_static_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_foreign_item_type_mut(&mut self, i: &mut ForeignItemType) {
visit_foreign_item_type_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_generic_argument_mut(&mut self, i: &mut GenericArgument) {
visit_generic_argument_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_generic_method_argument_mut(&mut self, i: &mut GenericMethodArgument) {
visit_generic_method_argument_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_generic_param_mut(&mut self, i: &mut GenericParam) {
visit_generic_param_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_generics_mut(&mut self, i: &mut Generics) {
visit_generics_mut(self, i)
}
fn visit_ident_mut(&mut self, i: &mut Ident) {
visit_ident_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_impl_item_mut(&mut self, i: &mut ImplItem) {
visit_impl_item_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_impl_item_const_mut(&mut self, i: &mut ImplItemConst) {
visit_impl_item_const_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_impl_item_macro_mut(&mut self, i: &mut ImplItemMacro) {
visit_impl_item_macro_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_impl_item_method_mut(&mut self, i: &mut ImplItemMethod) {
visit_impl_item_method_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_impl_item_type_mut(&mut self, i: &mut ImplItemType) {
visit_impl_item_type_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_index_mut(&mut self, i: &mut Index) {
visit_index_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_item_mut(&mut self, i: &mut Item) {
visit_item_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_item_const_mut(&mut self, i: &mut ItemConst) {
visit_item_const_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_item_enum_mut(&mut self, i: &mut ItemEnum) {
visit_item_enum_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_item_extern_crate_mut(&mut self, i: &mut ItemExternCrate) {
visit_item_extern_crate_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_item_fn_mut(&mut self, i: &mut ItemFn) {
visit_item_fn_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_item_foreign_mod_mut(&mut self, i: &mut ItemForeignMod) {
visit_item_foreign_mod_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_item_impl_mut(&mut self, i: &mut ItemImpl) {
visit_item_impl_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_item_macro_mut(&mut self, i: &mut ItemMacro) {
visit_item_macro_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_item_macro2_mut(&mut self, i: &mut ItemMacro2) {
visit_item_macro2_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_item_mod_mut(&mut self, i: &mut ItemMod) {
visit_item_mod_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_item_static_mut(&mut self, i: &mut ItemStatic) {
visit_item_static_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_item_struct_mut(&mut self, i: &mut ItemStruct) {
visit_item_struct_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_item_trait_mut(&mut self, i: &mut ItemTrait) {
visit_item_trait_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_item_trait_alias_mut(&mut self, i: &mut ItemTraitAlias) {
visit_item_trait_alias_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_item_type_mut(&mut self, i: &mut ItemType) {
visit_item_type_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_item_union_mut(&mut self, i: &mut ItemUnion) {
visit_item_union_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_item_use_mut(&mut self, i: &mut ItemUse) {
visit_item_use_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_label_mut(&mut self, i: &mut Label) {
visit_label_mut(self, i)
}
fn visit_lifetime_mut(&mut self, i: &mut Lifetime) {
visit_lifetime_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_lifetime_def_mut(&mut self, i: &mut LifetimeDef) {
visit_lifetime_def_mut(self, i)
}
fn visit_lit_mut(&mut self, i: &mut Lit) {
visit_lit_mut(self, i)
}
fn visit_lit_bool_mut(&mut self, i: &mut LitBool) {
visit_lit_bool_mut(self, i)
}
fn visit_lit_byte_mut(&mut self, i: &mut LitByte) {
visit_lit_byte_mut(self, i)
}
fn visit_lit_byte_str_mut(&mut self, i: &mut LitByteStr) {
visit_lit_byte_str_mut(self, i)
}
fn visit_lit_char_mut(&mut self, i: &mut LitChar) {
visit_lit_char_mut(self, i)
}
fn visit_lit_float_mut(&mut self, i: &mut LitFloat) {
visit_lit_float_mut(self, i)
}
fn visit_lit_int_mut(&mut self, i: &mut LitInt) {
visit_lit_int_mut(self, i)
}
fn visit_lit_str_mut(&mut self, i: &mut LitStr) {
visit_lit_str_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_local_mut(&mut self, i: &mut Local) {
visit_local_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_macro_mut(&mut self, i: &mut Macro) {
visit_macro_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_macro_delimiter_mut(&mut self, i: &mut MacroDelimiter) {
visit_macro_delimiter_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_member_mut(&mut self, i: &mut Member) {
visit_member_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_meta_mut(&mut self, i: &mut Meta) {
visit_meta_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_meta_list_mut(&mut self, i: &mut MetaList) {
visit_meta_list_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_meta_name_value_mut(&mut self, i: &mut MetaNameValue) {
visit_meta_name_value_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_method_turbofish_mut(&mut self, i: &mut MethodTurbofish) {
visit_method_turbofish_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_nested_meta_mut(&mut self, i: &mut NestedMeta) {
visit_nested_meta_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_parenthesized_generic_arguments_mut(&mut self, i: &mut ParenthesizedGenericArguments) {
visit_parenthesized_generic_arguments_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_pat_mut(&mut self, i: &mut Pat) {
visit_pat_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_pat_box_mut(&mut self, i: &mut PatBox) {
visit_pat_box_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_pat_ident_mut(&mut self, i: &mut PatIdent) {
visit_pat_ident_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_pat_lit_mut(&mut self, i: &mut PatLit) {
visit_pat_lit_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_pat_macro_mut(&mut self, i: &mut PatMacro) {
visit_pat_macro_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_pat_or_mut(&mut self, i: &mut PatOr) {
visit_pat_or_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_pat_path_mut(&mut self, i: &mut PatPath) {
visit_pat_path_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_pat_range_mut(&mut self, i: &mut PatRange) {
visit_pat_range_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_pat_reference_mut(&mut self, i: &mut PatReference) {
visit_pat_reference_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_pat_rest_mut(&mut self, i: &mut PatRest) {
visit_pat_rest_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_pat_slice_mut(&mut self, i: &mut PatSlice) {
visit_pat_slice_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_pat_struct_mut(&mut self, i: &mut PatStruct) {
visit_pat_struct_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_pat_tuple_mut(&mut self, i: &mut PatTuple) {
visit_pat_tuple_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_pat_tuple_struct_mut(&mut self, i: &mut PatTupleStruct) {
visit_pat_tuple_struct_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_pat_type_mut(&mut self, i: &mut PatType) {
visit_pat_type_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_pat_wild_mut(&mut self, i: &mut PatWild) {
visit_pat_wild_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_path_mut(&mut self, i: &mut Path) {
visit_path_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_path_arguments_mut(&mut self, i: &mut PathArguments) {
visit_path_arguments_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_path_segment_mut(&mut self, i: &mut PathSegment) {
visit_path_segment_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_predicate_eq_mut(&mut self, i: &mut PredicateEq) {
visit_predicate_eq_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_predicate_lifetime_mut(&mut self, i: &mut PredicateLifetime) {
visit_predicate_lifetime_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_predicate_type_mut(&mut self, i: &mut PredicateType) {
visit_predicate_type_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_qself_mut(&mut self, i: &mut QSelf) {
visit_qself_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_range_limits_mut(&mut self, i: &mut RangeLimits) {
visit_range_limits_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_receiver_mut(&mut self, i: &mut Receiver) {
visit_receiver_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_return_type_mut(&mut self, i: &mut ReturnType) {
visit_return_type_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_signature_mut(&mut self, i: &mut Signature) {
visit_signature_mut(self, i)
}
fn visit_span_mut(&mut self, i: &mut Span) {
visit_span_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_stmt_mut(&mut self, i: &mut Stmt) {
visit_stmt_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_trait_bound_mut(&mut self, i: &mut TraitBound) {
visit_trait_bound_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_trait_bound_modifier_mut(&mut self, i: &mut TraitBoundModifier) {
visit_trait_bound_modifier_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_trait_item_mut(&mut self, i: &mut TraitItem) {
visit_trait_item_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_trait_item_const_mut(&mut self, i: &mut TraitItemConst) {
visit_trait_item_const_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_trait_item_macro_mut(&mut self, i: &mut TraitItemMacro) {
visit_trait_item_macro_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_trait_item_method_mut(&mut self, i: &mut TraitItemMethod) {
visit_trait_item_method_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_trait_item_type_mut(&mut self, i: &mut TraitItemType) {
visit_trait_item_type_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_type_mut(&mut self, i: &mut Type) {
visit_type_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_type_array_mut(&mut self, i: &mut TypeArray) {
visit_type_array_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_type_bare_fn_mut(&mut self, i: &mut TypeBareFn) {
visit_type_bare_fn_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_type_group_mut(&mut self, i: &mut TypeGroup) {
visit_type_group_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_type_impl_trait_mut(&mut self, i: &mut TypeImplTrait) {
visit_type_impl_trait_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_type_infer_mut(&mut self, i: &mut TypeInfer) {
visit_type_infer_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_type_macro_mut(&mut self, i: &mut TypeMacro) {
visit_type_macro_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_type_never_mut(&mut self, i: &mut TypeNever) {
visit_type_never_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_type_param_mut(&mut self, i: &mut TypeParam) {
visit_type_param_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_type_param_bound_mut(&mut self, i: &mut TypeParamBound) {
visit_type_param_bound_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_type_paren_mut(&mut self, i: &mut TypeParen) {
visit_type_paren_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_type_path_mut(&mut self, i: &mut TypePath) {
visit_type_path_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_type_ptr_mut(&mut self, i: &mut TypePtr) {
visit_type_ptr_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_type_reference_mut(&mut self, i: &mut TypeReference) {
visit_type_reference_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_type_slice_mut(&mut self, i: &mut TypeSlice) {
visit_type_slice_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_type_trait_object_mut(&mut self, i: &mut TypeTraitObject) {
visit_type_trait_object_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_type_tuple_mut(&mut self, i: &mut TypeTuple) {
visit_type_tuple_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_un_op_mut(&mut self, i: &mut UnOp) {
visit_un_op_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_use_glob_mut(&mut self, i: &mut UseGlob) {
visit_use_glob_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_use_group_mut(&mut self, i: &mut UseGroup) {
visit_use_group_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_use_name_mut(&mut self, i: &mut UseName) {
visit_use_name_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_use_path_mut(&mut self, i: &mut UsePath) {
visit_use_path_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_use_rename_mut(&mut self, i: &mut UseRename) {
visit_use_rename_mut(self, i)
}
#[cfg(feature = "full")]
fn visit_use_tree_mut(&mut self, i: &mut UseTree) {
visit_use_tree_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_variadic_mut(&mut self, i: &mut Variadic) {
visit_variadic_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_variant_mut(&mut self, i: &mut Variant) {
visit_variant_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_vis_crate_mut(&mut self, i: &mut VisCrate) {
visit_vis_crate_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_vis_public_mut(&mut self, i: &mut VisPublic) {
visit_vis_public_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_vis_restricted_mut(&mut self, i: &mut VisRestricted) {
visit_vis_restricted_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_visibility_mut(&mut self, i: &mut Visibility) {
visit_visibility_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_where_clause_mut(&mut self, i: &mut WhereClause) {
visit_where_clause_mut(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
fn visit_where_predicate_mut(&mut self, i: &mut WherePredicate) {
visit_where_predicate_mut(self, i)
}
}
#[cfg(any(feature = "derive", feature = "full"))]
pub fn visit_abi_mut<V>(v: &mut V, node: &mut Abi)
where
V: VisitMut + ?Sized,
{
tokens_helper(v, &mut node.extern_token.span);
if let Some(it) = &mut node.name {
v.visit_lit_str_mut(it)
};
}
#[cfg(any(feature = "derive", feature = "full"))]
pub fn visit_angle_bracketed_generic_arguments_mut<V>(
v: &mut V,
node: &mut AngleBracketedGenericArguments,
) where
V: VisitMut + ?Sized,
{
if let Some(it) = &mut node.colon2_token {
tokens_helper(v, &mut it.spans)
};
tokens_helper(v, &mut node.lt_token.spans);
for el in Punctuated::pairs_mut(&mut node.args) {
let (it, p) = el.into_tuple();
v.visit_generic_argument_mut(it);
if let Some(p) = p {
tokens_helper(v, &mut p.spans);
}
}
tokens_helper(v, &mut node.gt_token.spans);
}
#[cfg(feature = "full")]
pub fn visit_arm_mut<V>(v: &mut V, node: &mut Arm)
where
V: VisitMut + ?Sized,
{
for it in &mut node.attrs {
v.visit_attribute_mut(it)
}
v.visit_pat_mut(&mut node.pat);
if let Some(it) = &mut node.guard {
tokens_helper(v, &mut (it).0.span);
v.visit_expr_mut(&mut *(it).1);
};
tokens_helper(v, &mut node.fat_arrow_token.spans);
v.visit_expr_mut(&mut *node.body);
if let Some(it) = &mut node.comma {
tokens_helper(v, &mut it.spans)
};
}
#[cfg(any(feature = "derive", feature = "full"))]
pub fn visit_attr_style_mut<V>(v: &mut V, node: &mut AttrStyle)
where
V: VisitMut + ?Sized,
{
match node {
AttrStyle::Outer => {}
AttrStyle::Inner(_binding_0) => {
tokens_helper(v, &mut _binding_0.spans);
}
}
}
#[cfg(any(feature = "derive", feature = "full"))]
pub fn visit_attribute_mut<V>(v: &mut V, node: &mut Attribute)
where
V: VisitMut + ?Sized,
{
tokens_helper(v, &mut node.pound_token.spans);
v.visit_attr_style_mut(&mut node.style);
tokens_helper(v, &mut node.bracket_token.span);
v.visit_path_mut(&mut node.path);
skip!(node.tokens);
}
#[cfg(any(feature = "derive", feature = "full"))]
pub fn visit_bare_fn_arg_mut<V>(v: &mut V, node: &mut BareFnArg)
where
V: VisitMut + ?Sized,
{
for it in &mut node.attrs {
v.visit_attribute_mut(it)
}
if let Some(it) = &mut node.name {
v.visit_ident_mut(&mut (it).0);
tokens_helper(v, &mut (it).1.spans);
};
v.visit_type_mut(&mut node.ty);
}
#[cfg(any(feature = "derive", feature = "full"))]
pub fn visit_bin_op_mut<V>(v: &mut V, node: &mut BinOp)
where
V: VisitMut + ?Sized,
{
match node {
BinOp::Add(_binding_0) => {
tokens_helper(v, &mut _binding_0.spans);
}
BinOp::Sub(_binding_0) => {
tokens_helper(v, &mut _binding_0.spans);
}
BinOp::Mul(_binding_0) => {
tokens_helper(v, &mut _binding_0.spans);
}
BinOp::Div(_binding_0) => {
tokens_helper(v, &mut _binding_0.spans);
}
BinOp::Rem(_binding_0) => {
tokens_helper(v, &mut _binding_0.spans);
}
BinOp::And(_binding_0) => {
tokens_helper(v, &mut _binding_0.spans);
}
BinOp::Or(_binding_0) => {
tokens_helper(v, &mut _binding_0.spans);
}
BinOp::BitXor(_binding_0) => {
tokens_helper(v, &mut _binding_0.spans);
}
BinOp::BitAnd(_binding_0) => {
tokens_helper(v, &mut _binding_0.spans);
}
BinOp::BitOr(_binding_0) => {
tokens_helper(v, &mut _binding_0.spans);
}
BinOp::Shl(_binding_0) => {
tokens_helper(v, &mut _binding_0.spans);
}
BinOp::Shr(_binding_0) => {
tokens_helper(v, &mut _binding_0.spans);
}
BinOp::Eq(_binding_0) => {
tokens_helper(v, &mut _binding_0.spans);
}
BinOp::Lt(_binding_0) => {
tokens_helper(v, &mut _binding_0.spans);
}
BinOp::Le(_binding_0) => {
tokens_helper(v, &mut _binding_0.spans);
}
BinOp::Ne(_binding_0) => {
tokens_helper(v, &mut _binding_0.spans);
}
BinOp::Ge(_binding_0) => {
tokens_helper(v, &mut _binding_0.spans);
}
BinOp::Gt(_binding_0) => {
tokens_helper(v, &mut _binding_0.spans);
}
BinOp::AddEq(_binding_0) => {
tokens_helper(v, &mut _binding_0.spans);
}
BinOp::SubEq(_binding_0) => {
tokens_helper(v, &mut _binding_0.spans);
}
BinOp::MulEq(_binding_0) => {
tokens_helper(v, &mut _binding_0.spans);
}
BinOp::DivEq(_binding_0) => {
tokens_helper(v, &mut _binding_0.spans);
}
BinOp::RemEq(_binding_0) => {
tokens_helper(v, &mut _binding_0.spans);
}
BinOp::BitXorEq(_binding_0) => {
tokens_helper(v, &mut _binding_0.spans);
}
BinOp::BitAndEq(_binding_0) => {
tokens_helper(v, &mut _binding_0.spans);
}
BinOp::BitOrEq(_binding_0) => {
tokens_helper(v, &mut _binding_0.spans);
}
BinOp::ShlEq(_binding_0) => {
tokens_helper(v, &mut _binding_0.spans);
}
BinOp::ShrEq(_binding_0) => {
tokens_helper(v, &mut _binding_0.spans);
}
}
}
#[cfg(any(feature = "derive", feature = "full"))]
pub fn visit_binding_mut<V>(v: &mut V, node: &mut Binding)
where
V: VisitMut + ?Sized,
{
v.visit_ident_mut(&mut node.ident);
tokens_helper(v, &mut node.eq_token.spans);
v.visit_type_mut(&mut node.ty);
}
#[cfg(feature = "full")]
pub fn visit_block_mut<V>(v: &mut V, node: &mut Block)
where
V: VisitMut + ?Sized,
{
tokens_helper(v, &mut node.brace_token.span);
for it in &mut node.stmts {
v.visit_stmt_mut(it)
}
}
#[cfg(any(feature = "derive", feature = "full"))]
pub fn visit_bound_lifetimes_mut<V>(v: &mut V, node: &mut BoundLifetimes)
where
V: VisitMut + ?Sized,
{
tokens_helper(v, &mut node.for_token.span);
tokens_helper(v, &mut node.lt_token.spans);
for el in Punctuated::pairs_mut(&mut node.lifetimes) {
let (it, p) = el.into_tuple();
v.visit_lifetime_def_mut(it);
if let Some(p) = p {
tokens_helper(v, &mut p.spans);
}
}
tokens_helper(v, &mut node.gt_token.spans);
}
#[cfg(any(feature = "derive", feature = "full"))]
pub fn visit_const_param_mut<V>(v: &mut V, node: &mut ConstParam)
where
V: VisitMut + ?Sized,
{
for it in &mut node.attrs {
v.visit_attribute_mut(it)
}
tokens_helper(v, &mut node.const_token.span);
v.visit_ident_mut(&mut node.ident);
tokens_helper(v, &mut node.colon_token.spans);
v.visit_type_mut(&mut node.ty);