1 // THIS FILE IS AUTOMATICALLY GENERATED; DO NOT EDIT
3 #![cfg_attr(rustfmt, rustfmt_skip)]
5 // Unreachable code is generated sometimes without the full feature.
6 #![allow(unreachable_code)]
7 #![cfg_attr(feature = "cargo-clippy", allow(needless_pass_by_value))]
10 #[cfg(any(feature = "full", feature = "derive"))]
11 use token
::{Brace, Bracket, Paren, Group}
;
12 use proc_macro2
::Span
;
13 #[cfg(any(feature = "full", feature = "derive"))]
14 use gen
::helper
::fold
::*;
17 #[cfg(feature = "full")]
22 #[cfg(all(feature = "derive", not(feature = "full")))]
24 ($e
:expr
) => { unreachable!() }
28 /// Syntax tree traversal to transform the nodes of an owned syntax tree.
30 /// See the [module documentation] for details.
32 /// [module documentation]: index.html
34 /// *This trait is available if Syn is built with the `"fold"` feature.*
36 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
37 fn fold_abi(&mut self, i
: Abi
) -> Abi { fold_abi(self, i) }
38 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
39 fn fold_angle_bracketed_generic_arguments(&mut self, i
: AngleBracketedGenericArguments
) -> AngleBracketedGenericArguments { fold_angle_bracketed_generic_arguments(self, i) }
40 # [ cfg ( feature = "full" ) ]
41 fn fold_arg_captured(&mut self, i
: ArgCaptured
) -> ArgCaptured { fold_arg_captured(self, i) }
42 # [ cfg ( feature = "full" ) ]
43 fn fold_arg_self(&mut self, i
: ArgSelf
) -> ArgSelf { fold_arg_self(self, i) }
44 # [ cfg ( feature = "full" ) ]
45 fn fold_arg_self_ref(&mut self, i
: ArgSelfRef
) -> ArgSelfRef { fold_arg_self_ref(self, i) }
46 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
47 fn fold_arm(&mut self, i
: Arm
) -> Arm { fold_arm(self, i) }
48 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
49 fn fold_attr_style(&mut self, i
: AttrStyle
) -> AttrStyle { fold_attr_style(self, i) }
50 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
51 fn fold_attribute(&mut self, i
: Attribute
) -> Attribute { fold_attribute(self, i) }
52 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
53 fn fold_bare_fn_arg(&mut self, i
: BareFnArg
) -> BareFnArg { fold_bare_fn_arg(self, i) }
54 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
55 fn fold_bare_fn_arg_name(&mut self, i
: BareFnArgName
) -> BareFnArgName { fold_bare_fn_arg_name(self, i) }
56 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
57 fn fold_bin_op(&mut self, i
: BinOp
) -> BinOp { fold_bin_op(self, i) }
58 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
59 fn fold_binding(&mut self, i
: Binding
) -> Binding { fold_binding(self, i) }
60 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
61 fn fold_block(&mut self, i
: Block
) -> Block { fold_block(self, i) }
62 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
63 fn fold_bound_lifetimes(&mut self, i
: BoundLifetimes
) -> BoundLifetimes { fold_bound_lifetimes(self, i) }
64 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
65 fn fold_const_param(&mut self, i
: ConstParam
) -> ConstParam { fold_const_param(self, i) }
66 # [ cfg ( feature = "derive" ) ]
67 fn fold_data(&mut self, i
: Data
) -> Data { fold_data(self, i) }
68 # [ cfg ( feature = "derive" ) ]
69 fn fold_data_enum(&mut self, i
: DataEnum
) -> DataEnum { fold_data_enum(self, i) }
70 # [ cfg ( feature = "derive" ) ]
71 fn fold_data_struct(&mut self, i
: DataStruct
) -> DataStruct { fold_data_struct(self, i) }
72 # [ cfg ( feature = "derive" ) ]
73 fn fold_data_union(&mut self, i
: DataUnion
) -> DataUnion { fold_data_union(self, i) }
74 # [ cfg ( feature = "derive" ) ]
75 fn fold_derive_input(&mut self, i
: DeriveInput
) -> DeriveInput { fold_derive_input(self, i) }
76 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
77 fn fold_expr(&mut self, i
: Expr
) -> Expr { fold_expr(self, i) }
78 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
79 fn fold_expr_addr_of(&mut self, i
: ExprAddrOf
) -> ExprAddrOf { fold_expr_addr_of(self, i) }
80 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
81 fn fold_expr_array(&mut self, i
: ExprArray
) -> ExprArray { fold_expr_array(self, i) }
82 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
83 fn fold_expr_assign(&mut self, i
: ExprAssign
) -> ExprAssign { fold_expr_assign(self, i) }
84 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
85 fn fold_expr_assign_op(&mut self, i
: ExprAssignOp
) -> ExprAssignOp { fold_expr_assign_op(self, i) }
86 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
87 fn fold_expr_binary(&mut self, i
: ExprBinary
) -> ExprBinary { fold_expr_binary(self, i) }
88 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
89 fn fold_expr_block(&mut self, i
: ExprBlock
) -> ExprBlock { fold_expr_block(self, i) }
90 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
91 fn fold_expr_box(&mut self, i
: ExprBox
) -> ExprBox { fold_expr_box(self, i) }
92 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
93 fn fold_expr_break(&mut self, i
: ExprBreak
) -> ExprBreak { fold_expr_break(self, i) }
94 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
95 fn fold_expr_call(&mut self, i
: ExprCall
) -> ExprCall { fold_expr_call(self, i) }
96 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
97 fn fold_expr_cast(&mut self, i
: ExprCast
) -> ExprCast { fold_expr_cast(self, i) }
98 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
99 fn fold_expr_catch(&mut self, i
: ExprCatch
) -> ExprCatch { fold_expr_catch(self, i) }
100 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
101 fn fold_expr_closure(&mut self, i
: ExprClosure
) -> ExprClosure { fold_expr_closure(self, i) }
102 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
103 fn fold_expr_continue(&mut self, i
: ExprContinue
) -> ExprContinue { fold_expr_continue(self, i) }
104 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
105 fn fold_expr_field(&mut self, i
: ExprField
) -> ExprField { fold_expr_field(self, i) }
106 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
107 fn fold_expr_for_loop(&mut self, i
: ExprForLoop
) -> ExprForLoop { fold_expr_for_loop(self, i) }
108 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
109 fn fold_expr_group(&mut self, i
: ExprGroup
) -> ExprGroup { fold_expr_group(self, i) }
110 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
111 fn fold_expr_if(&mut self, i
: ExprIf
) -> ExprIf { fold_expr_if(self, i) }
112 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
113 fn fold_expr_if_let(&mut self, i
: ExprIfLet
) -> ExprIfLet { fold_expr_if_let(self, i) }
114 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
115 fn fold_expr_in_place(&mut self, i
: ExprInPlace
) -> ExprInPlace { fold_expr_in_place(self, i) }
116 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
117 fn fold_expr_index(&mut self, i
: ExprIndex
) -> ExprIndex { fold_expr_index(self, i) }
118 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
119 fn fold_expr_lit(&mut self, i
: ExprLit
) -> ExprLit { fold_expr_lit(self, i) }
120 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
121 fn fold_expr_loop(&mut self, i
: ExprLoop
) -> ExprLoop { fold_expr_loop(self, i) }
122 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
123 fn fold_expr_macro(&mut self, i
: ExprMacro
) -> ExprMacro { fold_expr_macro(self, i) }
124 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
125 fn fold_expr_match(&mut self, i
: ExprMatch
) -> ExprMatch { fold_expr_match(self, i) }
126 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
127 fn fold_expr_method_call(&mut self, i
: ExprMethodCall
) -> ExprMethodCall { fold_expr_method_call(self, i) }
128 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
129 fn fold_expr_paren(&mut self, i
: ExprParen
) -> ExprParen { fold_expr_paren(self, i) }
130 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
131 fn fold_expr_path(&mut self, i
: ExprPath
) -> ExprPath { fold_expr_path(self, i) }
132 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
133 fn fold_expr_range(&mut self, i
: ExprRange
) -> ExprRange { fold_expr_range(self, i) }
134 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
135 fn fold_expr_repeat(&mut self, i
: ExprRepeat
) -> ExprRepeat { fold_expr_repeat(self, i) }
136 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
137 fn fold_expr_return(&mut self, i
: ExprReturn
) -> ExprReturn { fold_expr_return(self, i) }
138 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
139 fn fold_expr_struct(&mut self, i
: ExprStruct
) -> ExprStruct { fold_expr_struct(self, i) }
140 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
141 fn fold_expr_try(&mut self, i
: ExprTry
) -> ExprTry { fold_expr_try(self, i) }
142 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
143 fn fold_expr_tuple(&mut self, i
: ExprTuple
) -> ExprTuple { fold_expr_tuple(self, i) }
144 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
145 fn fold_expr_type(&mut self, i
: ExprType
) -> ExprType { fold_expr_type(self, i) }
146 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
147 fn fold_expr_unary(&mut self, i
: ExprUnary
) -> ExprUnary { fold_expr_unary(self, i) }
148 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
149 fn fold_expr_unsafe(&mut self, i
: ExprUnsafe
) -> ExprUnsafe { fold_expr_unsafe(self, i) }
150 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
151 fn fold_expr_verbatim(&mut self, i
: ExprVerbatim
) -> ExprVerbatim { fold_expr_verbatim(self, i) }
152 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
153 fn fold_expr_while(&mut self, i
: ExprWhile
) -> ExprWhile { fold_expr_while(self, i) }
154 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
155 fn fold_expr_while_let(&mut self, i
: ExprWhileLet
) -> ExprWhileLet { fold_expr_while_let(self, i) }
156 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
157 fn fold_expr_yield(&mut self, i
: ExprYield
) -> ExprYield { fold_expr_yield(self, i) }
158 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
159 fn fold_field(&mut self, i
: Field
) -> Field { fold_field(self, i) }
160 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
161 fn fold_field_pat(&mut self, i
: FieldPat
) -> FieldPat { fold_field_pat(self, i) }
162 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
163 fn fold_field_value(&mut self, i
: FieldValue
) -> FieldValue { fold_field_value(self, i) }
164 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
165 fn fold_fields(&mut self, i
: Fields
) -> Fields { fold_fields(self, i) }
166 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
167 fn fold_fields_named(&mut self, i
: FieldsNamed
) -> FieldsNamed { fold_fields_named(self, i) }
168 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
169 fn fold_fields_unnamed(&mut self, i
: FieldsUnnamed
) -> FieldsUnnamed { fold_fields_unnamed(self, i) }
170 # [ cfg ( feature = "full" ) ]
171 fn fold_file(&mut self, i
: File
) -> File { fold_file(self, i) }
172 # [ cfg ( feature = "full" ) ]
173 fn fold_fn_arg(&mut self, i
: FnArg
) -> FnArg { fold_fn_arg(self, i) }
174 # [ cfg ( feature = "full" ) ]
175 fn fold_fn_decl(&mut self, i
: FnDecl
) -> FnDecl { fold_fn_decl(self, i) }
176 # [ cfg ( feature = "full" ) ]
177 fn fold_foreign_item(&mut self, i
: ForeignItem
) -> ForeignItem { fold_foreign_item(self, i) }
178 # [ cfg ( feature = "full" ) ]
179 fn fold_foreign_item_fn(&mut self, i
: ForeignItemFn
) -> ForeignItemFn { fold_foreign_item_fn(self, i) }
180 # [ cfg ( feature = "full" ) ]
181 fn fold_foreign_item_static(&mut self, i
: ForeignItemStatic
) -> ForeignItemStatic { fold_foreign_item_static(self, i) }
182 # [ cfg ( feature = "full" ) ]
183 fn fold_foreign_item_type(&mut self, i
: ForeignItemType
) -> ForeignItemType { fold_foreign_item_type(self, i) }
184 # [ cfg ( feature = "full" ) ]
185 fn fold_foreign_item_verbatim(&mut self, i
: ForeignItemVerbatim
) -> ForeignItemVerbatim { fold_foreign_item_verbatim(self, i) }
186 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
187 fn fold_generic_argument(&mut self, i
: GenericArgument
) -> GenericArgument { fold_generic_argument(self, i) }
188 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
189 fn fold_generic_method_argument(&mut self, i
: GenericMethodArgument
) -> GenericMethodArgument { fold_generic_method_argument(self, i) }
190 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
191 fn fold_generic_param(&mut self, i
: GenericParam
) -> GenericParam { fold_generic_param(self, i) }
192 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
193 fn fold_generics(&mut self, i
: Generics
) -> Generics { fold_generics(self, i) }
195 fn fold_ident(&mut self, i
: Ident
) -> Ident { fold_ident(self, i) }
196 # [ cfg ( feature = "full" ) ]
197 fn fold_impl_item(&mut self, i
: ImplItem
) -> ImplItem { fold_impl_item(self, i) }
198 # [ cfg ( feature = "full" ) ]
199 fn fold_impl_item_const(&mut self, i
: ImplItemConst
) -> ImplItemConst { fold_impl_item_const(self, i) }
200 # [ cfg ( feature = "full" ) ]
201 fn fold_impl_item_macro(&mut self, i
: ImplItemMacro
) -> ImplItemMacro { fold_impl_item_macro(self, i) }
202 # [ cfg ( feature = "full" ) ]
203 fn fold_impl_item_method(&mut self, i
: ImplItemMethod
) -> ImplItemMethod { fold_impl_item_method(self, i) }
204 # [ cfg ( feature = "full" ) ]
205 fn fold_impl_item_type(&mut self, i
: ImplItemType
) -> ImplItemType { fold_impl_item_type(self, i) }
206 # [ cfg ( feature = "full" ) ]
207 fn fold_impl_item_verbatim(&mut self, i
: ImplItemVerbatim
) -> ImplItemVerbatim { fold_impl_item_verbatim(self, i) }
208 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
209 fn fold_index(&mut self, i
: Index
) -> Index { fold_index(self, i) }
210 # [ cfg ( feature = "full" ) ]
211 fn fold_item(&mut self, i
: Item
) -> Item { fold_item(self, i) }
212 # [ cfg ( feature = "full" ) ]
213 fn fold_item_const(&mut self, i
: ItemConst
) -> ItemConst { fold_item_const(self, i) }
214 # [ cfg ( feature = "full" ) ]
215 fn fold_item_enum(&mut self, i
: ItemEnum
) -> ItemEnum { fold_item_enum(self, i) }
216 # [ cfg ( feature = "full" ) ]
217 fn fold_item_extern_crate(&mut self, i
: ItemExternCrate
) -> ItemExternCrate { fold_item_extern_crate(self, i) }
218 # [ cfg ( feature = "full" ) ]
219 fn fold_item_fn(&mut self, i
: ItemFn
) -> ItemFn { fold_item_fn(self, i) }
220 # [ cfg ( feature = "full" ) ]
221 fn fold_item_foreign_mod(&mut self, i
: ItemForeignMod
) -> ItemForeignMod { fold_item_foreign_mod(self, i) }
222 # [ cfg ( feature = "full" ) ]
223 fn fold_item_impl(&mut self, i
: ItemImpl
) -> ItemImpl { fold_item_impl(self, i) }
224 # [ cfg ( feature = "full" ) ]
225 fn fold_item_macro(&mut self, i
: ItemMacro
) -> ItemMacro { fold_item_macro(self, i) }
226 # [ cfg ( feature = "full" ) ]
227 fn fold_item_macro2(&mut self, i
: ItemMacro2
) -> ItemMacro2 { fold_item_macro2(self, i) }
228 # [ cfg ( feature = "full" ) ]
229 fn fold_item_mod(&mut self, i
: ItemMod
) -> ItemMod { fold_item_mod(self, i) }
230 # [ cfg ( feature = "full" ) ]
231 fn fold_item_static(&mut self, i
: ItemStatic
) -> ItemStatic { fold_item_static(self, i) }
232 # [ cfg ( feature = "full" ) ]
233 fn fold_item_struct(&mut self, i
: ItemStruct
) -> ItemStruct { fold_item_struct(self, i) }
234 # [ cfg ( feature = "full" ) ]
235 fn fold_item_trait(&mut self, i
: ItemTrait
) -> ItemTrait { fold_item_trait(self, i) }
236 # [ cfg ( feature = "full" ) ]
237 fn fold_item_type(&mut self, i
: ItemType
) -> ItemType { fold_item_type(self, i) }
238 # [ cfg ( feature = "full" ) ]
239 fn fold_item_union(&mut self, i
: ItemUnion
) -> ItemUnion { fold_item_union(self, i) }
240 # [ cfg ( feature = "full" ) ]
241 fn fold_item_use(&mut self, i
: ItemUse
) -> ItemUse { fold_item_use(self, i) }
242 # [ cfg ( feature = "full" ) ]
243 fn fold_item_verbatim(&mut self, i
: ItemVerbatim
) -> ItemVerbatim { fold_item_verbatim(self, i) }
244 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
245 fn fold_label(&mut self, i
: Label
) -> Label { fold_label(self, i) }
246 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
247 fn fold_lifetime(&mut self, i
: Lifetime
) -> Lifetime { fold_lifetime(self, i) }
248 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
249 fn fold_lifetime_def(&mut self, i
: LifetimeDef
) -> LifetimeDef { fold_lifetime_def(self, i) }
250 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
251 fn fold_lit(&mut self, i
: Lit
) -> Lit { fold_lit(self, i) }
252 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
253 fn fold_lit_bool(&mut self, i
: LitBool
) -> LitBool { fold_lit_bool(self, i) }
254 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
255 fn fold_lit_byte(&mut self, i
: LitByte
) -> LitByte { fold_lit_byte(self, i) }
256 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
257 fn fold_lit_byte_str(&mut self, i
: LitByteStr
) -> LitByteStr { fold_lit_byte_str(self, i) }
258 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
259 fn fold_lit_char(&mut self, i
: LitChar
) -> LitChar { fold_lit_char(self, i) }
260 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
261 fn fold_lit_float(&mut self, i
: LitFloat
) -> LitFloat { fold_lit_float(self, i) }
262 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
263 fn fold_lit_int(&mut self, i
: LitInt
) -> LitInt { fold_lit_int(self, i) }
264 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
265 fn fold_lit_str(&mut self, i
: LitStr
) -> LitStr { fold_lit_str(self, i) }
266 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
267 fn fold_lit_verbatim(&mut self, i
: LitVerbatim
) -> LitVerbatim { fold_lit_verbatim(self, i) }
268 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
269 fn fold_local(&mut self, i
: Local
) -> Local { fold_local(self, i) }
270 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
271 fn fold_macro(&mut self, i
: Macro
) -> Macro { fold_macro(self, i) }
272 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
273 fn fold_macro_delimiter(&mut self, i
: MacroDelimiter
) -> MacroDelimiter { fold_macro_delimiter(self, i) }
274 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
275 fn fold_member(&mut self, i
: Member
) -> Member { fold_member(self, i) }
276 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
277 fn fold_meta(&mut self, i
: Meta
) -> Meta { fold_meta(self, i) }
278 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
279 fn fold_meta_list(&mut self, i
: MetaList
) -> MetaList { fold_meta_list(self, i) }
280 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
281 fn fold_meta_name_value(&mut self, i
: MetaNameValue
) -> MetaNameValue { fold_meta_name_value(self, i) }
282 # [ cfg ( feature = "full" ) ]
283 fn fold_method_sig(&mut self, i
: MethodSig
) -> MethodSig { fold_method_sig(self, i) }
284 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
285 fn fold_method_turbofish(&mut self, i
: MethodTurbofish
) -> MethodTurbofish { fold_method_turbofish(self, i) }
286 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
287 fn fold_nested_meta(&mut self, i
: NestedMeta
) -> NestedMeta { fold_nested_meta(self, i) }
288 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
289 fn fold_parenthesized_generic_arguments(&mut self, i
: ParenthesizedGenericArguments
) -> ParenthesizedGenericArguments { fold_parenthesized_generic_arguments(self, i) }
290 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
291 fn fold_pat(&mut self, i
: Pat
) -> Pat { fold_pat(self, i) }
292 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
293 fn fold_pat_box(&mut self, i
: PatBox
) -> PatBox { fold_pat_box(self, i) }
294 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
295 fn fold_pat_ident(&mut self, i
: PatIdent
) -> PatIdent { fold_pat_ident(self, i) }
296 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
297 fn fold_pat_lit(&mut self, i
: PatLit
) -> PatLit { fold_pat_lit(self, i) }
298 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
299 fn fold_pat_macro(&mut self, i
: PatMacro
) -> PatMacro { fold_pat_macro(self, i) }
300 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
301 fn fold_pat_path(&mut self, i
: PatPath
) -> PatPath { fold_pat_path(self, i) }
302 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
303 fn fold_pat_range(&mut self, i
: PatRange
) -> PatRange { fold_pat_range(self, i) }
304 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
305 fn fold_pat_ref(&mut self, i
: PatRef
) -> PatRef { fold_pat_ref(self, i) }
306 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
307 fn fold_pat_slice(&mut self, i
: PatSlice
) -> PatSlice { fold_pat_slice(self, i) }
308 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
309 fn fold_pat_struct(&mut self, i
: PatStruct
) -> PatStruct { fold_pat_struct(self, i) }
310 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
311 fn fold_pat_tuple(&mut self, i
: PatTuple
) -> PatTuple { fold_pat_tuple(self, i) }
312 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
313 fn fold_pat_tuple_struct(&mut self, i
: PatTupleStruct
) -> PatTupleStruct { fold_pat_tuple_struct(self, i) }
314 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
315 fn fold_pat_verbatim(&mut self, i
: PatVerbatim
) -> PatVerbatim { fold_pat_verbatim(self, i) }
316 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
317 fn fold_pat_wild(&mut self, i
: PatWild
) -> PatWild { fold_pat_wild(self, i) }
318 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
319 fn fold_path(&mut self, i
: Path
) -> Path { fold_path(self, i) }
320 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
321 fn fold_path_arguments(&mut self, i
: PathArguments
) -> PathArguments { fold_path_arguments(self, i) }
322 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
323 fn fold_path_segment(&mut self, i
: PathSegment
) -> PathSegment { fold_path_segment(self, i) }
324 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
325 fn fold_predicate_eq(&mut self, i
: PredicateEq
) -> PredicateEq { fold_predicate_eq(self, i) }
326 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
327 fn fold_predicate_lifetime(&mut self, i
: PredicateLifetime
) -> PredicateLifetime { fold_predicate_lifetime(self, i) }
328 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
329 fn fold_predicate_type(&mut self, i
: PredicateType
) -> PredicateType { fold_predicate_type(self, i) }
330 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
331 fn fold_qself(&mut self, i
: QSelf
) -> QSelf { fold_qself(self, i) }
332 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
333 fn fold_range_limits(&mut self, i
: RangeLimits
) -> RangeLimits { fold_range_limits(self, i) }
334 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
335 fn fold_return_type(&mut self, i
: ReturnType
) -> ReturnType { fold_return_type(self, i) }
337 fn fold_span(&mut self, i
: Span
) -> Span { fold_span(self, i) }
338 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
339 fn fold_stmt(&mut self, i
: Stmt
) -> Stmt { fold_stmt(self, i) }
340 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
341 fn fold_trait_bound(&mut self, i
: TraitBound
) -> TraitBound { fold_trait_bound(self, i) }
342 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
343 fn fold_trait_bound_modifier(&mut self, i
: TraitBoundModifier
) -> TraitBoundModifier { fold_trait_bound_modifier(self, i) }
344 # [ cfg ( feature = "full" ) ]
345 fn fold_trait_item(&mut self, i
: TraitItem
) -> TraitItem { fold_trait_item(self, i) }
346 # [ cfg ( feature = "full" ) ]
347 fn fold_trait_item_const(&mut self, i
: TraitItemConst
) -> TraitItemConst { fold_trait_item_const(self, i) }
348 # [ cfg ( feature = "full" ) ]
349 fn fold_trait_item_macro(&mut self, i
: TraitItemMacro
) -> TraitItemMacro { fold_trait_item_macro(self, i) }
350 # [ cfg ( feature = "full" ) ]
351 fn fold_trait_item_method(&mut self, i
: TraitItemMethod
) -> TraitItemMethod { fold_trait_item_method(self, i) }
352 # [ cfg ( feature = "full" ) ]
353 fn fold_trait_item_type(&mut self, i
: TraitItemType
) -> TraitItemType { fold_trait_item_type(self, i) }
354 # [ cfg ( feature = "full" ) ]
355 fn fold_trait_item_verbatim(&mut self, i
: TraitItemVerbatim
) -> TraitItemVerbatim { fold_trait_item_verbatim(self, i) }
356 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
357 fn fold_type(&mut self, i
: Type
) -> Type { fold_type(self, i) }
358 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
359 fn fold_type_array(&mut self, i
: TypeArray
) -> TypeArray { fold_type_array(self, i) }
360 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
361 fn fold_type_bare_fn(&mut self, i
: TypeBareFn
) -> TypeBareFn { fold_type_bare_fn(self, i) }
362 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
363 fn fold_type_group(&mut self, i
: TypeGroup
) -> TypeGroup { fold_type_group(self, i) }
364 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
365 fn fold_type_impl_trait(&mut self, i
: TypeImplTrait
) -> TypeImplTrait { fold_type_impl_trait(self, i) }
366 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
367 fn fold_type_infer(&mut self, i
: TypeInfer
) -> TypeInfer { fold_type_infer(self, i) }
368 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
369 fn fold_type_macro(&mut self, i
: TypeMacro
) -> TypeMacro { fold_type_macro(self, i) }
370 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
371 fn fold_type_never(&mut self, i
: TypeNever
) -> TypeNever { fold_type_never(self, i) }
372 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
373 fn fold_type_param(&mut self, i
: TypeParam
) -> TypeParam { fold_type_param(self, i) }
374 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
375 fn fold_type_param_bound(&mut self, i
: TypeParamBound
) -> TypeParamBound { fold_type_param_bound(self, i) }
376 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
377 fn fold_type_paren(&mut self, i
: TypeParen
) -> TypeParen { fold_type_paren(self, i) }
378 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
379 fn fold_type_path(&mut self, i
: TypePath
) -> TypePath { fold_type_path(self, i) }
380 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
381 fn fold_type_ptr(&mut self, i
: TypePtr
) -> TypePtr { fold_type_ptr(self, i) }
382 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
383 fn fold_type_reference(&mut self, i
: TypeReference
) -> TypeReference { fold_type_reference(self, i) }
384 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
385 fn fold_type_slice(&mut self, i
: TypeSlice
) -> TypeSlice { fold_type_slice(self, i) }
386 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
387 fn fold_type_trait_object(&mut self, i
: TypeTraitObject
) -> TypeTraitObject { fold_type_trait_object(self, i) }
388 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
389 fn fold_type_tuple(&mut self, i
: TypeTuple
) -> TypeTuple { fold_type_tuple(self, i) }
390 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
391 fn fold_type_verbatim(&mut self, i
: TypeVerbatim
) -> TypeVerbatim { fold_type_verbatim(self, i) }
392 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
393 fn fold_un_op(&mut self, i
: UnOp
) -> UnOp { fold_un_op(self, i) }
394 # [ cfg ( feature = "full" ) ]
395 fn fold_use_glob(&mut self, i
: UseGlob
) -> UseGlob { fold_use_glob(self, i) }
396 # [ cfg ( feature = "full" ) ]
397 fn fold_use_list(&mut self, i
: UseList
) -> UseList { fold_use_list(self, i) }
398 # [ cfg ( feature = "full" ) ]
399 fn fold_use_path(&mut self, i
: UsePath
) -> UsePath { fold_use_path(self, i) }
400 # [ cfg ( feature = "full" ) ]
401 fn fold_use_tree(&mut self, i
: UseTree
) -> UseTree { fold_use_tree(self, i) }
402 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
403 fn fold_variant(&mut self, i
: Variant
) -> Variant { fold_variant(self, i) }
404 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
405 fn fold_vis_crate(&mut self, i
: VisCrate
) -> VisCrate { fold_vis_crate(self, i) }
406 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
407 fn fold_vis_public(&mut self, i
: VisPublic
) -> VisPublic { fold_vis_public(self, i) }
408 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
409 fn fold_vis_restricted(&mut self, i
: VisRestricted
) -> VisRestricted { fold_vis_restricted(self, i) }
410 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
411 fn fold_visibility(&mut self, i
: Visibility
) -> Visibility { fold_visibility(self, i) }
412 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
413 fn fold_where_clause(&mut self, i
: WhereClause
) -> WhereClause { fold_where_clause(self, i) }
414 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
415 fn fold_where_predicate(&mut self, i
: WherePredicate
) -> WherePredicate { fold_where_predicate(self, i) }
419 macro_rules
! fold_span_only
{
420 ($f
:ident
: $t
:ident
) => {
421 pub fn $f
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, mut _i
: $t
) -> $t
{
422 _i
.span
= _visitor
.fold_span(_i
.span
);
428 fold_span_only
!(fold_ident
: Ident
);
429 #[cfg(any(feature = "full", feature = "derive"))]
430 fold_span_only
!(fold_lifetime
: Lifetime
);
431 #[cfg(any(feature = "full", feature = "derive"))]
432 fold_span_only
!(fold_lit_byte
: LitByte
);
433 #[cfg(any(feature = "full", feature = "derive"))]
434 fold_span_only
!(fold_lit_byte_str
: LitByteStr
);
435 #[cfg(any(feature = "full", feature = "derive"))]
436 fold_span_only
!(fold_lit_char
: LitChar
);
437 #[cfg(any(feature = "full", feature = "derive"))]
438 fold_span_only
!(fold_lit_float
: LitFloat
);
439 #[cfg(any(feature = "full", feature = "derive"))]
440 fold_span_only
!(fold_lit_int
: LitInt
);
441 #[cfg(any(feature = "full", feature = "derive"))]
442 fold_span_only
!(fold_lit_str
: LitStr
);
444 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
445 pub fn fold_abi
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Abi
) -> Abi
{
447 extern_token
: Token
! [ extern ](tokens_helper(_visitor
, &(_i
. extern_token
).0)),
448 name
: (_i
. name
).map(|it
| { _visitor.fold_lit_str(it) }
),
451 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
452 pub fn fold_angle_bracketed_generic_arguments
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: AngleBracketedGenericArguments
) -> AngleBracketedGenericArguments
{
453 AngleBracketedGenericArguments
{
454 colon2_token
: (_i
. colon2_token
).map(|it
| { Token ! [ :: ](tokens_helper(_visitor, &(it).0)) }
),
455 lt_token
: Token
! [ < ](tokens_helper(_visitor
, &(_i
. lt_token
).0)),
456 args
: FoldHelper
::lift(_i
. args
, |it
| { _visitor.fold_generic_argument(it) }
),
457 gt_token
: Token
! [ > ](tokens_helper(_visitor
, &(_i
. gt_token
).0)),
460 # [ cfg ( feature = "full" ) ]
461 pub fn fold_arg_captured
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ArgCaptured
) -> ArgCaptured
{
463 pat
: _visitor
.fold_pat(_i
. pat
),
464 colon_token
: Token
! [ : ](tokens_helper(_visitor
, &(_i
. colon_token
).0)),
465 ty
: _visitor
.fold_type(_i
. ty
),
468 # [ cfg ( feature = "full" ) ]
469 pub fn fold_arg_self
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ArgSelf
) -> ArgSelf
{
471 mutability
: (_i
. mutability
).map(|it
| { Token ! [ mut ](tokens_helper(_visitor, &(it).0)) }
),
472 self_token
: Token
! [ self ](tokens_helper(_visitor
, &(_i
. self_token
).0)),
475 # [ cfg ( feature = "full" ) ]
476 pub fn fold_arg_self_ref
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ArgSelfRef
) -> ArgSelfRef
{
478 and_token
: Token
! [ & ](tokens_helper(_visitor
, &(_i
. and_token
).0)),
479 lifetime
: (_i
. lifetime
).map(|it
| { _visitor.fold_lifetime(it) }
),
480 mutability
: (_i
. mutability
).map(|it
| { Token ! [ mut ](tokens_helper(_visitor, &(it).0)) }
),
481 self_token
: Token
! [ self ](tokens_helper(_visitor
, &(_i
. self_token
).0)),
484 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
485 pub fn fold_arm
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Arm
) -> Arm
{
487 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
488 pats
: FoldHelper
::lift(_i
. pats
, |it
| { _visitor.fold_pat(it) }
),
489 guard
: (_i
. guard
).map(|it
| { (
490 Token
! [ if ](tokens_helper(_visitor
, &(( it
) . 0).0)),
491 Box
::new(_visitor
.fold_expr(* ( it
) . 1)),
493 rocket_token
: Token
! [ => ](tokens_helper(_visitor
, &(_i
. rocket_token
).0)),
494 body
: Box
::new(_visitor
.fold_expr(* _i
. body
)),
495 comma
: (_i
. comma
).map(|it
| { Token ! [ , ](tokens_helper(_visitor, &(it).0)) }
),
498 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
499 pub fn fold_attr_style
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: AttrStyle
) -> AttrStyle
{
501 AttrStyle
::Outer
=> { AttrStyle::Outer }
502 AttrStyle
::Inner(_binding_0
, ) => {
504 Token
! [ ! ](tokens_helper(_visitor
, &(_binding_0
).0)),
509 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
510 pub fn fold_attribute
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Attribute
) -> Attribute
{
512 pound_token
: Token
! [ # ](tokens_helper(_visitor, &(_i . pound_token).0)),
513 style
: _visitor
.fold_attr_style(_i
. style
),
514 bracket_token
: Bracket(tokens_helper(_visitor
, &(_i
. bracket_token
).0)),
515 path
: _visitor
.fold_path(_i
. path
),
517 is_sugared_doc
: _i
. is_sugared_doc
,
520 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
521 pub fn fold_bare_fn_arg
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: BareFnArg
) -> BareFnArg
{
523 name
: (_i
. name
).map(|it
| { (
524 _visitor
.fold_bare_fn_arg_name(( it
) . 0),
525 Token
! [ : ](tokens_helper(_visitor
, &(( it
) . 1).0)),
527 ty
: _visitor
.fold_type(_i
. ty
),
530 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
531 pub fn fold_bare_fn_arg_name
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: BareFnArgName
) -> BareFnArgName
{
533 BareFnArgName
::Named(_binding_0
, ) => {
534 BareFnArgName
::Named (
535 _visitor
.fold_ident(_binding_0
),
538 BareFnArgName
::Wild(_binding_0
, ) => {
539 BareFnArgName
::Wild (
540 Token
! [ _
](tokens_helper(_visitor
, &(_binding_0
).0)),
545 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
546 pub fn fold_bin_op
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: BinOp
) -> BinOp
{
548 BinOp
::Add(_binding_0
, ) => {
550 Token
! [ + ](tokens_helper(_visitor
, &(_binding_0
).0)),
553 BinOp
::Sub(_binding_0
, ) => {
555 Token
! [ - ](tokens_helper(_visitor
, &(_binding_0
).0)),
558 BinOp
::Mul(_binding_0
, ) => {
560 Token
! [ * ](tokens_helper(_visitor
, &(_binding_0
).0)),
563 BinOp
::Div(_binding_0
, ) => {
565 Token
! [ / ](tokens_helper(_visitor
, &(_binding_0
).0)),
568 BinOp
::Rem(_binding_0
, ) => {
570 Token
! [ % ](tokens_helper(_visitor
, &(_binding_0
).0)),
573 BinOp
::And(_binding_0
, ) => {
575 Token
! [ && ](tokens_helper(_visitor
, &(_binding_0
).0)),
578 BinOp
::Or(_binding_0
, ) => {
580 Token
! [ || ](tokens_helper(_visitor
, &(_binding_0
).0)),
583 BinOp
::BitXor(_binding_0
, ) => {
585 Token
! [ ^
](tokens_helper(_visitor
, &(_binding_0
).0)),
588 BinOp
::BitAnd(_binding_0
, ) => {
590 Token
! [ & ](tokens_helper(_visitor
, &(_binding_0
).0)),
593 BinOp
::BitOr(_binding_0
, ) => {
595 Token
! [ | ](tokens_helper(_visitor
, &(_binding_0
).0)),
598 BinOp
::Shl(_binding_0
, ) => {
600 Token
! [ << ](tokens_helper(_visitor
, &(_binding_0
).0)),
603 BinOp
::Shr(_binding_0
, ) => {
605 Token
! [ >> ](tokens_helper(_visitor
, &(_binding_0
).0)),
608 BinOp
::Eq(_binding_0
, ) => {
610 Token
! [ == ](tokens_helper(_visitor
, &(_binding_0
).0)),
613 BinOp
::Lt(_binding_0
, ) => {
615 Token
! [ < ](tokens_helper(_visitor
, &(_binding_0
).0)),
618 BinOp
::Le(_binding_0
, ) => {
620 Token
! [ <= ](tokens_helper(_visitor
, &(_binding_0
).0)),
623 BinOp
::Ne(_binding_0
, ) => {
625 Token
! [ != ](tokens_helper(_visitor
, &(_binding_0
).0)),
628 BinOp
::Ge(_binding_0
, ) => {
630 Token
! [ >= ](tokens_helper(_visitor
, &(_binding_0
).0)),
633 BinOp
::Gt(_binding_0
, ) => {
635 Token
! [ > ](tokens_helper(_visitor
, &(_binding_0
).0)),
638 BinOp
::AddEq(_binding_0
, ) => {
640 Token
! [ += ](tokens_helper(_visitor
, &(_binding_0
).0)),
643 BinOp
::SubEq(_binding_0
, ) => {
645 Token
! [ -= ](tokens_helper(_visitor
, &(_binding_0
).0)),
648 BinOp
::MulEq(_binding_0
, ) => {
650 Token
! [ *= ](tokens_helper(_visitor
, &(_binding_0
).0)),
653 BinOp
::DivEq(_binding_0
, ) => {
655 Token
! [ /= ](tokens_helper(_visitor
, &(_binding_0
).0)),
658 BinOp
::RemEq(_binding_0
, ) => {
660 Token
! [ %= ](tokens_helper(_visitor
, &(_binding_0
).0)),
663 BinOp
::BitXorEq(_binding_0
, ) => {
665 Token
! [ ^
= ](tokens_helper(_visitor
, &(_binding_0
).0)),
668 BinOp
::BitAndEq(_binding_0
, ) => {
670 Token
! [ &= ](tokens_helper(_visitor
, &(_binding_0
).0)),
673 BinOp
::BitOrEq(_binding_0
, ) => {
675 Token
! [ |= ](tokens_helper(_visitor
, &(_binding_0
).0)),
678 BinOp
::ShlEq(_binding_0
, ) => {
680 Token
! [ <<= ](tokens_helper(_visitor
, &(_binding_0
).0)),
683 BinOp
::ShrEq(_binding_0
, ) => {
685 Token
! [ >>= ](tokens_helper(_visitor
, &(_binding_0
).0)),
690 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
691 pub fn fold_binding
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Binding
) -> Binding
{
693 ident
: _visitor
.fold_ident(_i
. ident
),
694 eq_token
: Token
! [ = ](tokens_helper(_visitor
, &(_i
. eq_token
).0)),
695 ty
: _visitor
.fold_type(_i
. ty
),
698 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
699 pub fn fold_block
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Block
) -> Block
{
701 brace_token
: Brace(tokens_helper(_visitor
, &(_i
. brace_token
).0)),
702 stmts
: FoldHelper
::lift(_i
. stmts
, |it
| { _visitor.fold_stmt(it) }
),
705 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
706 pub fn fold_bound_lifetimes
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: BoundLifetimes
) -> BoundLifetimes
{
708 for_token
: Token
! [ for ](tokens_helper(_visitor
, &(_i
. for_token
).0)),
709 lt_token
: Token
! [ < ](tokens_helper(_visitor
, &(_i
. lt_token
).0)),
710 lifetimes
: FoldHelper
::lift(_i
. lifetimes
, |it
| { _visitor.fold_lifetime_def(it) }
),
711 gt_token
: Token
! [ > ](tokens_helper(_visitor
, &(_i
. gt_token
).0)),
714 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
715 pub fn fold_const_param
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ConstParam
) -> ConstParam
{
717 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
718 const_token
: Token
! [ const ](tokens_helper(_visitor
, &(_i
. const_token
).0)),
719 ident
: _visitor
.fold_ident(_i
. ident
),
720 colon_token
: Token
! [ : ](tokens_helper(_visitor
, &(_i
. colon_token
).0)),
721 ty
: _visitor
.fold_type(_i
. ty
),
722 eq_token
: (_i
. eq_token
).map(|it
| { Token ! [ = ](tokens_helper(_visitor, &(it).0)) }
),
723 default: (_i
. default).map(|it
| { _visitor.fold_expr(it) }
),
726 # [ cfg ( feature = "derive" ) ]
727 pub fn fold_data
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Data
) -> Data
{
729 Data
::Struct(_binding_0
, ) => {
731 _visitor
.fold_data_struct(_binding_0
),
734 Data
::Enum(_binding_0
, ) => {
736 _visitor
.fold_data_enum(_binding_0
),
739 Data
::Union(_binding_0
, ) => {
741 _visitor
.fold_data_union(_binding_0
),
746 # [ cfg ( feature = "derive" ) ]
747 pub fn fold_data_enum
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: DataEnum
) -> DataEnum
{
749 enum_token
: Token
! [ enum ](tokens_helper(_visitor
, &(_i
. enum_token
).0)),
750 brace_token
: Brace(tokens_helper(_visitor
, &(_i
. brace_token
).0)),
751 variants
: FoldHelper
::lift(_i
. variants
, |it
| { _visitor.fold_variant(it) }
),
754 # [ cfg ( feature = "derive" ) ]
755 pub fn fold_data_struct
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: DataStruct
) -> DataStruct
{
757 struct_token
: Token
! [ struct ](tokens_helper(_visitor
, &(_i
. struct_token
).0)),
758 fields
: _visitor
.fold_fields(_i
. fields
),
759 semi_token
: (_i
. semi_token
).map(|it
| { Token ! [ ; ](tokens_helper(_visitor, &(it).0)) }
),
762 # [ cfg ( feature = "derive" ) ]
763 pub fn fold_data_union
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: DataUnion
) -> DataUnion
{
765 union_token
: Token
! [ union ](tokens_helper(_visitor
, &(_i
. union_token
).0)),
766 fields
: _visitor
.fold_fields_named(_i
. fields
),
769 # [ cfg ( feature = "derive" ) ]
770 pub fn fold_derive_input
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: DeriveInput
) -> DeriveInput
{
772 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
773 vis
: _visitor
.fold_visibility(_i
. vis
),
774 ident
: _visitor
.fold_ident(_i
. ident
),
775 generics
: _visitor
.fold_generics(_i
. generics
),
776 data
: _visitor
.fold_data(_i
. data
),
779 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
780 pub fn fold_expr
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Expr
) -> Expr
{
782 Expr
::Box(_binding_0
, ) => {
784 full
!(_visitor
.fold_expr_box(_binding_0
)),
787 Expr
::InPlace(_binding_0
, ) => {
789 full
!(_visitor
.fold_expr_in_place(_binding_0
)),
792 Expr
::Array(_binding_0
, ) => {
794 full
!(_visitor
.fold_expr_array(_binding_0
)),
797 Expr
::Call(_binding_0
, ) => {
799 _visitor
.fold_expr_call(_binding_0
),
802 Expr
::MethodCall(_binding_0
, ) => {
804 full
!(_visitor
.fold_expr_method_call(_binding_0
)),
807 Expr
::Tuple(_binding_0
, ) => {
809 full
!(_visitor
.fold_expr_tuple(_binding_0
)),
812 Expr
::Binary(_binding_0
, ) => {
814 _visitor
.fold_expr_binary(_binding_0
),
817 Expr
::Unary(_binding_0
, ) => {
819 _visitor
.fold_expr_unary(_binding_0
),
822 Expr
::Lit(_binding_0
, ) => {
824 _visitor
.fold_expr_lit(_binding_0
),
827 Expr
::Cast(_binding_0
, ) => {
829 _visitor
.fold_expr_cast(_binding_0
),
832 Expr
::Type(_binding_0
, ) => {
834 full
!(_visitor
.fold_expr_type(_binding_0
)),
837 Expr
::If(_binding_0
, ) => {
839 full
!(_visitor
.fold_expr_if(_binding_0
)),
842 Expr
::IfLet(_binding_0
, ) => {
844 full
!(_visitor
.fold_expr_if_let(_binding_0
)),
847 Expr
::While(_binding_0
, ) => {
849 full
!(_visitor
.fold_expr_while(_binding_0
)),
852 Expr
::WhileLet(_binding_0
, ) => {
854 full
!(_visitor
.fold_expr_while_let(_binding_0
)),
857 Expr
::ForLoop(_binding_0
, ) => {
859 full
!(_visitor
.fold_expr_for_loop(_binding_0
)),
862 Expr
::Loop(_binding_0
, ) => {
864 full
!(_visitor
.fold_expr_loop(_binding_0
)),
867 Expr
::Match(_binding_0
, ) => {
869 full
!(_visitor
.fold_expr_match(_binding_0
)),
872 Expr
::Closure(_binding_0
, ) => {
874 full
!(_visitor
.fold_expr_closure(_binding_0
)),
877 Expr
::Unsafe(_binding_0
, ) => {
879 full
!(_visitor
.fold_expr_unsafe(_binding_0
)),
882 Expr
::Block(_binding_0
, ) => {
884 full
!(_visitor
.fold_expr_block(_binding_0
)),
887 Expr
::Assign(_binding_0
, ) => {
889 full
!(_visitor
.fold_expr_assign(_binding_0
)),
892 Expr
::AssignOp(_binding_0
, ) => {
894 full
!(_visitor
.fold_expr_assign_op(_binding_0
)),
897 Expr
::Field(_binding_0
, ) => {
899 full
!(_visitor
.fold_expr_field(_binding_0
)),
902 Expr
::Index(_binding_0
, ) => {
904 _visitor
.fold_expr_index(_binding_0
),
907 Expr
::Range(_binding_0
, ) => {
909 full
!(_visitor
.fold_expr_range(_binding_0
)),
912 Expr
::Path(_binding_0
, ) => {
914 _visitor
.fold_expr_path(_binding_0
),
917 Expr
::AddrOf(_binding_0
, ) => {
919 full
!(_visitor
.fold_expr_addr_of(_binding_0
)),
922 Expr
::Break(_binding_0
, ) => {
924 full
!(_visitor
.fold_expr_break(_binding_0
)),
927 Expr
::Continue(_binding_0
, ) => {
929 full
!(_visitor
.fold_expr_continue(_binding_0
)),
932 Expr
::Return(_binding_0
, ) => {
934 full
!(_visitor
.fold_expr_return(_binding_0
)),
937 Expr
::Macro(_binding_0
, ) => {
939 full
!(_visitor
.fold_expr_macro(_binding_0
)),
942 Expr
::Struct(_binding_0
, ) => {
944 full
!(_visitor
.fold_expr_struct(_binding_0
)),
947 Expr
::Repeat(_binding_0
, ) => {
949 full
!(_visitor
.fold_expr_repeat(_binding_0
)),
952 Expr
::Paren(_binding_0
, ) => {
954 _visitor
.fold_expr_paren(_binding_0
),
957 Expr
::Group(_binding_0
, ) => {
959 full
!(_visitor
.fold_expr_group(_binding_0
)),
962 Expr
::Try(_binding_0
, ) => {
964 full
!(_visitor
.fold_expr_try(_binding_0
)),
967 Expr
::Catch(_binding_0
, ) => {
969 full
!(_visitor
.fold_expr_catch(_binding_0
)),
972 Expr
::Yield(_binding_0
, ) => {
974 full
!(_visitor
.fold_expr_yield(_binding_0
)),
977 Expr
::Verbatim(_binding_0
, ) => {
979 _visitor
.fold_expr_verbatim(_binding_0
),
984 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
985 pub fn fold_expr_addr_of
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprAddrOf
) -> ExprAddrOf
{
987 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
988 and_token
: Token
! [ & ](tokens_helper(_visitor
, &(_i
. and_token
).0)),
989 mutability
: (_i
. mutability
).map(|it
| { Token ! [ mut ](tokens_helper(_visitor, &(it).0)) }
),
990 expr
: Box
::new(_visitor
.fold_expr(* _i
. expr
)),
993 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
994 pub fn fold_expr_array
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprArray
) -> ExprArray
{
996 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
997 bracket_token
: Bracket(tokens_helper(_visitor
, &(_i
. bracket_token
).0)),
998 elems
: FoldHelper
::lift(_i
. elems
, |it
| { _visitor.fold_expr(it) }
),
1001 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1002 pub fn fold_expr_assign
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprAssign
) -> ExprAssign
{
1004 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1005 left
: Box
::new(_visitor
.fold_expr(* _i
. left
)),
1006 eq_token
: Token
! [ = ](tokens_helper(_visitor
, &(_i
. eq_token
).0)),
1007 right
: Box
::new(_visitor
.fold_expr(* _i
. right
)),
1010 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1011 pub fn fold_expr_assign_op
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprAssignOp
) -> ExprAssignOp
{
1013 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1014 left
: Box
::new(_visitor
.fold_expr(* _i
. left
)),
1015 op
: _visitor
.fold_bin_op(_i
. op
),
1016 right
: Box
::new(_visitor
.fold_expr(* _i
. right
)),
1019 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1020 pub fn fold_expr_binary
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprBinary
) -> ExprBinary
{
1022 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1023 left
: Box
::new(_visitor
.fold_expr(* _i
. left
)),
1024 op
: _visitor
.fold_bin_op(_i
. op
),
1025 right
: Box
::new(_visitor
.fold_expr(* _i
. right
)),
1028 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1029 pub fn fold_expr_block
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprBlock
) -> ExprBlock
{
1031 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1032 block
: _visitor
.fold_block(_i
. block
),
1035 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1036 pub fn fold_expr_box
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprBox
) -> ExprBox
{
1038 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1039 box_token
: Token
! [ box ](tokens_helper(_visitor
, &(_i
. box_token
).0)),
1040 expr
: Box
::new(_visitor
.fold_expr(* _i
. expr
)),
1043 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1044 pub fn fold_expr_break
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprBreak
) -> ExprBreak
{
1046 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1047 break_token
: Token
! [ break ](tokens_helper(_visitor
, &(_i
. break_token
).0)),
1048 label
: (_i
. label
).map(|it
| { _visitor.fold_lifetime(it) }
),
1049 expr
: (_i
. expr
).map(|it
| { Box::new(_visitor.fold_expr(* it)) }
),
1052 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1053 pub fn fold_expr_call
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprCall
) -> ExprCall
{
1055 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1056 func
: Box
::new(_visitor
.fold_expr(* _i
. func
)),
1057 paren_token
: Paren(tokens_helper(_visitor
, &(_i
. paren_token
).0)),
1058 args
: FoldHelper
::lift(_i
. args
, |it
| { _visitor.fold_expr(it) }
),
1061 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1062 pub fn fold_expr_cast
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprCast
) -> ExprCast
{
1064 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1065 expr
: Box
::new(_visitor
.fold_expr(* _i
. expr
)),
1066 as_token
: Token
! [ as ](tokens_helper(_visitor
, &(_i
. as_token
).0)),
1067 ty
: Box
::new(_visitor
.fold_type(* _i
. ty
)),
1070 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1071 pub fn fold_expr_catch
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprCatch
) -> ExprCatch
{
1073 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1074 do_token
: Token
! [ do ](tokens_helper(_visitor
, &(_i
. do_token
).0)),
1075 catch_token
: Token
! [ catch ](tokens_helper(_visitor
, &(_i
. catch_token
).0)),
1076 block
: _visitor
.fold_block(_i
. block
),
1079 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1080 pub fn fold_expr_closure
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprClosure
) -> ExprClosure
{
1082 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1083 capture
: (_i
. capture
).map(|it
| { Token ! [ move ](tokens_helper(_visitor, &(it).0)) }
),
1084 or1_token
: Token
! [ | ](tokens_helper(_visitor
, &(_i
. or1_token
).0)),
1085 inputs
: FoldHelper
::lift(_i
. inputs
, |it
| { _visitor.fold_fn_arg(it) }
),
1086 or2_token
: Token
! [ | ](tokens_helper(_visitor
, &(_i
. or2_token
).0)),
1087 output
: _visitor
.fold_return_type(_i
. output
),
1088 body
: Box
::new(_visitor
.fold_expr(* _i
. body
)),
1091 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1092 pub fn fold_expr_continue
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprContinue
) -> ExprContinue
{
1094 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1095 continue_token
: Token
! [ continue ](tokens_helper(_visitor
, &(_i
. continue_token
).0)),
1096 label
: (_i
. label
).map(|it
| { _visitor.fold_lifetime(it) }
),
1099 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1100 pub fn fold_expr_field
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprField
) -> ExprField
{
1102 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1103 base
: Box
::new(_visitor
.fold_expr(* _i
. base
)),
1104 dot_token
: Token
! [ . ](tokens_helper(_visitor
, &(_i
. dot_token
).0)),
1105 member
: _visitor
.fold_member(_i
. member
),
1108 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1109 pub fn fold_expr_for_loop
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprForLoop
) -> ExprForLoop
{
1111 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1112 label
: (_i
. label
).map(|it
| { _visitor.fold_label(it) }
),
1113 for_token
: Token
! [ for ](tokens_helper(_visitor
, &(_i
. for_token
).0)),
1114 pat
: Box
::new(_visitor
.fold_pat(* _i
. pat
)),
1115 in_token
: Token
! [ in ](tokens_helper(_visitor
, &(_i
. in_token
).0)),
1116 expr
: Box
::new(_visitor
.fold_expr(* _i
. expr
)),
1117 body
: _visitor
.fold_block(_i
. body
),
1120 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1121 pub fn fold_expr_group
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprGroup
) -> ExprGroup
{
1123 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1124 group_token
: Group(tokens_helper(_visitor
, &(_i
. group_token
).0)),
1125 expr
: Box
::new(_visitor
.fold_expr(* _i
. expr
)),
1128 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1129 pub fn fold_expr_if
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprIf
) -> ExprIf
{
1131 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1132 if_token
: Token
! [ if ](tokens_helper(_visitor
, &(_i
. if_token
).0)),
1133 cond
: Box
::new(_visitor
.fold_expr(* _i
. cond
)),
1134 then_branch
: _visitor
.fold_block(_i
. then_branch
),
1135 else_branch
: (_i
. else_branch
).map(|it
| { (
1136 Token
! [ else ](tokens_helper(_visitor
, &(( it
) . 0).0)),
1137 Box
::new(_visitor
.fold_expr(* ( it
) . 1)),
1141 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1142 pub fn fold_expr_if_let
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprIfLet
) -> ExprIfLet
{
1144 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1145 if_token
: Token
! [ if ](tokens_helper(_visitor
, &(_i
. if_token
).0)),
1146 let_token
: Token
! [ let ](tokens_helper(_visitor
, &(_i
. let_token
).0)),
1147 pat
: Box
::new(_visitor
.fold_pat(* _i
. pat
)),
1148 eq_token
: Token
! [ = ](tokens_helper(_visitor
, &(_i
. eq_token
).0)),
1149 expr
: Box
::new(_visitor
.fold_expr(* _i
. expr
)),
1150 then_branch
: _visitor
.fold_block(_i
. then_branch
),
1151 else_branch
: (_i
. else_branch
).map(|it
| { (
1152 Token
! [ else ](tokens_helper(_visitor
, &(( it
) . 0).0)),
1153 Box
::new(_visitor
.fold_expr(* ( it
) . 1)),
1157 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1158 pub fn fold_expr_in_place
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprInPlace
) -> ExprInPlace
{
1160 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1161 place
: Box
::new(_visitor
.fold_expr(* _i
. place
)),
1162 arrow_token
: Token
! [ <- ](tokens_helper(_visitor
, &(_i
. arrow_token
).0)),
1163 value
: Box
::new(_visitor
.fold_expr(* _i
. value
)),
1166 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1167 pub fn fold_expr_index
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprIndex
) -> ExprIndex
{
1169 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1170 expr
: Box
::new(_visitor
.fold_expr(* _i
. expr
)),
1171 bracket_token
: Bracket(tokens_helper(_visitor
, &(_i
. bracket_token
).0)),
1172 index
: Box
::new(_visitor
.fold_expr(* _i
. index
)),
1175 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1176 pub fn fold_expr_lit
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprLit
) -> ExprLit
{
1178 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1179 lit
: _visitor
.fold_lit(_i
. lit
),
1182 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1183 pub fn fold_expr_loop
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprLoop
) -> ExprLoop
{
1185 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1186 label
: (_i
. label
).map(|it
| { _visitor.fold_label(it) }
),
1187 loop_token
: Token
! [ loop ](tokens_helper(_visitor
, &(_i
. loop_token
).0)),
1188 body
: _visitor
.fold_block(_i
. body
),
1191 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1192 pub fn fold_expr_macro
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprMacro
) -> ExprMacro
{
1194 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1195 mac
: _visitor
.fold_macro(_i
. mac
),
1198 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1199 pub fn fold_expr_match
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprMatch
) -> ExprMatch
{
1201 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1202 match_token
: Token
! [ match ](tokens_helper(_visitor
, &(_i
. match_token
).0)),
1203 expr
: Box
::new(_visitor
.fold_expr(* _i
. expr
)),
1204 brace_token
: Brace(tokens_helper(_visitor
, &(_i
. brace_token
).0)),
1205 arms
: FoldHelper
::lift(_i
. arms
, |it
| { _visitor.fold_arm(it) }
),
1208 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1209 pub fn fold_expr_method_call
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprMethodCall
) -> ExprMethodCall
{
1211 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1212 receiver
: Box
::new(_visitor
.fold_expr(* _i
. receiver
)),
1213 dot_token
: Token
! [ . ](tokens_helper(_visitor
, &(_i
. dot_token
).0)),
1214 method
: _visitor
.fold_ident(_i
. method
),
1215 turbofish
: (_i
. turbofish
).map(|it
| { _visitor.fold_method_turbofish(it) }
),
1216 paren_token
: Paren(tokens_helper(_visitor
, &(_i
. paren_token
).0)),
1217 args
: FoldHelper
::lift(_i
. args
, |it
| { _visitor.fold_expr(it) }
),
1220 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1221 pub fn fold_expr_paren
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprParen
) -> ExprParen
{
1223 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1224 paren_token
: Paren(tokens_helper(_visitor
, &(_i
. paren_token
).0)),
1225 expr
: Box
::new(_visitor
.fold_expr(* _i
. expr
)),
1228 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1229 pub fn fold_expr_path
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprPath
) -> ExprPath
{
1231 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1232 qself
: (_i
. qself
).map(|it
| { _visitor.fold_qself(it) }
),
1233 path
: _visitor
.fold_path(_i
. path
),
1236 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1237 pub fn fold_expr_range
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprRange
) -> ExprRange
{
1239 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1240 from
: (_i
. from
).map(|it
| { Box::new(_visitor.fold_expr(* it)) }
),
1241 limits
: _visitor
.fold_range_limits(_i
. limits
),
1242 to
: (_i
. to
).map(|it
| { Box::new(_visitor.fold_expr(* it)) }
),
1245 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1246 pub fn fold_expr_repeat
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprRepeat
) -> ExprRepeat
{
1248 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1249 bracket_token
: Bracket(tokens_helper(_visitor
, &(_i
. bracket_token
).0)),
1250 expr
: Box
::new(_visitor
.fold_expr(* _i
. expr
)),
1251 semi_token
: Token
! [ ; ](tokens_helper(_visitor
, &(_i
. semi_token
).0)),
1252 len
: Box
::new(_visitor
.fold_expr(* _i
. len
)),
1255 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1256 pub fn fold_expr_return
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprReturn
) -> ExprReturn
{
1258 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1259 return_token
: Token
! [ return ](tokens_helper(_visitor
, &(_i
. return_token
).0)),
1260 expr
: (_i
. expr
).map(|it
| { Box::new(_visitor.fold_expr(* it)) }
),
1263 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1264 pub fn fold_expr_struct
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprStruct
) -> ExprStruct
{
1266 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1267 path
: _visitor
.fold_path(_i
. path
),
1268 brace_token
: Brace(tokens_helper(_visitor
, &(_i
. brace_token
).0)),
1269 fields
: FoldHelper
::lift(_i
. fields
, |it
| { _visitor.fold_field_value(it) }
),
1270 dot2_token
: (_i
. dot2_token
).map(|it
| { Token ! [ .. ](tokens_helper(_visitor, &(it).0)) }
),
1271 rest
: (_i
. rest
).map(|it
| { Box::new(_visitor.fold_expr(* it)) }
),
1274 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1275 pub fn fold_expr_try
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprTry
) -> ExprTry
{
1277 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1278 expr
: Box
::new(_visitor
.fold_expr(* _i
. expr
)),
1279 question_token
: Token
! [ ?
](tokens_helper(_visitor
, &(_i
. question_token
).0)),
1282 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1283 pub fn fold_expr_tuple
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprTuple
) -> ExprTuple
{
1285 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1286 paren_token
: Paren(tokens_helper(_visitor
, &(_i
. paren_token
).0)),
1287 elems
: FoldHelper
::lift(_i
. elems
, |it
| { _visitor.fold_expr(it) }
),
1290 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1291 pub fn fold_expr_type
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprType
) -> ExprType
{
1293 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1294 expr
: Box
::new(_visitor
.fold_expr(* _i
. expr
)),
1295 colon_token
: Token
! [ : ](tokens_helper(_visitor
, &(_i
. colon_token
).0)),
1296 ty
: Box
::new(_visitor
.fold_type(* _i
. ty
)),
1299 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1300 pub fn fold_expr_unary
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprUnary
) -> ExprUnary
{
1302 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1303 op
: _visitor
.fold_un_op(_i
. op
),
1304 expr
: Box
::new(_visitor
.fold_expr(* _i
. expr
)),
1307 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1308 pub fn fold_expr_unsafe
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprUnsafe
) -> ExprUnsafe
{
1310 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1311 unsafe_token
: Token
! [ unsafe ](tokens_helper(_visitor
, &(_i
. unsafe_token
).0)),
1312 block
: _visitor
.fold_block(_i
. block
),
1315 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1316 pub fn fold_expr_verbatim
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprVerbatim
) -> ExprVerbatim
{
1321 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1322 pub fn fold_expr_while
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprWhile
) -> ExprWhile
{
1324 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1325 label
: (_i
. label
).map(|it
| { _visitor.fold_label(it) }
),
1326 while_token
: Token
! [ while ](tokens_helper(_visitor
, &(_i
. while_token
).0)),
1327 cond
: Box
::new(_visitor
.fold_expr(* _i
. cond
)),
1328 body
: _visitor
.fold_block(_i
. body
),
1331 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1332 pub fn fold_expr_while_let
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprWhileLet
) -> ExprWhileLet
{
1334 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1335 label
: (_i
. label
).map(|it
| { _visitor.fold_label(it) }
),
1336 while_token
: Token
! [ while ](tokens_helper(_visitor
, &(_i
. while_token
).0)),
1337 let_token
: Token
! [ let ](tokens_helper(_visitor
, &(_i
. let_token
).0)),
1338 pat
: Box
::new(_visitor
.fold_pat(* _i
. pat
)),
1339 eq_token
: Token
! [ = ](tokens_helper(_visitor
, &(_i
. eq_token
).0)),
1340 expr
: Box
::new(_visitor
.fold_expr(* _i
. expr
)),
1341 body
: _visitor
.fold_block(_i
. body
),
1344 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1345 pub fn fold_expr_yield
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ExprYield
) -> ExprYield
{
1347 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1348 yield_token
: Token
! [ yield ](tokens_helper(_visitor
, &(_i
. yield_token
).0)),
1349 expr
: (_i
. expr
).map(|it
| { Box::new(_visitor.fold_expr(* it)) }
),
1352 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1353 pub fn fold_field
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Field
) -> Field
{
1355 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1356 vis
: _visitor
.fold_visibility(_i
. vis
),
1357 ident
: (_i
. ident
).map(|it
| { _visitor.fold_ident(it) }
),
1358 colon_token
: (_i
. colon_token
).map(|it
| { Token ! [ : ](tokens_helper(_visitor, &(it).0)) }
),
1359 ty
: _visitor
.fold_type(_i
. ty
),
1362 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
1363 pub fn fold_field_pat
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: FieldPat
) -> FieldPat
{
1365 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1366 member
: _visitor
.fold_member(_i
. member
),
1367 colon_token
: (_i
. colon_token
).map(|it
| { Token ! [ : ](tokens_helper(_visitor, &(it).0)) }
),
1368 pat
: Box
::new(_visitor
.fold_pat(* _i
. pat
)),
1371 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
1372 pub fn fold_field_value
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: FieldValue
) -> FieldValue
{
1374 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1375 member
: _visitor
.fold_member(_i
. member
),
1376 colon_token
: (_i
. colon_token
).map(|it
| { Token ! [ : ](tokens_helper(_visitor, &(it).0)) }
),
1377 expr
: _visitor
.fold_expr(_i
. expr
),
1380 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1381 pub fn fold_fields
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Fields
) -> Fields
{
1383 Fields
::Named(_binding_0
, ) => {
1385 _visitor
.fold_fields_named(_binding_0
),
1388 Fields
::Unnamed(_binding_0
, ) => {
1390 _visitor
.fold_fields_unnamed(_binding_0
),
1393 Fields
::Unit
=> { Fields::Unit }
1396 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1397 pub fn fold_fields_named
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: FieldsNamed
) -> FieldsNamed
{
1399 brace_token
: Brace(tokens_helper(_visitor
, &(_i
. brace_token
).0)),
1400 named
: FoldHelper
::lift(_i
. named
, |it
| { _visitor.fold_field(it) }
),
1403 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1404 pub fn fold_fields_unnamed
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: FieldsUnnamed
) -> FieldsUnnamed
{
1406 paren_token
: Paren(tokens_helper(_visitor
, &(_i
. paren_token
).0)),
1407 unnamed
: FoldHelper
::lift(_i
. unnamed
, |it
| { _visitor.fold_field(it) }
),
1410 # [ cfg ( feature = "full" ) ]
1411 pub fn fold_file
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: File
) -> File
{
1413 shebang
: _i
. shebang
,
1414 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1415 items
: FoldHelper
::lift(_i
. items
, |it
| { _visitor.fold_item(it) }
),
1418 # [ cfg ( feature = "full" ) ]
1419 pub fn fold_fn_arg
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: FnArg
) -> FnArg
{
1421 FnArg
::SelfRef(_binding_0
, ) => {
1423 _visitor
.fold_arg_self_ref(_binding_0
),
1426 FnArg
::SelfValue(_binding_0
, ) => {
1428 _visitor
.fold_arg_self(_binding_0
),
1431 FnArg
::Captured(_binding_0
, ) => {
1433 _visitor
.fold_arg_captured(_binding_0
),
1436 FnArg
::Inferred(_binding_0
, ) => {
1438 _visitor
.fold_pat(_binding_0
),
1441 FnArg
::Ignored(_binding_0
, ) => {
1443 _visitor
.fold_type(_binding_0
),
1448 # [ cfg ( feature = "full" ) ]
1449 pub fn fold_fn_decl
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: FnDecl
) -> FnDecl
{
1451 fn_token
: Token
! [ fn ](tokens_helper(_visitor
, &(_i
. fn_token
).0)),
1452 generics
: _visitor
.fold_generics(_i
. generics
),
1453 paren_token
: Paren(tokens_helper(_visitor
, &(_i
. paren_token
).0)),
1454 inputs
: FoldHelper
::lift(_i
. inputs
, |it
| { _visitor.fold_fn_arg(it) }
),
1455 variadic
: (_i
. variadic
).map(|it
| { Token ! [ ... ](tokens_helper(_visitor, &(it).0)) }
),
1456 output
: _visitor
.fold_return_type(_i
. output
),
1459 # [ cfg ( feature = "full" ) ]
1460 pub fn fold_foreign_item
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ForeignItem
) -> ForeignItem
{
1462 ForeignItem
::Fn(_binding_0
, ) => {
1464 _visitor
.fold_foreign_item_fn(_binding_0
),
1467 ForeignItem
::Static(_binding_0
, ) => {
1468 ForeignItem
::Static (
1469 _visitor
.fold_foreign_item_static(_binding_0
),
1472 ForeignItem
::Type(_binding_0
, ) => {
1474 _visitor
.fold_foreign_item_type(_binding_0
),
1477 ForeignItem
::Verbatim(_binding_0
, ) => {
1478 ForeignItem
::Verbatim (
1479 _visitor
.fold_foreign_item_verbatim(_binding_0
),
1484 # [ cfg ( feature = "full" ) ]
1485 pub fn fold_foreign_item_fn
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ForeignItemFn
) -> ForeignItemFn
{
1487 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1488 vis
: _visitor
.fold_visibility(_i
. vis
),
1489 ident
: _visitor
.fold_ident(_i
. ident
),
1490 decl
: Box
::new(_visitor
.fold_fn_decl(* _i
. decl
)),
1491 semi_token
: Token
! [ ; ](tokens_helper(_visitor
, &(_i
. semi_token
).0)),
1494 # [ cfg ( feature = "full" ) ]
1495 pub fn fold_foreign_item_static
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ForeignItemStatic
) -> ForeignItemStatic
{
1497 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1498 vis
: _visitor
.fold_visibility(_i
. vis
),
1499 static_token
: Token
! [ static ](tokens_helper(_visitor
, &(_i
. static_token
).0)),
1500 mutability
: (_i
. mutability
).map(|it
| { Token ! [ mut ](tokens_helper(_visitor, &(it).0)) }
),
1501 ident
: _visitor
.fold_ident(_i
. ident
),
1502 colon_token
: Token
! [ : ](tokens_helper(_visitor
, &(_i
. colon_token
).0)),
1503 ty
: Box
::new(_visitor
.fold_type(* _i
. ty
)),
1504 semi_token
: Token
! [ ; ](tokens_helper(_visitor
, &(_i
. semi_token
).0)),
1507 # [ cfg ( feature = "full" ) ]
1508 pub fn fold_foreign_item_type
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ForeignItemType
) -> ForeignItemType
{
1510 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1511 vis
: _visitor
.fold_visibility(_i
. vis
),
1512 type_token
: Token
! [ type ](tokens_helper(_visitor
, &(_i
. type_token
).0)),
1513 ident
: _visitor
.fold_ident(_i
. ident
),
1514 semi_token
: Token
! [ ; ](tokens_helper(_visitor
, &(_i
. semi_token
).0)),
1517 # [ cfg ( feature = "full" ) ]
1518 pub fn fold_foreign_item_verbatim
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ForeignItemVerbatim
) -> ForeignItemVerbatim
{
1519 ForeignItemVerbatim
{
1523 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1524 pub fn fold_generic_argument
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: GenericArgument
) -> GenericArgument
{
1526 GenericArgument
::Lifetime(_binding_0
, ) => {
1527 GenericArgument
::Lifetime (
1528 _visitor
.fold_lifetime(_binding_0
),
1531 GenericArgument
::Type(_binding_0
, ) => {
1532 GenericArgument
::Type (
1533 _visitor
.fold_type(_binding_0
),
1536 GenericArgument
::Binding(_binding_0
, ) => {
1537 GenericArgument
::Binding (
1538 _visitor
.fold_binding(_binding_0
),
1541 GenericArgument
::Const(_binding_0
, ) => {
1542 GenericArgument
::Const (
1543 _visitor
.fold_expr(_binding_0
),
1548 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
1549 pub fn fold_generic_method_argument
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: GenericMethodArgument
) -> GenericMethodArgument
{
1551 GenericMethodArgument
::Type(_binding_0
, ) => {
1552 GenericMethodArgument
::Type (
1553 _visitor
.fold_type(_binding_0
),
1556 GenericMethodArgument
::Const(_binding_0
, ) => {
1557 GenericMethodArgument
::Const (
1558 _visitor
.fold_expr(_binding_0
),
1563 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1564 pub fn fold_generic_param
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: GenericParam
) -> GenericParam
{
1566 GenericParam
::Type(_binding_0
, ) => {
1567 GenericParam
::Type (
1568 _visitor
.fold_type_param(_binding_0
),
1571 GenericParam
::Lifetime(_binding_0
, ) => {
1572 GenericParam
::Lifetime (
1573 _visitor
.fold_lifetime_def(_binding_0
),
1576 GenericParam
::Const(_binding_0
, ) => {
1577 GenericParam
::Const (
1578 _visitor
.fold_const_param(_binding_0
),
1583 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1584 pub fn fold_generics
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Generics
) -> Generics
{
1586 lt_token
: (_i
. lt_token
).map(|it
| { Token ! [ < ](tokens_helper(_visitor, &(it).0)) }
),
1587 params
: FoldHelper
::lift(_i
. params
, |it
| { _visitor.fold_generic_param(it) }
),
1588 gt_token
: (_i
. gt_token
).map(|it
| { Token ! [ > ](tokens_helper(_visitor, &(it).0)) }
),
1589 where_clause
: (_i
. where_clause
).map(|it
| { _visitor.fold_where_clause(it) }
),
1592 # [ cfg ( feature = "full" ) ]
1593 pub fn fold_impl_item
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ImplItem
) -> ImplItem
{
1595 ImplItem
::Const(_binding_0
, ) => {
1597 _visitor
.fold_impl_item_const(_binding_0
),
1600 ImplItem
::Method(_binding_0
, ) => {
1602 _visitor
.fold_impl_item_method(_binding_0
),
1605 ImplItem
::Type(_binding_0
, ) => {
1607 _visitor
.fold_impl_item_type(_binding_0
),
1610 ImplItem
::Macro(_binding_0
, ) => {
1612 _visitor
.fold_impl_item_macro(_binding_0
),
1615 ImplItem
::Verbatim(_binding_0
, ) => {
1616 ImplItem
::Verbatim (
1617 _visitor
.fold_impl_item_verbatim(_binding_0
),
1622 # [ cfg ( feature = "full" ) ]
1623 pub fn fold_impl_item_const
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ImplItemConst
) -> ImplItemConst
{
1625 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1626 vis
: _visitor
.fold_visibility(_i
. vis
),
1627 defaultness
: (_i
. defaultness
).map(|it
| { Token ! [ default ](tokens_helper(_visitor, &(it).0)) }
),
1628 const_token
: Token
! [ const ](tokens_helper(_visitor
, &(_i
. const_token
).0)),
1629 ident
: _visitor
.fold_ident(_i
. ident
),
1630 colon_token
: Token
! [ : ](tokens_helper(_visitor
, &(_i
. colon_token
).0)),
1631 ty
: _visitor
.fold_type(_i
. ty
),
1632 eq_token
: Token
! [ = ](tokens_helper(_visitor
, &(_i
. eq_token
).0)),
1633 expr
: _visitor
.fold_expr(_i
. expr
),
1634 semi_token
: Token
! [ ; ](tokens_helper(_visitor
, &(_i
. semi_token
).0)),
1637 # [ cfg ( feature = "full" ) ]
1638 pub fn fold_impl_item_macro
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ImplItemMacro
) -> ImplItemMacro
{
1640 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1641 mac
: _visitor
.fold_macro(_i
. mac
),
1642 semi_token
: (_i
. semi_token
).map(|it
| { Token ! [ ; ](tokens_helper(_visitor, &(it).0)) }
),
1645 # [ cfg ( feature = "full" ) ]
1646 pub fn fold_impl_item_method
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ImplItemMethod
) -> ImplItemMethod
{
1648 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1649 vis
: _visitor
.fold_visibility(_i
. vis
),
1650 defaultness
: (_i
. defaultness
).map(|it
| { Token ! [ default ](tokens_helper(_visitor, &(it).0)) }
),
1651 sig
: _visitor
.fold_method_sig(_i
. sig
),
1652 block
: _visitor
.fold_block(_i
. block
),
1655 # [ cfg ( feature = "full" ) ]
1656 pub fn fold_impl_item_type
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ImplItemType
) -> ImplItemType
{
1658 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1659 vis
: _visitor
.fold_visibility(_i
. vis
),
1660 defaultness
: (_i
. defaultness
).map(|it
| { Token ! [ default ](tokens_helper(_visitor, &(it).0)) }
),
1661 type_token
: Token
! [ type ](tokens_helper(_visitor
, &(_i
. type_token
).0)),
1662 ident
: _visitor
.fold_ident(_i
. ident
),
1663 generics
: _visitor
.fold_generics(_i
. generics
),
1664 eq_token
: Token
! [ = ](tokens_helper(_visitor
, &(_i
. eq_token
).0)),
1665 ty
: _visitor
.fold_type(_i
. ty
),
1666 semi_token
: Token
! [ ; ](tokens_helper(_visitor
, &(_i
. semi_token
).0)),
1669 # [ cfg ( feature = "full" ) ]
1670 pub fn fold_impl_item_verbatim
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ImplItemVerbatim
) -> ImplItemVerbatim
{
1675 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1676 pub fn fold_index
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Index
) -> Index
{
1679 span
: _visitor
.fold_span(_i
. span
),
1682 # [ cfg ( feature = "full" ) ]
1683 pub fn fold_item
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Item
) -> Item
{
1685 Item
::ExternCrate(_binding_0
, ) => {
1687 _visitor
.fold_item_extern_crate(_binding_0
),
1690 Item
::Use(_binding_0
, ) => {
1692 _visitor
.fold_item_use(_binding_0
),
1695 Item
::Static(_binding_0
, ) => {
1697 _visitor
.fold_item_static(_binding_0
),
1700 Item
::Const(_binding_0
, ) => {
1702 _visitor
.fold_item_const(_binding_0
),
1705 Item
::Fn(_binding_0
, ) => {
1707 _visitor
.fold_item_fn(_binding_0
),
1710 Item
::Mod(_binding_0
, ) => {
1712 _visitor
.fold_item_mod(_binding_0
),
1715 Item
::ForeignMod(_binding_0
, ) => {
1717 _visitor
.fold_item_foreign_mod(_binding_0
),
1720 Item
::Type(_binding_0
, ) => {
1722 _visitor
.fold_item_type(_binding_0
),
1725 Item
::Struct(_binding_0
, ) => {
1727 _visitor
.fold_item_struct(_binding_0
),
1730 Item
::Enum(_binding_0
, ) => {
1732 _visitor
.fold_item_enum(_binding_0
),
1735 Item
::Union(_binding_0
, ) => {
1737 _visitor
.fold_item_union(_binding_0
),
1740 Item
::Trait(_binding_0
, ) => {
1742 _visitor
.fold_item_trait(_binding_0
),
1745 Item
::Impl(_binding_0
, ) => {
1747 _visitor
.fold_item_impl(_binding_0
),
1750 Item
::Macro(_binding_0
, ) => {
1752 _visitor
.fold_item_macro(_binding_0
),
1755 Item
::Macro2(_binding_0
, ) => {
1757 _visitor
.fold_item_macro2(_binding_0
),
1760 Item
::Verbatim(_binding_0
, ) => {
1762 _visitor
.fold_item_verbatim(_binding_0
),
1767 # [ cfg ( feature = "full" ) ]
1768 pub fn fold_item_const
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ItemConst
) -> ItemConst
{
1770 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1771 vis
: _visitor
.fold_visibility(_i
. vis
),
1772 const_token
: Token
! [ const ](tokens_helper(_visitor
, &(_i
. const_token
).0)),
1773 ident
: _visitor
.fold_ident(_i
. ident
),
1774 colon_token
: Token
! [ : ](tokens_helper(_visitor
, &(_i
. colon_token
).0)),
1775 ty
: Box
::new(_visitor
.fold_type(* _i
. ty
)),
1776 eq_token
: Token
! [ = ](tokens_helper(_visitor
, &(_i
. eq_token
).0)),
1777 expr
: Box
::new(_visitor
.fold_expr(* _i
. expr
)),
1778 semi_token
: Token
! [ ; ](tokens_helper(_visitor
, &(_i
. semi_token
).0)),
1781 # [ cfg ( feature = "full" ) ]
1782 pub fn fold_item_enum
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ItemEnum
) -> ItemEnum
{
1784 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1785 vis
: _visitor
.fold_visibility(_i
. vis
),
1786 enum_token
: Token
! [ enum ](tokens_helper(_visitor
, &(_i
. enum_token
).0)),
1787 ident
: _visitor
.fold_ident(_i
. ident
),
1788 generics
: _visitor
.fold_generics(_i
. generics
),
1789 brace_token
: Brace(tokens_helper(_visitor
, &(_i
. brace_token
).0)),
1790 variants
: FoldHelper
::lift(_i
. variants
, |it
| { _visitor.fold_variant(it) }
),
1793 # [ cfg ( feature = "full" ) ]
1794 pub fn fold_item_extern_crate
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ItemExternCrate
) -> ItemExternCrate
{
1796 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1797 vis
: _visitor
.fold_visibility(_i
. vis
),
1798 extern_token
: Token
! [ extern ](tokens_helper(_visitor
, &(_i
. extern_token
).0)),
1799 crate_token
: Token
! [ crate ](tokens_helper(_visitor
, &(_i
. crate_token
).0)),
1800 ident
: _visitor
.fold_ident(_i
. ident
),
1801 rename
: (_i
. rename
).map(|it
| { (
1802 Token
! [ as ](tokens_helper(_visitor
, &(( it
) . 0).0)),
1803 _visitor
.fold_ident(( it
) . 1),
1805 semi_token
: Token
! [ ; ](tokens_helper(_visitor
, &(_i
. semi_token
).0)),
1808 # [ cfg ( feature = "full" ) ]
1809 pub fn fold_item_fn
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ItemFn
) -> ItemFn
{
1811 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1812 vis
: _visitor
.fold_visibility(_i
. vis
),
1813 constness
: (_i
. constness
).map(|it
| { Token ! [ const ](tokens_helper(_visitor, &(it).0)) }
),
1814 unsafety
: (_i
. unsafety
).map(|it
| { Token ! [ unsafe ](tokens_helper(_visitor, &(it).0)) }
),
1815 abi
: (_i
. abi
).map(|it
| { _visitor.fold_abi(it) }
),
1816 ident
: _visitor
.fold_ident(_i
. ident
),
1817 decl
: Box
::new(_visitor
.fold_fn_decl(* _i
. decl
)),
1818 block
: Box
::new(_visitor
.fold_block(* _i
. block
)),
1821 # [ cfg ( feature = "full" ) ]
1822 pub fn fold_item_foreign_mod
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ItemForeignMod
) -> ItemForeignMod
{
1824 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1825 abi
: _visitor
.fold_abi(_i
. abi
),
1826 brace_token
: Brace(tokens_helper(_visitor
, &(_i
. brace_token
).0)),
1827 items
: FoldHelper
::lift(_i
. items
, |it
| { _visitor.fold_foreign_item(it) }
),
1830 # [ cfg ( feature = "full" ) ]
1831 pub fn fold_item_impl
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ItemImpl
) -> ItemImpl
{
1833 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1834 defaultness
: (_i
. defaultness
).map(|it
| { Token ! [ default ](tokens_helper(_visitor, &(it).0)) }
),
1835 unsafety
: (_i
. unsafety
).map(|it
| { Token ! [ unsafe ](tokens_helper(_visitor, &(it).0)) }
),
1836 impl_token
: Token
! [ impl ](tokens_helper(_visitor
, &(_i
. impl_token
).0)),
1837 generics
: _visitor
.fold_generics(_i
. generics
),
1838 trait_
: (_i
. trait_
).map(|it
| { (
1839 (( it
) . 0).map(|it
| { Token ! [ ! ](tokens_helper(_visitor, &(it).0)) }
),
1840 _visitor
.fold_path(( it
) . 1),
1841 Token
! [ for ](tokens_helper(_visitor
, &(( it
) . 2).0)),
1843 self_ty
: Box
::new(_visitor
.fold_type(* _i
. self_ty
)),
1844 brace_token
: Brace(tokens_helper(_visitor
, &(_i
. brace_token
).0)),
1845 items
: FoldHelper
::lift(_i
. items
, |it
| { _visitor.fold_impl_item(it) }
),
1848 # [ cfg ( feature = "full" ) ]
1849 pub fn fold_item_macro
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ItemMacro
) -> ItemMacro
{
1851 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1852 ident
: (_i
. ident
).map(|it
| { _visitor.fold_ident(it) }
),
1853 mac
: _visitor
.fold_macro(_i
. mac
),
1854 semi_token
: (_i
. semi_token
).map(|it
| { Token ! [ ; ](tokens_helper(_visitor, &(it).0)) }
),
1857 # [ cfg ( feature = "full" ) ]
1858 pub fn fold_item_macro2
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ItemMacro2
) -> ItemMacro2
{
1860 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1861 vis
: _visitor
.fold_visibility(_i
. vis
),
1862 macro_token
: Token
! [ macro ](tokens_helper(_visitor
, &(_i
. macro_token
).0)),
1863 ident
: _visitor
.fold_ident(_i
. ident
),
1864 paren_token
: Paren(tokens_helper(_visitor
, &(_i
. paren_token
).0)),
1866 brace_token
: Brace(tokens_helper(_visitor
, &(_i
. brace_token
).0)),
1870 # [ cfg ( feature = "full" ) ]
1871 pub fn fold_item_mod
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ItemMod
) -> ItemMod
{
1873 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1874 vis
: _visitor
.fold_visibility(_i
. vis
),
1875 mod_token
: Token
! [ mod ](tokens_helper(_visitor
, &(_i
. mod_token
).0)),
1876 ident
: _visitor
.fold_ident(_i
. ident
),
1877 content
: (_i
. content
).map(|it
| { (
1878 Brace(tokens_helper(_visitor
, &(( it
) . 0).0)),
1879 FoldHelper
::lift(( it
) . 1, |it
| { _visitor.fold_item(it) }
),
1881 semi
: (_i
. semi
).map(|it
| { Token ! [ ; ](tokens_helper(_visitor, &(it).0)) }
),
1884 # [ cfg ( feature = "full" ) ]
1885 pub fn fold_item_static
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ItemStatic
) -> ItemStatic
{
1887 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1888 vis
: _visitor
.fold_visibility(_i
. vis
),
1889 static_token
: Token
! [ static ](tokens_helper(_visitor
, &(_i
. static_token
).0)),
1890 mutability
: (_i
. mutability
).map(|it
| { Token ! [ mut ](tokens_helper(_visitor, &(it).0)) }
),
1891 ident
: _visitor
.fold_ident(_i
. ident
),
1892 colon_token
: Token
! [ : ](tokens_helper(_visitor
, &(_i
. colon_token
).0)),
1893 ty
: Box
::new(_visitor
.fold_type(* _i
. ty
)),
1894 eq_token
: Token
! [ = ](tokens_helper(_visitor
, &(_i
. eq_token
).0)),
1895 expr
: Box
::new(_visitor
.fold_expr(* _i
. expr
)),
1896 semi_token
: Token
! [ ; ](tokens_helper(_visitor
, &(_i
. semi_token
).0)),
1899 # [ cfg ( feature = "full" ) ]
1900 pub fn fold_item_struct
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ItemStruct
) -> ItemStruct
{
1902 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1903 vis
: _visitor
.fold_visibility(_i
. vis
),
1904 struct_token
: Token
! [ struct ](tokens_helper(_visitor
, &(_i
. struct_token
).0)),
1905 ident
: _visitor
.fold_ident(_i
. ident
),
1906 generics
: _visitor
.fold_generics(_i
. generics
),
1907 fields
: _visitor
.fold_fields(_i
. fields
),
1908 semi_token
: (_i
. semi_token
).map(|it
| { Token ! [ ; ](tokens_helper(_visitor, &(it).0)) }
),
1911 # [ cfg ( feature = "full" ) ]
1912 pub fn fold_item_trait
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ItemTrait
) -> ItemTrait
{
1914 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1915 vis
: _visitor
.fold_visibility(_i
. vis
),
1916 unsafety
: (_i
. unsafety
).map(|it
| { Token ! [ unsafe ](tokens_helper(_visitor, &(it).0)) }
),
1917 auto_token
: (_i
. auto_token
).map(|it
| { Token ! [ auto ](tokens_helper(_visitor, &(it).0)) }
),
1918 trait_token
: Token
! [ trait ](tokens_helper(_visitor
, &(_i
. trait_token
).0)),
1919 ident
: _visitor
.fold_ident(_i
. ident
),
1920 generics
: _visitor
.fold_generics(_i
. generics
),
1921 colon_token
: (_i
. colon_token
).map(|it
| { Token ! [ : ](tokens_helper(_visitor, &(it).0)) }
),
1922 supertraits
: FoldHelper
::lift(_i
. supertraits
, |it
| { _visitor.fold_type_param_bound(it) }
),
1923 brace_token
: Brace(tokens_helper(_visitor
, &(_i
. brace_token
).0)),
1924 items
: FoldHelper
::lift(_i
. items
, |it
| { _visitor.fold_trait_item(it) }
),
1927 # [ cfg ( feature = "full" ) ]
1928 pub fn fold_item_type
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ItemType
) -> ItemType
{
1930 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1931 vis
: _visitor
.fold_visibility(_i
. vis
),
1932 type_token
: Token
! [ type ](tokens_helper(_visitor
, &(_i
. type_token
).0)),
1933 ident
: _visitor
.fold_ident(_i
. ident
),
1934 generics
: _visitor
.fold_generics(_i
. generics
),
1935 eq_token
: Token
! [ = ](tokens_helper(_visitor
, &(_i
. eq_token
).0)),
1936 ty
: Box
::new(_visitor
.fold_type(* _i
. ty
)),
1937 semi_token
: Token
! [ ; ](tokens_helper(_visitor
, &(_i
. semi_token
).0)),
1940 # [ cfg ( feature = "full" ) ]
1941 pub fn fold_item_union
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ItemUnion
) -> ItemUnion
{
1943 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1944 vis
: _visitor
.fold_visibility(_i
. vis
),
1945 union_token
: Token
! [ union ](tokens_helper(_visitor
, &(_i
. union_token
).0)),
1946 ident
: _visitor
.fold_ident(_i
. ident
),
1947 generics
: _visitor
.fold_generics(_i
. generics
),
1948 fields
: _visitor
.fold_fields_named(_i
. fields
),
1951 # [ cfg ( feature = "full" ) ]
1952 pub fn fold_item_use
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ItemUse
) -> ItemUse
{
1954 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1955 vis
: _visitor
.fold_visibility(_i
. vis
),
1956 use_token
: Token
! [ use ](tokens_helper(_visitor
, &(_i
. use_token
).0)),
1957 leading_colon
: (_i
. leading_colon
).map(|it
| { Token ! [ :: ](tokens_helper(_visitor, &(it).0)) }
),
1958 prefix
: FoldHelper
::lift(_i
. prefix
, |it
| { _visitor.fold_ident(it) }
),
1959 tree
: _visitor
.fold_use_tree(_i
. tree
),
1960 semi_token
: Token
! [ ; ](tokens_helper(_visitor
, &(_i
. semi_token
).0)),
1963 # [ cfg ( feature = "full" ) ]
1964 pub fn fold_item_verbatim
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ItemVerbatim
) -> ItemVerbatim
{
1969 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
1970 pub fn fold_label
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Label
) -> Label
{
1972 name
: _visitor
.fold_lifetime(_i
. name
),
1973 colon_token
: Token
! [ : ](tokens_helper(_visitor
, &(_i
. colon_token
).0)),
1976 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1977 pub fn fold_lifetime_def
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: LifetimeDef
) -> LifetimeDef
{
1979 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
1980 lifetime
: _visitor
.fold_lifetime(_i
. lifetime
),
1981 colon_token
: (_i
. colon_token
).map(|it
| { Token ! [ : ](tokens_helper(_visitor, &(it).0)) }
),
1982 bounds
: FoldHelper
::lift(_i
. bounds
, |it
| { _visitor.fold_lifetime(it) }
),
1985 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1986 pub fn fold_lit
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Lit
) -> Lit
{
1988 Lit
::Str(_binding_0
, ) => {
1990 _visitor
.fold_lit_str(_binding_0
),
1993 Lit
::ByteStr(_binding_0
, ) => {
1995 _visitor
.fold_lit_byte_str(_binding_0
),
1998 Lit
::Byte(_binding_0
, ) => {
2000 _visitor
.fold_lit_byte(_binding_0
),
2003 Lit
::Char(_binding_0
, ) => {
2005 _visitor
.fold_lit_char(_binding_0
),
2008 Lit
::Int(_binding_0
, ) => {
2010 _visitor
.fold_lit_int(_binding_0
),
2013 Lit
::Float(_binding_0
, ) => {
2015 _visitor
.fold_lit_float(_binding_0
),
2018 Lit
::Bool(_binding_0
, ) => {
2020 _visitor
.fold_lit_bool(_binding_0
),
2023 Lit
::Verbatim(_binding_0
, ) => {
2025 _visitor
.fold_lit_verbatim(_binding_0
),
2030 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2031 pub fn fold_lit_bool
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: LitBool
) -> LitBool
{
2034 span
: _visitor
.fold_span(_i
. span
),
2037 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2038 pub fn fold_lit_verbatim
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: LitVerbatim
) -> LitVerbatim
{
2041 span
: _visitor
.fold_span(_i
. span
),
2044 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
2045 pub fn fold_local
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Local
) -> Local
{
2047 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
2048 let_token
: Token
! [ let ](tokens_helper(_visitor
, &(_i
. let_token
).0)),
2049 pat
: Box
::new(_visitor
.fold_pat(* _i
. pat
)),
2050 ty
: (_i
. ty
).map(|it
| { (
2051 Token
! [ : ](tokens_helper(_visitor
, &(( it
) . 0).0)),
2052 Box
::new(_visitor
.fold_type(* ( it
) . 1)),
2054 init
: (_i
. init
).map(|it
| { (
2055 Token
! [ = ](tokens_helper(_visitor
, &(( it
) . 0).0)),
2056 Box
::new(_visitor
.fold_expr(* ( it
) . 1)),
2058 semi_token
: Token
! [ ; ](tokens_helper(_visitor
, &(_i
. semi_token
).0)),
2061 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2062 pub fn fold_macro
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Macro
) -> Macro
{
2064 path
: _visitor
.fold_path(_i
. path
),
2065 bang_token
: Token
! [ ! ](tokens_helper(_visitor
, &(_i
. bang_token
).0)),
2066 delimiter
: _visitor
.fold_macro_delimiter(_i
. delimiter
),
2070 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2071 pub fn fold_macro_delimiter
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: MacroDelimiter
) -> MacroDelimiter
{
2073 MacroDelimiter
::Paren(_binding_0
, ) => {
2074 MacroDelimiter
::Paren (
2075 Paren(tokens_helper(_visitor
, &(_binding_0
).0)),
2078 MacroDelimiter
::Brace(_binding_0
, ) => {
2079 MacroDelimiter
::Brace (
2080 Brace(tokens_helper(_visitor
, &(_binding_0
).0)),
2083 MacroDelimiter
::Bracket(_binding_0
, ) => {
2084 MacroDelimiter
::Bracket (
2085 Bracket(tokens_helper(_visitor
, &(_binding_0
).0)),
2090 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2091 pub fn fold_member
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Member
) -> Member
{
2093 Member
::Named(_binding_0
, ) => {
2095 _visitor
.fold_ident(_binding_0
),
2098 Member
::Unnamed(_binding_0
, ) => {
2100 _visitor
.fold_index(_binding_0
),
2105 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2106 pub fn fold_meta
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Meta
) -> Meta
{
2108 Meta
::Word(_binding_0
, ) => {
2110 _visitor
.fold_ident(_binding_0
),
2113 Meta
::List(_binding_0
, ) => {
2115 _visitor
.fold_meta_list(_binding_0
),
2118 Meta
::NameValue(_binding_0
, ) => {
2120 _visitor
.fold_meta_name_value(_binding_0
),
2125 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2126 pub fn fold_meta_list
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: MetaList
) -> MetaList
{
2128 ident
: _visitor
.fold_ident(_i
. ident
),
2129 paren_token
: Paren(tokens_helper(_visitor
, &(_i
. paren_token
).0)),
2130 nested
: FoldHelper
::lift(_i
. nested
, |it
| { _visitor.fold_nested_meta(it) }
),
2133 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2134 pub fn fold_meta_name_value
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: MetaNameValue
) -> MetaNameValue
{
2136 ident
: _visitor
.fold_ident(_i
. ident
),
2137 eq_token
: Token
! [ = ](tokens_helper(_visitor
, &(_i
. eq_token
).0)),
2138 lit
: _visitor
.fold_lit(_i
. lit
),
2141 # [ cfg ( feature = "full" ) ]
2142 pub fn fold_method_sig
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: MethodSig
) -> MethodSig
{
2144 constness
: (_i
. constness
).map(|it
| { Token ! [ const ](tokens_helper(_visitor, &(it).0)) }
),
2145 unsafety
: (_i
. unsafety
).map(|it
| { Token ! [ unsafe ](tokens_helper(_visitor, &(it).0)) }
),
2146 abi
: (_i
. abi
).map(|it
| { _visitor.fold_abi(it) }
),
2147 ident
: _visitor
.fold_ident(_i
. ident
),
2148 decl
: _visitor
.fold_fn_decl(_i
. decl
),
2151 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
2152 pub fn fold_method_turbofish
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: MethodTurbofish
) -> MethodTurbofish
{
2154 colon2_token
: Token
! [ :: ](tokens_helper(_visitor
, &(_i
. colon2_token
).0)),
2155 lt_token
: Token
! [ < ](tokens_helper(_visitor
, &(_i
. lt_token
).0)),
2156 args
: FoldHelper
::lift(_i
. args
, |it
| { _visitor.fold_generic_method_argument(it) }
),
2157 gt_token
: Token
! [ > ](tokens_helper(_visitor
, &(_i
. gt_token
).0)),
2160 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2161 pub fn fold_nested_meta
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: NestedMeta
) -> NestedMeta
{
2163 NestedMeta
::Meta(_binding_0
, ) => {
2165 _visitor
.fold_meta(_binding_0
),
2168 NestedMeta
::Literal(_binding_0
, ) => {
2169 NestedMeta
::Literal (
2170 _visitor
.fold_lit(_binding_0
),
2175 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2176 pub fn fold_parenthesized_generic_arguments
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ParenthesizedGenericArguments
) -> ParenthesizedGenericArguments
{
2177 ParenthesizedGenericArguments
{
2178 paren_token
: Paren(tokens_helper(_visitor
, &(_i
. paren_token
).0)),
2179 inputs
: FoldHelper
::lift(_i
. inputs
, |it
| { _visitor.fold_type(it) }
),
2180 output
: _visitor
.fold_return_type(_i
. output
),
2183 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
2184 pub fn fold_pat
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Pat
) -> Pat
{
2186 Pat
::Wild(_binding_0
, ) => {
2188 _visitor
.fold_pat_wild(_binding_0
),
2191 Pat
::Ident(_binding_0
, ) => {
2193 _visitor
.fold_pat_ident(_binding_0
),
2196 Pat
::Struct(_binding_0
, ) => {
2198 _visitor
.fold_pat_struct(_binding_0
),
2201 Pat
::TupleStruct(_binding_0
, ) => {
2203 _visitor
.fold_pat_tuple_struct(_binding_0
),
2206 Pat
::Path(_binding_0
, ) => {
2208 _visitor
.fold_pat_path(_binding_0
),
2211 Pat
::Tuple(_binding_0
, ) => {
2213 _visitor
.fold_pat_tuple(_binding_0
),
2216 Pat
::Box(_binding_0
, ) => {
2218 _visitor
.fold_pat_box(_binding_0
),
2221 Pat
::Ref(_binding_0
, ) => {
2223 _visitor
.fold_pat_ref(_binding_0
),
2226 Pat
::Lit(_binding_0
, ) => {
2228 _visitor
.fold_pat_lit(_binding_0
),
2231 Pat
::Range(_binding_0
, ) => {
2233 _visitor
.fold_pat_range(_binding_0
),
2236 Pat
::Slice(_binding_0
, ) => {
2238 _visitor
.fold_pat_slice(_binding_0
),
2241 Pat
::Macro(_binding_0
, ) => {
2243 _visitor
.fold_pat_macro(_binding_0
),
2246 Pat
::Verbatim(_binding_0
, ) => {
2248 _visitor
.fold_pat_verbatim(_binding_0
),
2253 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
2254 pub fn fold_pat_box
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: PatBox
) -> PatBox
{
2256 box_token
: Token
! [ box ](tokens_helper(_visitor
, &(_i
. box_token
).0)),
2257 pat
: Box
::new(_visitor
.fold_pat(* _i
. pat
)),
2260 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
2261 pub fn fold_pat_ident
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: PatIdent
) -> PatIdent
{
2263 by_ref
: (_i
. by_ref
).map(|it
| { Token ! [ ref ](tokens_helper(_visitor, &(it).0)) }
),
2264 mutability
: (_i
. mutability
).map(|it
| { Token ! [ mut ](tokens_helper(_visitor, &(it).0)) }
),
2265 ident
: _visitor
.fold_ident(_i
. ident
),
2266 subpat
: (_i
. subpat
).map(|it
| { (
2267 Token
! [ @
](tokens_helper(_visitor
, &(( it
) . 0).0)),
2268 Box
::new(_visitor
.fold_pat(* ( it
) . 1)),
2272 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
2273 pub fn fold_pat_lit
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: PatLit
) -> PatLit
{
2275 expr
: Box
::new(_visitor
.fold_expr(* _i
. expr
)),
2278 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
2279 pub fn fold_pat_macro
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: PatMacro
) -> PatMacro
{
2281 mac
: _visitor
.fold_macro(_i
. mac
),
2284 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
2285 pub fn fold_pat_path
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: PatPath
) -> PatPath
{
2287 qself
: (_i
. qself
).map(|it
| { _visitor.fold_qself(it) }
),
2288 path
: _visitor
.fold_path(_i
. path
),
2291 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
2292 pub fn fold_pat_range
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: PatRange
) -> PatRange
{
2294 lo
: Box
::new(_visitor
.fold_expr(* _i
. lo
)),
2295 limits
: _visitor
.fold_range_limits(_i
. limits
),
2296 hi
: Box
::new(_visitor
.fold_expr(* _i
. hi
)),
2299 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
2300 pub fn fold_pat_ref
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: PatRef
) -> PatRef
{
2302 and_token
: Token
! [ & ](tokens_helper(_visitor
, &(_i
. and_token
).0)),
2303 mutability
: (_i
. mutability
).map(|it
| { Token ! [ mut ](tokens_helper(_visitor, &(it).0)) }
),
2304 pat
: Box
::new(_visitor
.fold_pat(* _i
. pat
)),
2307 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
2308 pub fn fold_pat_slice
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: PatSlice
) -> PatSlice
{
2310 bracket_token
: Bracket(tokens_helper(_visitor
, &(_i
. bracket_token
).0)),
2311 front
: FoldHelper
::lift(_i
. front
, |it
| { _visitor.fold_pat(it) }
),
2312 middle
: (_i
. middle
).map(|it
| { Box::new(_visitor.fold_pat(* it)) }
),
2313 dot2_token
: (_i
. dot2_token
).map(|it
| { Token ! [ .. ](tokens_helper(_visitor, &(it).0)) }
),
2314 comma_token
: (_i
. comma_token
).map(|it
| { Token ! [ , ](tokens_helper(_visitor, &(it).0)) }
),
2315 back
: FoldHelper
::lift(_i
. back
, |it
| { _visitor.fold_pat(it) }
),
2318 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
2319 pub fn fold_pat_struct
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: PatStruct
) -> PatStruct
{
2321 path
: _visitor
.fold_path(_i
. path
),
2322 brace_token
: Brace(tokens_helper(_visitor
, &(_i
. brace_token
).0)),
2323 fields
: FoldHelper
::lift(_i
. fields
, |it
| { _visitor.fold_field_pat(it) }
),
2324 dot2_token
: (_i
. dot2_token
).map(|it
| { Token ! [ .. ](tokens_helper(_visitor, &(it).0)) }
),
2327 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
2328 pub fn fold_pat_tuple
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: PatTuple
) -> PatTuple
{
2330 paren_token
: Paren(tokens_helper(_visitor
, &(_i
. paren_token
).0)),
2331 front
: FoldHelper
::lift(_i
. front
, |it
| { _visitor.fold_pat(it) }
),
2332 dot2_token
: (_i
. dot2_token
).map(|it
| { Token ! [ .. ](tokens_helper(_visitor, &(it).0)) }
),
2333 comma_token
: (_i
. comma_token
).map(|it
| { Token ! [ , ](tokens_helper(_visitor, &(it).0)) }
),
2334 back
: FoldHelper
::lift(_i
. back
, |it
| { _visitor.fold_pat(it) }
),
2337 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
2338 pub fn fold_pat_tuple_struct
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: PatTupleStruct
) -> PatTupleStruct
{
2340 path
: _visitor
.fold_path(_i
. path
),
2341 pat
: _visitor
.fold_pat_tuple(_i
. pat
),
2344 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
2345 pub fn fold_pat_verbatim
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: PatVerbatim
) -> PatVerbatim
{
2350 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
2351 pub fn fold_pat_wild
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: PatWild
) -> PatWild
{
2353 underscore_token
: Token
! [ _
](tokens_helper(_visitor
, &(_i
. underscore_token
).0)),
2356 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2357 pub fn fold_path
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Path
) -> Path
{
2359 leading_colon
: (_i
. leading_colon
).map(|it
| { Token ! [ :: ](tokens_helper(_visitor, &(it).0)) }
),
2360 segments
: FoldHelper
::lift(_i
. segments
, |it
| { _visitor.fold_path_segment(it) }
),
2363 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2364 pub fn fold_path_arguments
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: PathArguments
) -> PathArguments
{
2366 PathArguments
::None
=> { PathArguments::None }
2367 PathArguments
::AngleBracketed(_binding_0
, ) => {
2368 PathArguments
::AngleBracketed (
2369 _visitor
.fold_angle_bracketed_generic_arguments(_binding_0
),
2372 PathArguments
::Parenthesized(_binding_0
, ) => {
2373 PathArguments
::Parenthesized (
2374 _visitor
.fold_parenthesized_generic_arguments(_binding_0
),
2379 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2380 pub fn fold_path_segment
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: PathSegment
) -> PathSegment
{
2382 ident
: _visitor
.fold_ident(_i
. ident
),
2383 arguments
: _visitor
.fold_path_arguments(_i
. arguments
),
2386 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2387 pub fn fold_predicate_eq
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: PredicateEq
) -> PredicateEq
{
2389 lhs_ty
: _visitor
.fold_type(_i
. lhs_ty
),
2390 eq_token
: Token
! [ = ](tokens_helper(_visitor
, &(_i
. eq_token
).0)),
2391 rhs_ty
: _visitor
.fold_type(_i
. rhs_ty
),
2394 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2395 pub fn fold_predicate_lifetime
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: PredicateLifetime
) -> PredicateLifetime
{
2397 lifetime
: _visitor
.fold_lifetime(_i
. lifetime
),
2398 colon_token
: (_i
. colon_token
).map(|it
| { Token ! [ : ](tokens_helper(_visitor, &(it).0)) }
),
2399 bounds
: FoldHelper
::lift(_i
. bounds
, |it
| { _visitor.fold_lifetime(it) }
),
2402 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2403 pub fn fold_predicate_type
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: PredicateType
) -> PredicateType
{
2405 lifetimes
: (_i
. lifetimes
).map(|it
| { _visitor.fold_bound_lifetimes(it) }
),
2406 bounded_ty
: _visitor
.fold_type(_i
. bounded_ty
),
2407 colon_token
: Token
! [ : ](tokens_helper(_visitor
, &(_i
. colon_token
).0)),
2408 bounds
: FoldHelper
::lift(_i
. bounds
, |it
| { _visitor.fold_type_param_bound(it) }
),
2411 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2412 pub fn fold_qself
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: QSelf
) -> QSelf
{
2414 lt_token
: Token
! [ < ](tokens_helper(_visitor
, &(_i
. lt_token
).0)),
2415 ty
: Box
::new(_visitor
.fold_type(* _i
. ty
)),
2416 position
: _i
. position
,
2417 as_token
: (_i
. as_token
).map(|it
| { Token ! [ as ](tokens_helper(_visitor, &(it).0)) }
),
2418 gt_token
: Token
! [ > ](tokens_helper(_visitor
, &(_i
. gt_token
).0)),
2421 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
2422 pub fn fold_range_limits
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: RangeLimits
) -> RangeLimits
{
2424 RangeLimits
::HalfOpen(_binding_0
, ) => {
2425 RangeLimits
::HalfOpen (
2426 Token
! [ .. ](tokens_helper(_visitor
, &(_binding_0
).0)),
2429 RangeLimits
::Closed(_binding_0
, ) => {
2430 RangeLimits
::Closed (
2431 Token
! [ ..= ](tokens_helper(_visitor
, &(_binding_0
).0)),
2436 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2437 pub fn fold_return_type
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: ReturnType
) -> ReturnType
{
2439 ReturnType
::Default
=> { ReturnType::Default }
2440 ReturnType
::Type(_binding_0
, _binding_1
, ) => {
2442 Token
! [ -> ](tokens_helper(_visitor
, &(_binding_0
).0)),
2443 Box
::new(_visitor
.fold_type(* _binding_1
)),
2449 pub fn fold_span
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Span
) -> Span
{
2452 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
2453 pub fn fold_stmt
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Stmt
) -> Stmt
{
2455 Stmt
::Local(_binding_0
, ) => {
2457 _visitor
.fold_local(_binding_0
),
2460 Stmt
::Item(_binding_0
, ) => {
2462 _visitor
.fold_item(_binding_0
),
2465 Stmt
::Expr(_binding_0
, ) => {
2467 _visitor
.fold_expr(_binding_0
),
2470 Stmt
::Semi(_binding_0
, _binding_1
, ) => {
2472 _visitor
.fold_expr(_binding_0
),
2473 Token
! [ ; ](tokens_helper(_visitor
, &(_binding_1
).0)),
2478 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2479 pub fn fold_trait_bound
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TraitBound
) -> TraitBound
{
2481 modifier
: _visitor
.fold_trait_bound_modifier(_i
. modifier
),
2482 lifetimes
: (_i
. lifetimes
).map(|it
| { _visitor.fold_bound_lifetimes(it) }
),
2483 path
: _visitor
.fold_path(_i
. path
),
2486 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2487 pub fn fold_trait_bound_modifier
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TraitBoundModifier
) -> TraitBoundModifier
{
2489 TraitBoundModifier
::None
=> { TraitBoundModifier::None }
2490 TraitBoundModifier
::Maybe(_binding_0
, ) => {
2491 TraitBoundModifier
::Maybe (
2492 Token
! [ ?
](tokens_helper(_visitor
, &(_binding_0
).0)),
2497 # [ cfg ( feature = "full" ) ]
2498 pub fn fold_trait_item
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TraitItem
) -> TraitItem
{
2500 TraitItem
::Const(_binding_0
, ) => {
2502 _visitor
.fold_trait_item_const(_binding_0
),
2505 TraitItem
::Method(_binding_0
, ) => {
2507 _visitor
.fold_trait_item_method(_binding_0
),
2510 TraitItem
::Type(_binding_0
, ) => {
2512 _visitor
.fold_trait_item_type(_binding_0
),
2515 TraitItem
::Macro(_binding_0
, ) => {
2517 _visitor
.fold_trait_item_macro(_binding_0
),
2520 TraitItem
::Verbatim(_binding_0
, ) => {
2521 TraitItem
::Verbatim (
2522 _visitor
.fold_trait_item_verbatim(_binding_0
),
2527 # [ cfg ( feature = "full" ) ]
2528 pub fn fold_trait_item_const
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TraitItemConst
) -> TraitItemConst
{
2530 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
2531 const_token
: Token
! [ const ](tokens_helper(_visitor
, &(_i
. const_token
).0)),
2532 ident
: _visitor
.fold_ident(_i
. ident
),
2533 colon_token
: Token
! [ : ](tokens_helper(_visitor
, &(_i
. colon_token
).0)),
2534 ty
: _visitor
.fold_type(_i
. ty
),
2535 default: (_i
. default).map(|it
| { (
2536 Token
! [ = ](tokens_helper(_visitor
, &(( it
) . 0).0)),
2537 _visitor
.fold_expr(( it
) . 1),
2539 semi_token
: Token
! [ ; ](tokens_helper(_visitor
, &(_i
. semi_token
).0)),
2542 # [ cfg ( feature = "full" ) ]
2543 pub fn fold_trait_item_macro
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TraitItemMacro
) -> TraitItemMacro
{
2545 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
2546 mac
: _visitor
.fold_macro(_i
. mac
),
2547 semi_token
: (_i
. semi_token
).map(|it
| { Token ! [ ; ](tokens_helper(_visitor, &(it).0)) }
),
2550 # [ cfg ( feature = "full" ) ]
2551 pub fn fold_trait_item_method
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TraitItemMethod
) -> TraitItemMethod
{
2553 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
2554 sig
: _visitor
.fold_method_sig(_i
. sig
),
2555 default: (_i
. default).map(|it
| { _visitor.fold_block(it) }
),
2556 semi_token
: (_i
. semi_token
).map(|it
| { Token ! [ ; ](tokens_helper(_visitor, &(it).0)) }
),
2559 # [ cfg ( feature = "full" ) ]
2560 pub fn fold_trait_item_type
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TraitItemType
) -> TraitItemType
{
2562 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
2563 type_token
: Token
! [ type ](tokens_helper(_visitor
, &(_i
. type_token
).0)),
2564 ident
: _visitor
.fold_ident(_i
. ident
),
2565 generics
: _visitor
.fold_generics(_i
. generics
),
2566 colon_token
: (_i
. colon_token
).map(|it
| { Token ! [ : ](tokens_helper(_visitor, &(it).0)) }
),
2567 bounds
: FoldHelper
::lift(_i
. bounds
, |it
| { _visitor.fold_type_param_bound(it) }
),
2568 default: (_i
. default).map(|it
| { (
2569 Token
! [ = ](tokens_helper(_visitor
, &(( it
) . 0).0)),
2570 _visitor
.fold_type(( it
) . 1),
2572 semi_token
: Token
! [ ; ](tokens_helper(_visitor
, &(_i
. semi_token
).0)),
2575 # [ cfg ( feature = "full" ) ]
2576 pub fn fold_trait_item_verbatim
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TraitItemVerbatim
) -> TraitItemVerbatim
{
2581 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2582 pub fn fold_type
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Type
) -> Type
{
2584 Type
::Slice(_binding_0
, ) => {
2586 _visitor
.fold_type_slice(_binding_0
),
2589 Type
::Array(_binding_0
, ) => {
2591 _visitor
.fold_type_array(_binding_0
),
2594 Type
::Ptr(_binding_0
, ) => {
2596 _visitor
.fold_type_ptr(_binding_0
),
2599 Type
::Reference(_binding_0
, ) => {
2601 _visitor
.fold_type_reference(_binding_0
),
2604 Type
::BareFn(_binding_0
, ) => {
2606 _visitor
.fold_type_bare_fn(_binding_0
),
2609 Type
::Never(_binding_0
, ) => {
2611 _visitor
.fold_type_never(_binding_0
),
2614 Type
::Tuple(_binding_0
, ) => {
2616 _visitor
.fold_type_tuple(_binding_0
),
2619 Type
::Path(_binding_0
, ) => {
2621 _visitor
.fold_type_path(_binding_0
),
2624 Type
::TraitObject(_binding_0
, ) => {
2626 _visitor
.fold_type_trait_object(_binding_0
),
2629 Type
::ImplTrait(_binding_0
, ) => {
2631 _visitor
.fold_type_impl_trait(_binding_0
),
2634 Type
::Paren(_binding_0
, ) => {
2636 _visitor
.fold_type_paren(_binding_0
),
2639 Type
::Group(_binding_0
, ) => {
2641 _visitor
.fold_type_group(_binding_0
),
2644 Type
::Infer(_binding_0
, ) => {
2646 _visitor
.fold_type_infer(_binding_0
),
2649 Type
::Macro(_binding_0
, ) => {
2651 _visitor
.fold_type_macro(_binding_0
),
2654 Type
::Verbatim(_binding_0
, ) => {
2656 _visitor
.fold_type_verbatim(_binding_0
),
2661 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2662 pub fn fold_type_array
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TypeArray
) -> TypeArray
{
2664 bracket_token
: Bracket(tokens_helper(_visitor
, &(_i
. bracket_token
).0)),
2665 elem
: Box
::new(_visitor
.fold_type(* _i
. elem
)),
2666 semi_token
: Token
! [ ; ](tokens_helper(_visitor
, &(_i
. semi_token
).0)),
2667 len
: _visitor
.fold_expr(_i
. len
),
2670 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2671 pub fn fold_type_bare_fn
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TypeBareFn
) -> TypeBareFn
{
2673 unsafety
: (_i
. unsafety
).map(|it
| { Token ! [ unsafe ](tokens_helper(_visitor, &(it).0)) }
),
2674 abi
: (_i
. abi
).map(|it
| { _visitor.fold_abi(it) }
),
2675 fn_token
: Token
! [ fn ](tokens_helper(_visitor
, &(_i
. fn_token
).0)),
2676 lifetimes
: (_i
. lifetimes
).map(|it
| { _visitor.fold_bound_lifetimes(it) }
),
2677 paren_token
: Paren(tokens_helper(_visitor
, &(_i
. paren_token
).0)),
2678 inputs
: FoldHelper
::lift(_i
. inputs
, |it
| { _visitor.fold_bare_fn_arg(it) }
),
2679 variadic
: (_i
. variadic
).map(|it
| { Token ! [ ... ](tokens_helper(_visitor, &(it).0)) }
),
2680 output
: _visitor
.fold_return_type(_i
. output
),
2683 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2684 pub fn fold_type_group
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TypeGroup
) -> TypeGroup
{
2686 group_token
: Group(tokens_helper(_visitor
, &(_i
. group_token
).0)),
2687 elem
: Box
::new(_visitor
.fold_type(* _i
. elem
)),
2690 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2691 pub fn fold_type_impl_trait
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TypeImplTrait
) -> TypeImplTrait
{
2693 impl_token
: Token
! [ impl ](tokens_helper(_visitor
, &(_i
. impl_token
).0)),
2694 bounds
: FoldHelper
::lift(_i
. bounds
, |it
| { _visitor.fold_type_param_bound(it) }
),
2697 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2698 pub fn fold_type_infer
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TypeInfer
) -> TypeInfer
{
2700 underscore_token
: Token
! [ _
](tokens_helper(_visitor
, &(_i
. underscore_token
).0)),
2703 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2704 pub fn fold_type_macro
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TypeMacro
) -> TypeMacro
{
2706 mac
: _visitor
.fold_macro(_i
. mac
),
2709 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2710 pub fn fold_type_never
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TypeNever
) -> TypeNever
{
2712 bang_token
: Token
! [ ! ](tokens_helper(_visitor
, &(_i
. bang_token
).0)),
2715 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2716 pub fn fold_type_param
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TypeParam
) -> TypeParam
{
2718 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
2719 ident
: _visitor
.fold_ident(_i
. ident
),
2720 colon_token
: (_i
. colon_token
).map(|it
| { Token ! [ : ](tokens_helper(_visitor, &(it).0)) }
),
2721 bounds
: FoldHelper
::lift(_i
. bounds
, |it
| { _visitor.fold_type_param_bound(it) }
),
2722 eq_token
: (_i
. eq_token
).map(|it
| { Token ! [ = ](tokens_helper(_visitor, &(it).0)) }
),
2723 default: (_i
. default).map(|it
| { _visitor.fold_type(it) }
),
2726 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2727 pub fn fold_type_param_bound
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TypeParamBound
) -> TypeParamBound
{
2729 TypeParamBound
::Trait(_binding_0
, ) => {
2730 TypeParamBound
::Trait (
2731 _visitor
.fold_trait_bound(_binding_0
),
2734 TypeParamBound
::Lifetime(_binding_0
, ) => {
2735 TypeParamBound
::Lifetime (
2736 _visitor
.fold_lifetime(_binding_0
),
2741 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2742 pub fn fold_type_paren
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TypeParen
) -> TypeParen
{
2744 paren_token
: Paren(tokens_helper(_visitor
, &(_i
. paren_token
).0)),
2745 elem
: Box
::new(_visitor
.fold_type(* _i
. elem
)),
2748 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2749 pub fn fold_type_path
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TypePath
) -> TypePath
{
2751 qself
: (_i
. qself
).map(|it
| { _visitor.fold_qself(it) }
),
2752 path
: _visitor
.fold_path(_i
. path
),
2755 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2756 pub fn fold_type_ptr
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TypePtr
) -> TypePtr
{
2758 star_token
: Token
! [ * ](tokens_helper(_visitor
, &(_i
. star_token
).0)),
2759 const_token
: (_i
. const_token
).map(|it
| { Token ! [ const ](tokens_helper(_visitor, &(it).0)) }
),
2760 mutability
: (_i
. mutability
).map(|it
| { Token ! [ mut ](tokens_helper(_visitor, &(it).0)) }
),
2761 elem
: Box
::new(_visitor
.fold_type(* _i
. elem
)),
2764 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2765 pub fn fold_type_reference
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TypeReference
) -> TypeReference
{
2767 and_token
: Token
! [ & ](tokens_helper(_visitor
, &(_i
. and_token
).0)),
2768 lifetime
: (_i
. lifetime
).map(|it
| { _visitor.fold_lifetime(it) }
),
2769 mutability
: (_i
. mutability
).map(|it
| { Token ! [ mut ](tokens_helper(_visitor, &(it).0)) }
),
2770 elem
: Box
::new(_visitor
.fold_type(* _i
. elem
)),
2773 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2774 pub fn fold_type_slice
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TypeSlice
) -> TypeSlice
{
2776 bracket_token
: Bracket(tokens_helper(_visitor
, &(_i
. bracket_token
).0)),
2777 elem
: Box
::new(_visitor
.fold_type(* _i
. elem
)),
2780 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2781 pub fn fold_type_trait_object
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TypeTraitObject
) -> TypeTraitObject
{
2783 dyn_token
: (_i
. dyn_token
).map(|it
| { Token ! [ dyn ](tokens_helper(_visitor, &(it).0)) }
),
2784 bounds
: FoldHelper
::lift(_i
. bounds
, |it
| { _visitor.fold_type_param_bound(it) }
),
2787 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2788 pub fn fold_type_tuple
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TypeTuple
) -> TypeTuple
{
2790 paren_token
: Paren(tokens_helper(_visitor
, &(_i
. paren_token
).0)),
2791 elems
: FoldHelper
::lift(_i
. elems
, |it
| { _visitor.fold_type(it) }
),
2794 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2795 pub fn fold_type_verbatim
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: TypeVerbatim
) -> TypeVerbatim
{
2800 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2801 pub fn fold_un_op
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: UnOp
) -> UnOp
{
2803 UnOp
::Deref(_binding_0
, ) => {
2805 Token
! [ * ](tokens_helper(_visitor
, &(_binding_0
).0)),
2808 UnOp
::Not(_binding_0
, ) => {
2810 Token
! [ ! ](tokens_helper(_visitor
, &(_binding_0
).0)),
2813 UnOp
::Neg(_binding_0
, ) => {
2815 Token
! [ - ](tokens_helper(_visitor
, &(_binding_0
).0)),
2820 # [ cfg ( feature = "full" ) ]
2821 pub fn fold_use_glob
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: UseGlob
) -> UseGlob
{
2823 star_token
: Token
! [ * ](tokens_helper(_visitor
, &(_i
. star_token
).0)),
2826 # [ cfg ( feature = "full" ) ]
2827 pub fn fold_use_list
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: UseList
) -> UseList
{
2829 brace_token
: Brace(tokens_helper(_visitor
, &(_i
. brace_token
).0)),
2830 items
: FoldHelper
::lift(_i
. items
, |it
| { _visitor.fold_use_tree(it) }
),
2833 # [ cfg ( feature = "full" ) ]
2834 pub fn fold_use_path
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: UsePath
) -> UsePath
{
2836 ident
: _visitor
.fold_ident(_i
. ident
),
2837 rename
: (_i
. rename
).map(|it
| { (
2838 Token
! [ as ](tokens_helper(_visitor
, &(( it
) . 0).0)),
2839 _visitor
.fold_ident(( it
) . 1),
2843 # [ cfg ( feature = "full" ) ]
2844 pub fn fold_use_tree
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: UseTree
) -> UseTree
{
2846 UseTree
::Path(_binding_0
, ) => {
2848 _visitor
.fold_use_path(_binding_0
),
2851 UseTree
::Glob(_binding_0
, ) => {
2853 _visitor
.fold_use_glob(_binding_0
),
2856 UseTree
::List(_binding_0
, ) => {
2858 _visitor
.fold_use_list(_binding_0
),
2863 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2864 pub fn fold_variant
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Variant
) -> Variant
{
2866 attrs
: FoldHelper
::lift(_i
. attrs
, |it
| { _visitor.fold_attribute(it) }
),
2867 ident
: _visitor
.fold_ident(_i
. ident
),
2868 fields
: _visitor
.fold_fields(_i
. fields
),
2869 discriminant
: (_i
. discriminant
).map(|it
| { (
2870 Token
! [ = ](tokens_helper(_visitor
, &(( it
) . 0).0)),
2871 _visitor
.fold_expr(( it
) . 1),
2875 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2876 pub fn fold_vis_crate
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: VisCrate
) -> VisCrate
{
2878 pub_token
: Token
! [ pub ](tokens_helper(_visitor
, &(_i
. pub_token
).0)),
2879 paren_token
: Paren(tokens_helper(_visitor
, &(_i
. paren_token
).0)),
2880 crate_token
: Token
! [ crate ](tokens_helper(_visitor
, &(_i
. crate_token
).0)),
2883 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2884 pub fn fold_vis_public
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: VisPublic
) -> VisPublic
{
2886 pub_token
: Token
! [ pub ](tokens_helper(_visitor
, &(_i
. pub_token
).0)),
2889 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2890 pub fn fold_vis_restricted
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: VisRestricted
) -> VisRestricted
{
2892 pub_token
: Token
! [ pub ](tokens_helper(_visitor
, &(_i
. pub_token
).0)),
2893 paren_token
: Paren(tokens_helper(_visitor
, &(_i
. paren_token
).0)),
2894 in_token
: (_i
. in_token
).map(|it
| { Token ! [ in ](tokens_helper(_visitor, &(it).0)) }
),
2895 path
: Box
::new(_visitor
.fold_path(* _i
. path
)),
2898 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2899 pub fn fold_visibility
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: Visibility
) -> Visibility
{
2901 Visibility
::Public(_binding_0
, ) => {
2902 Visibility
::Public (
2903 _visitor
.fold_vis_public(_binding_0
),
2906 Visibility
::Crate(_binding_0
, ) => {
2908 _visitor
.fold_vis_crate(_binding_0
),
2911 Visibility
::Restricted(_binding_0
, ) => {
2912 Visibility
::Restricted (
2913 _visitor
.fold_vis_restricted(_binding_0
),
2916 Visibility
::Inherited
=> { Visibility::Inherited }
2919 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2920 pub fn fold_where_clause
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: WhereClause
) -> WhereClause
{
2922 where_token
: Token
! [ where ](tokens_helper(_visitor
, &(_i
. where_token
).0)),
2923 predicates
: FoldHelper
::lift(_i
. predicates
, |it
| { _visitor.fold_where_predicate(it) }
),
2926 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2927 pub fn fold_where_predicate
<V
: Fold
+ ?Sized
>(_visitor
: &mut V
, _i
: WherePredicate
) -> WherePredicate
{
2929 WherePredicate
::Type(_binding_0
, ) => {
2930 WherePredicate
::Type (
2931 _visitor
.fold_predicate_type(_binding_0
),
2934 WherePredicate
::Lifetime(_binding_0
, ) => {
2935 WherePredicate
::Lifetime (
2936 _visitor
.fold_predicate_lifetime(_binding_0
),
2939 WherePredicate
::Eq(_binding_0
, ) => {
2940 WherePredicate
::Eq (
2941 _visitor
.fold_predicate_eq(_binding_0
),