1 // This file is @generated by syn-internal-codegen.
2 // It is not intended for manual editing.
4 #![allow(unreachable_code)]
5 #[cfg(any(feature = "full", feature = "derive"))]
6 use gen
::helper
::fold
::*;
8 #[cfg(any(feature = "full", feature = "derive"))]
9 use token
::{Brace, Bracket, Group, Paren}
;
11 #[cfg(feature = "full")]
17 #[cfg(all(feature = "derive", not(feature = "full")))]
23 /// Syntax tree traversal to transform the nodes of an owned syntax tree.
25 /// See the [module documentation] for details.
27 /// [module documentation]: index.html
29 /// *This trait is available if Syn is built with the `"fold"` feature.*
31 #[cfg(any(feature = "derive", feature = "full"))]
32 fn fold_abi(&mut self, i
: Abi
) -> Abi
{
35 #[cfg(any(feature = "derive", feature = "full"))]
36 fn fold_angle_bracketed_generic_arguments(
38 i
: AngleBracketedGenericArguments
,
39 ) -> AngleBracketedGenericArguments
{
40 fold_angle_bracketed_generic_arguments(self, i
)
42 #[cfg(feature = "full")]
43 fn fold_arg_captured(&mut self, i
: ArgCaptured
) -> ArgCaptured
{
44 fold_arg_captured(self, i
)
46 #[cfg(feature = "full")]
47 fn fold_arg_self(&mut self, i
: ArgSelf
) -> ArgSelf
{
48 fold_arg_self(self, i
)
50 #[cfg(feature = "full")]
51 fn fold_arg_self_ref(&mut self, i
: ArgSelfRef
) -> ArgSelfRef
{
52 fold_arg_self_ref(self, i
)
54 #[cfg(feature = "full")]
55 fn fold_arm(&mut self, i
: Arm
) -> Arm
{
58 #[cfg(any(feature = "derive", feature = "full"))]
59 fn fold_attr_style(&mut self, i
: AttrStyle
) -> AttrStyle
{
60 fold_attr_style(self, i
)
62 #[cfg(any(feature = "derive", feature = "full"))]
63 fn fold_attribute(&mut self, i
: Attribute
) -> Attribute
{
64 fold_attribute(self, i
)
66 #[cfg(any(feature = "derive", feature = "full"))]
67 fn fold_bare_fn_arg(&mut self, i
: BareFnArg
) -> BareFnArg
{
68 fold_bare_fn_arg(self, i
)
70 #[cfg(any(feature = "derive", feature = "full"))]
71 fn fold_bare_fn_arg_name(&mut self, i
: BareFnArgName
) -> BareFnArgName
{
72 fold_bare_fn_arg_name(self, i
)
74 #[cfg(any(feature = "derive", feature = "full"))]
75 fn fold_bin_op(&mut self, i
: BinOp
) -> BinOp
{
78 #[cfg(any(feature = "derive", feature = "full"))]
79 fn fold_binding(&mut self, i
: Binding
) -> Binding
{
82 #[cfg(feature = "full")]
83 fn fold_block(&mut self, i
: Block
) -> Block
{
86 #[cfg(any(feature = "derive", feature = "full"))]
87 fn fold_bound_lifetimes(&mut self, i
: BoundLifetimes
) -> BoundLifetimes
{
88 fold_bound_lifetimes(self, i
)
90 #[cfg(any(feature = "derive", feature = "full"))]
91 fn fold_const_param(&mut self, i
: ConstParam
) -> ConstParam
{
92 fold_const_param(self, i
)
94 #[cfg(any(feature = "derive", feature = "full"))]
95 fn fold_constraint(&mut self, i
: Constraint
) -> Constraint
{
96 fold_constraint(self, i
)
98 #[cfg(feature = "derive")]
99 fn fold_data(&mut self, i
: Data
) -> Data
{
102 #[cfg(feature = "derive")]
103 fn fold_data_enum(&mut self, i
: DataEnum
) -> DataEnum
{
104 fold_data_enum(self, i
)
106 #[cfg(feature = "derive")]
107 fn fold_data_struct(&mut self, i
: DataStruct
) -> DataStruct
{
108 fold_data_struct(self, i
)
110 #[cfg(feature = "derive")]
111 fn fold_data_union(&mut self, i
: DataUnion
) -> DataUnion
{
112 fold_data_union(self, i
)
114 #[cfg(feature = "derive")]
115 fn fold_derive_input(&mut self, i
: DeriveInput
) -> DeriveInput
{
116 fold_derive_input(self, i
)
118 #[cfg(any(feature = "derive", feature = "full"))]
119 fn fold_expr(&mut self, i
: Expr
) -> Expr
{
122 #[cfg(feature = "full")]
123 fn fold_expr_array(&mut self, i
: ExprArray
) -> ExprArray
{
124 fold_expr_array(self, i
)
126 #[cfg(feature = "full")]
127 fn fold_expr_assign(&mut self, i
: ExprAssign
) -> ExprAssign
{
128 fold_expr_assign(self, i
)
130 #[cfg(feature = "full")]
131 fn fold_expr_assign_op(&mut self, i
: ExprAssignOp
) -> ExprAssignOp
{
132 fold_expr_assign_op(self, i
)
134 #[cfg(feature = "full")]
135 fn fold_expr_async(&mut self, i
: ExprAsync
) -> ExprAsync
{
136 fold_expr_async(self, i
)
138 #[cfg(any(feature = "derive", feature = "full"))]
139 fn fold_expr_binary(&mut self, i
: ExprBinary
) -> ExprBinary
{
140 fold_expr_binary(self, i
)
142 #[cfg(feature = "full")]
143 fn fold_expr_block(&mut self, i
: ExprBlock
) -> ExprBlock
{
144 fold_expr_block(self, i
)
146 #[cfg(feature = "full")]
147 fn fold_expr_box(&mut self, i
: ExprBox
) -> ExprBox
{
148 fold_expr_box(self, i
)
150 #[cfg(feature = "full")]
151 fn fold_expr_break(&mut self, i
: ExprBreak
) -> ExprBreak
{
152 fold_expr_break(self, i
)
154 #[cfg(any(feature = "derive", feature = "full"))]
155 fn fold_expr_call(&mut self, i
: ExprCall
) -> ExprCall
{
156 fold_expr_call(self, i
)
158 #[cfg(any(feature = "derive", feature = "full"))]
159 fn fold_expr_cast(&mut self, i
: ExprCast
) -> ExprCast
{
160 fold_expr_cast(self, i
)
162 #[cfg(feature = "full")]
163 fn fold_expr_closure(&mut self, i
: ExprClosure
) -> ExprClosure
{
164 fold_expr_closure(self, i
)
166 #[cfg(feature = "full")]
167 fn fold_expr_continue(&mut self, i
: ExprContinue
) -> ExprContinue
{
168 fold_expr_continue(self, i
)
170 #[cfg(any(feature = "derive", feature = "full"))]
171 fn fold_expr_field(&mut self, i
: ExprField
) -> ExprField
{
172 fold_expr_field(self, i
)
174 #[cfg(feature = "full")]
175 fn fold_expr_for_loop(&mut self, i
: ExprForLoop
) -> ExprForLoop
{
176 fold_expr_for_loop(self, i
)
178 #[cfg(feature = "full")]
179 fn fold_expr_group(&mut self, i
: ExprGroup
) -> ExprGroup
{
180 fold_expr_group(self, i
)
182 #[cfg(feature = "full")]
183 fn fold_expr_if(&mut self, i
: ExprIf
) -> ExprIf
{
184 fold_expr_if(self, i
)
186 #[cfg(feature = "full")]
187 fn fold_expr_in_place(&mut self, i
: ExprInPlace
) -> ExprInPlace
{
188 fold_expr_in_place(self, i
)
190 #[cfg(any(feature = "derive", feature = "full"))]
191 fn fold_expr_index(&mut self, i
: ExprIndex
) -> ExprIndex
{
192 fold_expr_index(self, i
)
194 #[cfg(feature = "full")]
195 fn fold_expr_let(&mut self, i
: ExprLet
) -> ExprLet
{
196 fold_expr_let(self, i
)
198 #[cfg(any(feature = "derive", feature = "full"))]
199 fn fold_expr_lit(&mut self, i
: ExprLit
) -> ExprLit
{
200 fold_expr_lit(self, i
)
202 #[cfg(feature = "full")]
203 fn fold_expr_loop(&mut self, i
: ExprLoop
) -> ExprLoop
{
204 fold_expr_loop(self, i
)
206 #[cfg(feature = "full")]
207 fn fold_expr_macro(&mut self, i
: ExprMacro
) -> ExprMacro
{
208 fold_expr_macro(self, i
)
210 #[cfg(feature = "full")]
211 fn fold_expr_match(&mut self, i
: ExprMatch
) -> ExprMatch
{
212 fold_expr_match(self, i
)
214 #[cfg(feature = "full")]
215 fn fold_expr_method_call(&mut self, i
: ExprMethodCall
) -> ExprMethodCall
{
216 fold_expr_method_call(self, i
)
218 #[cfg(any(feature = "derive", feature = "full"))]
219 fn fold_expr_paren(&mut self, i
: ExprParen
) -> ExprParen
{
220 fold_expr_paren(self, i
)
222 #[cfg(any(feature = "derive", feature = "full"))]
223 fn fold_expr_path(&mut self, i
: ExprPath
) -> ExprPath
{
224 fold_expr_path(self, i
)
226 #[cfg(feature = "full")]
227 fn fold_expr_range(&mut self, i
: ExprRange
) -> ExprRange
{
228 fold_expr_range(self, i
)
230 #[cfg(feature = "full")]
231 fn fold_expr_reference(&mut self, i
: ExprReference
) -> ExprReference
{
232 fold_expr_reference(self, i
)
234 #[cfg(feature = "full")]
235 fn fold_expr_repeat(&mut self, i
: ExprRepeat
) -> ExprRepeat
{
236 fold_expr_repeat(self, i
)
238 #[cfg(feature = "full")]
239 fn fold_expr_return(&mut self, i
: ExprReturn
) -> ExprReturn
{
240 fold_expr_return(self, i
)
242 #[cfg(feature = "full")]
243 fn fold_expr_struct(&mut self, i
: ExprStruct
) -> ExprStruct
{
244 fold_expr_struct(self, i
)
246 #[cfg(feature = "full")]
247 fn fold_expr_try(&mut self, i
: ExprTry
) -> ExprTry
{
248 fold_expr_try(self, i
)
250 #[cfg(feature = "full")]
251 fn fold_expr_try_block(&mut self, i
: ExprTryBlock
) -> ExprTryBlock
{
252 fold_expr_try_block(self, i
)
254 #[cfg(feature = "full")]
255 fn fold_expr_tuple(&mut self, i
: ExprTuple
) -> ExprTuple
{
256 fold_expr_tuple(self, i
)
258 #[cfg(feature = "full")]
259 fn fold_expr_type(&mut self, i
: ExprType
) -> ExprType
{
260 fold_expr_type(self, i
)
262 #[cfg(any(feature = "derive", feature = "full"))]
263 fn fold_expr_unary(&mut self, i
: ExprUnary
) -> ExprUnary
{
264 fold_expr_unary(self, i
)
266 #[cfg(feature = "full")]
267 fn fold_expr_unsafe(&mut self, i
: ExprUnsafe
) -> ExprUnsafe
{
268 fold_expr_unsafe(self, i
)
270 #[cfg(any(feature = "derive", feature = "full"))]
271 fn fold_expr_verbatim(&mut self, i
: ExprVerbatim
) -> ExprVerbatim
{
272 fold_expr_verbatim(self, i
)
274 #[cfg(feature = "full")]
275 fn fold_expr_while(&mut self, i
: ExprWhile
) -> ExprWhile
{
276 fold_expr_while(self, i
)
278 #[cfg(feature = "full")]
279 fn fold_expr_yield(&mut self, i
: ExprYield
) -> ExprYield
{
280 fold_expr_yield(self, i
)
282 #[cfg(any(feature = "derive", feature = "full"))]
283 fn fold_field(&mut self, i
: Field
) -> Field
{
286 #[cfg(feature = "full")]
287 fn fold_field_pat(&mut self, i
: FieldPat
) -> FieldPat
{
288 fold_field_pat(self, i
)
290 #[cfg(feature = "full")]
291 fn fold_field_value(&mut self, i
: FieldValue
) -> FieldValue
{
292 fold_field_value(self, i
)
294 #[cfg(any(feature = "derive", feature = "full"))]
295 fn fold_fields(&mut self, i
: Fields
) -> Fields
{
298 #[cfg(any(feature = "derive", feature = "full"))]
299 fn fold_fields_named(&mut self, i
: FieldsNamed
) -> FieldsNamed
{
300 fold_fields_named(self, i
)
302 #[cfg(any(feature = "derive", feature = "full"))]
303 fn fold_fields_unnamed(&mut self, i
: FieldsUnnamed
) -> FieldsUnnamed
{
304 fold_fields_unnamed(self, i
)
306 #[cfg(feature = "full")]
307 fn fold_file(&mut self, i
: File
) -> File
{
310 #[cfg(feature = "full")]
311 fn fold_fn_arg(&mut self, i
: FnArg
) -> FnArg
{
314 #[cfg(feature = "full")]
315 fn fold_fn_decl(&mut self, i
: FnDecl
) -> FnDecl
{
316 fold_fn_decl(self, i
)
318 #[cfg(feature = "full")]
319 fn fold_foreign_item(&mut self, i
: ForeignItem
) -> ForeignItem
{
320 fold_foreign_item(self, i
)
322 #[cfg(feature = "full")]
323 fn fold_foreign_item_fn(&mut self, i
: ForeignItemFn
) -> ForeignItemFn
{
324 fold_foreign_item_fn(self, i
)
326 #[cfg(feature = "full")]
327 fn fold_foreign_item_macro(&mut self, i
: ForeignItemMacro
) -> ForeignItemMacro
{
328 fold_foreign_item_macro(self, i
)
330 #[cfg(feature = "full")]
331 fn fold_foreign_item_static(&mut self, i
: ForeignItemStatic
) -> ForeignItemStatic
{
332 fold_foreign_item_static(self, i
)
334 #[cfg(feature = "full")]
335 fn fold_foreign_item_type(&mut self, i
: ForeignItemType
) -> ForeignItemType
{
336 fold_foreign_item_type(self, i
)
338 #[cfg(feature = "full")]
339 fn fold_foreign_item_verbatim(&mut self, i
: ForeignItemVerbatim
) -> ForeignItemVerbatim
{
340 fold_foreign_item_verbatim(self, i
)
342 #[cfg(any(feature = "derive", feature = "full"))]
343 fn fold_generic_argument(&mut self, i
: GenericArgument
) -> GenericArgument
{
344 fold_generic_argument(self, i
)
346 #[cfg(feature = "full")]
347 fn fold_generic_method_argument(&mut self, i
: GenericMethodArgument
) -> GenericMethodArgument
{
348 fold_generic_method_argument(self, i
)
350 #[cfg(any(feature = "derive", feature = "full"))]
351 fn fold_generic_param(&mut self, i
: GenericParam
) -> GenericParam
{
352 fold_generic_param(self, i
)
354 #[cfg(any(feature = "derive", feature = "full"))]
355 fn fold_generics(&mut self, i
: Generics
) -> Generics
{
356 fold_generics(self, i
)
358 #[cfg(feature = "full")]
359 fn fold_impl_item(&mut self, i
: ImplItem
) -> ImplItem
{
360 fold_impl_item(self, i
)
362 #[cfg(feature = "full")]
363 fn fold_impl_item_const(&mut self, i
: ImplItemConst
) -> ImplItemConst
{
364 fold_impl_item_const(self, i
)
366 #[cfg(feature = "full")]
367 fn fold_impl_item_existential(&mut self, i
: ImplItemExistential
) -> ImplItemExistential
{
368 fold_impl_item_existential(self, i
)
370 #[cfg(feature = "full")]
371 fn fold_impl_item_macro(&mut self, i
: ImplItemMacro
) -> ImplItemMacro
{
372 fold_impl_item_macro(self, i
)
374 #[cfg(feature = "full")]
375 fn fold_impl_item_method(&mut self, i
: ImplItemMethod
) -> ImplItemMethod
{
376 fold_impl_item_method(self, i
)
378 #[cfg(feature = "full")]
379 fn fold_impl_item_type(&mut self, i
: ImplItemType
) -> ImplItemType
{
380 fold_impl_item_type(self, i
)
382 #[cfg(feature = "full")]
383 fn fold_impl_item_verbatim(&mut self, i
: ImplItemVerbatim
) -> ImplItemVerbatim
{
384 fold_impl_item_verbatim(self, i
)
386 #[cfg(any(feature = "derive", feature = "full"))]
387 fn fold_index(&mut self, i
: Index
) -> Index
{
390 #[cfg(feature = "full")]
391 fn fold_item(&mut self, i
: Item
) -> Item
{
394 #[cfg(feature = "full")]
395 fn fold_item_const(&mut self, i
: ItemConst
) -> ItemConst
{
396 fold_item_const(self, i
)
398 #[cfg(feature = "full")]
399 fn fold_item_enum(&mut self, i
: ItemEnum
) -> ItemEnum
{
400 fold_item_enum(self, i
)
402 #[cfg(feature = "full")]
403 fn fold_item_existential(&mut self, i
: ItemExistential
) -> ItemExistential
{
404 fold_item_existential(self, i
)
406 #[cfg(feature = "full")]
407 fn fold_item_extern_crate(&mut self, i
: ItemExternCrate
) -> ItemExternCrate
{
408 fold_item_extern_crate(self, i
)
410 #[cfg(feature = "full")]
411 fn fold_item_fn(&mut self, i
: ItemFn
) -> ItemFn
{
412 fold_item_fn(self, i
)
414 #[cfg(feature = "full")]
415 fn fold_item_foreign_mod(&mut self, i
: ItemForeignMod
) -> ItemForeignMod
{
416 fold_item_foreign_mod(self, i
)
418 #[cfg(feature = "full")]
419 fn fold_item_impl(&mut self, i
: ItemImpl
) -> ItemImpl
{
420 fold_item_impl(self, i
)
422 #[cfg(feature = "full")]
423 fn fold_item_macro(&mut self, i
: ItemMacro
) -> ItemMacro
{
424 fold_item_macro(self, i
)
426 #[cfg(feature = "full")]
427 fn fold_item_macro2(&mut self, i
: ItemMacro2
) -> ItemMacro2
{
428 fold_item_macro2(self, i
)
430 #[cfg(feature = "full")]
431 fn fold_item_mod(&mut self, i
: ItemMod
) -> ItemMod
{
432 fold_item_mod(self, i
)
434 #[cfg(feature = "full")]
435 fn fold_item_static(&mut self, i
: ItemStatic
) -> ItemStatic
{
436 fold_item_static(self, i
)
438 #[cfg(feature = "full")]
439 fn fold_item_struct(&mut self, i
: ItemStruct
) -> ItemStruct
{
440 fold_item_struct(self, i
)
442 #[cfg(feature = "full")]
443 fn fold_item_trait(&mut self, i
: ItemTrait
) -> ItemTrait
{
444 fold_item_trait(self, i
)
446 #[cfg(feature = "full")]
447 fn fold_item_trait_alias(&mut self, i
: ItemTraitAlias
) -> ItemTraitAlias
{
448 fold_item_trait_alias(self, i
)
450 #[cfg(feature = "full")]
451 fn fold_item_type(&mut self, i
: ItemType
) -> ItemType
{
452 fold_item_type(self, i
)
454 #[cfg(feature = "full")]
455 fn fold_item_union(&mut self, i
: ItemUnion
) -> ItemUnion
{
456 fold_item_union(self, i
)
458 #[cfg(feature = "full")]
459 fn fold_item_use(&mut self, i
: ItemUse
) -> ItemUse
{
460 fold_item_use(self, i
)
462 #[cfg(feature = "full")]
463 fn fold_item_verbatim(&mut self, i
: ItemVerbatim
) -> ItemVerbatim
{
464 fold_item_verbatim(self, i
)
466 #[cfg(feature = "full")]
467 fn fold_label(&mut self, i
: Label
) -> Label
{
470 fn fold_lifetime(&mut self, i
: Lifetime
) -> Lifetime
{
471 fold_lifetime(self, i
)
473 #[cfg(any(feature = "derive", feature = "full"))]
474 fn fold_lifetime_def(&mut self, i
: LifetimeDef
) -> LifetimeDef
{
475 fold_lifetime_def(self, i
)
477 #[cfg(any(feature = "derive", feature = "full"))]
478 fn fold_lit(&mut self, i
: Lit
) -> Lit
{
481 #[cfg(any(feature = "derive", feature = "full"))]
482 fn fold_lit_bool(&mut self, i
: LitBool
) -> LitBool
{
483 fold_lit_bool(self, i
)
485 #[cfg(any(feature = "derive", feature = "full"))]
486 fn fold_lit_byte(&mut self, i
: LitByte
) -> LitByte
{
487 fold_lit_byte(self, i
)
489 #[cfg(any(feature = "derive", feature = "full"))]
490 fn fold_lit_byte_str(&mut self, i
: LitByteStr
) -> LitByteStr
{
491 fold_lit_byte_str(self, i
)
493 #[cfg(any(feature = "derive", feature = "full"))]
494 fn fold_lit_char(&mut self, i
: LitChar
) -> LitChar
{
495 fold_lit_char(self, i
)
497 #[cfg(any(feature = "derive", feature = "full"))]
498 fn fold_lit_float(&mut self, i
: LitFloat
) -> LitFloat
{
499 fold_lit_float(self, i
)
501 #[cfg(any(feature = "derive", feature = "full"))]
502 fn fold_lit_int(&mut self, i
: LitInt
) -> LitInt
{
503 fold_lit_int(self, i
)
505 #[cfg(any(feature = "derive", feature = "full"))]
506 fn fold_lit_str(&mut self, i
: LitStr
) -> LitStr
{
507 fold_lit_str(self, i
)
509 #[cfg(any(feature = "derive", feature = "full"))]
510 fn fold_lit_verbatim(&mut self, i
: LitVerbatim
) -> LitVerbatim
{
511 fold_lit_verbatim(self, i
)
513 #[cfg(feature = "full")]
514 fn fold_local(&mut self, i
: Local
) -> Local
{
517 #[cfg(any(feature = "derive", feature = "full"))]
518 fn fold_macro(&mut self, i
: Macro
) -> Macro
{
521 #[cfg(any(feature = "derive", feature = "full"))]
522 fn fold_macro_delimiter(&mut self, i
: MacroDelimiter
) -> MacroDelimiter
{
523 fold_macro_delimiter(self, i
)
525 #[cfg(any(feature = "derive", feature = "full"))]
526 fn fold_member(&mut self, i
: Member
) -> Member
{
529 #[cfg(any(feature = "derive", feature = "full"))]
530 fn fold_meta(&mut self, i
: Meta
) -> Meta
{
533 #[cfg(any(feature = "derive", feature = "full"))]
534 fn fold_meta_list(&mut self, i
: MetaList
) -> MetaList
{
535 fold_meta_list(self, i
)
537 #[cfg(any(feature = "derive", feature = "full"))]
538 fn fold_meta_name_value(&mut self, i
: MetaNameValue
) -> MetaNameValue
{
539 fold_meta_name_value(self, i
)
541 #[cfg(feature = "full")]
542 fn fold_method_sig(&mut self, i
: MethodSig
) -> MethodSig
{
543 fold_method_sig(self, i
)
545 #[cfg(feature = "full")]
546 fn fold_method_turbofish(&mut self, i
: MethodTurbofish
) -> MethodTurbofish
{
547 fold_method_turbofish(self, i
)
549 #[cfg(any(feature = "derive", feature = "full"))]
550 fn fold_nested_meta(&mut self, i
: NestedMeta
) -> NestedMeta
{
551 fold_nested_meta(self, i
)
553 #[cfg(any(feature = "derive", feature = "full"))]
554 fn fold_parenthesized_generic_arguments(
556 i
: ParenthesizedGenericArguments
,
557 ) -> ParenthesizedGenericArguments
{
558 fold_parenthesized_generic_arguments(self, i
)
560 #[cfg(feature = "full")]
561 fn fold_pat(&mut self, i
: Pat
) -> Pat
{
564 #[cfg(feature = "full")]
565 fn fold_pat_box(&mut self, i
: PatBox
) -> PatBox
{
566 fold_pat_box(self, i
)
568 #[cfg(feature = "full")]
569 fn fold_pat_ident(&mut self, i
: PatIdent
) -> PatIdent
{
570 fold_pat_ident(self, i
)
572 #[cfg(feature = "full")]
573 fn fold_pat_lit(&mut self, i
: PatLit
) -> PatLit
{
574 fold_pat_lit(self, i
)
576 #[cfg(feature = "full")]
577 fn fold_pat_macro(&mut self, i
: PatMacro
) -> PatMacro
{
578 fold_pat_macro(self, i
)
580 #[cfg(feature = "full")]
581 fn fold_pat_path(&mut self, i
: PatPath
) -> PatPath
{
582 fold_pat_path(self, i
)
584 #[cfg(feature = "full")]
585 fn fold_pat_range(&mut self, i
: PatRange
) -> PatRange
{
586 fold_pat_range(self, i
)
588 #[cfg(feature = "full")]
589 fn fold_pat_ref(&mut self, i
: PatRef
) -> PatRef
{
590 fold_pat_ref(self, i
)
592 #[cfg(feature = "full")]
593 fn fold_pat_slice(&mut self, i
: PatSlice
) -> PatSlice
{
594 fold_pat_slice(self, i
)
596 #[cfg(feature = "full")]
597 fn fold_pat_struct(&mut self, i
: PatStruct
) -> PatStruct
{
598 fold_pat_struct(self, i
)
600 #[cfg(feature = "full")]
601 fn fold_pat_tuple(&mut self, i
: PatTuple
) -> PatTuple
{
602 fold_pat_tuple(self, i
)
604 #[cfg(feature = "full")]
605 fn fold_pat_tuple_struct(&mut self, i
: PatTupleStruct
) -> PatTupleStruct
{
606 fold_pat_tuple_struct(self, i
)
608 #[cfg(feature = "full")]
609 fn fold_pat_verbatim(&mut self, i
: PatVerbatim
) -> PatVerbatim
{
610 fold_pat_verbatim(self, i
)
612 #[cfg(feature = "full")]
613 fn fold_pat_wild(&mut self, i
: PatWild
) -> PatWild
{
614 fold_pat_wild(self, i
)
616 #[cfg(any(feature = "derive", feature = "full"))]
617 fn fold_path(&mut self, i
: Path
) -> Path
{
620 #[cfg(any(feature = "derive", feature = "full"))]
621 fn fold_path_arguments(&mut self, i
: PathArguments
) -> PathArguments
{
622 fold_path_arguments(self, i
)
624 #[cfg(any(feature = "derive", feature = "full"))]
625 fn fold_path_segment(&mut self, i
: PathSegment
) -> PathSegment
{
626 fold_path_segment(self, i
)
628 #[cfg(any(feature = "derive", feature = "full"))]
629 fn fold_predicate_eq(&mut self, i
: PredicateEq
) -> PredicateEq
{
630 fold_predicate_eq(self, i
)
632 #[cfg(any(feature = "derive", feature = "full"))]
633 fn fold_predicate_lifetime(&mut self, i
: PredicateLifetime
) -> PredicateLifetime
{
634 fold_predicate_lifetime(self, i
)
636 #[cfg(any(feature = "derive", feature = "full"))]
637 fn fold_predicate_type(&mut self, i
: PredicateType
) -> PredicateType
{
638 fold_predicate_type(self, i
)
640 #[cfg(any(feature = "derive", feature = "full"))]
641 fn fold_qself(&mut self, i
: QSelf
) -> QSelf
{
644 #[cfg(feature = "full")]
645 fn fold_range_limits(&mut self, i
: RangeLimits
) -> RangeLimits
{
646 fold_range_limits(self, i
)
648 #[cfg(any(feature = "derive", feature = "full"))]
649 fn fold_return_type(&mut self, i
: ReturnType
) -> ReturnType
{
650 fold_return_type(self, i
)
652 #[cfg(feature = "full")]
653 fn fold_stmt(&mut self, i
: Stmt
) -> Stmt
{
656 #[cfg(any(feature = "derive", feature = "full"))]
657 fn fold_trait_bound(&mut self, i
: TraitBound
) -> TraitBound
{
658 fold_trait_bound(self, i
)
660 #[cfg(any(feature = "derive", feature = "full"))]
661 fn fold_trait_bound_modifier(&mut self, i
: TraitBoundModifier
) -> TraitBoundModifier
{
662 fold_trait_bound_modifier(self, i
)
664 #[cfg(feature = "full")]
665 fn fold_trait_item(&mut self, i
: TraitItem
) -> TraitItem
{
666 fold_trait_item(self, i
)
668 #[cfg(feature = "full")]
669 fn fold_trait_item_const(&mut self, i
: TraitItemConst
) -> TraitItemConst
{
670 fold_trait_item_const(self, i
)
672 #[cfg(feature = "full")]
673 fn fold_trait_item_macro(&mut self, i
: TraitItemMacro
) -> TraitItemMacro
{
674 fold_trait_item_macro(self, i
)
676 #[cfg(feature = "full")]
677 fn fold_trait_item_method(&mut self, i
: TraitItemMethod
) -> TraitItemMethod
{
678 fold_trait_item_method(self, i
)
680 #[cfg(feature = "full")]
681 fn fold_trait_item_type(&mut self, i
: TraitItemType
) -> TraitItemType
{
682 fold_trait_item_type(self, i
)
684 #[cfg(feature = "full")]
685 fn fold_trait_item_verbatim(&mut self, i
: TraitItemVerbatim
) -> TraitItemVerbatim
{
686 fold_trait_item_verbatim(self, i
)
688 #[cfg(any(feature = "derive", feature = "full"))]
689 fn fold_type(&mut self, i
: Type
) -> Type
{
692 #[cfg(any(feature = "derive", feature = "full"))]
693 fn fold_type_array(&mut self, i
: TypeArray
) -> TypeArray
{
694 fold_type_array(self, i
)
696 #[cfg(any(feature = "derive", feature = "full"))]
697 fn fold_type_bare_fn(&mut self, i
: TypeBareFn
) -> TypeBareFn
{
698 fold_type_bare_fn(self, i
)
700 #[cfg(any(feature = "derive", feature = "full"))]
701 fn fold_type_group(&mut self, i
: TypeGroup
) -> TypeGroup
{
702 fold_type_group(self, i
)
704 #[cfg(any(feature = "derive", feature = "full"))]
705 fn fold_type_impl_trait(&mut self, i
: TypeImplTrait
) -> TypeImplTrait
{
706 fold_type_impl_trait(self, i
)
708 #[cfg(any(feature = "derive", feature = "full"))]
709 fn fold_type_infer(&mut self, i
: TypeInfer
) -> TypeInfer
{
710 fold_type_infer(self, i
)
712 #[cfg(any(feature = "derive", feature = "full"))]
713 fn fold_type_macro(&mut self, i
: TypeMacro
) -> TypeMacro
{
714 fold_type_macro(self, i
)
716 #[cfg(any(feature = "derive", feature = "full"))]
717 fn fold_type_never(&mut self, i
: TypeNever
) -> TypeNever
{
718 fold_type_never(self, i
)
720 #[cfg(any(feature = "derive", feature = "full"))]
721 fn fold_type_param(&mut self, i
: TypeParam
) -> TypeParam
{
722 fold_type_param(self, i
)
724 #[cfg(any(feature = "derive", feature = "full"))]
725 fn fold_type_param_bound(&mut self, i
: TypeParamBound
) -> TypeParamBound
{
726 fold_type_param_bound(self, i
)
728 #[cfg(any(feature = "derive", feature = "full"))]
729 fn fold_type_paren(&mut self, i
: TypeParen
) -> TypeParen
{
730 fold_type_paren(self, i
)
732 #[cfg(any(feature = "derive", feature = "full"))]
733 fn fold_type_path(&mut self, i
: TypePath
) -> TypePath
{
734 fold_type_path(self, i
)
736 #[cfg(any(feature = "derive", feature = "full"))]
737 fn fold_type_ptr(&mut self, i
: TypePtr
) -> TypePtr
{
738 fold_type_ptr(self, i
)
740 #[cfg(any(feature = "derive", feature = "full"))]
741 fn fold_type_reference(&mut self, i
: TypeReference
) -> TypeReference
{
742 fold_type_reference(self, i
)
744 #[cfg(any(feature = "derive", feature = "full"))]
745 fn fold_type_slice(&mut self, i
: TypeSlice
) -> TypeSlice
{
746 fold_type_slice(self, i
)
748 #[cfg(any(feature = "derive", feature = "full"))]
749 fn fold_type_trait_object(&mut self, i
: TypeTraitObject
) -> TypeTraitObject
{
750 fold_type_trait_object(self, i
)
752 #[cfg(any(feature = "derive", feature = "full"))]
753 fn fold_type_tuple(&mut self, i
: TypeTuple
) -> TypeTuple
{
754 fold_type_tuple(self, i
)
756 #[cfg(any(feature = "derive", feature = "full"))]
757 fn fold_type_verbatim(&mut self, i
: TypeVerbatim
) -> TypeVerbatim
{
758 fold_type_verbatim(self, i
)
760 #[cfg(any(feature = "derive", feature = "full"))]
761 fn fold_un_op(&mut self, i
: UnOp
) -> UnOp
{
764 #[cfg(feature = "full")]
765 fn fold_use_glob(&mut self, i
: UseGlob
) -> UseGlob
{
766 fold_use_glob(self, i
)
768 #[cfg(feature = "full")]
769 fn fold_use_group(&mut self, i
: UseGroup
) -> UseGroup
{
770 fold_use_group(self, i
)
772 #[cfg(feature = "full")]
773 fn fold_use_name(&mut self, i
: UseName
) -> UseName
{
774 fold_use_name(self, i
)
776 #[cfg(feature = "full")]
777 fn fold_use_path(&mut self, i
: UsePath
) -> UsePath
{
778 fold_use_path(self, i
)
780 #[cfg(feature = "full")]
781 fn fold_use_rename(&mut self, i
: UseRename
) -> UseRename
{
782 fold_use_rename(self, i
)
784 #[cfg(feature = "full")]
785 fn fold_use_tree(&mut self, i
: UseTree
) -> UseTree
{
786 fold_use_tree(self, i
)
788 #[cfg(any(feature = "derive", feature = "full"))]
789 fn fold_variant(&mut self, i
: Variant
) -> Variant
{
790 fold_variant(self, i
)
792 #[cfg(any(feature = "derive", feature = "full"))]
793 fn fold_vis_crate(&mut self, i
: VisCrate
) -> VisCrate
{
794 fold_vis_crate(self, i
)
796 #[cfg(any(feature = "derive", feature = "full"))]
797 fn fold_vis_public(&mut self, i
: VisPublic
) -> VisPublic
{
798 fold_vis_public(self, i
)
800 #[cfg(any(feature = "derive", feature = "full"))]
801 fn fold_vis_restricted(&mut self, i
: VisRestricted
) -> VisRestricted
{
802 fold_vis_restricted(self, i
)
804 #[cfg(any(feature = "derive", feature = "full"))]
805 fn fold_visibility(&mut self, i
: Visibility
) -> Visibility
{
806 fold_visibility(self, i
)
808 #[cfg(any(feature = "derive", feature = "full"))]
809 fn fold_where_clause(&mut self, i
: WhereClause
) -> WhereClause
{
810 fold_where_clause(self, i
)
812 #[cfg(any(feature = "derive", feature = "full"))]
813 fn fold_where_predicate(&mut self, i
: WherePredicate
) -> WherePredicate
{
814 fold_where_predicate(self, i
)
816 fn fold_span(&mut self, i
: Span
) -> Span
{
819 fn fold_ident(&mut self, i
: Ident
) -> Ident
{
823 #[cfg(any(feature = "derive", feature = "full"))]
824 pub fn fold_abi
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Abi
) -> Abi
{
826 extern_token
: Token
![extern](tokens_helper(_visitor
, &_i
.extern_token
.span
)),
827 name
: (_i
.name
).map(|it
| _visitor
.fold_lit_str(it
)),
830 #[cfg(any(feature = "derive", feature = "full"))]
831 pub fn fold_angle_bracketed_generic_arguments
<V
: Fold
+ ?Sized
>(
833 _i
: AngleBracketedGenericArguments
,
834 ) -> AngleBracketedGenericArguments
{
835 AngleBracketedGenericArguments
{
836 colon2_token
: (_i
.colon2_token
)
837 .map(|it
| Token
! [ :: ](tokens_helper(_visitor
, &it
.spans
))),
838 lt_token
: Token
! [ < ](tokens_helper(_visitor
, &_i
.lt_token
.spans
)),
839 args
: FoldHelper
::lift(_i
.args
, |it
| _visitor
.fold_generic_argument(it
)),
840 gt_token
: Token
! [ > ](tokens_helper(_visitor
, &_i
.gt_token
.spans
)),
843 #[cfg(feature = "full")]
844 pub fn fold_arg_captured
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ArgCaptured
) -> ArgCaptured
{
846 pat
: _visitor
.fold_pat(_i
.pat
),
847 colon_token
: Token
! [ : ](tokens_helper(_visitor
, &_i
.colon_token
.spans
)),
848 ty
: _visitor
.fold_type(_i
.ty
),
851 #[cfg(feature = "full")]
852 pub fn fold_arg_self
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ArgSelf
) -> ArgSelf
{
854 mutability
: (_i
.mutability
).map(|it
| Token
![mut](tokens_helper(_visitor
, &it
.span
))),
855 self_token
: Token
![self](tokens_helper(_visitor
, &_i
.self_token
.span
)),
858 #[cfg(feature = "full")]
859 pub fn fold_arg_self_ref
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ArgSelfRef
) -> ArgSelfRef
{
861 and_token
: Token
! [ & ](tokens_helper(_visitor
, &_i
.and_token
.spans
)),
862 lifetime
: (_i
.lifetime
).map(|it
| _visitor
.fold_lifetime(it
)),
863 mutability
: (_i
.mutability
).map(|it
| Token
![mut](tokens_helper(_visitor
, &it
.span
))),
864 self_token
: Token
![self](tokens_helper(_visitor
, &_i
.self_token
.span
)),
867 #[cfg(feature = "full")]
868 pub fn fold_arm
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Arm
) -> Arm
{
870 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
871 leading_vert
: (_i
.leading_vert
).map(|it
| Token
! [ | ](tokens_helper(_visitor
, &it
.spans
))),
872 pats
: FoldHelper
::lift(_i
.pats
, |it
| _visitor
.fold_pat(it
)),
873 guard
: (_i
.guard
).map(|it
| {
875 Token
![if](tokens_helper(_visitor
, &(it
).0.span
)),
876 Box
::new(_visitor
.fold_expr(*(it
).1)),
879 fat_arrow_token
: Token
! [ => ](tokens_helper(_visitor
, &_i
.fat_arrow_token
.spans
)),
880 body
: Box
::new(_visitor
.fold_expr(*_i
.body
)),
881 comma
: (_i
.comma
).map(|it
| Token
! [ , ](tokens_helper(_visitor
, &it
.spans
))),
884 #[cfg(any(feature = "derive", feature = "full"))]
885 pub fn fold_attr_style
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: AttrStyle
) -> AttrStyle
{
887 AttrStyle
::Outer
=> AttrStyle
::Outer
,
888 AttrStyle
::Inner(_binding_0
) => {
889 AttrStyle
::Inner(Token
![!](tokens_helper(_visitor
, &_binding_0
.spans
)))
893 #[cfg(any(feature = "derive", feature = "full"))]
894 pub fn fold_attribute
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Attribute
) -> Attribute
{
896 pound_token
: Token
! [ # ](tokens_helper(_visitor, &_i.pound_token.spans)),
897 style
: _visitor
.fold_attr_style(_i
.style
),
898 bracket_token
: Bracket(tokens_helper(_visitor
, &_i
.bracket_token
.span
)),
899 path
: _visitor
.fold_path(_i
.path
),
903 #[cfg(any(feature = "derive", feature = "full"))]
904 pub fn fold_bare_fn_arg
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: BareFnArg
) -> BareFnArg
{
906 name
: (_i
.name
).map(|it
| {
908 _visitor
.fold_bare_fn_arg_name((it
).0),
909 Token
! [ : ](tokens_helper(_visitor
, &(it
).1.spans
)),
912 ty
: _visitor
.fold_type(_i
.ty
),
915 #[cfg(any(feature = "derive", feature = "full"))]
916 pub fn fold_bare_fn_arg_name
<V
: Fold
+ ?Sized
>(
921 BareFnArgName
::Named(_binding_0
) => BareFnArgName
::Named(_visitor
.fold_ident(_binding_0
)),
922 BareFnArgName
::Wild(_binding_0
) => {
923 BareFnArgName
::Wild(Token
![_
](tokens_helper(_visitor
, &_binding_0
.spans
)))
927 #[cfg(any(feature = "derive", feature = "full"))]
928 pub fn fold_bin_op
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: BinOp
) -> BinOp
{
930 BinOp
::Add(_binding_0
) => {
931 BinOp
::Add(Token
! [ + ](tokens_helper(_visitor
, &_binding_0
.spans
)))
933 BinOp
::Sub(_binding_0
) => {
934 BinOp
::Sub(Token
! [ - ](tokens_helper(_visitor
, &_binding_0
.spans
)))
936 BinOp
::Mul(_binding_0
) => {
937 BinOp
::Mul(Token
! [ * ](tokens_helper(_visitor
, &_binding_0
.spans
)))
939 BinOp
::Div(_binding_0
) => {
940 BinOp
::Div(Token
! [ / ](tokens_helper(_visitor
, &_binding_0
.spans
)))
942 BinOp
::Rem(_binding_0
) => {
943 BinOp
::Rem(Token
! [ % ](tokens_helper(_visitor
, &_binding_0
.spans
)))
945 BinOp
::And(_binding_0
) => {
946 BinOp
::And(Token
! [ && ](tokens_helper(_visitor
, &_binding_0
.spans
)))
948 BinOp
::Or(_binding_0
) => {
949 BinOp
::Or(Token
! [ || ](tokens_helper(_visitor
, &_binding_0
.spans
)))
951 BinOp
::BitXor(_binding_0
) => {
952 BinOp
::BitXor(Token
! [ ^
](tokens_helper(_visitor
, &_binding_0
.spans
)))
954 BinOp
::BitAnd(_binding_0
) => {
955 BinOp
::BitAnd(Token
! [ & ](tokens_helper(_visitor
, &_binding_0
.spans
)))
957 BinOp
::BitOr(_binding_0
) => {
958 BinOp
::BitOr(Token
! [ | ](tokens_helper(_visitor
, &_binding_0
.spans
)))
960 BinOp
::Shl(_binding_0
) => {
961 BinOp
::Shl(Token
! [ << ](tokens_helper(_visitor
, &_binding_0
.spans
)))
963 BinOp
::Shr(_binding_0
) => {
964 BinOp
::Shr(Token
! [ >> ](tokens_helper(_visitor
, &_binding_0
.spans
)))
966 BinOp
::Eq(_binding_0
) => {
967 BinOp
::Eq(Token
! [ == ](tokens_helper(_visitor
, &_binding_0
.spans
)))
969 BinOp
::Lt(_binding_0
) => {
970 BinOp
::Lt(Token
! [ < ](tokens_helper(_visitor
, &_binding_0
.spans
)))
972 BinOp
::Le(_binding_0
) => {
973 BinOp
::Le(Token
! [ <= ](tokens_helper(_visitor
, &_binding_0
.spans
)))
975 BinOp
::Ne(_binding_0
) => {
976 BinOp
::Ne(Token
! [ != ](tokens_helper(_visitor
, &_binding_0
.spans
)))
978 BinOp
::Ge(_binding_0
) => {
979 BinOp
::Ge(Token
! [ >= ](tokens_helper(_visitor
, &_binding_0
.spans
)))
981 BinOp
::Gt(_binding_0
) => {
982 BinOp
::Gt(Token
! [ > ](tokens_helper(_visitor
, &_binding_0
.spans
)))
984 BinOp
::AddEq(_binding_0
) => {
985 BinOp
::AddEq(Token
! [ += ](tokens_helper(_visitor
, &_binding_0
.spans
)))
987 BinOp
::SubEq(_binding_0
) => {
988 BinOp
::SubEq(Token
! [ -= ](tokens_helper(_visitor
, &_binding_0
.spans
)))
990 BinOp
::MulEq(_binding_0
) => {
991 BinOp
::MulEq(Token
! [ *= ](tokens_helper(_visitor
, &_binding_0
.spans
)))
993 BinOp
::DivEq(_binding_0
) => {
994 BinOp
::DivEq(Token
! [ /= ](tokens_helper(_visitor
, &_binding_0
.spans
)))
996 BinOp
::RemEq(_binding_0
) => {
997 BinOp
::RemEq(Token
! [ %= ](tokens_helper(_visitor
, &_binding_0
.spans
)))
999 BinOp
::BitXorEq(_binding_0
) => {
1000 BinOp
::BitXorEq(Token
! [ ^
= ](tokens_helper(_visitor
, &_binding_0
.spans
)))
1002 BinOp
::BitAndEq(_binding_0
) => {
1003 BinOp
::BitAndEq(Token
! [ &= ](tokens_helper(_visitor
, &_binding_0
.spans
)))
1005 BinOp
::BitOrEq(_binding_0
) => {
1006 BinOp
::BitOrEq(Token
! [ |= ](tokens_helper(_visitor
, &_binding_0
.spans
)))
1008 BinOp
::ShlEq(_binding_0
) => {
1009 BinOp
::ShlEq(Token
! [ <<= ](tokens_helper(_visitor
, &_binding_0
.spans
)))
1011 BinOp
::ShrEq(_binding_0
) => {
1012 BinOp
::ShrEq(Token
! [ >>= ](tokens_helper(_visitor
, &_binding_0
.spans
)))
1016 #[cfg(any(feature = "derive", feature = "full"))]
1017 pub fn fold_binding
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Binding
) -> Binding
{
1019 ident
: _visitor
.fold_ident(_i
.ident
),
1020 eq_token
: Token
! [ = ](tokens_helper(_visitor
, &_i
.eq_token
.spans
)),
1021 ty
: _visitor
.fold_type(_i
.ty
),
1024 #[cfg(feature = "full")]
1025 pub fn fold_block
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Block
) -> Block
{
1027 brace_token
: Brace(tokens_helper(_visitor
, &_i
.brace_token
.span
)),
1028 stmts
: FoldHelper
::lift(_i
.stmts
, |it
| _visitor
.fold_stmt(it
)),
1031 #[cfg(any(feature = "derive", feature = "full"))]
1032 pub fn fold_bound_lifetimes
<V
: Fold
+ ?Sized
>(
1035 ) -> BoundLifetimes
{
1037 for_token
: Token
![for](tokens_helper(_visitor
, &_i
.for_token
.span
)),
1038 lt_token
: Token
! [ < ](tokens_helper(_visitor
, &_i
.lt_token
.spans
)),
1039 lifetimes
: FoldHelper
::lift(_i
.lifetimes
, |it
| _visitor
.fold_lifetime_def(it
)),
1040 gt_token
: Token
! [ > ](tokens_helper(_visitor
, &_i
.gt_token
.spans
)),
1043 #[cfg(any(feature = "derive", feature = "full"))]
1044 pub fn fold_const_param
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ConstParam
) -> ConstParam
{
1046 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1047 const_token
: Token
![const](tokens_helper(_visitor
, &_i
.const_token
.span
)),
1048 ident
: _visitor
.fold_ident(_i
.ident
),
1049 colon_token
: Token
! [ : ](tokens_helper(_visitor
, &_i
.colon_token
.spans
)),
1050 ty
: _visitor
.fold_type(_i
.ty
),
1051 eq_token
: (_i
.eq_token
).map(|it
| Token
! [ = ](tokens_helper(_visitor
, &it
.spans
))),
1052 default: (_i
.default).map(|it
| _visitor
.fold_expr(it
)),
1055 #[cfg(any(feature = "derive", feature = "full"))]
1056 pub fn fold_constraint
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Constraint
) -> Constraint
{
1058 ident
: _visitor
.fold_ident(_i
.ident
),
1059 colon_token
: Token
! [ : ](tokens_helper(_visitor
, &_i
.colon_token
.spans
)),
1060 bounds
: FoldHelper
::lift(_i
.bounds
, |it
| _visitor
.fold_type_param_bound(it
)),
1063 #[cfg(feature = "derive")]
1064 pub fn fold_data
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Data
) -> Data
{
1066 Data
::Struct(_binding_0
) => Data
::Struct(_visitor
.fold_data_struct(_binding_0
)),
1067 Data
::Enum(_binding_0
) => Data
::Enum(_visitor
.fold_data_enum(_binding_0
)),
1068 Data
::Union(_binding_0
) => Data
::Union(_visitor
.fold_data_union(_binding_0
)),
1071 #[cfg(feature = "derive")]
1072 pub fn fold_data_enum
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: DataEnum
) -> DataEnum
{
1074 enum_token
: Token
![enum](tokens_helper(_visitor
, &_i
.enum_token
.span
)),
1075 brace_token
: Brace(tokens_helper(_visitor
, &_i
.brace_token
.span
)),
1076 variants
: FoldHelper
::lift(_i
.variants
, |it
| _visitor
.fold_variant(it
)),
1079 #[cfg(feature = "derive")]
1080 pub fn fold_data_struct
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: DataStruct
) -> DataStruct
{
1082 struct_token
: Token
![struct](tokens_helper(_visitor
, &_i
.struct_token
.span
)),
1083 fields
: _visitor
.fold_fields(_i
.fields
),
1084 semi_token
: (_i
.semi_token
).map(|it
| Token
! [ ; ](tokens_helper(_visitor
, &it
.spans
))),
1087 #[cfg(feature = "derive")]
1088 pub fn fold_data_union
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: DataUnion
) -> DataUnion
{
1090 union_token
: Token
![union](tokens_helper(_visitor
, &_i
.union_token
.span
)),
1091 fields
: _visitor
.fold_fields_named(_i
.fields
),
1094 #[cfg(feature = "derive")]
1095 pub fn fold_derive_input
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: DeriveInput
) -> DeriveInput
{
1097 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1098 vis
: _visitor
.fold_visibility(_i
.vis
),
1099 ident
: _visitor
.fold_ident(_i
.ident
),
1100 generics
: _visitor
.fold_generics(_i
.generics
),
1101 data
: _visitor
.fold_data(_i
.data
),
1104 #[cfg(any(feature = "derive", feature = "full"))]
1105 pub fn fold_expr
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Expr
) -> Expr
{
1107 Expr
::Box(_binding_0
) => Expr
::Box(full
!(_visitor
.fold_expr_box(_binding_0
))),
1108 Expr
::InPlace(_binding_0
) => Expr
::InPlace(full
!(_visitor
.fold_expr_in_place(_binding_0
))),
1109 Expr
::Array(_binding_0
) => Expr
::Array(full
!(_visitor
.fold_expr_array(_binding_0
))),
1110 Expr
::Call(_binding_0
) => Expr
::Call(_visitor
.fold_expr_call(_binding_0
)),
1111 Expr
::MethodCall(_binding_0
) => {
1112 Expr
::MethodCall(full
!(_visitor
.fold_expr_method_call(_binding_0
)))
1114 Expr
::Tuple(_binding_0
) => Expr
::Tuple(full
!(_visitor
.fold_expr_tuple(_binding_0
))),
1115 Expr
::Binary(_binding_0
) => Expr
::Binary(_visitor
.fold_expr_binary(_binding_0
)),
1116 Expr
::Unary(_binding_0
) => Expr
::Unary(_visitor
.fold_expr_unary(_binding_0
)),
1117 Expr
::Lit(_binding_0
) => Expr
::Lit(_visitor
.fold_expr_lit(_binding_0
)),
1118 Expr
::Cast(_binding_0
) => Expr
::Cast(_visitor
.fold_expr_cast(_binding_0
)),
1119 Expr
::Type(_binding_0
) => Expr
::Type(full
!(_visitor
.fold_expr_type(_binding_0
))),
1120 Expr
::Let(_binding_0
) => Expr
::Let(full
!(_visitor
.fold_expr_let(_binding_0
))),
1121 Expr
::If(_binding_0
) => Expr
::If(full
!(_visitor
.fold_expr_if(_binding_0
))),
1122 Expr
::While(_binding_0
) => Expr
::While(full
!(_visitor
.fold_expr_while(_binding_0
))),
1123 Expr
::ForLoop(_binding_0
) => Expr
::ForLoop(full
!(_visitor
.fold_expr_for_loop(_binding_0
))),
1124 Expr
::Loop(_binding_0
) => Expr
::Loop(full
!(_visitor
.fold_expr_loop(_binding_0
))),
1125 Expr
::Match(_binding_0
) => Expr
::Match(full
!(_visitor
.fold_expr_match(_binding_0
))),
1126 Expr
::Closure(_binding_0
) => Expr
::Closure(full
!(_visitor
.fold_expr_closure(_binding_0
))),
1127 Expr
::Unsafe(_binding_0
) => Expr
::Unsafe(full
!(_visitor
.fold_expr_unsafe(_binding_0
))),
1128 Expr
::Block(_binding_0
) => Expr
::Block(full
!(_visitor
.fold_expr_block(_binding_0
))),
1129 Expr
::Assign(_binding_0
) => Expr
::Assign(full
!(_visitor
.fold_expr_assign(_binding_0
))),
1130 Expr
::AssignOp(_binding_0
) => {
1131 Expr
::AssignOp(full
!(_visitor
.fold_expr_assign_op(_binding_0
)))
1133 Expr
::Field(_binding_0
) => Expr
::Field(_visitor
.fold_expr_field(_binding_0
)),
1134 Expr
::Index(_binding_0
) => Expr
::Index(_visitor
.fold_expr_index(_binding_0
)),
1135 Expr
::Range(_binding_0
) => Expr
::Range(full
!(_visitor
.fold_expr_range(_binding_0
))),
1136 Expr
::Path(_binding_0
) => Expr
::Path(_visitor
.fold_expr_path(_binding_0
)),
1137 Expr
::Reference(_binding_0
) => {
1138 Expr
::Reference(full
!(_visitor
.fold_expr_reference(_binding_0
)))
1140 Expr
::Break(_binding_0
) => Expr
::Break(full
!(_visitor
.fold_expr_break(_binding_0
))),
1141 Expr
::Continue(_binding_0
) => {
1142 Expr
::Continue(full
!(_visitor
.fold_expr_continue(_binding_0
)))
1144 Expr
::Return(_binding_0
) => Expr
::Return(full
!(_visitor
.fold_expr_return(_binding_0
))),
1145 Expr
::Macro(_binding_0
) => Expr
::Macro(full
!(_visitor
.fold_expr_macro(_binding_0
))),
1146 Expr
::Struct(_binding_0
) => Expr
::Struct(full
!(_visitor
.fold_expr_struct(_binding_0
))),
1147 Expr
::Repeat(_binding_0
) => Expr
::Repeat(full
!(_visitor
.fold_expr_repeat(_binding_0
))),
1148 Expr
::Paren(_binding_0
) => Expr
::Paren(_visitor
.fold_expr_paren(_binding_0
)),
1149 Expr
::Group(_binding_0
) => Expr
::Group(full
!(_visitor
.fold_expr_group(_binding_0
))),
1150 Expr
::Try(_binding_0
) => Expr
::Try(full
!(_visitor
.fold_expr_try(_binding_0
))),
1151 Expr
::Async(_binding_0
) => Expr
::Async(full
!(_visitor
.fold_expr_async(_binding_0
))),
1152 Expr
::TryBlock(_binding_0
) => {
1153 Expr
::TryBlock(full
!(_visitor
.fold_expr_try_block(_binding_0
)))
1155 Expr
::Yield(_binding_0
) => Expr
::Yield(full
!(_visitor
.fold_expr_yield(_binding_0
))),
1156 Expr
::Verbatim(_binding_0
) => Expr
::Verbatim(_visitor
.fold_expr_verbatim(_binding_0
)),
1159 #[cfg(feature = "full")]
1160 pub fn fold_expr_array
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprArray
) -> ExprArray
{
1162 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1163 bracket_token
: Bracket(tokens_helper(_visitor
, &_i
.bracket_token
.span
)),
1164 elems
: FoldHelper
::lift(_i
.elems
, |it
| _visitor
.fold_expr(it
)),
1167 #[cfg(feature = "full")]
1168 pub fn fold_expr_assign
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprAssign
) -> ExprAssign
{
1170 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1171 left
: Box
::new(_visitor
.fold_expr(*_i
.left
)),
1172 eq_token
: Token
! [ = ](tokens_helper(_visitor
, &_i
.eq_token
.spans
)),
1173 right
: Box
::new(_visitor
.fold_expr(*_i
.right
)),
1176 #[cfg(feature = "full")]
1177 pub fn fold_expr_assign_op
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprAssignOp
) -> ExprAssignOp
{
1179 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1180 left
: Box
::new(_visitor
.fold_expr(*_i
.left
)),
1181 op
: _visitor
.fold_bin_op(_i
.op
),
1182 right
: Box
::new(_visitor
.fold_expr(*_i
.right
)),
1185 #[cfg(feature = "full")]
1186 pub fn fold_expr_async
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprAsync
) -> ExprAsync
{
1188 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1189 async_token
: Token
![async
](tokens_helper(_visitor
, &_i
.async_token
.span
)),
1190 capture
: (_i
.capture
).map(|it
| Token
![move](tokens_helper(_visitor
, &it
.span
))),
1191 block
: _visitor
.fold_block(_i
.block
),
1194 #[cfg(any(feature = "derive", feature = "full"))]
1195 pub fn fold_expr_binary
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprBinary
) -> ExprBinary
{
1197 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1198 left
: Box
::new(_visitor
.fold_expr(*_i
.left
)),
1199 op
: _visitor
.fold_bin_op(_i
.op
),
1200 right
: Box
::new(_visitor
.fold_expr(*_i
.right
)),
1203 #[cfg(feature = "full")]
1204 pub fn fold_expr_block
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprBlock
) -> ExprBlock
{
1206 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1207 label
: (_i
.label
).map(|it
| _visitor
.fold_label(it
)),
1208 block
: _visitor
.fold_block(_i
.block
),
1211 #[cfg(feature = "full")]
1212 pub fn fold_expr_box
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprBox
) -> ExprBox
{
1214 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1215 box_token
: Token
![box](tokens_helper(_visitor
, &_i
.box_token
.span
)),
1216 expr
: Box
::new(_visitor
.fold_expr(*_i
.expr
)),
1219 #[cfg(feature = "full")]
1220 pub fn fold_expr_break
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprBreak
) -> ExprBreak
{
1222 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1223 break_token
: Token
![break](tokens_helper(_visitor
, &_i
.break_token
.span
)),
1224 label
: (_i
.label
).map(|it
| _visitor
.fold_lifetime(it
)),
1225 expr
: (_i
.expr
).map(|it
| Box
::new(_visitor
.fold_expr(*it
))),
1228 #[cfg(any(feature = "derive", feature = "full"))]
1229 pub fn fold_expr_call
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprCall
) -> ExprCall
{
1231 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1232 func
: Box
::new(_visitor
.fold_expr(*_i
.func
)),
1233 paren_token
: Paren(tokens_helper(_visitor
, &_i
.paren_token
.span
)),
1234 args
: FoldHelper
::lift(_i
.args
, |it
| _visitor
.fold_expr(it
)),
1237 #[cfg(any(feature = "derive", feature = "full"))]
1238 pub fn fold_expr_cast
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprCast
) -> ExprCast
{
1240 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1241 expr
: Box
::new(_visitor
.fold_expr(*_i
.expr
)),
1242 as_token
: Token
![as](tokens_helper(_visitor
, &_i
.as_token
.span
)),
1243 ty
: Box
::new(_visitor
.fold_type(*_i
.ty
)),
1246 #[cfg(feature = "full")]
1247 pub fn fold_expr_closure
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprClosure
) -> ExprClosure
{
1249 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1250 asyncness
: (_i
.asyncness
).map(|it
| Token
![async
](tokens_helper(_visitor
, &it
.span
))),
1251 movability
: (_i
.movability
).map(|it
| Token
![static](tokens_helper(_visitor
, &it
.span
))),
1252 capture
: (_i
.capture
).map(|it
| Token
![move](tokens_helper(_visitor
, &it
.span
))),
1253 or1_token
: Token
! [ | ](tokens_helper(_visitor
, &_i
.or1_token
.spans
)),
1254 inputs
: FoldHelper
::lift(_i
.inputs
, |it
| _visitor
.fold_fn_arg(it
)),
1255 or2_token
: Token
! [ | ](tokens_helper(_visitor
, &_i
.or2_token
.spans
)),
1256 output
: _visitor
.fold_return_type(_i
.output
),
1257 body
: Box
::new(_visitor
.fold_expr(*_i
.body
)),
1260 #[cfg(feature = "full")]
1261 pub fn fold_expr_continue
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprContinue
) -> ExprContinue
{
1263 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1264 continue_token
: Token
![continue](tokens_helper(_visitor
, &_i
.continue_token
.span
)),
1265 label
: (_i
.label
).map(|it
| _visitor
.fold_lifetime(it
)),
1268 #[cfg(any(feature = "derive", feature = "full"))]
1269 pub fn fold_expr_field
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprField
) -> ExprField
{
1271 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1272 base
: Box
::new(_visitor
.fold_expr(*_i
.base
)),
1273 dot_token
: Token
! [ . ](tokens_helper(_visitor
, &_i
.dot_token
.spans
)),
1274 member
: _visitor
.fold_member(_i
.member
),
1277 #[cfg(feature = "full")]
1278 pub fn fold_expr_for_loop
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprForLoop
) -> ExprForLoop
{
1280 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1281 label
: (_i
.label
).map(|it
| _visitor
.fold_label(it
)),
1282 for_token
: Token
![for](tokens_helper(_visitor
, &_i
.for_token
.span
)),
1283 pat
: Box
::new(_visitor
.fold_pat(*_i
.pat
)),
1284 in_token
: Token
![in](tokens_helper(_visitor
, &_i
.in_token
.span
)),
1285 expr
: Box
::new(_visitor
.fold_expr(*_i
.expr
)),
1286 body
: _visitor
.fold_block(_i
.body
),
1289 #[cfg(feature = "full")]
1290 pub fn fold_expr_group
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprGroup
) -> ExprGroup
{
1292 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1293 group_token
: Group(tokens_helper(_visitor
, &_i
.group_token
.span
)),
1294 expr
: Box
::new(_visitor
.fold_expr(*_i
.expr
)),
1297 #[cfg(feature = "full")]
1298 pub fn fold_expr_if
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprIf
) -> ExprIf
{
1300 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1301 if_token
: Token
![if](tokens_helper(_visitor
, &_i
.if_token
.span
)),
1302 cond
: Box
::new(_visitor
.fold_expr(*_i
.cond
)),
1303 then_branch
: _visitor
.fold_block(_i
.then_branch
),
1304 else_branch
: (_i
.else_branch
).map(|it
| {
1306 Token
![else](tokens_helper(_visitor
, &(it
).0.span
)),
1307 Box
::new(_visitor
.fold_expr(*(it
).1)),
1312 #[cfg(feature = "full")]
1313 pub fn fold_expr_in_place
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprInPlace
) -> ExprInPlace
{
1315 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1316 place
: Box
::new(_visitor
.fold_expr(*_i
.place
)),
1317 arrow_token
: Token
! [ <- ](tokens_helper(_visitor
, &_i
.arrow_token
.spans
)),
1318 value
: Box
::new(_visitor
.fold_expr(*_i
.value
)),
1321 #[cfg(any(feature = "derive", feature = "full"))]
1322 pub fn fold_expr_index
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprIndex
) -> ExprIndex
{
1324 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1325 expr
: Box
::new(_visitor
.fold_expr(*_i
.expr
)),
1326 bracket_token
: Bracket(tokens_helper(_visitor
, &_i
.bracket_token
.span
)),
1327 index
: Box
::new(_visitor
.fold_expr(*_i
.index
)),
1330 #[cfg(feature = "full")]
1331 pub fn fold_expr_let
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprLet
) -> ExprLet
{
1333 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1334 let_token
: Token
![let](tokens_helper(_visitor
, &_i
.let_token
.span
)),
1335 pats
: FoldHelper
::lift(_i
.pats
, |it
| _visitor
.fold_pat(it
)),
1336 eq_token
: Token
! [ = ](tokens_helper(_visitor
, &_i
.eq_token
.spans
)),
1337 expr
: Box
::new(_visitor
.fold_expr(*_i
.expr
)),
1340 #[cfg(any(feature = "derive", feature = "full"))]
1341 pub fn fold_expr_lit
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprLit
) -> ExprLit
{
1343 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1344 lit
: _visitor
.fold_lit(_i
.lit
),
1347 #[cfg(feature = "full")]
1348 pub fn fold_expr_loop
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprLoop
) -> ExprLoop
{
1350 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1351 label
: (_i
.label
).map(|it
| _visitor
.fold_label(it
)),
1352 loop_token
: Token
![loop](tokens_helper(_visitor
, &_i
.loop_token
.span
)),
1353 body
: _visitor
.fold_block(_i
.body
),
1356 #[cfg(feature = "full")]
1357 pub fn fold_expr_macro
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprMacro
) -> ExprMacro
{
1359 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1360 mac
: _visitor
.fold_macro(_i
.mac
),
1363 #[cfg(feature = "full")]
1364 pub fn fold_expr_match
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprMatch
) -> ExprMatch
{
1366 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1367 match_token
: Token
![match](tokens_helper(_visitor
, &_i
.match_token
.span
)),
1368 expr
: Box
::new(_visitor
.fold_expr(*_i
.expr
)),
1369 brace_token
: Brace(tokens_helper(_visitor
, &_i
.brace_token
.span
)),
1370 arms
: FoldHelper
::lift(_i
.arms
, |it
| _visitor
.fold_arm(it
)),
1373 #[cfg(feature = "full")]
1374 pub fn fold_expr_method_call
<V
: Fold
+ ?Sized
>(
1377 ) -> ExprMethodCall
{
1379 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1380 receiver
: Box
::new(_visitor
.fold_expr(*_i
.receiver
)),
1381 dot_token
: Token
! [ . ](tokens_helper(_visitor
, &_i
.dot_token
.spans
)),
1382 method
: _visitor
.fold_ident(_i
.method
),
1383 turbofish
: (_i
.turbofish
).map(|it
| _visitor
.fold_method_turbofish(it
)),
1384 paren_token
: Paren(tokens_helper(_visitor
, &_i
.paren_token
.span
)),
1385 args
: FoldHelper
::lift(_i
.args
, |it
| _visitor
.fold_expr(it
)),
1388 #[cfg(any(feature = "derive", feature = "full"))]
1389 pub fn fold_expr_paren
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprParen
) -> ExprParen
{
1391 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1392 paren_token
: Paren(tokens_helper(_visitor
, &_i
.paren_token
.span
)),
1393 expr
: Box
::new(_visitor
.fold_expr(*_i
.expr
)),
1396 #[cfg(any(feature = "derive", feature = "full"))]
1397 pub fn fold_expr_path
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprPath
) -> ExprPath
{
1399 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1400 qself
: (_i
.qself
).map(|it
| _visitor
.fold_qself(it
)),
1401 path
: _visitor
.fold_path(_i
.path
),
1404 #[cfg(feature = "full")]
1405 pub fn fold_expr_range
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprRange
) -> ExprRange
{
1407 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1408 from
: (_i
.from
).map(|it
| Box
::new(_visitor
.fold_expr(*it
))),
1409 limits
: _visitor
.fold_range_limits(_i
.limits
),
1410 to
: (_i
.to
).map(|it
| Box
::new(_visitor
.fold_expr(*it
))),
1413 #[cfg(feature = "full")]
1414 pub fn fold_expr_reference
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprReference
) -> ExprReference
{
1416 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1417 and_token
: Token
! [ & ](tokens_helper(_visitor
, &_i
.and_token
.spans
)),
1418 mutability
: (_i
.mutability
).map(|it
| Token
![mut](tokens_helper(_visitor
, &it
.span
))),
1419 expr
: Box
::new(_visitor
.fold_expr(*_i
.expr
)),
1422 #[cfg(feature = "full")]
1423 pub fn fold_expr_repeat
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprRepeat
) -> ExprRepeat
{
1425 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1426 bracket_token
: Bracket(tokens_helper(_visitor
, &_i
.bracket_token
.span
)),
1427 expr
: Box
::new(_visitor
.fold_expr(*_i
.expr
)),
1428 semi_token
: Token
! [ ; ](tokens_helper(_visitor
, &_i
.semi_token
.spans
)),
1429 len
: Box
::new(_visitor
.fold_expr(*_i
.len
)),
1432 #[cfg(feature = "full")]
1433 pub fn fold_expr_return
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprReturn
) -> ExprReturn
{
1435 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1436 return_token
: Token
![return](tokens_helper(_visitor
, &_i
.return_token
.span
)),
1437 expr
: (_i
.expr
).map(|it
| Box
::new(_visitor
.fold_expr(*it
))),
1440 #[cfg(feature = "full")]
1441 pub fn fold_expr_struct
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprStruct
) -> ExprStruct
{
1443 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1444 path
: _visitor
.fold_path(_i
.path
),
1445 brace_token
: Brace(tokens_helper(_visitor
, &_i
.brace_token
.span
)),
1446 fields
: FoldHelper
::lift(_i
.fields
, |it
| _visitor
.fold_field_value(it
)),
1447 dot2_token
: (_i
.dot2_token
).map(|it
| Token
![..](tokens_helper(_visitor
, &it
.spans
))),
1448 rest
: (_i
.rest
).map(|it
| Box
::new(_visitor
.fold_expr(*it
))),
1451 #[cfg(feature = "full")]
1452 pub fn fold_expr_try
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprTry
) -> ExprTry
{
1454 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1455 expr
: Box
::new(_visitor
.fold_expr(*_i
.expr
)),
1456 question_token
: Token
! [ ?
](tokens_helper(_visitor
, &_i
.question_token
.spans
)),
1459 #[cfg(feature = "full")]
1460 pub fn fold_expr_try_block
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprTryBlock
) -> ExprTryBlock
{
1462 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1463 try_token
: Token
![try
](tokens_helper(_visitor
, &_i
.try_token
.span
)),
1464 block
: _visitor
.fold_block(_i
.block
),
1467 #[cfg(feature = "full")]
1468 pub fn fold_expr_tuple
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprTuple
) -> ExprTuple
{
1470 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1471 paren_token
: Paren(tokens_helper(_visitor
, &_i
.paren_token
.span
)),
1472 elems
: FoldHelper
::lift(_i
.elems
, |it
| _visitor
.fold_expr(it
)),
1475 #[cfg(feature = "full")]
1476 pub fn fold_expr_type
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprType
) -> ExprType
{
1478 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1479 expr
: Box
::new(_visitor
.fold_expr(*_i
.expr
)),
1480 colon_token
: Token
! [ : ](tokens_helper(_visitor
, &_i
.colon_token
.spans
)),
1481 ty
: Box
::new(_visitor
.fold_type(*_i
.ty
)),
1484 #[cfg(any(feature = "derive", feature = "full"))]
1485 pub fn fold_expr_unary
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprUnary
) -> ExprUnary
{
1487 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1488 op
: _visitor
.fold_un_op(_i
.op
),
1489 expr
: Box
::new(_visitor
.fold_expr(*_i
.expr
)),
1492 #[cfg(feature = "full")]
1493 pub fn fold_expr_unsafe
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprUnsafe
) -> ExprUnsafe
{
1495 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1496 unsafe_token
: Token
![unsafe](tokens_helper(_visitor
, &_i
.unsafe_token
.span
)),
1497 block
: _visitor
.fold_block(_i
.block
),
1500 #[cfg(any(feature = "derive", feature = "full"))]
1501 pub fn fold_expr_verbatim
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprVerbatim
) -> ExprVerbatim
{
1502 ExprVerbatim { tts: _i.tts }
1504 #[cfg(feature = "full")]
1505 pub fn fold_expr_while
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprWhile
) -> ExprWhile
{
1507 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1508 label
: (_i
.label
).map(|it
| _visitor
.fold_label(it
)),
1509 while_token
: Token
![while](tokens_helper(_visitor
, &_i
.while_token
.span
)),
1510 cond
: Box
::new(_visitor
.fold_expr(*_i
.cond
)),
1511 body
: _visitor
.fold_block(_i
.body
),
1514 #[cfg(feature = "full")]
1515 pub fn fold_expr_yield
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprYield
) -> ExprYield
{
1517 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1518 yield_token
: Token
![yield](tokens_helper(_visitor
, &_i
.yield_token
.span
)),
1519 expr
: (_i
.expr
).map(|it
| Box
::new(_visitor
.fold_expr(*it
))),
1522 #[cfg(any(feature = "derive", feature = "full"))]
1523 pub fn fold_field
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Field
) -> Field
{
1525 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1526 vis
: _visitor
.fold_visibility(_i
.vis
),
1527 ident
: (_i
.ident
).map(|it
| _visitor
.fold_ident(it
)),
1528 colon_token
: (_i
.colon_token
).map(|it
| Token
! [ : ](tokens_helper(_visitor
, &it
.spans
))),
1529 ty
: _visitor
.fold_type(_i
.ty
),
1532 #[cfg(feature = "full")]
1533 pub fn fold_field_pat
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: FieldPat
) -> FieldPat
{
1535 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1536 member
: _visitor
.fold_member(_i
.member
),
1537 colon_token
: (_i
.colon_token
).map(|it
| Token
! [ : ](tokens_helper(_visitor
, &it
.spans
))),
1538 pat
: Box
::new(_visitor
.fold_pat(*_i
.pat
)),
1541 #[cfg(feature = "full")]
1542 pub fn fold_field_value
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: FieldValue
) -> FieldValue
{
1544 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1545 member
: _visitor
.fold_member(_i
.member
),
1546 colon_token
: (_i
.colon_token
).map(|it
| Token
! [ : ](tokens_helper(_visitor
, &it
.spans
))),
1547 expr
: _visitor
.fold_expr(_i
.expr
),
1550 #[cfg(any(feature = "derive", feature = "full"))]
1551 pub fn fold_fields
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Fields
) -> Fields
{
1553 Fields
::Named(_binding_0
) => Fields
::Named(_visitor
.fold_fields_named(_binding_0
)),
1554 Fields
::Unnamed(_binding_0
) => Fields
::Unnamed(_visitor
.fold_fields_unnamed(_binding_0
)),
1555 Fields
::Unit
=> Fields
::Unit
,
1558 #[cfg(any(feature = "derive", feature = "full"))]
1559 pub fn fold_fields_named
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: FieldsNamed
) -> FieldsNamed
{
1561 brace_token
: Brace(tokens_helper(_visitor
, &_i
.brace_token
.span
)),
1562 named
: FoldHelper
::lift(_i
.named
, |it
| _visitor
.fold_field(it
)),
1565 #[cfg(any(feature = "derive", feature = "full"))]
1566 pub fn fold_fields_unnamed
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: FieldsUnnamed
) -> FieldsUnnamed
{
1568 paren_token
: Paren(tokens_helper(_visitor
, &_i
.paren_token
.span
)),
1569 unnamed
: FoldHelper
::lift(_i
.unnamed
, |it
| _visitor
.fold_field(it
)),
1572 #[cfg(feature = "full")]
1573 pub fn fold_file
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: File
) -> File
{
1575 shebang
: _i
.shebang
,
1576 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1577 items
: FoldHelper
::lift(_i
.items
, |it
| _visitor
.fold_item(it
)),
1580 #[cfg(feature = "full")]
1581 pub fn fold_fn_arg
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: FnArg
) -> FnArg
{
1583 FnArg
::SelfRef(_binding_0
) => FnArg
::SelfRef(_visitor
.fold_arg_self_ref(_binding_0
)),
1584 FnArg
::SelfValue(_binding_0
) => FnArg
::SelfValue(_visitor
.fold_arg_self(_binding_0
)),
1585 FnArg
::Captured(_binding_0
) => FnArg
::Captured(_visitor
.fold_arg_captured(_binding_0
)),
1586 FnArg
::Inferred(_binding_0
) => FnArg
::Inferred(_visitor
.fold_pat(_binding_0
)),
1587 FnArg
::Ignored(_binding_0
) => FnArg
::Ignored(_visitor
.fold_type(_binding_0
)),
1590 #[cfg(feature = "full")]
1591 pub fn fold_fn_decl
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: FnDecl
) -> FnDecl
{
1593 fn_token
: Token
![fn](tokens_helper(_visitor
, &_i
.fn_token
.span
)),
1594 generics
: _visitor
.fold_generics(_i
.generics
),
1595 paren_token
: Paren(tokens_helper(_visitor
, &_i
.paren_token
.span
)),
1596 inputs
: FoldHelper
::lift(_i
.inputs
, |it
| _visitor
.fold_fn_arg(it
)),
1597 variadic
: (_i
.variadic
).map(|it
| Token
! [ ... ](tokens_helper(_visitor
, &it
.spans
))),
1598 output
: _visitor
.fold_return_type(_i
.output
),
1601 #[cfg(feature = "full")]
1602 pub fn fold_foreign_item
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ForeignItem
) -> ForeignItem
{
1604 ForeignItem
::Fn(_binding_0
) => ForeignItem
::Fn(_visitor
.fold_foreign_item_fn(_binding_0
)),
1605 ForeignItem
::Static(_binding_0
) => {
1606 ForeignItem
::Static(_visitor
.fold_foreign_item_static(_binding_0
))
1608 ForeignItem
::Type(_binding_0
) => {
1609 ForeignItem
::Type(_visitor
.fold_foreign_item_type(_binding_0
))
1611 ForeignItem
::Macro(_binding_0
) => {
1612 ForeignItem
::Macro(_visitor
.fold_foreign_item_macro(_binding_0
))
1614 ForeignItem
::Verbatim(_binding_0
) => {
1615 ForeignItem
::Verbatim(_visitor
.fold_foreign_item_verbatim(_binding_0
))
1619 #[cfg(feature = "full")]
1620 pub fn fold_foreign_item_fn
<V
: Fold
+ ?Sized
>(
1623 ) -> ForeignItemFn
{
1625 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1626 vis
: _visitor
.fold_visibility(_i
.vis
),
1627 ident
: _visitor
.fold_ident(_i
.ident
),
1628 decl
: Box
::new(_visitor
.fold_fn_decl(*_i
.decl
)),
1629 semi_token
: Token
! [ ; ](tokens_helper(_visitor
, &_i
.semi_token
.spans
)),
1632 #[cfg(feature = "full")]
1633 pub fn fold_foreign_item_macro
<V
: Fold
+ ?Sized
>(
1635 _i
: ForeignItemMacro
,
1636 ) -> ForeignItemMacro
{
1638 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1639 mac
: _visitor
.fold_macro(_i
.mac
),
1640 semi_token
: (_i
.semi_token
).map(|it
| Token
! [ ; ](tokens_helper(_visitor
, &it
.spans
))),
1643 #[cfg(feature = "full")]
1644 pub fn fold_foreign_item_static
<V
: Fold
+ ?Sized
>(
1646 _i
: ForeignItemStatic
,
1647 ) -> ForeignItemStatic
{
1649 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1650 vis
: _visitor
.fold_visibility(_i
.vis
),
1651 static_token
: Token
![static](tokens_helper(_visitor
, &_i
.static_token
.span
)),
1652 mutability
: (_i
.mutability
).map(|it
| Token
![mut](tokens_helper(_visitor
, &it
.span
))),
1653 ident
: _visitor
.fold_ident(_i
.ident
),
1654 colon_token
: Token
! [ : ](tokens_helper(_visitor
, &_i
.colon_token
.spans
)),
1655 ty
: Box
::new(_visitor
.fold_type(*_i
.ty
)),
1656 semi_token
: Token
! [ ; ](tokens_helper(_visitor
, &_i
.semi_token
.spans
)),
1659 #[cfg(feature = "full")]
1660 pub fn fold_foreign_item_type
<V
: Fold
+ ?Sized
>(
1662 _i
: ForeignItemType
,
1663 ) -> ForeignItemType
{
1665 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1666 vis
: _visitor
.fold_visibility(_i
.vis
),
1667 type_token
: Token
![type](tokens_helper(_visitor
, &_i
.type_token
.span
)),
1668 ident
: _visitor
.fold_ident(_i
.ident
),
1669 semi_token
: Token
! [ ; ](tokens_helper(_visitor
, &_i
.semi_token
.spans
)),
1672 #[cfg(feature = "full")]
1673 pub fn fold_foreign_item_verbatim
<V
: Fold
+ ?Sized
>(
1675 _i
: ForeignItemVerbatim
,
1676 ) -> ForeignItemVerbatim
{
1677 ForeignItemVerbatim { tts: _i.tts }
1679 #[cfg(any(feature = "derive", feature = "full"))]
1680 pub fn fold_generic_argument
<V
: Fold
+ ?Sized
>(
1682 _i
: GenericArgument
,
1683 ) -> GenericArgument
{
1685 GenericArgument
::Lifetime(_binding_0
) => {
1686 GenericArgument
::Lifetime(_visitor
.fold_lifetime(_binding_0
))
1688 GenericArgument
::Type(_binding_0
) => GenericArgument
::Type(_visitor
.fold_type(_binding_0
)),
1689 GenericArgument
::Binding(_binding_0
) => {
1690 GenericArgument
::Binding(_visitor
.fold_binding(_binding_0
))
1692 GenericArgument
::Constraint(_binding_0
) => {
1693 GenericArgument
::Constraint(_visitor
.fold_constraint(_binding_0
))
1695 GenericArgument
::Const(_binding_0
) => {
1696 GenericArgument
::Const(_visitor
.fold_expr(_binding_0
))
1700 #[cfg(feature = "full")]
1701 pub fn fold_generic_method_argument
<V
: Fold
+ ?Sized
>(
1703 _i
: GenericMethodArgument
,
1704 ) -> GenericMethodArgument
{
1706 GenericMethodArgument
::Type(_binding_0
) => {
1707 GenericMethodArgument
::Type(_visitor
.fold_type(_binding_0
))
1709 GenericMethodArgument
::Const(_binding_0
) => {
1710 GenericMethodArgument
::Const(_visitor
.fold_expr(_binding_0
))
1714 #[cfg(any(feature = "derive", feature = "full"))]
1715 pub fn fold_generic_param
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: GenericParam
) -> GenericParam
{
1717 GenericParam
::Type(_binding_0
) => GenericParam
::Type(_visitor
.fold_type_param(_binding_0
)),
1718 GenericParam
::Lifetime(_binding_0
) => {
1719 GenericParam
::Lifetime(_visitor
.fold_lifetime_def(_binding_0
))
1721 GenericParam
::Const(_binding_0
) => {
1722 GenericParam
::Const(_visitor
.fold_const_param(_binding_0
))
1726 #[cfg(any(feature = "derive", feature = "full"))]
1727 pub fn fold_generics
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Generics
) -> Generics
{
1729 lt_token
: (_i
.lt_token
).map(|it
| Token
! [ < ](tokens_helper(_visitor
, &it
.spans
))),
1730 params
: FoldHelper
::lift(_i
.params
, |it
| _visitor
.fold_generic_param(it
)),
1731 gt_token
: (_i
.gt_token
).map(|it
| Token
! [ > ](tokens_helper(_visitor
, &it
.spans
))),
1732 where_clause
: (_i
.where_clause
).map(|it
| _visitor
.fold_where_clause(it
)),
1735 #[cfg(feature = "full")]
1736 pub fn fold_impl_item
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ImplItem
) -> ImplItem
{
1738 ImplItem
::Const(_binding_0
) => ImplItem
::Const(_visitor
.fold_impl_item_const(_binding_0
)),
1739 ImplItem
::Method(_binding_0
) => {
1740 ImplItem
::Method(_visitor
.fold_impl_item_method(_binding_0
))
1742 ImplItem
::Type(_binding_0
) => ImplItem
::Type(_visitor
.fold_impl_item_type(_binding_0
)),
1743 ImplItem
::Existential(_binding_0
) => {
1744 ImplItem
::Existential(_visitor
.fold_impl_item_existential(_binding_0
))
1746 ImplItem
::Macro(_binding_0
) => ImplItem
::Macro(_visitor
.fold_impl_item_macro(_binding_0
)),
1747 ImplItem
::Verbatim(_binding_0
) => {
1748 ImplItem
::Verbatim(_visitor
.fold_impl_item_verbatim(_binding_0
))
1752 #[cfg(feature = "full")]
1753 pub fn fold_impl_item_const
<V
: Fold
+ ?Sized
>(
1756 ) -> ImplItemConst
{
1758 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1759 vis
: _visitor
.fold_visibility(_i
.vis
),
1760 defaultness
: (_i
.defaultness
).map(|it
| Token
![default](tokens_helper(_visitor
, &it
.span
))),
1761 const_token
: Token
![const](tokens_helper(_visitor
, &_i
.const_token
.span
)),
1762 ident
: _visitor
.fold_ident(_i
.ident
),
1763 colon_token
: Token
! [ : ](tokens_helper(_visitor
, &_i
.colon_token
.spans
)),
1764 ty
: _visitor
.fold_type(_i
.ty
),
1765 eq_token
: Token
! [ = ](tokens_helper(_visitor
, &_i
.eq_token
.spans
)),
1766 expr
: _visitor
.fold_expr(_i
.expr
),
1767 semi_token
: Token
! [ ; ](tokens_helper(_visitor
, &_i
.semi_token
.spans
)),
1770 #[cfg(feature = "full")]
1771 pub fn fold_impl_item_existential
<V
: Fold
+ ?Sized
>(
1773 _i
: ImplItemExistential
,
1774 ) -> ImplItemExistential
{
1775 ImplItemExistential
{
1776 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1777 existential_token
: Token
![existential
](tokens_helper(_visitor
, &_i
.existential_token
.span
)),
1778 type_token
: Token
![type](tokens_helper(_visitor
, &_i
.type_token
.span
)),
1779 ident
: _visitor
.fold_ident(_i
.ident
),
1780 generics
: _visitor
.fold_generics(_i
.generics
),
1781 colon_token
: (_i
.colon_token
).map(|it
| Token
! [ : ](tokens_helper(_visitor
, &it
.spans
))),
1782 bounds
: FoldHelper
::lift(_i
.bounds
, |it
| _visitor
.fold_type_param_bound(it
)),
1783 semi_token
: Token
! [ ; ](tokens_helper(_visitor
, &_i
.semi_token
.spans
)),
1786 #[cfg(feature = "full")]
1787 pub fn fold_impl_item_macro
<V
: Fold
+ ?Sized
>(
1790 ) -> ImplItemMacro
{
1792 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1793 mac
: _visitor
.fold_macro(_i
.mac
),
1794 semi_token
: (_i
.semi_token
).map(|it
| Token
! [ ; ](tokens_helper(_visitor
, &it
.spans
))),
1797 #[cfg(feature = "full")]
1798 pub fn fold_impl_item_method
<V
: Fold
+ ?Sized
>(
1801 ) -> ImplItemMethod
{
1803 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1804 vis
: _visitor
.fold_visibility(_i
.vis
),
1805 defaultness
: (_i
.defaultness
).map(|it
| Token
![default](tokens_helper(_visitor
, &it
.span
))),
1806 sig
: _visitor
.fold_method_sig(_i
.sig
),
1807 block
: _visitor
.fold_block(_i
.block
),
1810 #[cfg(feature = "full")]
1811 pub fn fold_impl_item_type
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ImplItemType
) -> ImplItemType
{
1813 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1814 vis
: _visitor
.fold_visibility(_i
.vis
),
1815 defaultness
: (_i
.defaultness
).map(|it
| Token
![default](tokens_helper(_visitor
, &it
.span
))),
1816 type_token
: Token
![type](tokens_helper(_visitor
, &_i
.type_token
.span
)),
1817 ident
: _visitor
.fold_ident(_i
.ident
),
1818 generics
: _visitor
.fold_generics(_i
.generics
),
1819 eq_token
: Token
! [ = ](tokens_helper(_visitor
, &_i
.eq_token
.spans
)),
1820 ty
: _visitor
.fold_type(_i
.ty
),
1821 semi_token
: Token
! [ ; ](tokens_helper(_visitor
, &_i
.semi_token
.spans
)),
1824 #[cfg(feature = "full")]
1825 pub fn fold_impl_item_verbatim
<V
: Fold
+ ?Sized
>(
1827 _i
: ImplItemVerbatim
,
1828 ) -> ImplItemVerbatim
{
1829 ImplItemVerbatim { tts: _i.tts }
1831 #[cfg(any(feature = "derive", feature = "full"))]
1832 pub fn fold_index
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Index
) -> Index
{
1835 span
: _visitor
.fold_span(_i
.span
),
1838 #[cfg(feature = "full")]
1839 pub fn fold_item
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Item
) -> Item
{
1841 Item
::ExternCrate(_binding_0
) => {
1842 Item
::ExternCrate(_visitor
.fold_item_extern_crate(_binding_0
))
1844 Item
::Use(_binding_0
) => Item
::Use(_visitor
.fold_item_use(_binding_0
)),
1845 Item
::Static(_binding_0
) => Item
::Static(_visitor
.fold_item_static(_binding_0
)),
1846 Item
::Const(_binding_0
) => Item
::Const(_visitor
.fold_item_const(_binding_0
)),
1847 Item
::Fn(_binding_0
) => Item
::Fn(_visitor
.fold_item_fn(_binding_0
)),
1848 Item
::Mod(_binding_0
) => Item
::Mod(_visitor
.fold_item_mod(_binding_0
)),
1849 Item
::ForeignMod(_binding_0
) => {
1850 Item
::ForeignMod(_visitor
.fold_item_foreign_mod(_binding_0
))
1852 Item
::Type(_binding_0
) => Item
::Type(_visitor
.fold_item_type(_binding_0
)),
1853 Item
::Existential(_binding_0
) => {
1854 Item
::Existential(_visitor
.fold_item_existential(_binding_0
))
1856 Item
::Struct(_binding_0
) => Item
::Struct(_visitor
.fold_item_struct(_binding_0
)),
1857 Item
::Enum(_binding_0
) => Item
::Enum(_visitor
.fold_item_enum(_binding_0
)),
1858 Item
::Union(_binding_0
) => Item
::Union(_visitor
.fold_item_union(_binding_0
)),
1859 Item
::Trait(_binding_0
) => Item
::Trait(_visitor
.fold_item_trait(_binding_0
)),
1860 Item
::TraitAlias(_binding_0
) => {
1861 Item
::TraitAlias(_visitor
.fold_item_trait_alias(_binding_0
))
1863 Item
::Impl(_binding_0
) => Item
::Impl(_visitor
.fold_item_impl(_binding_0
)),
1864 Item
::Macro(_binding_0
) => Item
::Macro(_visitor
.fold_item_macro(_binding_0
)),
1865 Item
::Macro2(_binding_0
) => Item
::Macro2(_visitor
.fold_item_macro2(_binding_0
)),
1866 Item
::Verbatim(_binding_0
) => Item
::Verbatim(_visitor
.fold_item_verbatim(_binding_0
)),
1869 #[cfg(feature = "full")]
1870 pub fn fold_item_const
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ItemConst
) -> ItemConst
{
1872 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1873 vis
: _visitor
.fold_visibility(_i
.vis
),
1874 const_token
: Token
![const](tokens_helper(_visitor
, &_i
.const_token
.span
)),
1875 ident
: _visitor
.fold_ident(_i
.ident
),
1876 colon_token
: Token
! [ : ](tokens_helper(_visitor
, &_i
.colon_token
.spans
)),
1877 ty
: Box
::new(_visitor
.fold_type(*_i
.ty
)),
1878 eq_token
: Token
! [ = ](tokens_helper(_visitor
, &_i
.eq_token
.spans
)),
1879 expr
: Box
::new(_visitor
.fold_expr(*_i
.expr
)),
1880 semi_token
: Token
! [ ; ](tokens_helper(_visitor
, &_i
.semi_token
.spans
)),
1883 #[cfg(feature = "full")]
1884 pub fn fold_item_enum
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ItemEnum
) -> ItemEnum
{
1886 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1887 vis
: _visitor
.fold_visibility(_i
.vis
),
1888 enum_token
: Token
![enum](tokens_helper(_visitor
, &_i
.enum_token
.span
)),
1889 ident
: _visitor
.fold_ident(_i
.ident
),
1890 generics
: _visitor
.fold_generics(_i
.generics
),
1891 brace_token
: Brace(tokens_helper(_visitor
, &_i
.brace_token
.span
)),
1892 variants
: FoldHelper
::lift(_i
.variants
, |it
| _visitor
.fold_variant(it
)),
1895 #[cfg(feature = "full")]
1896 pub fn fold_item_existential
<V
: Fold
+ ?Sized
>(
1898 _i
: ItemExistential
,
1899 ) -> ItemExistential
{
1901 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1902 vis
: _visitor
.fold_visibility(_i
.vis
),
1903 existential_token
: Token
![existential
](tokens_helper(_visitor
, &_i
.existential_token
.span
)),
1904 type_token
: Token
![type](tokens_helper(_visitor
, &_i
.type_token
.span
)),
1905 ident
: _visitor
.fold_ident(_i
.ident
),
1906 generics
: _visitor
.fold_generics(_i
.generics
),
1907 colon_token
: (_i
.colon_token
).map(|it
| Token
! [ : ](tokens_helper(_visitor
, &it
.spans
))),
1908 bounds
: FoldHelper
::lift(_i
.bounds
, |it
| _visitor
.fold_type_param_bound(it
)),
1909 semi_token
: Token
! [ ; ](tokens_helper(_visitor
, &_i
.semi_token
.spans
)),
1912 #[cfg(feature = "full")]
1913 pub fn fold_item_extern_crate
<V
: Fold
+ ?Sized
>(
1915 _i
: ItemExternCrate
,
1916 ) -> ItemExternCrate
{
1918 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1919 vis
: _visitor
.fold_visibility(_i
.vis
),
1920 extern_token
: Token
![extern](tokens_helper(_visitor
, &_i
.extern_token
.span
)),
1921 crate_token
: Token
![crate](tokens_helper(_visitor
, &_i
.crate_token
.span
)),
1922 ident
: _visitor
.fold_ident(_i
.ident
),
1923 rename
: (_i
.rename
).map(|it
| {
1925 Token
![as](tokens_helper(_visitor
, &(it
).0.span
)),
1926 _visitor
.fold_ident((it
).1),
1929 semi_token
: Token
! [ ; ](tokens_helper(_visitor
, &_i
.semi_token
.spans
)),
1932 #[cfg(feature = "full")]
1933 pub fn fold_item_fn
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ItemFn
) -> ItemFn
{
1935 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1936 vis
: _visitor
.fold_visibility(_i
.vis
),
1937 constness
: (_i
.constness
).map(|it
| Token
![const](tokens_helper(_visitor
, &it
.span
))),
1938 unsafety
: (_i
.unsafety
).map(|it
| Token
![unsafe](tokens_helper(_visitor
, &it
.span
))),
1939 asyncness
: (_i
.asyncness
).map(|it
| Token
![async
](tokens_helper(_visitor
, &it
.span
))),
1940 abi
: (_i
.abi
).map(|it
| _visitor
.fold_abi(it
)),
1941 ident
: _visitor
.fold_ident(_i
.ident
),
1942 decl
: Box
::new(_visitor
.fold_fn_decl(*_i
.decl
)),
1943 block
: Box
::new(_visitor
.fold_block(*_i
.block
)),
1946 #[cfg(feature = "full")]
1947 pub fn fold_item_foreign_mod
<V
: Fold
+ ?Sized
>(
1950 ) -> ItemForeignMod
{
1952 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1953 abi
: _visitor
.fold_abi(_i
.abi
),
1954 brace_token
: Brace(tokens_helper(_visitor
, &_i
.brace_token
.span
)),
1955 items
: FoldHelper
::lift(_i
.items
, |it
| _visitor
.fold_foreign_item(it
)),
1958 #[cfg(feature = "full")]
1959 pub fn fold_item_impl
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ItemImpl
) -> ItemImpl
{
1961 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1962 defaultness
: (_i
.defaultness
).map(|it
| Token
![default](tokens_helper(_visitor
, &it
.span
))),
1963 unsafety
: (_i
.unsafety
).map(|it
| Token
![unsafe](tokens_helper(_visitor
, &it
.span
))),
1964 impl_token
: Token
![impl](tokens_helper(_visitor
, &_i
.impl_token
.span
)),
1965 generics
: _visitor
.fold_generics(_i
.generics
),
1966 trait_
: (_i
.trait_
).map(|it
| {
1968 ((it
).0).map(|it
| Token
![!](tokens_helper(_visitor
, &it
.spans
))),
1969 _visitor
.fold_path((it
).1),
1970 Token
![for](tokens_helper(_visitor
, &(it
).2.span
)),
1973 self_ty
: Box
::new(_visitor
.fold_type(*_i
.self_ty
)),
1974 brace_token
: Brace(tokens_helper(_visitor
, &_i
.brace_token
.span
)),
1975 items
: FoldHelper
::lift(_i
.items
, |it
| _visitor
.fold_impl_item(it
)),
1978 #[cfg(feature = "full")]
1979 pub fn fold_item_macro
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ItemMacro
) -> ItemMacro
{
1981 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1982 ident
: (_i
.ident
).map(|it
| _visitor
.fold_ident(it
)),
1983 mac
: _visitor
.fold_macro(_i
.mac
),
1984 semi_token
: (_i
.semi_token
).map(|it
| Token
! [ ; ](tokens_helper(_visitor
, &it
.spans
))),
1987 #[cfg(feature = "full")]
1988 pub fn fold_item_macro2
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ItemMacro2
) -> ItemMacro2
{
1990 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
1991 vis
: _visitor
.fold_visibility(_i
.vis
),
1992 macro_token
: Token
![macro](tokens_helper(_visitor
, &_i
.macro_token
.span
)),
1993 ident
: _visitor
.fold_ident(_i
.ident
),
1994 paren_token
: Paren(tokens_helper(_visitor
, &_i
.paren_token
.span
)),
1996 brace_token
: Brace(tokens_helper(_visitor
, &_i
.brace_token
.span
)),
2000 #[cfg(feature = "full")]
2001 pub fn fold_item_mod
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ItemMod
) -> ItemMod
{
2003 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
2004 vis
: _visitor
.fold_visibility(_i
.vis
),
2005 mod_token
: Token
![mod](tokens_helper(_visitor
, &_i
.mod_token
.span
)),
2006 ident
: _visitor
.fold_ident(_i
.ident
),
2007 content
: (_i
.content
).map(|it
| {
2009 Brace(tokens_helper(_visitor
, &(it
).0.span
)),
2010 FoldHelper
::lift((it
).1, |it
| _visitor
.fold_item(it
)),
2013 semi
: (_i
.semi
).map(|it
| Token
! [ ; ](tokens_helper(_visitor
, &it
.spans
))),
2016 #[cfg(feature = "full")]
2017 pub fn fold_item_static
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ItemStatic
) -> ItemStatic
{
2019 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
2020 vis
: _visitor
.fold_visibility(_i
.vis
),
2021 static_token
: Token
![static](tokens_helper(_visitor
, &_i
.static_token
.span
)),
2022 mutability
: (_i
.mutability
).map(|it
| Token
![mut](tokens_helper(_visitor
, &it
.span
))),
2023 ident
: _visitor
.fold_ident(_i
.ident
),
2024 colon_token
: Token
! [ : ](tokens_helper(_visitor
, &_i
.colon_token
.spans
)),
2025 ty
: Box
::new(_visitor
.fold_type(*_i
.ty
)),
2026 eq_token
: Token
! [ = ](tokens_helper(_visitor
, &_i
.eq_token
.spans
)),
2027 expr
: Box
::new(_visitor
.fold_expr(*_i
.expr
)),
2028 semi_token
: Token
! [ ; ](tokens_helper(_visitor
, &_i
.semi_token
.spans
)),
2031 #[cfg(feature = "full")]
2032 pub fn fold_item_struct
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ItemStruct
) -> ItemStruct
{
2034 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
2035 vis
: _visitor
.fold_visibility(_i
.vis
),
2036 struct_token
: Token
![struct](tokens_helper(_visitor
, &_i
.struct_token
.span
)),
2037 ident
: _visitor
.fold_ident(_i
.ident
),
2038 generics
: _visitor
.fold_generics(_i
.generics
),
2039 fields
: _visitor
.fold_fields(_i
.fields
),
2040 semi_token
: (_i
.semi_token
).map(|it
| Token
! [ ; ](tokens_helper(_visitor
, &it
.spans
))),
2043 #[cfg(feature = "full")]
2044 pub fn fold_item_trait
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ItemTrait
) -> ItemTrait
{
2046 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
2047 vis
: _visitor
.fold_visibility(_i
.vis
),
2048 unsafety
: (_i
.unsafety
).map(|it
| Token
![unsafe](tokens_helper(_visitor
, &it
.span
))),
2049 auto_token
: (_i
.auto_token
).map(|it
| Token
![auto](tokens_helper(_visitor
, &it
.span
))),
2050 trait_token
: Token
![trait](tokens_helper(_visitor
, &_i
.trait_token
.span
)),
2051 ident
: _visitor
.fold_ident(_i
.ident
),
2052 generics
: _visitor
.fold_generics(_i
.generics
),
2053 colon_token
: (_i
.colon_token
).map(|it
| Token
! [ : ](tokens_helper(_visitor
, &it
.spans
))),
2054 supertraits
: FoldHelper
::lift(_i
.supertraits
, |it
| _visitor
.fold_type_param_bound(it
)),
2055 brace_token
: Brace(tokens_helper(_visitor
, &_i
.brace_token
.span
)),
2056 items
: FoldHelper
::lift(_i
.items
, |it
| _visitor
.fold_trait_item(it
)),
2059 #[cfg(feature = "full")]
2060 pub fn fold_item_trait_alias
<V
: Fold
+ ?Sized
>(
2063 ) -> ItemTraitAlias
{
2065 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
2066 vis
: _visitor
.fold_visibility(_i
.vis
),
2067 trait_token
: Token
![trait](tokens_helper(_visitor
, &_i
.trait_token
.span
)),
2068 ident
: _visitor
.fold_ident(_i
.ident
),
2069 generics
: _visitor
.fold_generics(_i
.generics
),
2070 eq_token
: Token
! [ = ](tokens_helper(_visitor
, &_i
.eq_token
.spans
)),
2071 bounds
: FoldHelper
::lift(_i
.bounds
, |it
| _visitor
.fold_type_param_bound(it
)),
2072 semi_token
: Token
! [ ; ](tokens_helper(_visitor
, &_i
.semi_token
.spans
)),
2075 #[cfg(feature = "full")]
2076 pub fn fold_item_type
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ItemType
) -> ItemType
{
2078 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
2079 vis
: _visitor
.fold_visibility(_i
.vis
),
2080 type_token
: Token
![type](tokens_helper(_visitor
, &_i
.type_token
.span
)),
2081 ident
: _visitor
.fold_ident(_i
.ident
),
2082 generics
: _visitor
.fold_generics(_i
.generics
),
2083 eq_token
: Token
! [ = ](tokens_helper(_visitor
, &_i
.eq_token
.spans
)),
2084 ty
: Box
::new(_visitor
.fold_type(*_i
.ty
)),
2085 semi_token
: Token
! [ ; ](tokens_helper(_visitor
, &_i
.semi_token
.spans
)),
2088 #[cfg(feature = "full")]
2089 pub fn fold_item_union
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ItemUnion
) -> ItemUnion
{
2091 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
2092 vis
: _visitor
.fold_visibility(_i
.vis
),
2093 union_token
: Token
![union](tokens_helper(_visitor
, &_i
.union_token
.span
)),
2094 ident
: _visitor
.fold_ident(_i
.ident
),
2095 generics
: _visitor
.fold_generics(_i
.generics
),
2096 fields
: _visitor
.fold_fields_named(_i
.fields
),
2099 #[cfg(feature = "full")]
2100 pub fn fold_item_use
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ItemUse
) -> ItemUse
{
2102 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
2103 vis
: _visitor
.fold_visibility(_i
.vis
),
2104 use_token
: Token
![use](tokens_helper(_visitor
, &_i
.use_token
.span
)),
2105 leading_colon
: (_i
.leading_colon
)
2106 .map(|it
| Token
! [ :: ](tokens_helper(_visitor
, &it
.spans
))),
2107 tree
: _visitor
.fold_use_tree(_i
.tree
),
2108 semi_token
: Token
! [ ; ](tokens_helper(_visitor
, &_i
.semi_token
.spans
)),
2111 #[cfg(feature = "full")]
2112 pub fn fold_item_verbatim
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ItemVerbatim
) -> ItemVerbatim
{
2113 ItemVerbatim { tts: _i.tts }
2115 #[cfg(feature = "full")]
2116 pub fn fold_label
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Label
) -> Label
{
2118 name
: _visitor
.fold_lifetime(_i
.name
),
2119 colon_token
: Token
! [ : ](tokens_helper(_visitor
, &_i
.colon_token
.spans
)),
2122 pub fn fold_lifetime
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Lifetime
) -> Lifetime
{
2124 apostrophe
: _visitor
.fold_span(_i
.apostrophe
),
2125 ident
: _visitor
.fold_ident(_i
.ident
),
2128 #[cfg(any(feature = "derive", feature = "full"))]
2129 pub fn fold_lifetime_def
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: LifetimeDef
) -> LifetimeDef
{
2131 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
2132 lifetime
: _visitor
.fold_lifetime(_i
.lifetime
),
2133 colon_token
: (_i
.colon_token
).map(|it
| Token
! [ : ](tokens_helper(_visitor
, &it
.spans
))),
2134 bounds
: FoldHelper
::lift(_i
.bounds
, |it
| _visitor
.fold_lifetime(it
)),
2137 #[cfg(any(feature = "derive", feature = "full"))]
2138 pub fn fold_lit
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Lit
) -> Lit
{
2140 Lit
::Str(_binding_0
) => Lit
::Str(_visitor
.fold_lit_str(_binding_0
)),
2141 Lit
::ByteStr(_binding_0
) => Lit
::ByteStr(_visitor
.fold_lit_byte_str(_binding_0
)),
2142 Lit
::Byte(_binding_0
) => Lit
::Byte(_visitor
.fold_lit_byte(_binding_0
)),
2143 Lit
::Char(_binding_0
) => Lit
::Char(_visitor
.fold_lit_char(_binding_0
)),
2144 Lit
::Int(_binding_0
) => Lit
::Int(_visitor
.fold_lit_int(_binding_0
)),
2145 Lit
::Float(_binding_0
) => Lit
::Float(_visitor
.fold_lit_float(_binding_0
)),
2146 Lit
::Bool(_binding_0
) => Lit
::Bool(_visitor
.fold_lit_bool(_binding_0
)),
2147 Lit
::Verbatim(_binding_0
) => Lit
::Verbatim(_visitor
.fold_lit_verbatim(_binding_0
)),
2150 #[cfg(any(feature = "derive", feature = "full"))]
2151 pub fn fold_lit_bool
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: LitBool
) -> LitBool
{
2154 span
: _visitor
.fold_span(_i
.span
),
2157 #[cfg(any(feature = "derive", feature = "full"))]
2158 pub fn fold_lit_byte
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: LitByte
) -> LitByte
{
2159 let span
= _visitor
.fold_span(_i
.span());
2164 #[cfg(any(feature = "derive", feature = "full"))]
2165 pub fn fold_lit_byte_str
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: LitByteStr
) -> LitByteStr
{
2166 let span
= _visitor
.fold_span(_i
.span());
2171 #[cfg(any(feature = "derive", feature = "full"))]
2172 pub fn fold_lit_char
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: LitChar
) -> LitChar
{
2173 let span
= _visitor
.fold_span(_i
.span());
2178 #[cfg(any(feature = "derive", feature = "full"))]
2179 pub fn fold_lit_float
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: LitFloat
) -> LitFloat
{
2180 let span
= _visitor
.fold_span(_i
.span());
2185 #[cfg(any(feature = "derive", feature = "full"))]
2186 pub fn fold_lit_int
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: LitInt
) -> LitInt
{
2187 let span
= _visitor
.fold_span(_i
.span());
2192 #[cfg(any(feature = "derive", feature = "full"))]
2193 pub fn fold_lit_str
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: LitStr
) -> LitStr
{
2194 let span
= _visitor
.fold_span(_i
.span());
2199 #[cfg(any(feature = "derive", feature = "full"))]
2200 pub fn fold_lit_verbatim
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: LitVerbatim
) -> LitVerbatim
{
2201 LitVerbatim { token: _i.token }
2203 #[cfg(feature = "full")]
2204 pub fn fold_local
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Local
) -> Local
{
2206 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
2207 let_token
: Token
![let](tokens_helper(_visitor
, &_i
.let_token
.span
)),
2208 pats
: FoldHelper
::lift(_i
.pats
, |it
| _visitor
.fold_pat(it
)),
2209 ty
: (_i
.ty
).map(|it
| {
2211 Token
! [ : ](tokens_helper(_visitor
, &(it
).0.spans
)),
2212 Box
::new(_visitor
.fold_type(*(it
).1)),
2215 init
: (_i
.init
).map(|it
| {
2217 Token
! [ = ](tokens_helper(_visitor
, &(it
).0.spans
)),
2218 Box
::new(_visitor
.fold_expr(*(it
).1)),
2221 semi_token
: Token
! [ ; ](tokens_helper(_visitor
, &_i
.semi_token
.spans
)),
2224 #[cfg(any(feature = "derive", feature = "full"))]
2225 pub fn fold_macro
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Macro
) -> Macro
{
2227 path
: _visitor
.fold_path(_i
.path
),
2228 bang_token
: Token
![!](tokens_helper(_visitor
, &_i
.bang_token
.spans
)),
2229 delimiter
: _visitor
.fold_macro_delimiter(_i
.delimiter
),
2233 #[cfg(any(feature = "derive", feature = "full"))]
2234 pub fn fold_macro_delimiter
<V
: Fold
+ ?Sized
>(
2237 ) -> MacroDelimiter
{
2239 MacroDelimiter
::Paren(_binding_0
) => {
2240 MacroDelimiter
::Paren(Paren(tokens_helper(_visitor
, &_binding_0
.span
)))
2242 MacroDelimiter
::Brace(_binding_0
) => {
2243 MacroDelimiter
::Brace(Brace(tokens_helper(_visitor
, &_binding_0
.span
)))
2245 MacroDelimiter
::Bracket(_binding_0
) => {
2246 MacroDelimiter
::Bracket(Bracket(tokens_helper(_visitor
, &_binding_0
.span
)))
2250 #[cfg(any(feature = "derive", feature = "full"))]
2251 pub fn fold_member
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Member
) -> Member
{
2253 Member
::Named(_binding_0
) => Member
::Named(_visitor
.fold_ident(_binding_0
)),
2254 Member
::Unnamed(_binding_0
) => Member
::Unnamed(_visitor
.fold_index(_binding_0
)),
2257 #[cfg(any(feature = "derive", feature = "full"))]
2258 pub fn fold_meta
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Meta
) -> Meta
{
2260 Meta
::Word(_binding_0
) => Meta
::Word(_visitor
.fold_ident(_binding_0
)),
2261 Meta
::List(_binding_0
) => Meta
::List(_visitor
.fold_meta_list(_binding_0
)),
2262 Meta
::NameValue(_binding_0
) => Meta
::NameValue(_visitor
.fold_meta_name_value(_binding_0
)),
2265 #[cfg(any(feature = "derive", feature = "full"))]
2266 pub fn fold_meta_list
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: MetaList
) -> MetaList
{
2268 ident
: _visitor
.fold_ident(_i
.ident
),
2269 paren_token
: Paren(tokens_helper(_visitor
, &_i
.paren_token
.span
)),
2270 nested
: FoldHelper
::lift(_i
.nested
, |it
| _visitor
.fold_nested_meta(it
)),
2273 #[cfg(any(feature = "derive", feature = "full"))]
2274 pub fn fold_meta_name_value
<V
: Fold
+ ?Sized
>(
2277 ) -> MetaNameValue
{
2279 ident
: _visitor
.fold_ident(_i
.ident
),
2280 eq_token
: Token
! [ = ](tokens_helper(_visitor
, &_i
.eq_token
.spans
)),
2281 lit
: _visitor
.fold_lit(_i
.lit
),
2284 #[cfg(feature = "full")]
2285 pub fn fold_method_sig
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: MethodSig
) -> MethodSig
{
2287 constness
: (_i
.constness
).map(|it
| Token
![const](tokens_helper(_visitor
, &it
.span
))),
2288 unsafety
: (_i
.unsafety
).map(|it
| Token
![unsafe](tokens_helper(_visitor
, &it
.span
))),
2289 asyncness
: (_i
.asyncness
).map(|it
| Token
![async
](tokens_helper(_visitor
, &it
.span
))),
2290 abi
: (_i
.abi
).map(|it
| _visitor
.fold_abi(it
)),
2291 ident
: _visitor
.fold_ident(_i
.ident
),
2292 decl
: _visitor
.fold_fn_decl(_i
.decl
),
2295 #[cfg(feature = "full")]
2296 pub fn fold_method_turbofish
<V
: Fold
+ ?Sized
>(
2298 _i
: MethodTurbofish
,
2299 ) -> MethodTurbofish
{
2301 colon2_token
: Token
! [ :: ](tokens_helper(_visitor
, &_i
.colon2_token
.spans
)),
2302 lt_token
: Token
! [ < ](tokens_helper(_visitor
, &_i
.lt_token
.spans
)),
2303 args
: FoldHelper
::lift(_i
.args
, |it
| _visitor
.fold_generic_method_argument(it
)),
2304 gt_token
: Token
! [ > ](tokens_helper(_visitor
, &_i
.gt_token
.spans
)),
2307 #[cfg(any(feature = "derive", feature = "full"))]
2308 pub fn fold_nested_meta
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: NestedMeta
) -> NestedMeta
{
2310 NestedMeta
::Meta(_binding_0
) => NestedMeta
::Meta(_visitor
.fold_meta(_binding_0
)),
2311 NestedMeta
::Literal(_binding_0
) => NestedMeta
::Literal(_visitor
.fold_lit(_binding_0
)),
2314 #[cfg(any(feature = "derive", feature = "full"))]
2315 pub fn fold_parenthesized_generic_arguments
<V
: Fold
+ ?Sized
>(
2317 _i
: ParenthesizedGenericArguments
,
2318 ) -> ParenthesizedGenericArguments
{
2319 ParenthesizedGenericArguments
{
2320 paren_token
: Paren(tokens_helper(_visitor
, &_i
.paren_token
.span
)),
2321 inputs
: FoldHelper
::lift(_i
.inputs
, |it
| _visitor
.fold_type(it
)),
2322 output
: _visitor
.fold_return_type(_i
.output
),
2325 #[cfg(feature = "full")]
2326 pub fn fold_pat
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Pat
) -> Pat
{
2328 Pat
::Wild(_binding_0
) => Pat
::Wild(_visitor
.fold_pat_wild(_binding_0
)),
2329 Pat
::Ident(_binding_0
) => Pat
::Ident(_visitor
.fold_pat_ident(_binding_0
)),
2330 Pat
::Struct(_binding_0
) => Pat
::Struct(_visitor
.fold_pat_struct(_binding_0
)),
2331 Pat
::TupleStruct(_binding_0
) => {
2332 Pat
::TupleStruct(_visitor
.fold_pat_tuple_struct(_binding_0
))
2334 Pat
::Path(_binding_0
) => Pat
::Path(_visitor
.fold_pat_path(_binding_0
)),
2335 Pat
::Tuple(_binding_0
) => Pat
::Tuple(_visitor
.fold_pat_tuple(_binding_0
)),
2336 Pat
::Box(_binding_0
) => Pat
::Box(_visitor
.fold_pat_box(_binding_0
)),
2337 Pat
::Ref(_binding_0
) => Pat
::Ref(_visitor
.fold_pat_ref(_binding_0
)),
2338 Pat
::Lit(_binding_0
) => Pat
::Lit(_visitor
.fold_pat_lit(_binding_0
)),
2339 Pat
::Range(_binding_0
) => Pat
::Range(_visitor
.fold_pat_range(_binding_0
)),
2340 Pat
::Slice(_binding_0
) => Pat
::Slice(_visitor
.fold_pat_slice(_binding_0
)),
2341 Pat
::Macro(_binding_0
) => Pat
::Macro(_visitor
.fold_pat_macro(_binding_0
)),
2342 Pat
::Verbatim(_binding_0
) => Pat
::Verbatim(_visitor
.fold_pat_verbatim(_binding_0
)),
2345 #[cfg(feature = "full")]
2346 pub fn fold_pat_box
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: PatBox
) -> PatBox
{
2348 box_token
: Token
![box](tokens_helper(_visitor
, &_i
.box_token
.span
)),
2349 pat
: Box
::new(_visitor
.fold_pat(*_i
.pat
)),
2352 #[cfg(feature = "full")]
2353 pub fn fold_pat_ident
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: PatIdent
) -> PatIdent
{
2355 by_ref
: (_i
.by_ref
).map(|it
| Token
![ref](tokens_helper(_visitor
, &it
.span
))),
2356 mutability
: (_i
.mutability
).map(|it
| Token
![mut](tokens_helper(_visitor
, &it
.span
))),
2357 ident
: _visitor
.fold_ident(_i
.ident
),
2358 subpat
: (_i
.subpat
).map(|it
| {
2360 Token
! [ @
](tokens_helper(_visitor
, &(it
).0.spans
)),
2361 Box
::new(_visitor
.fold_pat(*(it
).1)),
2366 #[cfg(feature = "full")]
2367 pub fn fold_pat_lit
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: PatLit
) -> PatLit
{
2369 expr
: Box
::new(_visitor
.fold_expr(*_i
.expr
)),
2372 #[cfg(feature = "full")]
2373 pub fn fold_pat_macro
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: PatMacro
) -> PatMacro
{
2375 mac
: _visitor
.fold_macro(_i
.mac
),
2378 #[cfg(feature = "full")]
2379 pub fn fold_pat_path
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: PatPath
) -> PatPath
{
2381 qself
: (_i
.qself
).map(|it
| _visitor
.fold_qself(it
)),
2382 path
: _visitor
.fold_path(_i
.path
),
2385 #[cfg(feature = "full")]
2386 pub fn fold_pat_range
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: PatRange
) -> PatRange
{
2388 lo
: Box
::new(_visitor
.fold_expr(*_i
.lo
)),
2389 limits
: _visitor
.fold_range_limits(_i
.limits
),
2390 hi
: Box
::new(_visitor
.fold_expr(*_i
.hi
)),
2393 #[cfg(feature = "full")]
2394 pub fn fold_pat_ref
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: PatRef
) -> PatRef
{
2396 and_token
: Token
! [ & ](tokens_helper(_visitor
, &_i
.and_token
.spans
)),
2397 mutability
: (_i
.mutability
).map(|it
| Token
![mut](tokens_helper(_visitor
, &it
.span
))),
2398 pat
: Box
::new(_visitor
.fold_pat(*_i
.pat
)),
2401 #[cfg(feature = "full")]
2402 pub fn fold_pat_slice
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: PatSlice
) -> PatSlice
{
2404 bracket_token
: Bracket(tokens_helper(_visitor
, &_i
.bracket_token
.span
)),
2405 front
: FoldHelper
::lift(_i
.front
, |it
| _visitor
.fold_pat(it
)),
2406 middle
: (_i
.middle
).map(|it
| Box
::new(_visitor
.fold_pat(*it
))),
2407 dot2_token
: (_i
.dot2_token
).map(|it
| Token
![..](tokens_helper(_visitor
, &it
.spans
))),
2408 comma_token
: (_i
.comma_token
).map(|it
| Token
! [ , ](tokens_helper(_visitor
, &it
.spans
))),
2409 back
: FoldHelper
::lift(_i
.back
, |it
| _visitor
.fold_pat(it
)),
2412 #[cfg(feature = "full")]
2413 pub fn fold_pat_struct
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: PatStruct
) -> PatStruct
{
2415 path
: _visitor
.fold_path(_i
.path
),
2416 brace_token
: Brace(tokens_helper(_visitor
, &_i
.brace_token
.span
)),
2417 fields
: FoldHelper
::lift(_i
.fields
, |it
| _visitor
.fold_field_pat(it
)),
2418 dot2_token
: (_i
.dot2_token
).map(|it
| Token
![..](tokens_helper(_visitor
, &it
.spans
))),
2421 #[cfg(feature = "full")]
2422 pub fn fold_pat_tuple
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: PatTuple
) -> PatTuple
{
2424 paren_token
: Paren(tokens_helper(_visitor
, &_i
.paren_token
.span
)),
2425 front
: FoldHelper
::lift(_i
.front
, |it
| _visitor
.fold_pat(it
)),
2426 dot2_token
: (_i
.dot2_token
).map(|it
| Token
![..](tokens_helper(_visitor
, &it
.spans
))),
2427 comma_token
: (_i
.comma_token
).map(|it
| Token
! [ , ](tokens_helper(_visitor
, &it
.spans
))),
2428 back
: FoldHelper
::lift(_i
.back
, |it
| _visitor
.fold_pat(it
)),
2431 #[cfg(feature = "full")]
2432 pub fn fold_pat_tuple_struct
<V
: Fold
+ ?Sized
>(
2435 ) -> PatTupleStruct
{
2437 path
: _visitor
.fold_path(_i
.path
),
2438 pat
: _visitor
.fold_pat_tuple(_i
.pat
),
2441 #[cfg(feature = "full")]
2442 pub fn fold_pat_verbatim
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: PatVerbatim
) -> PatVerbatim
{
2443 PatVerbatim { tts: _i.tts }
2445 #[cfg(feature = "full")]
2446 pub fn fold_pat_wild
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: PatWild
) -> PatWild
{
2448 underscore_token
: Token
![_
](tokens_helper(_visitor
, &_i
.underscore_token
.spans
)),
2451 #[cfg(any(feature = "derive", feature = "full"))]
2452 pub fn fold_path
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Path
) -> Path
{
2454 leading_colon
: (_i
.leading_colon
)
2455 .map(|it
| Token
! [ :: ](tokens_helper(_visitor
, &it
.spans
))),
2456 segments
: FoldHelper
::lift(_i
.segments
, |it
| _visitor
.fold_path_segment(it
)),
2459 #[cfg(any(feature = "derive", feature = "full"))]
2460 pub fn fold_path_arguments
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: PathArguments
) -> PathArguments
{
2462 PathArguments
::None
=> PathArguments
::None
,
2463 PathArguments
::AngleBracketed(_binding_0
) => PathArguments
::AngleBracketed(
2464 _visitor
.fold_angle_bracketed_generic_arguments(_binding_0
),
2466 PathArguments
::Parenthesized(_binding_0
) => {
2467 PathArguments
::Parenthesized(_visitor
.fold_parenthesized_generic_arguments(_binding_0
))
2471 #[cfg(any(feature = "derive", feature = "full"))]
2472 pub fn fold_path_segment
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: PathSegment
) -> PathSegment
{
2474 ident
: _visitor
.fold_ident(_i
.ident
),
2475 arguments
: _visitor
.fold_path_arguments(_i
.arguments
),
2478 #[cfg(any(feature = "derive", feature = "full"))]
2479 pub fn fold_predicate_eq
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: PredicateEq
) -> PredicateEq
{
2481 lhs_ty
: _visitor
.fold_type(_i
.lhs_ty
),
2482 eq_token
: Token
! [ = ](tokens_helper(_visitor
, &_i
.eq_token
.spans
)),
2483 rhs_ty
: _visitor
.fold_type(_i
.rhs_ty
),
2486 #[cfg(any(feature = "derive", feature = "full"))]
2487 pub fn fold_predicate_lifetime
<V
: Fold
+ ?Sized
>(
2489 _i
: PredicateLifetime
,
2490 ) -> PredicateLifetime
{
2492 lifetime
: _visitor
.fold_lifetime(_i
.lifetime
),
2493 colon_token
: Token
! [ : ](tokens_helper(_visitor
, &_i
.colon_token
.spans
)),
2494 bounds
: FoldHelper
::lift(_i
.bounds
, |it
| _visitor
.fold_lifetime(it
)),
2497 #[cfg(any(feature = "derive", feature = "full"))]
2498 pub fn fold_predicate_type
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: PredicateType
) -> PredicateType
{
2500 lifetimes
: (_i
.lifetimes
).map(|it
| _visitor
.fold_bound_lifetimes(it
)),
2501 bounded_ty
: _visitor
.fold_type(_i
.bounded_ty
),
2502 colon_token
: Token
! [ : ](tokens_helper(_visitor
, &_i
.colon_token
.spans
)),
2503 bounds
: FoldHelper
::lift(_i
.bounds
, |it
| _visitor
.fold_type_param_bound(it
)),
2506 #[cfg(any(feature = "derive", feature = "full"))]
2507 pub fn fold_qself
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: QSelf
) -> QSelf
{
2509 lt_token
: Token
! [ < ](tokens_helper(_visitor
, &_i
.lt_token
.spans
)),
2510 ty
: Box
::new(_visitor
.fold_type(*_i
.ty
)),
2511 position
: _i
.position
,
2512 as_token
: (_i
.as_token
).map(|it
| Token
![as](tokens_helper(_visitor
, &it
.span
))),
2513 gt_token
: Token
! [ > ](tokens_helper(_visitor
, &_i
.gt_token
.spans
)),
2516 #[cfg(feature = "full")]
2517 pub fn fold_range_limits
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: RangeLimits
) -> RangeLimits
{
2519 RangeLimits
::HalfOpen(_binding_0
) => {
2520 RangeLimits
::HalfOpen(Token
![..](tokens_helper(_visitor
, &_binding_0
.spans
)))
2522 RangeLimits
::Closed(_binding_0
) => {
2523 RangeLimits
::Closed(Token
! [ ..= ](tokens_helper(_visitor
, &_binding_0
.spans
)))
2527 #[cfg(any(feature = "derive", feature = "full"))]
2528 pub fn fold_return_type
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ReturnType
) -> ReturnType
{
2530 ReturnType
::Default
=> ReturnType
::Default
,
2531 ReturnType
::Type(_binding_0
, _binding_1
) => ReturnType
::Type(
2532 Token
! [ -> ](tokens_helper(_visitor
, &_binding_0
.spans
)),
2533 Box
::new(_visitor
.fold_type(*_binding_1
)),
2537 #[cfg(feature = "full")]
2538 pub fn fold_stmt
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Stmt
) -> Stmt
{
2540 Stmt
::Local(_binding_0
) => Stmt
::Local(_visitor
.fold_local(_binding_0
)),
2541 Stmt
::Item(_binding_0
) => Stmt
::Item(_visitor
.fold_item(_binding_0
)),
2542 Stmt
::Expr(_binding_0
) => Stmt
::Expr(_visitor
.fold_expr(_binding_0
)),
2543 Stmt
::Semi(_binding_0
, _binding_1
) => Stmt
::Semi(
2544 _visitor
.fold_expr(_binding_0
),
2545 Token
! [ ; ](tokens_helper(_visitor
, &_binding_1
.spans
)),
2549 #[cfg(any(feature = "derive", feature = "full"))]
2550 pub fn fold_trait_bound
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TraitBound
) -> TraitBound
{
2552 paren_token
: (_i
.paren_token
).map(|it
| Paren(tokens_helper(_visitor
, &it
.span
))),
2553 modifier
: _visitor
.fold_trait_bound_modifier(_i
.modifier
),
2554 lifetimes
: (_i
.lifetimes
).map(|it
| _visitor
.fold_bound_lifetimes(it
)),
2555 path
: _visitor
.fold_path(_i
.path
),
2558 #[cfg(any(feature = "derive", feature = "full"))]
2559 pub fn fold_trait_bound_modifier
<V
: Fold
+ ?Sized
>(
2561 _i
: TraitBoundModifier
,
2562 ) -> TraitBoundModifier
{
2564 TraitBoundModifier
::None
=> TraitBoundModifier
::None
,
2565 TraitBoundModifier
::Maybe(_binding_0
) => {
2566 TraitBoundModifier
::Maybe(Token
! [ ?
](tokens_helper(_visitor
, &_binding_0
.spans
)))
2570 #[cfg(feature = "full")]
2571 pub fn fold_trait_item
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TraitItem
) -> TraitItem
{
2573 TraitItem
::Const(_binding_0
) => {
2574 TraitItem
::Const(_visitor
.fold_trait_item_const(_binding_0
))
2576 TraitItem
::Method(_binding_0
) => {
2577 TraitItem
::Method(_visitor
.fold_trait_item_method(_binding_0
))
2579 TraitItem
::Type(_binding_0
) => TraitItem
::Type(_visitor
.fold_trait_item_type(_binding_0
)),
2580 TraitItem
::Macro(_binding_0
) => {
2581 TraitItem
::Macro(_visitor
.fold_trait_item_macro(_binding_0
))
2583 TraitItem
::Verbatim(_binding_0
) => {
2584 TraitItem
::Verbatim(_visitor
.fold_trait_item_verbatim(_binding_0
))
2588 #[cfg(feature = "full")]
2589 pub fn fold_trait_item_const
<V
: Fold
+ ?Sized
>(
2592 ) -> TraitItemConst
{
2594 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
2595 const_token
: Token
![const](tokens_helper(_visitor
, &_i
.const_token
.span
)),
2596 ident
: _visitor
.fold_ident(_i
.ident
),
2597 colon_token
: Token
! [ : ](tokens_helper(_visitor
, &_i
.colon_token
.spans
)),
2598 ty
: _visitor
.fold_type(_i
.ty
),
2599 default: (_i
.default).map(|it
| {
2601 Token
! [ = ](tokens_helper(_visitor
, &(it
).0.spans
)),
2602 _visitor
.fold_expr((it
).1),
2605 semi_token
: Token
! [ ; ](tokens_helper(_visitor
, &_i
.semi_token
.spans
)),
2608 #[cfg(feature = "full")]
2609 pub fn fold_trait_item_macro
<V
: Fold
+ ?Sized
>(
2612 ) -> TraitItemMacro
{
2614 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
2615 mac
: _visitor
.fold_macro(_i
.mac
),
2616 semi_token
: (_i
.semi_token
).map(|it
| Token
! [ ; ](tokens_helper(_visitor
, &it
.spans
))),
2619 #[cfg(feature = "full")]
2620 pub fn fold_trait_item_method
<V
: Fold
+ ?Sized
>(
2622 _i
: TraitItemMethod
,
2623 ) -> TraitItemMethod
{
2625 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
2626 sig
: _visitor
.fold_method_sig(_i
.sig
),
2627 default: (_i
.default).map(|it
| _visitor
.fold_block(it
)),
2628 semi_token
: (_i
.semi_token
).map(|it
| Token
! [ ; ](tokens_helper(_visitor
, &it
.spans
))),
2631 #[cfg(feature = "full")]
2632 pub fn fold_trait_item_type
<V
: Fold
+ ?Sized
>(
2635 ) -> TraitItemType
{
2637 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
2638 type_token
: Token
![type](tokens_helper(_visitor
, &_i
.type_token
.span
)),
2639 ident
: _visitor
.fold_ident(_i
.ident
),
2640 generics
: _visitor
.fold_generics(_i
.generics
),
2641 colon_token
: (_i
.colon_token
).map(|it
| Token
! [ : ](tokens_helper(_visitor
, &it
.spans
))),
2642 bounds
: FoldHelper
::lift(_i
.bounds
, |it
| _visitor
.fold_type_param_bound(it
)),
2643 default: (_i
.default).map(|it
| {
2645 Token
! [ = ](tokens_helper(_visitor
, &(it
).0.spans
)),
2646 _visitor
.fold_type((it
).1),
2649 semi_token
: Token
! [ ; ](tokens_helper(_visitor
, &_i
.semi_token
.spans
)),
2652 #[cfg(feature = "full")]
2653 pub fn fold_trait_item_verbatim
<V
: Fold
+ ?Sized
>(
2655 _i
: TraitItemVerbatim
,
2656 ) -> TraitItemVerbatim
{
2657 TraitItemVerbatim { tts: _i.tts }
2659 #[cfg(any(feature = "derive", feature = "full"))]
2660 pub fn fold_type
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Type
) -> Type
{
2662 Type
::Slice(_binding_0
) => Type
::Slice(_visitor
.fold_type_slice(_binding_0
)),
2663 Type
::Array(_binding_0
) => Type
::Array(_visitor
.fold_type_array(_binding_0
)),
2664 Type
::Ptr(_binding_0
) => Type
::Ptr(_visitor
.fold_type_ptr(_binding_0
)),
2665 Type
::Reference(_binding_0
) => Type
::Reference(_visitor
.fold_type_reference(_binding_0
)),
2666 Type
::BareFn(_binding_0
) => Type
::BareFn(_visitor
.fold_type_bare_fn(_binding_0
)),
2667 Type
::Never(_binding_0
) => Type
::Never(_visitor
.fold_type_never(_binding_0
)),
2668 Type
::Tuple(_binding_0
) => Type
::Tuple(_visitor
.fold_type_tuple(_binding_0
)),
2669 Type
::Path(_binding_0
) => Type
::Path(_visitor
.fold_type_path(_binding_0
)),
2670 Type
::TraitObject(_binding_0
) => {
2671 Type
::TraitObject(_visitor
.fold_type_trait_object(_binding_0
))
2673 Type
::ImplTrait(_binding_0
) => Type
::ImplTrait(_visitor
.fold_type_impl_trait(_binding_0
)),
2674 Type
::Paren(_binding_0
) => Type
::Paren(_visitor
.fold_type_paren(_binding_0
)),
2675 Type
::Group(_binding_0
) => Type
::Group(_visitor
.fold_type_group(_binding_0
)),
2676 Type
::Infer(_binding_0
) => Type
::Infer(_visitor
.fold_type_infer(_binding_0
)),
2677 Type
::Macro(_binding_0
) => Type
::Macro(_visitor
.fold_type_macro(_binding_0
)),
2678 Type
::Verbatim(_binding_0
) => Type
::Verbatim(_visitor
.fold_type_verbatim(_binding_0
)),
2681 #[cfg(any(feature = "derive", feature = "full"))]
2682 pub fn fold_type_array
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TypeArray
) -> TypeArray
{
2684 bracket_token
: Bracket(tokens_helper(_visitor
, &_i
.bracket_token
.span
)),
2685 elem
: Box
::new(_visitor
.fold_type(*_i
.elem
)),
2686 semi_token
: Token
! [ ; ](tokens_helper(_visitor
, &_i
.semi_token
.spans
)),
2687 len
: _visitor
.fold_expr(_i
.len
),
2690 #[cfg(any(feature = "derive", feature = "full"))]
2691 pub fn fold_type_bare_fn
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TypeBareFn
) -> TypeBareFn
{
2693 lifetimes
: (_i
.lifetimes
).map(|it
| _visitor
.fold_bound_lifetimes(it
)),
2694 unsafety
: (_i
.unsafety
).map(|it
| Token
![unsafe](tokens_helper(_visitor
, &it
.span
))),
2695 abi
: (_i
.abi
).map(|it
| _visitor
.fold_abi(it
)),
2696 fn_token
: Token
![fn](tokens_helper(_visitor
, &_i
.fn_token
.span
)),
2697 paren_token
: Paren(tokens_helper(_visitor
, &_i
.paren_token
.span
)),
2698 inputs
: FoldHelper
::lift(_i
.inputs
, |it
| _visitor
.fold_bare_fn_arg(it
)),
2699 variadic
: (_i
.variadic
).map(|it
| Token
! [ ... ](tokens_helper(_visitor
, &it
.spans
))),
2700 output
: _visitor
.fold_return_type(_i
.output
),
2703 #[cfg(any(feature = "derive", feature = "full"))]
2704 pub fn fold_type_group
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TypeGroup
) -> TypeGroup
{
2706 group_token
: Group(tokens_helper(_visitor
, &_i
.group_token
.span
)),
2707 elem
: Box
::new(_visitor
.fold_type(*_i
.elem
)),
2710 #[cfg(any(feature = "derive", feature = "full"))]
2711 pub fn fold_type_impl_trait
<V
: Fold
+ ?Sized
>(
2714 ) -> TypeImplTrait
{
2716 impl_token
: Token
![impl](tokens_helper(_visitor
, &_i
.impl_token
.span
)),
2717 bounds
: FoldHelper
::lift(_i
.bounds
, |it
| _visitor
.fold_type_param_bound(it
)),
2720 #[cfg(any(feature = "derive", feature = "full"))]
2721 pub fn fold_type_infer
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TypeInfer
) -> TypeInfer
{
2723 underscore_token
: Token
![_
](tokens_helper(_visitor
, &_i
.underscore_token
.spans
)),
2726 #[cfg(any(feature = "derive", feature = "full"))]
2727 pub fn fold_type_macro
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TypeMacro
) -> TypeMacro
{
2729 mac
: _visitor
.fold_macro(_i
.mac
),
2732 #[cfg(any(feature = "derive", feature = "full"))]
2733 pub fn fold_type_never
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TypeNever
) -> TypeNever
{
2735 bang_token
: Token
![!](tokens_helper(_visitor
, &_i
.bang_token
.spans
)),
2738 #[cfg(any(feature = "derive", feature = "full"))]
2739 pub fn fold_type_param
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TypeParam
) -> TypeParam
{
2741 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
2742 ident
: _visitor
.fold_ident(_i
.ident
),
2743 colon_token
: (_i
.colon_token
).map(|it
| Token
! [ : ](tokens_helper(_visitor
, &it
.spans
))),
2744 bounds
: FoldHelper
::lift(_i
.bounds
, |it
| _visitor
.fold_type_param_bound(it
)),
2745 eq_token
: (_i
.eq_token
).map(|it
| Token
! [ = ](tokens_helper(_visitor
, &it
.spans
))),
2746 default: (_i
.default).map(|it
| _visitor
.fold_type(it
)),
2749 #[cfg(any(feature = "derive", feature = "full"))]
2750 pub fn fold_type_param_bound
<V
: Fold
+ ?Sized
>(
2753 ) -> TypeParamBound
{
2755 TypeParamBound
::Trait(_binding_0
) => {
2756 TypeParamBound
::Trait(_visitor
.fold_trait_bound(_binding_0
))
2758 TypeParamBound
::Lifetime(_binding_0
) => {
2759 TypeParamBound
::Lifetime(_visitor
.fold_lifetime(_binding_0
))
2763 #[cfg(any(feature = "derive", feature = "full"))]
2764 pub fn fold_type_paren
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TypeParen
) -> TypeParen
{
2766 paren_token
: Paren(tokens_helper(_visitor
, &_i
.paren_token
.span
)),
2767 elem
: Box
::new(_visitor
.fold_type(*_i
.elem
)),
2770 #[cfg(any(feature = "derive", feature = "full"))]
2771 pub fn fold_type_path
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TypePath
) -> TypePath
{
2773 qself
: (_i
.qself
).map(|it
| _visitor
.fold_qself(it
)),
2774 path
: _visitor
.fold_path(_i
.path
),
2777 #[cfg(any(feature = "derive", feature = "full"))]
2778 pub fn fold_type_ptr
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TypePtr
) -> TypePtr
{
2780 star_token
: Token
! [ * ](tokens_helper(_visitor
, &_i
.star_token
.spans
)),
2781 const_token
: (_i
.const_token
).map(|it
| Token
![const](tokens_helper(_visitor
, &it
.span
))),
2782 mutability
: (_i
.mutability
).map(|it
| Token
![mut](tokens_helper(_visitor
, &it
.span
))),
2783 elem
: Box
::new(_visitor
.fold_type(*_i
.elem
)),
2786 #[cfg(any(feature = "derive", feature = "full"))]
2787 pub fn fold_type_reference
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TypeReference
) -> TypeReference
{
2789 and_token
: Token
! [ & ](tokens_helper(_visitor
, &_i
.and_token
.spans
)),
2790 lifetime
: (_i
.lifetime
).map(|it
| _visitor
.fold_lifetime(it
)),
2791 mutability
: (_i
.mutability
).map(|it
| Token
![mut](tokens_helper(_visitor
, &it
.span
))),
2792 elem
: Box
::new(_visitor
.fold_type(*_i
.elem
)),
2795 #[cfg(any(feature = "derive", feature = "full"))]
2796 pub fn fold_type_slice
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TypeSlice
) -> TypeSlice
{
2798 bracket_token
: Bracket(tokens_helper(_visitor
, &_i
.bracket_token
.span
)),
2799 elem
: Box
::new(_visitor
.fold_type(*_i
.elem
)),
2802 #[cfg(any(feature = "derive", feature = "full"))]
2803 pub fn fold_type_trait_object
<V
: Fold
+ ?Sized
>(
2805 _i
: TypeTraitObject
,
2806 ) -> TypeTraitObject
{
2808 dyn_token
: (_i
.dyn_token
).map(|it
| Token
![dyn](tokens_helper(_visitor
, &it
.span
))),
2809 bounds
: FoldHelper
::lift(_i
.bounds
, |it
| _visitor
.fold_type_param_bound(it
)),
2812 #[cfg(any(feature = "derive", feature = "full"))]
2813 pub fn fold_type_tuple
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TypeTuple
) -> TypeTuple
{
2815 paren_token
: Paren(tokens_helper(_visitor
, &_i
.paren_token
.span
)),
2816 elems
: FoldHelper
::lift(_i
.elems
, |it
| _visitor
.fold_type(it
)),
2819 #[cfg(any(feature = "derive", feature = "full"))]
2820 pub fn fold_type_verbatim
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TypeVerbatim
) -> TypeVerbatim
{
2821 TypeVerbatim { tts: _i.tts }
2823 #[cfg(any(feature = "derive", feature = "full"))]
2824 pub fn fold_un_op
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: UnOp
) -> UnOp
{
2826 UnOp
::Deref(_binding_0
) => {
2827 UnOp
::Deref(Token
! [ * ](tokens_helper(_visitor
, &_binding_0
.spans
)))
2829 UnOp
::Not(_binding_0
) => UnOp
::Not(Token
![!](tokens_helper(_visitor
, &_binding_0
.spans
))),
2830 UnOp
::Neg(_binding_0
) => {
2831 UnOp
::Neg(Token
! [ - ](tokens_helper(_visitor
, &_binding_0
.spans
)))
2835 #[cfg(feature = "full")]
2836 pub fn fold_use_glob
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: UseGlob
) -> UseGlob
{
2838 star_token
: Token
! [ * ](tokens_helper(_visitor
, &_i
.star_token
.spans
)),
2841 #[cfg(feature = "full")]
2842 pub fn fold_use_group
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: UseGroup
) -> UseGroup
{
2844 brace_token
: Brace(tokens_helper(_visitor
, &_i
.brace_token
.span
)),
2845 items
: FoldHelper
::lift(_i
.items
, |it
| _visitor
.fold_use_tree(it
)),
2848 #[cfg(feature = "full")]
2849 pub fn fold_use_name
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: UseName
) -> UseName
{
2851 ident
: _visitor
.fold_ident(_i
.ident
),
2854 #[cfg(feature = "full")]
2855 pub fn fold_use_path
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: UsePath
) -> UsePath
{
2857 ident
: _visitor
.fold_ident(_i
.ident
),
2858 colon2_token
: Token
! [ :: ](tokens_helper(_visitor
, &_i
.colon2_token
.spans
)),
2859 tree
: Box
::new(_visitor
.fold_use_tree(*_i
.tree
)),
2862 #[cfg(feature = "full")]
2863 pub fn fold_use_rename
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: UseRename
) -> UseRename
{
2865 ident
: _visitor
.fold_ident(_i
.ident
),
2866 as_token
: Token
![as](tokens_helper(_visitor
, &_i
.as_token
.span
)),
2867 rename
: _visitor
.fold_ident(_i
.rename
),
2870 #[cfg(feature = "full")]
2871 pub fn fold_use_tree
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: UseTree
) -> UseTree
{
2873 UseTree
::Path(_binding_0
) => UseTree
::Path(_visitor
.fold_use_path(_binding_0
)),
2874 UseTree
::Name(_binding_0
) => UseTree
::Name(_visitor
.fold_use_name(_binding_0
)),
2875 UseTree
::Rename(_binding_0
) => UseTree
::Rename(_visitor
.fold_use_rename(_binding_0
)),
2876 UseTree
::Glob(_binding_0
) => UseTree
::Glob(_visitor
.fold_use_glob(_binding_0
)),
2877 UseTree
::Group(_binding_0
) => UseTree
::Group(_visitor
.fold_use_group(_binding_0
)),
2880 #[cfg(any(feature = "derive", feature = "full"))]
2881 pub fn fold_variant
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Variant
) -> Variant
{
2883 attrs
: FoldHelper
::lift(_i
.attrs
, |it
| _visitor
.fold_attribute(it
)),
2884 ident
: _visitor
.fold_ident(_i
.ident
),
2885 fields
: _visitor
.fold_fields(_i
.fields
),
2886 discriminant
: (_i
.discriminant
).map(|it
| {
2888 Token
! [ = ](tokens_helper(_visitor
, &(it
).0.spans
)),
2889 _visitor
.fold_expr((it
).1),
2894 #[cfg(any(feature = "derive", feature = "full"))]
2895 pub fn fold_vis_crate
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: VisCrate
) -> VisCrate
{
2897 crate_token
: Token
![crate](tokens_helper(_visitor
, &_i
.crate_token
.span
)),
2900 #[cfg(any(feature = "derive", feature = "full"))]
2901 pub fn fold_vis_public
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: VisPublic
) -> VisPublic
{
2903 pub_token
: Token
![pub](tokens_helper(_visitor
, &_i
.pub_token
.span
)),
2906 #[cfg(any(feature = "derive", feature = "full"))]
2907 pub fn fold_vis_restricted
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: VisRestricted
) -> VisRestricted
{
2909 pub_token
: Token
![pub](tokens_helper(_visitor
, &_i
.pub_token
.span
)),
2910 paren_token
: Paren(tokens_helper(_visitor
, &_i
.paren_token
.span
)),
2911 in_token
: (_i
.in_token
).map(|it
| Token
![in](tokens_helper(_visitor
, &it
.span
))),
2912 path
: Box
::new(_visitor
.fold_path(*_i
.path
)),
2915 #[cfg(any(feature = "derive", feature = "full"))]
2916 pub fn fold_visibility
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Visibility
) -> Visibility
{
2918 Visibility
::Public(_binding_0
) => Visibility
::Public(_visitor
.fold_vis_public(_binding_0
)),
2919 Visibility
::Crate(_binding_0
) => Visibility
::Crate(_visitor
.fold_vis_crate(_binding_0
)),
2920 Visibility
::Restricted(_binding_0
) => {
2921 Visibility
::Restricted(_visitor
.fold_vis_restricted(_binding_0
))
2923 Visibility
::Inherited
=> Visibility
::Inherited
,
2926 #[cfg(any(feature = "derive", feature = "full"))]
2927 pub fn fold_where_clause
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: WhereClause
) -> WhereClause
{
2929 where_token
: Token
![where](tokens_helper(_visitor
, &_i
.where_token
.span
)),
2930 predicates
: FoldHelper
::lift(_i
.predicates
, |it
| _visitor
.fold_where_predicate(it
)),
2933 #[cfg(any(feature = "derive", feature = "full"))]
2934 pub fn fold_where_predicate
<V
: Fold
+ ?Sized
>(
2937 ) -> WherePredicate
{
2939 WherePredicate
::Type(_binding_0
) => {
2940 WherePredicate
::Type(_visitor
.fold_predicate_type(_binding_0
))
2942 WherePredicate
::Lifetime(_binding_0
) => {
2943 WherePredicate
::Lifetime(_visitor
.fold_predicate_lifetime(_binding_0
))
2945 WherePredicate
::Eq(_binding_0
) => {
2946 WherePredicate
::Eq(_visitor
.fold_predicate_eq(_binding_0
))
2950 pub fn fold_span
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Span
) -> Span
{
2953 pub fn fold_ident
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Ident
) -> Ident
{
2955 let span
= _visitor
.fold_span(_i
.span());