blob: 6f5e77f5867006aaff6b0c80796c64aa5ddeec56 [file] [log] [blame]
Nika Layzell27726662017-10-24 23:16:35 -04001
2// THIS FILE IS AUTOMATICALLY GENERATED; DO NOT EDIT
3
4//! A Folder represents an AST->AST fold; it accepts an AST piece,
5//! and returns a piece of the same type.
6
7// Unreachable code is generated sometimes without the full feature.
8#![allow(unreachable_code)]
9
10use super::*;
11use synom::delimited::Delimited;
12
13trait FoldHelper {
14 type Item;
15 fn lift<F>(self, f: F) -> Self where F: FnMut(Self::Item) -> Self::Item;
16}
17
18impl<T> FoldHelper for Vec<T> {
19 type Item = T;
20 fn lift<F>(self, f: F) -> Self where F: FnMut(Self::Item) -> Self::Item {
21 self.into_iter().map(f).collect()
22 }
23}
24
25impl<T, U> FoldHelper for Delimited<T, U> {
26 type Item = T;
27 fn lift<F>(self, mut f: F) -> Self where F: FnMut(Self::Item) -> Self::Item {
28 self.into_iter().map(|elem| {
29 let (t, u) = elem.into_tuple();
30 (f(t), u)
31 }).collect::<Vec<(T, Option<U>)>>().into()
32 }
33}
34
Nika Layzell4ab8d6e2017-10-26 09:45:49 -040035
36#[cfg(feature = "full")]
37macro_rules! full {
38 ($e:expr) => { $e }
39}
40
41#[cfg(not(feature = "full"))]
42macro_rules! full {
43 ($e:expr) => { unreachable!() }
44}
45
46
Nika Layzell27726662017-10-24 23:16:35 -040047/// AST->AST fold.
48///
49/// Each method of the Folder trait is a hook to be potentially overridden. Each
50/// method's default implementation recursively visits the substructure of the
51/// input via the `walk` functions, which perform an "identity fold", that
52/// is, they return the same structure that they are given (for example the
53/// `fold_file` method by default calls `fold::walk_file`).
54///
55/// If you want to ensure that your code handles every variant
56/// explicitly, you need to override each method. (And you also need
57/// to monitor future changes to `Folder` in case a new method with a
58/// new default implementation gets introduced.)
59pub trait Folder {
60
61fn fold_abi(&mut self, i: Abi) -> Abi { walk_abi(self, i) }
62
63fn fold_abi_kind(&mut self, i: AbiKind) -> AbiKind { walk_abi_kind(self, i) }
64
65fn fold_angle_bracketed_parameter_data(&mut self, i: AngleBracketedParameterData) -> AngleBracketedParameterData { walk_angle_bracketed_parameter_data(self, i) }
66# [ cfg ( feature = "full" ) ]
67fn fold_arg_captured(&mut self, i: ArgCaptured) -> ArgCaptured { walk_arg_captured(self, i) }
68# [ cfg ( feature = "full" ) ]
69fn fold_arg_self(&mut self, i: ArgSelf) -> ArgSelf { walk_arg_self(self, i) }
70# [ cfg ( feature = "full" ) ]
71fn fold_arg_self_ref(&mut self, i: ArgSelfRef) -> ArgSelfRef { walk_arg_self_ref(self, i) }
72# [ cfg ( feature = "full" ) ]
73fn fold_arm(&mut self, i: Arm) -> Arm { walk_arm(self, i) }
74
75fn fold_attr_style(&mut self, i: AttrStyle) -> AttrStyle { walk_attr_style(self, i) }
76
77fn fold_attribute(&mut self, i: Attribute) -> Attribute { walk_attribute(self, i) }
78
79fn fold_bare_fn_arg(&mut self, i: BareFnArg) -> BareFnArg { walk_bare_fn_arg(self, i) }
80
81fn fold_bare_fn_arg_name(&mut self, i: BareFnArgName) -> BareFnArgName { walk_bare_fn_arg_name(self, i) }
82
83fn fold_bare_fn_ty(&mut self, i: BareFnTy) -> BareFnTy { walk_bare_fn_ty(self, i) }
84
85fn fold_bin_op(&mut self, i: BinOp) -> BinOp { walk_bin_op(self, i) }
86# [ cfg ( feature = "full" ) ]
87fn fold_binding_mode(&mut self, i: BindingMode) -> BindingMode { walk_binding_mode(self, i) }
88# [ cfg ( feature = "full" ) ]
89fn fold_block(&mut self, i: Block) -> Block { walk_block(self, i) }
90
91fn fold_body(&mut self, i: Body) -> Body { walk_body(self, i) }
92
93fn fold_body_enum(&mut self, i: BodyEnum) -> BodyEnum { walk_body_enum(self, i) }
94
95fn fold_body_struct(&mut self, i: BodyStruct) -> BodyStruct { walk_body_struct(self, i) }
96
97fn fold_bound_lifetimes(&mut self, i: BoundLifetimes) -> BoundLifetimes { walk_bound_lifetimes(self, i) }
98# [ cfg ( feature = "full" ) ]
99fn fold_capture_by(&mut self, i: CaptureBy) -> CaptureBy { walk_capture_by(self, i) }
100# [ cfg ( feature = "full" ) ]
101fn fold_constness(&mut self, i: Constness) -> Constness { walk_constness(self, i) }
102# [ cfg ( feature = "full" ) ]
103fn fold_defaultness(&mut self, i: Defaultness) -> Defaultness { walk_defaultness(self, i) }
104
105fn fold_derive_input(&mut self, i: DeriveInput) -> DeriveInput { walk_derive_input(self, i) }
106
107fn fold_expr(&mut self, i: Expr) -> Expr { walk_expr(self, i) }
108# [ cfg ( feature = "full" ) ]
109fn fold_expr_addr_of(&mut self, i: ExprAddrOf) -> ExprAddrOf { walk_expr_addr_of(self, i) }
110# [ cfg ( feature = "full" ) ]
111fn fold_expr_array(&mut self, i: ExprArray) -> ExprArray { walk_expr_array(self, i) }
112# [ cfg ( feature = "full" ) ]
113fn fold_expr_assign(&mut self, i: ExprAssign) -> ExprAssign { walk_expr_assign(self, i) }
114# [ cfg ( feature = "full" ) ]
115fn fold_expr_assign_op(&mut self, i: ExprAssignOp) -> ExprAssignOp { walk_expr_assign_op(self, i) }
116
117fn fold_expr_binary(&mut self, i: ExprBinary) -> ExprBinary { walk_expr_binary(self, i) }
118# [ cfg ( feature = "full" ) ]
119fn fold_expr_block(&mut self, i: ExprBlock) -> ExprBlock { walk_expr_block(self, i) }
120# [ cfg ( feature = "full" ) ]
121fn fold_expr_box(&mut self, i: ExprBox) -> ExprBox { walk_expr_box(self, i) }
122# [ cfg ( feature = "full" ) ]
123fn fold_expr_break(&mut self, i: ExprBreak) -> ExprBreak { walk_expr_break(self, i) }
124
125fn fold_expr_call(&mut self, i: ExprCall) -> ExprCall { walk_expr_call(self, i) }
126
127fn fold_expr_cast(&mut self, i: ExprCast) -> ExprCast { walk_expr_cast(self, i) }
128# [ cfg ( feature = "full" ) ]
129fn fold_expr_catch(&mut self, i: ExprCatch) -> ExprCatch { walk_expr_catch(self, i) }
130# [ cfg ( feature = "full" ) ]
131fn fold_expr_closure(&mut self, i: ExprClosure) -> ExprClosure { walk_expr_closure(self, i) }
132# [ cfg ( feature = "full" ) ]
133fn fold_expr_continue(&mut self, i: ExprContinue) -> ExprContinue { walk_expr_continue(self, i) }
134# [ cfg ( feature = "full" ) ]
135fn fold_expr_field(&mut self, i: ExprField) -> ExprField { walk_expr_field(self, i) }
136# [ cfg ( feature = "full" ) ]
137fn fold_expr_for_loop(&mut self, i: ExprForLoop) -> ExprForLoop { walk_expr_for_loop(self, i) }
138
139fn fold_expr_group(&mut self, i: ExprGroup) -> ExprGroup { walk_expr_group(self, i) }
140# [ cfg ( feature = "full" ) ]
141fn fold_expr_if(&mut self, i: ExprIf) -> ExprIf { walk_expr_if(self, i) }
142# [ cfg ( feature = "full" ) ]
143fn fold_expr_if_let(&mut self, i: ExprIfLet) -> ExprIfLet { walk_expr_if_let(self, i) }
144# [ cfg ( feature = "full" ) ]
145fn fold_expr_in_place(&mut self, i: ExprInPlace) -> ExprInPlace { walk_expr_in_place(self, i) }
146
147fn fold_expr_index(&mut self, i: ExprIndex) -> ExprIndex { walk_expr_index(self, i) }
148
149fn fold_expr_kind(&mut self, i: ExprKind) -> ExprKind { walk_expr_kind(self, i) }
150# [ cfg ( feature = "full" ) ]
151fn fold_expr_loop(&mut self, i: ExprLoop) -> ExprLoop { walk_expr_loop(self, i) }
152# [ cfg ( feature = "full" ) ]
153fn fold_expr_match(&mut self, i: ExprMatch) -> ExprMatch { walk_expr_match(self, i) }
154# [ cfg ( feature = "full" ) ]
155fn fold_expr_method_call(&mut self, i: ExprMethodCall) -> ExprMethodCall { walk_expr_method_call(self, i) }
156
157fn fold_expr_paren(&mut self, i: ExprParen) -> ExprParen { walk_expr_paren(self, i) }
158
159fn fold_expr_path(&mut self, i: ExprPath) -> ExprPath { walk_expr_path(self, i) }
160# [ cfg ( feature = "full" ) ]
161fn fold_expr_range(&mut self, i: ExprRange) -> ExprRange { walk_expr_range(self, i) }
162# [ cfg ( feature = "full" ) ]
163fn fold_expr_repeat(&mut self, i: ExprRepeat) -> ExprRepeat { walk_expr_repeat(self, i) }
164# [ cfg ( feature = "full" ) ]
165fn fold_expr_ret(&mut self, i: ExprRet) -> ExprRet { walk_expr_ret(self, i) }
166# [ cfg ( feature = "full" ) ]
167fn fold_expr_struct(&mut self, i: ExprStruct) -> ExprStruct { walk_expr_struct(self, i) }
168# [ cfg ( feature = "full" ) ]
169fn fold_expr_try(&mut self, i: ExprTry) -> ExprTry { walk_expr_try(self, i) }
170# [ cfg ( feature = "full" ) ]
171fn fold_expr_tup(&mut self, i: ExprTup) -> ExprTup { walk_expr_tup(self, i) }
172# [ cfg ( feature = "full" ) ]
173fn fold_expr_tup_field(&mut self, i: ExprTupField) -> ExprTupField { walk_expr_tup_field(self, i) }
174
175fn fold_expr_type(&mut self, i: ExprType) -> ExprType { walk_expr_type(self, i) }
176
177fn fold_expr_unary(&mut self, i: ExprUnary) -> ExprUnary { walk_expr_unary(self, i) }
178# [ cfg ( feature = "full" ) ]
179fn fold_expr_while(&mut self, i: ExprWhile) -> ExprWhile { walk_expr_while(self, i) }
180# [ cfg ( feature = "full" ) ]
181fn fold_expr_while_let(&mut self, i: ExprWhileLet) -> ExprWhileLet { walk_expr_while_let(self, i) }
182# [ cfg ( feature = "full" ) ]
183fn fold_expr_yield(&mut self, i: ExprYield) -> ExprYield { walk_expr_yield(self, i) }
184
185fn fold_field(&mut self, i: Field) -> Field { walk_field(self, i) }
186# [ cfg ( feature = "full" ) ]
187fn fold_field_pat(&mut self, i: FieldPat) -> FieldPat { walk_field_pat(self, i) }
188# [ cfg ( feature = "full" ) ]
189fn fold_field_value(&mut self, i: FieldValue) -> FieldValue { walk_field_value(self, i) }
190# [ cfg ( feature = "full" ) ]
191fn fold_file(&mut self, i: File) -> File { walk_file(self, i) }
192# [ cfg ( feature = "full" ) ]
193fn fold_fn_arg(&mut self, i: FnArg) -> FnArg { walk_fn_arg(self, i) }
194# [ cfg ( feature = "full" ) ]
195fn fold_fn_decl(&mut self, i: FnDecl) -> FnDecl { walk_fn_decl(self, i) }
196# [ cfg ( feature = "full" ) ]
197fn fold_foreign_item(&mut self, i: ForeignItem) -> ForeignItem { walk_foreign_item(self, i) }
198# [ cfg ( feature = "full" ) ]
199fn fold_foreign_item_fn(&mut self, i: ForeignItemFn) -> ForeignItemFn { walk_foreign_item_fn(self, i) }
200# [ cfg ( feature = "full" ) ]
201fn fold_foreign_item_kind(&mut self, i: ForeignItemKind) -> ForeignItemKind { walk_foreign_item_kind(self, i) }
202# [ cfg ( feature = "full" ) ]
203fn fold_foreign_item_static(&mut self, i: ForeignItemStatic) -> ForeignItemStatic { walk_foreign_item_static(self, i) }
204
205fn fold_function_ret_ty(&mut self, i: FunctionRetTy) -> FunctionRetTy { walk_function_ret_ty(self, i) }
206
207fn fold_generics(&mut self, i: Generics) -> Generics { walk_generics(self, i) }
208# [ cfg ( feature = "full" ) ]
209fn fold_impl_item(&mut self, i: ImplItem) -> ImplItem { walk_impl_item(self, i) }
210# [ cfg ( feature = "full" ) ]
211fn fold_impl_item_const(&mut self, i: ImplItemConst) -> ImplItemConst { walk_impl_item_const(self, i) }
212# [ cfg ( feature = "full" ) ]
213fn fold_impl_item_kind(&mut self, i: ImplItemKind) -> ImplItemKind { walk_impl_item_kind(self, i) }
214# [ cfg ( feature = "full" ) ]
215fn fold_impl_item_method(&mut self, i: ImplItemMethod) -> ImplItemMethod { walk_impl_item_method(self, i) }
216# [ cfg ( feature = "full" ) ]
217fn fold_impl_item_type(&mut self, i: ImplItemType) -> ImplItemType { walk_impl_item_type(self, i) }
218# [ cfg ( feature = "full" ) ]
219fn fold_impl_polarity(&mut self, i: ImplPolarity) -> ImplPolarity { walk_impl_polarity(self, i) }
220# [ cfg ( feature = "full" ) ]
221fn fold_in_place_kind(&mut self, i: InPlaceKind) -> InPlaceKind { walk_in_place_kind(self, i) }
222# [ cfg ( feature = "full" ) ]
223fn fold_item(&mut self, i: Item) -> Item { walk_item(self, i) }
224# [ cfg ( feature = "full" ) ]
225fn fold_item_const(&mut self, i: ItemConst) -> ItemConst { walk_item_const(self, i) }
226# [ cfg ( feature = "full" ) ]
227fn fold_item_default_impl(&mut self, i: ItemDefaultImpl) -> ItemDefaultImpl { walk_item_default_impl(self, i) }
228# [ cfg ( feature = "full" ) ]
229fn fold_item_enum(&mut self, i: ItemEnum) -> ItemEnum { walk_item_enum(self, i) }
230# [ cfg ( feature = "full" ) ]
231fn fold_item_extern_crate(&mut self, i: ItemExternCrate) -> ItemExternCrate { walk_item_extern_crate(self, i) }
232# [ cfg ( feature = "full" ) ]
233fn fold_item_fn(&mut self, i: ItemFn) -> ItemFn { walk_item_fn(self, i) }
234# [ cfg ( feature = "full" ) ]
235fn fold_item_foreign_mod(&mut self, i: ItemForeignMod) -> ItemForeignMod { walk_item_foreign_mod(self, i) }
236# [ cfg ( feature = "full" ) ]
237fn fold_item_impl(&mut self, i: ItemImpl) -> ItemImpl { walk_item_impl(self, i) }
238# [ cfg ( feature = "full" ) ]
239fn fold_item_kind(&mut self, i: ItemKind) -> ItemKind { walk_item_kind(self, i) }
240# [ cfg ( feature = "full" ) ]
241fn fold_item_mod(&mut self, i: ItemMod) -> ItemMod { walk_item_mod(self, i) }
242# [ cfg ( feature = "full" ) ]
243fn fold_item_static(&mut self, i: ItemStatic) -> ItemStatic { walk_item_static(self, i) }
244# [ cfg ( feature = "full" ) ]
245fn fold_item_struct(&mut self, i: ItemStruct) -> ItemStruct { walk_item_struct(self, i) }
246# [ cfg ( feature = "full" ) ]
247fn fold_item_trait(&mut self, i: ItemTrait) -> ItemTrait { walk_item_trait(self, i) }
248# [ cfg ( feature = "full" ) ]
249fn fold_item_ty(&mut self, i: ItemTy) -> ItemTy { walk_item_ty(self, i) }
250# [ cfg ( feature = "full" ) ]
251fn fold_item_union(&mut self, i: ItemUnion) -> ItemUnion { walk_item_union(self, i) }
252# [ cfg ( feature = "full" ) ]
253fn fold_item_use(&mut self, i: ItemUse) -> ItemUse { walk_item_use(self, i) }
254
255fn fold_lifetime_def(&mut self, i: LifetimeDef) -> LifetimeDef { walk_lifetime_def(self, i) }
256# [ cfg ( feature = "full" ) ]
257fn fold_local(&mut self, i: Local) -> Local { walk_local(self, i) }
258
259fn fold_mac(&mut self, i: Mac) -> Mac { walk_mac(self, i) }
260# [ cfg ( feature = "full" ) ]
261fn fold_mac_stmt_style(&mut self, i: MacStmtStyle) -> MacStmtStyle { walk_mac_stmt_style(self, i) }
262
263fn fold_meta_item(&mut self, i: MetaItem) -> MetaItem { walk_meta_item(self, i) }
264
265fn fold_meta_item_list(&mut self, i: MetaItemList) -> MetaItemList { walk_meta_item_list(self, i) }
266
267fn fold_meta_name_value(&mut self, i: MetaNameValue) -> MetaNameValue { walk_meta_name_value(self, i) }
268# [ cfg ( feature = "full" ) ]
269fn fold_method_sig(&mut self, i: MethodSig) -> MethodSig { walk_method_sig(self, i) }
270
271fn fold_mut_ty(&mut self, i: MutTy) -> MutTy { walk_mut_ty(self, i) }
272
273fn fold_mutability(&mut self, i: Mutability) -> Mutability { walk_mutability(self, i) }
274
275fn fold_nested_meta_item(&mut self, i: NestedMetaItem) -> NestedMetaItem { walk_nested_meta_item(self, i) }
276
277fn fold_parenthesized_parameter_data(&mut self, i: ParenthesizedParameterData) -> ParenthesizedParameterData { walk_parenthesized_parameter_data(self, i) }
278# [ cfg ( feature = "full" ) ]
279fn fold_pat(&mut self, i: Pat) -> Pat { walk_pat(self, i) }
280# [ cfg ( feature = "full" ) ]
281fn fold_pat_box(&mut self, i: PatBox) -> PatBox { walk_pat_box(self, i) }
282# [ cfg ( feature = "full" ) ]
283fn fold_pat_ident(&mut self, i: PatIdent) -> PatIdent { walk_pat_ident(self, i) }
284# [ cfg ( feature = "full" ) ]
285fn fold_pat_lit(&mut self, i: PatLit) -> PatLit { walk_pat_lit(self, i) }
286# [ cfg ( feature = "full" ) ]
287fn fold_pat_path(&mut self, i: PatPath) -> PatPath { walk_pat_path(self, i) }
288# [ cfg ( feature = "full" ) ]
289fn fold_pat_range(&mut self, i: PatRange) -> PatRange { walk_pat_range(self, i) }
290# [ cfg ( feature = "full" ) ]
291fn fold_pat_ref(&mut self, i: PatRef) -> PatRef { walk_pat_ref(self, i) }
292# [ cfg ( feature = "full" ) ]
293fn fold_pat_slice(&mut self, i: PatSlice) -> PatSlice { walk_pat_slice(self, i) }
294# [ cfg ( feature = "full" ) ]
295fn fold_pat_struct(&mut self, i: PatStruct) -> PatStruct { walk_pat_struct(self, i) }
296# [ cfg ( feature = "full" ) ]
297fn fold_pat_tuple(&mut self, i: PatTuple) -> PatTuple { walk_pat_tuple(self, i) }
298# [ cfg ( feature = "full" ) ]
299fn fold_pat_tuple_struct(&mut self, i: PatTupleStruct) -> PatTupleStruct { walk_pat_tuple_struct(self, i) }
300# [ cfg ( feature = "full" ) ]
301fn fold_pat_wild(&mut self, i: PatWild) -> PatWild { walk_pat_wild(self, i) }
302
303fn fold_path(&mut self, i: Path) -> Path { walk_path(self, i) }
304# [ cfg ( feature = "full" ) ]
305fn fold_path_glob(&mut self, i: PathGlob) -> PathGlob { walk_path_glob(self, i) }
306# [ cfg ( feature = "full" ) ]
307fn fold_path_list(&mut self, i: PathList) -> PathList { walk_path_list(self, i) }
308# [ cfg ( feature = "full" ) ]
309fn fold_path_list_item(&mut self, i: PathListItem) -> PathListItem { walk_path_list_item(self, i) }
310
311fn fold_path_parameters(&mut self, i: PathParameters) -> PathParameters { walk_path_parameters(self, i) }
312
313fn fold_path_segment(&mut self, i: PathSegment) -> PathSegment { walk_path_segment(self, i) }
314# [ cfg ( feature = "full" ) ]
315fn fold_path_simple(&mut self, i: PathSimple) -> PathSimple { walk_path_simple(self, i) }
316
317fn fold_poly_trait_ref(&mut self, i: PolyTraitRef) -> PolyTraitRef { walk_poly_trait_ref(self, i) }
318
319fn fold_qself(&mut self, i: QSelf) -> QSelf { walk_qself(self, i) }
320# [ cfg ( feature = "full" ) ]
321fn fold_range_limits(&mut self, i: RangeLimits) -> RangeLimits { walk_range_limits(self, i) }
322# [ cfg ( feature = "full" ) ]
323fn fold_stmt(&mut self, i: Stmt) -> Stmt { walk_stmt(self, i) }
324
325fn fold_trait_bound_modifier(&mut self, i: TraitBoundModifier) -> TraitBoundModifier { walk_trait_bound_modifier(self, i) }
326# [ cfg ( feature = "full" ) ]
327fn fold_trait_item(&mut self, i: TraitItem) -> TraitItem { walk_trait_item(self, i) }
328# [ cfg ( feature = "full" ) ]
329fn fold_trait_item_const(&mut self, i: TraitItemConst) -> TraitItemConst { walk_trait_item_const(self, i) }
330# [ cfg ( feature = "full" ) ]
331fn fold_trait_item_kind(&mut self, i: TraitItemKind) -> TraitItemKind { walk_trait_item_kind(self, i) }
332# [ cfg ( feature = "full" ) ]
333fn fold_trait_item_method(&mut self, i: TraitItemMethod) -> TraitItemMethod { walk_trait_item_method(self, i) }
334# [ cfg ( feature = "full" ) ]
335fn fold_trait_item_type(&mut self, i: TraitItemType) -> TraitItemType { walk_trait_item_type(self, i) }
336
337fn fold_ty(&mut self, i: Ty) -> Ty { walk_ty(self, i) }
338
339fn fold_ty_array(&mut self, i: TyArray) -> TyArray { walk_ty_array(self, i) }
340
341fn fold_ty_bare_fn(&mut self, i: TyBareFn) -> TyBareFn { walk_ty_bare_fn(self, i) }
342
343fn fold_ty_group(&mut self, i: TyGroup) -> TyGroup { walk_ty_group(self, i) }
344
345fn fold_ty_impl_trait(&mut self, i: TyImplTrait) -> TyImplTrait { walk_ty_impl_trait(self, i) }
346
347fn fold_ty_infer(&mut self, i: TyInfer) -> TyInfer { walk_ty_infer(self, i) }
348
349fn fold_ty_never(&mut self, i: TyNever) -> TyNever { walk_ty_never(self, i) }
350
351fn fold_ty_param(&mut self, i: TyParam) -> TyParam { walk_ty_param(self, i) }
352
353fn fold_ty_param_bound(&mut self, i: TyParamBound) -> TyParamBound { walk_ty_param_bound(self, i) }
354
355fn fold_ty_paren(&mut self, i: TyParen) -> TyParen { walk_ty_paren(self, i) }
356
357fn fold_ty_path(&mut self, i: TyPath) -> TyPath { walk_ty_path(self, i) }
358
359fn fold_ty_ptr(&mut self, i: TyPtr) -> TyPtr { walk_ty_ptr(self, i) }
360
361fn fold_ty_rptr(&mut self, i: TyRptr) -> TyRptr { walk_ty_rptr(self, i) }
362
363fn fold_ty_slice(&mut self, i: TySlice) -> TySlice { walk_ty_slice(self, i) }
364
365fn fold_ty_trait_object(&mut self, i: TyTraitObject) -> TyTraitObject { walk_ty_trait_object(self, i) }
366
367fn fold_ty_tup(&mut self, i: TyTup) -> TyTup { walk_ty_tup(self, i) }
368
369fn fold_type_binding(&mut self, i: TypeBinding) -> TypeBinding { walk_type_binding(self, i) }
370
371fn fold_un_op(&mut self, i: UnOp) -> UnOp { walk_un_op(self, i) }
372
373fn fold_unsafety(&mut self, i: Unsafety) -> Unsafety { walk_unsafety(self, i) }
374
375fn fold_variant(&mut self, i: Variant) -> Variant { walk_variant(self, i) }
376
377fn fold_variant_data(&mut self, i: VariantData) -> VariantData { walk_variant_data(self, i) }
378# [ cfg ( feature = "full" ) ]
379fn fold_view_path(&mut self, i: ViewPath) -> ViewPath { walk_view_path(self, i) }
380
381fn fold_vis_crate(&mut self, i: VisCrate) -> VisCrate { walk_vis_crate(self, i) }
382
383fn fold_vis_inherited(&mut self, i: VisInherited) -> VisInherited { walk_vis_inherited(self, i) }
384
385fn fold_vis_public(&mut self, i: VisPublic) -> VisPublic { walk_vis_public(self, i) }
386
387fn fold_vis_restricted(&mut self, i: VisRestricted) -> VisRestricted { walk_vis_restricted(self, i) }
388
389fn fold_visibility(&mut self, i: Visibility) -> Visibility { walk_visibility(self, i) }
390
391fn fold_where_bound_predicate(&mut self, i: WhereBoundPredicate) -> WhereBoundPredicate { walk_where_bound_predicate(self, i) }
392
393fn fold_where_clause(&mut self, i: WhereClause) -> WhereClause { walk_where_clause(self, i) }
394
395fn fold_where_eq_predicate(&mut self, i: WhereEqPredicate) -> WhereEqPredicate { walk_where_eq_predicate(self, i) }
396
397fn fold_where_predicate(&mut self, i: WherePredicate) -> WherePredicate { walk_where_predicate(self, i) }
398
399fn fold_where_region_predicate(&mut self, i: WhereRegionPredicate) -> WhereRegionPredicate { walk_where_region_predicate(self, i) }
400
401}
402
403
404pub fn walk_abi<V: Folder + ?Sized>(_visitor: &mut V, _i: Abi) -> Abi {
405 Abi {
406 extern_token: _i . extern_token,
407 kind: _visitor.fold_abi_kind(_i . kind),
408 }
409}
410
411pub fn walk_abi_kind<V: Folder + ?Sized>(_visitor: &mut V, _i: AbiKind) -> AbiKind {
412 use ::AbiKind::*;
413 match _i {
414 Named(_binding_0, ) => {
415 Named (
416 _binding_0,
417 )
418 }
419 Default => { Default }
420 }
421}
422
423pub fn walk_angle_bracketed_parameter_data<V: Folder + ?Sized>(_visitor: &mut V, _i: AngleBracketedParameterData) -> AngleBracketedParameterData {
424 AngleBracketedParameterData {
425 turbofish: _i . turbofish,
426 lt_token: _i . lt_token,
427 lifetimes: _i . lifetimes,
428 types: FoldHelper::lift(_i . types, |it| { _visitor.fold_ty(it) }),
429 bindings: FoldHelper::lift(_i . bindings, |it| { _visitor.fold_type_binding(it) }),
430 gt_token: _i . gt_token,
431 }
432}
433# [ cfg ( feature = "full" ) ]
434pub fn walk_arg_captured<V: Folder + ?Sized>(_visitor: &mut V, _i: ArgCaptured) -> ArgCaptured {
435 ArgCaptured {
436 pat: _visitor.fold_pat(_i . pat),
437 colon_token: _i . colon_token,
438 ty: _visitor.fold_ty(_i . ty),
439 }
440}
441# [ cfg ( feature = "full" ) ]
442pub fn walk_arg_self<V: Folder + ?Sized>(_visitor: &mut V, _i: ArgSelf) -> ArgSelf {
443 ArgSelf {
444 mutbl: _visitor.fold_mutability(_i . mutbl),
445 self_token: _i . self_token,
446 }
447}
448# [ cfg ( feature = "full" ) ]
449pub fn walk_arg_self_ref<V: Folder + ?Sized>(_visitor: &mut V, _i: ArgSelfRef) -> ArgSelfRef {
450 ArgSelfRef {
451 and_token: _i . and_token,
452 self_token: _i . self_token,
453 lifetime: _i . lifetime,
454 mutbl: _visitor.fold_mutability(_i . mutbl),
455 }
456}
457# [ cfg ( feature = "full" ) ]
458pub fn walk_arm<V: Folder + ?Sized>(_visitor: &mut V, _i: Arm) -> Arm {
459 Arm {
460 attrs: FoldHelper::lift(_i . attrs, |it| { _visitor.fold_attribute(it) }),
461 pats: FoldHelper::lift(_i . pats, |it| { _visitor.fold_pat(it) }),
462 if_token: _i . if_token,
Nika Layzell4ab8d6e2017-10-26 09:45:49 -0400463 guard: (_i . guard).map(|it| { Box::new(_visitor.fold_expr(* it)) }),
Nika Layzell27726662017-10-24 23:16:35 -0400464 rocket_token: _i . rocket_token,
465 body: Box::new(_visitor.fold_expr(* _i . body)),
466 comma: _i . comma,
467 }
468}
469
470pub fn walk_attr_style<V: Folder + ?Sized>(_visitor: &mut V, _i: AttrStyle) -> AttrStyle {
471 use ::AttrStyle::*;
472 match _i {
473 Outer => { Outer }
474 Inner(_binding_0, ) => {
475 Inner (
476 _binding_0,
477 )
478 }
479 }
480}
481
482pub fn walk_attribute<V: Folder + ?Sized>(_visitor: &mut V, _i: Attribute) -> Attribute {
483 Attribute {
484 style: _visitor.fold_attr_style(_i . style),
485 pound_token: _i . pound_token,
486 bracket_token: _i . bracket_token,
487 path: _visitor.fold_path(_i . path),
488 tts: _i . tts,
489 is_sugared_doc: _i . is_sugared_doc,
490 }
491}
492
493pub fn walk_bare_fn_arg<V: Folder + ?Sized>(_visitor: &mut V, _i: BareFnArg) -> BareFnArg {
494 BareFnArg {
495 name: _i . name,
496 ty: _visitor.fold_ty(_i . ty),
497 }
498}
499
500pub fn walk_bare_fn_arg_name<V: Folder + ?Sized>(_visitor: &mut V, _i: BareFnArgName) -> BareFnArgName {
501 use ::BareFnArgName::*;
502 match _i {
503 Named(_binding_0, ) => {
504 Named (
505 _binding_0,
506 )
507 }
508 Wild(_binding_0, ) => {
509 Wild (
510 _binding_0,
511 )
512 }
513 }
514}
515
516pub fn walk_bare_fn_ty<V: Folder + ?Sized>(_visitor: &mut V, _i: BareFnTy) -> BareFnTy {
517 BareFnTy {
Nika Layzell4ab8d6e2017-10-26 09:45:49 -0400518 lifetimes: (_i . lifetimes).map(|it| { _visitor.fold_bound_lifetimes(it) }),
Nika Layzell27726662017-10-24 23:16:35 -0400519 unsafety: _visitor.fold_unsafety(_i . unsafety),
Nika Layzell4ab8d6e2017-10-26 09:45:49 -0400520 abi: (_i . abi).map(|it| { _visitor.fold_abi(it) }),
Nika Layzell27726662017-10-24 23:16:35 -0400521 fn_token: _i . fn_token,
522 paren_token: _i . paren_token,
523 inputs: FoldHelper::lift(_i . inputs, |it| { _visitor.fold_bare_fn_arg(it) }),
524 variadic: _i . variadic,
525 output: _visitor.fold_function_ret_ty(_i . output),
526 }
527}
528
529pub fn walk_bin_op<V: Folder + ?Sized>(_visitor: &mut V, _i: BinOp) -> BinOp {
530 use ::BinOp::*;
531 match _i {
532 Add(_binding_0, ) => {
533 Add (
534 _binding_0,
535 )
536 }
537 Sub(_binding_0, ) => {
538 Sub (
539 _binding_0,
540 )
541 }
542 Mul(_binding_0, ) => {
543 Mul (
544 _binding_0,
545 )
546 }
547 Div(_binding_0, ) => {
548 Div (
549 _binding_0,
550 )
551 }
552 Rem(_binding_0, ) => {
553 Rem (
554 _binding_0,
555 )
556 }
557 And(_binding_0, ) => {
558 And (
559 _binding_0,
560 )
561 }
562 Or(_binding_0, ) => {
563 Or (
564 _binding_0,
565 )
566 }
567 BitXor(_binding_0, ) => {
568 BitXor (
569 _binding_0,
570 )
571 }
572 BitAnd(_binding_0, ) => {
573 BitAnd (
574 _binding_0,
575 )
576 }
577 BitOr(_binding_0, ) => {
578 BitOr (
579 _binding_0,
580 )
581 }
582 Shl(_binding_0, ) => {
583 Shl (
584 _binding_0,
585 )
586 }
587 Shr(_binding_0, ) => {
588 Shr (
589 _binding_0,
590 )
591 }
592 Eq(_binding_0, ) => {
593 Eq (
594 _binding_0,
595 )
596 }
597 Lt(_binding_0, ) => {
598 Lt (
599 _binding_0,
600 )
601 }
602 Le(_binding_0, ) => {
603 Le (
604 _binding_0,
605 )
606 }
607 Ne(_binding_0, ) => {
608 Ne (
609 _binding_0,
610 )
611 }
612 Ge(_binding_0, ) => {
613 Ge (
614 _binding_0,
615 )
616 }
617 Gt(_binding_0, ) => {
618 Gt (
619 _binding_0,
620 )
621 }
622 AddEq(_binding_0, ) => {
623 AddEq (
624 _binding_0,
625 )
626 }
627 SubEq(_binding_0, ) => {
628 SubEq (
629 _binding_0,
630 )
631 }
632 MulEq(_binding_0, ) => {
633 MulEq (
634 _binding_0,
635 )
636 }
637 DivEq(_binding_0, ) => {
638 DivEq (
639 _binding_0,
640 )
641 }
642 RemEq(_binding_0, ) => {
643 RemEq (
644 _binding_0,
645 )
646 }
647 BitXorEq(_binding_0, ) => {
648 BitXorEq (
649 _binding_0,
650 )
651 }
652 BitAndEq(_binding_0, ) => {
653 BitAndEq (
654 _binding_0,
655 )
656 }
657 BitOrEq(_binding_0, ) => {
658 BitOrEq (
659 _binding_0,
660 )
661 }
662 ShlEq(_binding_0, ) => {
663 ShlEq (
664 _binding_0,
665 )
666 }
667 ShrEq(_binding_0, ) => {
668 ShrEq (
669 _binding_0,
670 )
671 }
672 }
673}
674# [ cfg ( feature = "full" ) ]
675pub fn walk_binding_mode<V: Folder + ?Sized>(_visitor: &mut V, _i: BindingMode) -> BindingMode {
676 use ::BindingMode::*;
677 match _i {
678 ByRef(_binding_0, _binding_1, ) => {
679 ByRef (
680 _binding_0,
681 _visitor.fold_mutability(_binding_1),
682 )
683 }
684 ByValue(_binding_0, ) => {
685 ByValue (
686 _visitor.fold_mutability(_binding_0),
687 )
688 }
689 }
690}
691# [ cfg ( feature = "full" ) ]
692pub fn walk_block<V: Folder + ?Sized>(_visitor: &mut V, _i: Block) -> Block {
693 Block {
694 brace_token: _i . brace_token,
695 stmts: FoldHelper::lift(_i . stmts, |it| { _visitor.fold_stmt(it) }),
696 }
697}
698
699pub fn walk_body<V: Folder + ?Sized>(_visitor: &mut V, _i: Body) -> Body {
700 use ::Body::*;
701 match _i {
702 Enum(_binding_0, ) => {
703 Enum (
704 _visitor.fold_body_enum(_binding_0),
705 )
706 }
707 Struct(_binding_0, ) => {
708 Struct (
709 _visitor.fold_body_struct(_binding_0),
710 )
711 }
712 }
713}
714
715pub fn walk_body_enum<V: Folder + ?Sized>(_visitor: &mut V, _i: BodyEnum) -> BodyEnum {
716 BodyEnum {
717 enum_token: _i . enum_token,
718 brace_token: _i . brace_token,
719 variants: FoldHelper::lift(_i . variants, |it| { _visitor.fold_variant(it) }),
720 }
721}
722
723pub fn walk_body_struct<V: Folder + ?Sized>(_visitor: &mut V, _i: BodyStruct) -> BodyStruct {
724 BodyStruct {
725 data: _visitor.fold_variant_data(_i . data),
726 struct_token: _i . struct_token,
727 semi_token: _i . semi_token,
728 }
729}
730
731pub fn walk_bound_lifetimes<V: Folder + ?Sized>(_visitor: &mut V, _i: BoundLifetimes) -> BoundLifetimes {
732 BoundLifetimes {
733 for_token: _i . for_token,
734 lt_token: _i . lt_token,
735 lifetimes: FoldHelper::lift(_i . lifetimes, |it| { _visitor.fold_lifetime_def(it) }),
736 gt_token: _i . gt_token,
737 }
738}
739# [ cfg ( feature = "full" ) ]
740pub fn walk_capture_by<V: Folder + ?Sized>(_visitor: &mut V, _i: CaptureBy) -> CaptureBy {
741 use ::CaptureBy::*;
742 match _i {
743 Value(_binding_0, ) => {
744 Value (
745 _binding_0,
746 )
747 }
748 Ref => { Ref }
749 }
750}
751# [ cfg ( feature = "full" ) ]
752pub fn walk_constness<V: Folder + ?Sized>(_visitor: &mut V, _i: Constness) -> Constness {
753 use ::Constness::*;
754 match _i {
755 Const(_binding_0, ) => {
756 Const (
757 _binding_0,
758 )
759 }
760 NotConst => { NotConst }
761 }
762}
763# [ cfg ( feature = "full" ) ]
764pub fn walk_defaultness<V: Folder + ?Sized>(_visitor: &mut V, _i: Defaultness) -> Defaultness {
765 use ::Defaultness::*;
766 match _i {
767 Default(_binding_0, ) => {
768 Default (
769 _binding_0,
770 )
771 }
772 Final => { Final }
773 }
774}
775
776pub fn walk_derive_input<V: Folder + ?Sized>(_visitor: &mut V, _i: DeriveInput) -> DeriveInput {
777 DeriveInput {
778 ident: _i . ident,
779 vis: _visitor.fold_visibility(_i . vis),
780 attrs: FoldHelper::lift(_i . attrs, |it| { _visitor.fold_attribute(it) }),
781 generics: _visitor.fold_generics(_i . generics),
782 body: _visitor.fold_body(_i . body),
783 }
784}
785
786pub fn walk_expr<V: Folder + ?Sized>(_visitor: &mut V, _i: Expr) -> Expr {
787 Expr {
788 node: _visitor.fold_expr_kind(_i . node),
789 attrs: FoldHelper::lift(_i . attrs, |it| { _visitor.fold_attribute(it) }),
790 }
791}
792# [ cfg ( feature = "full" ) ]
793pub fn walk_expr_addr_of<V: Folder + ?Sized>(_visitor: &mut V, _i: ExprAddrOf) -> ExprAddrOf {
794 ExprAddrOf {
795 and_token: _i . and_token,
796 mutbl: _visitor.fold_mutability(_i . mutbl),
797 expr: Box::new(_visitor.fold_expr(* _i . expr)),
798 }
799}
800# [ cfg ( feature = "full" ) ]
801pub fn walk_expr_array<V: Folder + ?Sized>(_visitor: &mut V, _i: ExprArray) -> ExprArray {
802 ExprArray {
803 exprs: FoldHelper::lift(_i . exprs, |it| { _visitor.fold_expr(it) }),
804 bracket_token: _i . bracket_token,
805 }
806}
807# [ cfg ( feature = "full" ) ]
808pub fn walk_expr_assign<V: Folder + ?Sized>(_visitor: &mut V, _i: ExprAssign) -> ExprAssign {
809 ExprAssign {
810 left: Box::new(_visitor.fold_expr(* _i . left)),
811 right: Box::new(_visitor.fold_expr(* _i . right)),
812 eq_token: _i . eq_token,
813 }
814}
815# [ cfg ( feature = "full" ) ]
816pub fn walk_expr_assign_op<V: Folder + ?Sized>(_visitor: &mut V, _i: ExprAssignOp) -> ExprAssignOp {
817 ExprAssignOp {
818 op: _visitor.fold_bin_op(_i . op),
819 left: Box::new(_visitor.fold_expr(* _i . left)),
820 right: Box::new(_visitor.fold_expr(* _i . right)),
821 }
822}
823
824pub fn walk_expr_binary<V: Folder + ?Sized>(_visitor: &mut V, _i: ExprBinary) -> ExprBinary {
825 ExprBinary {
826 op: _visitor.fold_bin_op(_i . op),
827 left: Box::new(_visitor.fold_expr(* _i . left)),
828 right: Box::new(_visitor.fold_expr(* _i . right)),
829 }
830}
831# [ cfg ( feature = "full" ) ]
832pub fn walk_expr_block<V: Folder + ?Sized>(_visitor: &mut V, _i: ExprBlock) -> ExprBlock {
833 ExprBlock {
834 unsafety: _visitor.fold_unsafety(_i . unsafety),
835 block: _visitor.fold_block(_i . block),
836 }
837}
838# [ cfg ( feature = "full" ) ]
839pub fn walk_expr_box<V: Folder + ?Sized>(_visitor: &mut V, _i: ExprBox) -> ExprBox {
840 ExprBox {
841 expr: Box::new(_visitor.fold_expr(* _i . expr)),
842 box_token: _i . box_token,
843 }
844}
845# [ cfg ( feature = "full" ) ]
846pub fn walk_expr_break<V: Folder + ?Sized>(_visitor: &mut V, _i: ExprBreak) -> ExprBreak {
847 ExprBreak {
848 label: _i . label,
Nika Layzell4ab8d6e2017-10-26 09:45:49 -0400849 expr: (_i . expr).map(|it| { Box::new(_visitor.fold_expr(* it)) }),
Nika Layzell27726662017-10-24 23:16:35 -0400850 break_token: _i . break_token,
851 }
852}
853
854pub fn walk_expr_call<V: Folder + ?Sized>(_visitor: &mut V, _i: ExprCall) -> ExprCall {
855 ExprCall {
856 func: Box::new(_visitor.fold_expr(* _i . func)),
857 args: FoldHelper::lift(_i . args, |it| { _visitor.fold_expr(it) }),
858 paren_token: _i . paren_token,
859 }
860}
861
862pub fn walk_expr_cast<V: Folder + ?Sized>(_visitor: &mut V, _i: ExprCast) -> ExprCast {
863 ExprCast {
864 expr: Box::new(_visitor.fold_expr(* _i . expr)),
865 as_token: _i . as_token,
866 ty: Box::new(_visitor.fold_ty(* _i . ty)),
867 }
868}
869# [ cfg ( feature = "full" ) ]
870pub fn walk_expr_catch<V: Folder + ?Sized>(_visitor: &mut V, _i: ExprCatch) -> ExprCatch {
871 ExprCatch {
872 do_token: _i . do_token,
873 catch_token: _i . catch_token,
874 block: _visitor.fold_block(_i . block),
875 }
876}
877# [ cfg ( feature = "full" ) ]
878pub fn walk_expr_closure<V: Folder + ?Sized>(_visitor: &mut V, _i: ExprClosure) -> ExprClosure {
879 ExprClosure {
880 capture: _visitor.fold_capture_by(_i . capture),
881 decl: Box::new(_visitor.fold_fn_decl(* _i . decl)),
882 body: Box::new(_visitor.fold_expr(* _i . body)),
883 or1_token: _i . or1_token,
884 or2_token: _i . or2_token,
885 }
886}
887# [ cfg ( feature = "full" ) ]
888pub fn walk_expr_continue<V: Folder + ?Sized>(_visitor: &mut V, _i: ExprContinue) -> ExprContinue {
889 ExprContinue {
890 label: _i . label,
891 continue_token: _i . continue_token,
892 }
893}
894# [ cfg ( feature = "full" ) ]
895pub fn walk_expr_field<V: Folder + ?Sized>(_visitor: &mut V, _i: ExprField) -> ExprField {
896 ExprField {
897 expr: Box::new(_visitor.fold_expr(* _i . expr)),
898 field: _i . field,
899 dot_token: _i . dot_token,
900 }
901}
902# [ cfg ( feature = "full" ) ]
903pub fn walk_expr_for_loop<V: Folder + ?Sized>(_visitor: &mut V, _i: ExprForLoop) -> ExprForLoop {
904 ExprForLoop {
905 pat: Box::new(_visitor.fold_pat(* _i . pat)),
906 expr: Box::new(_visitor.fold_expr(* _i . expr)),
907 body: _visitor.fold_block(_i . body),
908 label: _i . label,
909 for_token: _i . for_token,
910 colon_token: _i . colon_token,
911 in_token: _i . in_token,
912 }
913}
914
915pub fn walk_expr_group<V: Folder + ?Sized>(_visitor: &mut V, _i: ExprGroup) -> ExprGroup {
916 ExprGroup {
917 expr: Box::new(_visitor.fold_expr(* _i . expr)),
918 group_token: _i . group_token,
919 }
920}
921# [ cfg ( feature = "full" ) ]
922pub fn walk_expr_if<V: Folder + ?Sized>(_visitor: &mut V, _i: ExprIf) -> ExprIf {
923 ExprIf {
924 cond: Box::new(_visitor.fold_expr(* _i . cond)),
925 if_true: _visitor.fold_block(_i . if_true),
Nika Layzell4ab8d6e2017-10-26 09:45:49 -0400926 if_false: (_i . if_false).map(|it| { Box::new(_visitor.fold_expr(* it)) }),
Nika Layzell27726662017-10-24 23:16:35 -0400927 if_token: _i . if_token,
928 else_token: _i . else_token,
929 }
930}
931# [ cfg ( feature = "full" ) ]
932pub fn walk_expr_if_let<V: Folder + ?Sized>(_visitor: &mut V, _i: ExprIfLet) -> ExprIfLet {
933 ExprIfLet {
934 pat: Box::new(_visitor.fold_pat(* _i . pat)),
935 expr: Box::new(_visitor.fold_expr(* _i . expr)),
936 if_true: _visitor.fold_block(_i . if_true),
Nika Layzell4ab8d6e2017-10-26 09:45:49 -0400937 if_false: (_i . if_false).map(|it| { Box::new(_visitor.fold_expr(* it)) }),
Nika Layzell27726662017-10-24 23:16:35 -0400938 if_token: _i . if_token,
939 let_token: _i . let_token,
940 eq_token: _i . eq_token,
941 else_token: _i . else_token,
942 }
943}
944# [ cfg ( feature = "full" ) ]
945pub fn walk_expr_in_place<V: Folder + ?Sized>(_visitor: &mut V, _i: ExprInPlace) -> ExprInPlace {
946 ExprInPlace {
947 place: Box::new(_visitor.fold_expr(* _i . place)),
948 kind: _visitor.fold_in_place_kind(_i . kind),
949 value: Box::new(_visitor.fold_expr(* _i . value)),
950 }
951}
952
953pub fn walk_expr_index<V: Folder + ?Sized>(_visitor: &mut V, _i: ExprIndex) -> ExprIndex {
954 ExprIndex {
955 expr: Box::new(_visitor.fold_expr(* _i . expr)),
956 index: Box::new(_visitor.fold_expr(* _i . index)),
957 bracket_token: _i . bracket_token,
958 }
959}
960
961pub fn walk_expr_kind<V: Folder + ?Sized>(_visitor: &mut V, _i: ExprKind) -> ExprKind {
962 use ::ExprKind::*;
963 match _i {
964 Box(_binding_0, ) => {
965 Box (
Nika Layzell4ab8d6e2017-10-26 09:45:49 -0400966 full!(_visitor.fold_expr_box(_binding_0)),
Nika Layzell27726662017-10-24 23:16:35 -0400967 )
968 }
969 InPlace(_binding_0, ) => {
970 InPlace (
Nika Layzell4ab8d6e2017-10-26 09:45:49 -0400971 full!(_visitor.fold_expr_in_place(_binding_0)),
Nika Layzell27726662017-10-24 23:16:35 -0400972 )
973 }
974 Array(_binding_0, ) => {
975 Array (
Nika Layzell4ab8d6e2017-10-26 09:45:49 -0400976 full!(_visitor.fold_expr_array(_binding_0)),
Nika Layzell27726662017-10-24 23:16:35 -0400977 )
978 }
979 Call(_binding_0, ) => {
980 Call (
981 _visitor.fold_expr_call(_binding_0),
982 )
983 }
984 MethodCall(_binding_0, ) => {
985 MethodCall (
Nika Layzell4ab8d6e2017-10-26 09:45:49 -0400986 full!(_visitor.fold_expr_method_call(_binding_0)),
Nika Layzell27726662017-10-24 23:16:35 -0400987 )
988 }
989 Tup(_binding_0, ) => {
990 Tup (
Nika Layzell4ab8d6e2017-10-26 09:45:49 -0400991 full!(_visitor.fold_expr_tup(_binding_0)),
Nika Layzell27726662017-10-24 23:16:35 -0400992 )
993 }
994 Binary(_binding_0, ) => {
995 Binary (
996 _visitor.fold_expr_binary(_binding_0),
997 )
998 }
999 Unary(_binding_0, ) => {
1000 Unary (
1001 _visitor.fold_expr_unary(_binding_0),
1002 )
1003 }
1004 Lit(_binding_0, ) => {
1005 Lit (
1006 _binding_0,
1007 )
1008 }
1009 Cast(_binding_0, ) => {
1010 Cast (
1011 _visitor.fold_expr_cast(_binding_0),
1012 )
1013 }
1014 Type(_binding_0, ) => {
1015 Type (
1016 _visitor.fold_expr_type(_binding_0),
1017 )
1018 }
1019 If(_binding_0, ) => {
1020 If (
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04001021 full!(_visitor.fold_expr_if(_binding_0)),
Nika Layzell27726662017-10-24 23:16:35 -04001022 )
1023 }
1024 IfLet(_binding_0, ) => {
1025 IfLet (
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04001026 full!(_visitor.fold_expr_if_let(_binding_0)),
Nika Layzell27726662017-10-24 23:16:35 -04001027 )
1028 }
1029 While(_binding_0, ) => {
1030 While (
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04001031 full!(_visitor.fold_expr_while(_binding_0)),
Nika Layzell27726662017-10-24 23:16:35 -04001032 )
1033 }
1034 WhileLet(_binding_0, ) => {
1035 WhileLet (
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04001036 full!(_visitor.fold_expr_while_let(_binding_0)),
Nika Layzell27726662017-10-24 23:16:35 -04001037 )
1038 }
1039 ForLoop(_binding_0, ) => {
1040 ForLoop (
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04001041 full!(_visitor.fold_expr_for_loop(_binding_0)),
Nika Layzell27726662017-10-24 23:16:35 -04001042 )
1043 }
1044 Loop(_binding_0, ) => {
1045 Loop (
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04001046 full!(_visitor.fold_expr_loop(_binding_0)),
Nika Layzell27726662017-10-24 23:16:35 -04001047 )
1048 }
1049 Match(_binding_0, ) => {
1050 Match (
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04001051 full!(_visitor.fold_expr_match(_binding_0)),
Nika Layzell27726662017-10-24 23:16:35 -04001052 )
1053 }
1054 Closure(_binding_0, ) => {
1055 Closure (
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04001056 full!(_visitor.fold_expr_closure(_binding_0)),
Nika Layzell27726662017-10-24 23:16:35 -04001057 )
1058 }
1059 Block(_binding_0, ) => {
1060 Block (
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04001061 full!(_visitor.fold_expr_block(_binding_0)),
Nika Layzell27726662017-10-24 23:16:35 -04001062 )
1063 }
1064 Assign(_binding_0, ) => {
1065 Assign (
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04001066 full!(_visitor.fold_expr_assign(_binding_0)),
Nika Layzell27726662017-10-24 23:16:35 -04001067 )
1068 }
1069 AssignOp(_binding_0, ) => {
1070 AssignOp (
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04001071 full!(_visitor.fold_expr_assign_op(_binding_0)),
Nika Layzell27726662017-10-24 23:16:35 -04001072 )
1073 }
1074 Field(_binding_0, ) => {
1075 Field (
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04001076 full!(_visitor.fold_expr_field(_binding_0)),
Nika Layzell27726662017-10-24 23:16:35 -04001077 )
1078 }
1079 TupField(_binding_0, ) => {
1080 TupField (
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04001081 full!(_visitor.fold_expr_tup_field(_binding_0)),
Nika Layzell27726662017-10-24 23:16:35 -04001082 )
1083 }
1084 Index(_binding_0, ) => {
1085 Index (
1086 _visitor.fold_expr_index(_binding_0),
1087 )
1088 }
1089 Range(_binding_0, ) => {
1090 Range (
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04001091 full!(_visitor.fold_expr_range(_binding_0)),
Nika Layzell27726662017-10-24 23:16:35 -04001092 )
1093 }
1094 Path(_binding_0, ) => {
1095 Path (
1096 _visitor.fold_expr_path(_binding_0),
1097 )
1098 }
1099 AddrOf(_binding_0, ) => {
1100 AddrOf (
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04001101 full!(_visitor.fold_expr_addr_of(_binding_0)),
Nika Layzell27726662017-10-24 23:16:35 -04001102 )
1103 }
1104 Break(_binding_0, ) => {
1105 Break (
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04001106 full!(_visitor.fold_expr_break(_binding_0)),
Nika Layzell27726662017-10-24 23:16:35 -04001107 )
1108 }
1109 Continue(_binding_0, ) => {
1110 Continue (
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04001111 full!(_visitor.fold_expr_continue(_binding_0)),
Nika Layzell27726662017-10-24 23:16:35 -04001112 )
1113 }
1114 Ret(_binding_0, ) => {
1115 Ret (
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04001116 full!(_visitor.fold_expr_ret(_binding_0)),
Nika Layzell27726662017-10-24 23:16:35 -04001117 )
1118 }
1119 Mac(_binding_0, ) => {
1120 Mac (
1121 _visitor.fold_mac(_binding_0),
1122 )
1123 }
1124 Struct(_binding_0, ) => {
1125 Struct (
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04001126 full!(_visitor.fold_expr_struct(_binding_0)),
Nika Layzell27726662017-10-24 23:16:35 -04001127 )
1128 }
1129 Repeat(_binding_0, ) => {
1130 Repeat (
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04001131 full!(_visitor.fold_expr_repeat(_binding_0)),
Nika Layzell27726662017-10-24 23:16:35 -04001132 )
1133 }
1134 Paren(_binding_0, ) => {
1135 Paren (
1136 _visitor.fold_expr_paren(_binding_0),
1137 )
1138 }
1139 Group(_binding_0, ) => {
1140 Group (
1141 _visitor.fold_expr_group(_binding_0),
1142 )
1143 }
1144 Try(_binding_0, ) => {
1145 Try (
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04001146 full!(_visitor.fold_expr_try(_binding_0)),
Nika Layzell27726662017-10-24 23:16:35 -04001147 )
1148 }
1149 Catch(_binding_0, ) => {
1150 Catch (
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04001151 full!(_visitor.fold_expr_catch(_binding_0)),
Nika Layzell27726662017-10-24 23:16:35 -04001152 )
1153 }
1154 Yield(_binding_0, ) => {
1155 Yield (
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04001156 full!(_visitor.fold_expr_yield(_binding_0)),
Nika Layzell27726662017-10-24 23:16:35 -04001157 )
1158 }
1159 }
1160}
1161# [ cfg ( feature = "full" ) ]
1162pub fn walk_expr_loop<V: Folder + ?Sized>(_visitor: &mut V, _i: ExprLoop) -> ExprLoop {
1163 ExprLoop {
1164 body: _visitor.fold_block(_i . body),
1165 label: _i . label,
1166 loop_token: _i . loop_token,
1167 colon_token: _i . colon_token,
1168 }
1169}
1170# [ cfg ( feature = "full" ) ]
1171pub fn walk_expr_match<V: Folder + ?Sized>(_visitor: &mut V, _i: ExprMatch) -> ExprMatch {
1172 ExprMatch {
1173 match_token: _i . match_token,
1174 brace_token: _i . brace_token,
1175 expr: Box::new(_visitor.fold_expr(* _i . expr)),
1176 arms: FoldHelper::lift(_i . arms, |it| { _visitor.fold_arm(it) }),
1177 }
1178}
1179# [ cfg ( feature = "full" ) ]
1180pub fn walk_expr_method_call<V: Folder + ?Sized>(_visitor: &mut V, _i: ExprMethodCall) -> ExprMethodCall {
1181 ExprMethodCall {
1182 expr: Box::new(_visitor.fold_expr(* _i . expr)),
1183 method: _i . method,
1184 typarams: FoldHelper::lift(_i . typarams, |it| { _visitor.fold_ty(it) }),
1185 args: FoldHelper::lift(_i . args, |it| { _visitor.fold_expr(it) }),
1186 paren_token: _i . paren_token,
1187 dot_token: _i . dot_token,
1188 lt_token: _i . lt_token,
1189 colon2_token: _i . colon2_token,
1190 gt_token: _i . gt_token,
1191 }
1192}
1193
1194pub fn walk_expr_paren<V: Folder + ?Sized>(_visitor: &mut V, _i: ExprParen) -> ExprParen {
1195 ExprParen {
1196 expr: Box::new(_visitor.fold_expr(* _i . expr)),
1197 paren_token: _i . paren_token,
1198 }
1199}
1200
1201pub fn walk_expr_path<V: Folder + ?Sized>(_visitor: &mut V, _i: ExprPath) -> ExprPath {
1202 ExprPath {
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04001203 qself: (_i . qself).map(|it| { _visitor.fold_qself(it) }),
Nika Layzell27726662017-10-24 23:16:35 -04001204 path: _visitor.fold_path(_i . path),
1205 }
1206}
1207# [ cfg ( feature = "full" ) ]
1208pub fn walk_expr_range<V: Folder + ?Sized>(_visitor: &mut V, _i: ExprRange) -> ExprRange {
1209 ExprRange {
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04001210 from: (_i . from).map(|it| { Box::new(_visitor.fold_expr(* it)) }),
1211 to: (_i . to).map(|it| { Box::new(_visitor.fold_expr(* it)) }),
Nika Layzell27726662017-10-24 23:16:35 -04001212 limits: _visitor.fold_range_limits(_i . limits),
1213 }
1214}
1215# [ cfg ( feature = "full" ) ]
1216pub fn walk_expr_repeat<V: Folder + ?Sized>(_visitor: &mut V, _i: ExprRepeat) -> ExprRepeat {
1217 ExprRepeat {
1218 bracket_token: _i . bracket_token,
1219 semi_token: _i . semi_token,
1220 expr: Box::new(_visitor.fold_expr(* _i . expr)),
1221 amt: Box::new(_visitor.fold_expr(* _i . amt)),
1222 }
1223}
1224# [ cfg ( feature = "full" ) ]
1225pub fn walk_expr_ret<V: Folder + ?Sized>(_visitor: &mut V, _i: ExprRet) -> ExprRet {
1226 ExprRet {
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04001227 expr: (_i . expr).map(|it| { Box::new(_visitor.fold_expr(* it)) }),
Nika Layzell27726662017-10-24 23:16:35 -04001228 return_token: _i . return_token,
1229 }
1230}
1231# [ cfg ( feature = "full" ) ]
1232pub fn walk_expr_struct<V: Folder + ?Sized>(_visitor: &mut V, _i: ExprStruct) -> ExprStruct {
1233 ExprStruct {
1234 path: _visitor.fold_path(_i . path),
1235 fields: FoldHelper::lift(_i . fields, |it| { _visitor.fold_field_value(it) }),
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04001236 rest: (_i . rest).map(|it| { Box::new(_visitor.fold_expr(* it)) }),
Nika Layzell27726662017-10-24 23:16:35 -04001237 dot2_token: _i . dot2_token,
1238 brace_token: _i . brace_token,
1239 }
1240}
1241# [ cfg ( feature = "full" ) ]
1242pub fn walk_expr_try<V: Folder + ?Sized>(_visitor: &mut V, _i: ExprTry) -> ExprTry {
1243 ExprTry {
1244 expr: Box::new(_visitor.fold_expr(* _i . expr)),
1245 question_token: _i . question_token,
1246 }
1247}
1248# [ cfg ( feature = "full" ) ]
1249pub fn walk_expr_tup<V: Folder + ?Sized>(_visitor: &mut V, _i: ExprTup) -> ExprTup {
1250 ExprTup {
1251 args: FoldHelper::lift(_i . args, |it| { _visitor.fold_expr(it) }),
1252 paren_token: _i . paren_token,
1253 lone_comma: _i . lone_comma,
1254 }
1255}
1256# [ cfg ( feature = "full" ) ]
1257pub fn walk_expr_tup_field<V: Folder + ?Sized>(_visitor: &mut V, _i: ExprTupField) -> ExprTupField {
1258 ExprTupField {
1259 expr: Box::new(_visitor.fold_expr(* _i . expr)),
1260 field: _i . field,
1261 dot_token: _i . dot_token,
1262 }
1263}
1264
1265pub fn walk_expr_type<V: Folder + ?Sized>(_visitor: &mut V, _i: ExprType) -> ExprType {
1266 ExprType {
1267 expr: Box::new(_visitor.fold_expr(* _i . expr)),
1268 colon_token: _i . colon_token,
1269 ty: Box::new(_visitor.fold_ty(* _i . ty)),
1270 }
1271}
1272
1273pub fn walk_expr_unary<V: Folder + ?Sized>(_visitor: &mut V, _i: ExprUnary) -> ExprUnary {
1274 ExprUnary {
1275 op: _visitor.fold_un_op(_i . op),
1276 expr: Box::new(_visitor.fold_expr(* _i . expr)),
1277 }
1278}
1279# [ cfg ( feature = "full" ) ]
1280pub fn walk_expr_while<V: Folder + ?Sized>(_visitor: &mut V, _i: ExprWhile) -> ExprWhile {
1281 ExprWhile {
1282 cond: Box::new(_visitor.fold_expr(* _i . cond)),
1283 body: _visitor.fold_block(_i . body),
1284 label: _i . label,
1285 colon_token: _i . colon_token,
1286 while_token: _i . while_token,
1287 }
1288}
1289# [ cfg ( feature = "full" ) ]
1290pub fn walk_expr_while_let<V: Folder + ?Sized>(_visitor: &mut V, _i: ExprWhileLet) -> ExprWhileLet {
1291 ExprWhileLet {
1292 pat: Box::new(_visitor.fold_pat(* _i . pat)),
1293 expr: Box::new(_visitor.fold_expr(* _i . expr)),
1294 body: _visitor.fold_block(_i . body),
1295 label: _i . label,
1296 colon_token: _i . colon_token,
1297 while_token: _i . while_token,
1298 let_token: _i . let_token,
1299 eq_token: _i . eq_token,
1300 }
1301}
1302# [ cfg ( feature = "full" ) ]
1303pub fn walk_expr_yield<V: Folder + ?Sized>(_visitor: &mut V, _i: ExprYield) -> ExprYield {
1304 ExprYield {
1305 yield_token: _i . yield_token,
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04001306 expr: (_i . expr).map(|it| { Box::new(_visitor.fold_expr(* it)) }),
Nika Layzell27726662017-10-24 23:16:35 -04001307 }
1308}
1309
1310pub fn walk_field<V: Folder + ?Sized>(_visitor: &mut V, _i: Field) -> Field {
1311 Field {
1312 ident: _i . ident,
1313 vis: _visitor.fold_visibility(_i . vis),
1314 attrs: FoldHelper::lift(_i . attrs, |it| { _visitor.fold_attribute(it) }),
1315 ty: _visitor.fold_ty(_i . ty),
1316 colon_token: _i . colon_token,
1317 }
1318}
1319# [ cfg ( feature = "full" ) ]
1320pub fn walk_field_pat<V: Folder + ?Sized>(_visitor: &mut V, _i: FieldPat) -> FieldPat {
1321 FieldPat {
1322 ident: _i . ident,
1323 pat: Box::new(_visitor.fold_pat(* _i . pat)),
1324 is_shorthand: _i . is_shorthand,
1325 colon_token: _i . colon_token,
1326 attrs: FoldHelper::lift(_i . attrs, |it| { _visitor.fold_attribute(it) }),
1327 }
1328}
1329# [ cfg ( feature = "full" ) ]
1330pub fn walk_field_value<V: Folder + ?Sized>(_visitor: &mut V, _i: FieldValue) -> FieldValue {
1331 FieldValue {
1332 ident: _i . ident,
1333 expr: _visitor.fold_expr(_i . expr),
1334 is_shorthand: _i . is_shorthand,
1335 attrs: FoldHelper::lift(_i . attrs, |it| { _visitor.fold_attribute(it) }),
1336 colon_token: _i . colon_token,
1337 }
1338}
1339# [ cfg ( feature = "full" ) ]
1340pub fn walk_file<V: Folder + ?Sized>(_visitor: &mut V, _i: File) -> File {
1341 File {
1342 shebang: _i . shebang,
1343 attrs: FoldHelper::lift(_i . attrs, |it| { _visitor.fold_attribute(it) }),
1344 items: FoldHelper::lift(_i . items, |it| { _visitor.fold_item(it) }),
1345 }
1346}
1347# [ cfg ( feature = "full" ) ]
1348pub fn walk_fn_arg<V: Folder + ?Sized>(_visitor: &mut V, _i: FnArg) -> FnArg {
1349 use ::FnArg::*;
1350 match _i {
1351 SelfRef(_binding_0, ) => {
1352 SelfRef (
1353 _visitor.fold_arg_self_ref(_binding_0),
1354 )
1355 }
1356 SelfValue(_binding_0, ) => {
1357 SelfValue (
1358 _visitor.fold_arg_self(_binding_0),
1359 )
1360 }
1361 Captured(_binding_0, ) => {
1362 Captured (
1363 _visitor.fold_arg_captured(_binding_0),
1364 )
1365 }
1366 Ignored(_binding_0, ) => {
1367 Ignored (
1368 _visitor.fold_ty(_binding_0),
1369 )
1370 }
1371 }
1372}
1373# [ cfg ( feature = "full" ) ]
1374pub fn walk_fn_decl<V: Folder + ?Sized>(_visitor: &mut V, _i: FnDecl) -> FnDecl {
1375 FnDecl {
1376 fn_token: _i . fn_token,
1377 paren_token: _i . paren_token,
1378 inputs: FoldHelper::lift(_i . inputs, |it| { _visitor.fold_fn_arg(it) }),
1379 output: _visitor.fold_function_ret_ty(_i . output),
1380 generics: _visitor.fold_generics(_i . generics),
1381 variadic: _i . variadic,
1382 dot_tokens: _i . dot_tokens,
1383 }
1384}
1385# [ cfg ( feature = "full" ) ]
1386pub fn walk_foreign_item<V: Folder + ?Sized>(_visitor: &mut V, _i: ForeignItem) -> ForeignItem {
1387 ForeignItem {
1388 ident: _i . ident,
1389 attrs: FoldHelper::lift(_i . attrs, |it| { _visitor.fold_attribute(it) }),
1390 node: _visitor.fold_foreign_item_kind(_i . node),
1391 vis: _visitor.fold_visibility(_i . vis),
1392 semi_token: _i . semi_token,
1393 }
1394}
1395# [ cfg ( feature = "full" ) ]
1396pub fn walk_foreign_item_fn<V: Folder + ?Sized>(_visitor: &mut V, _i: ForeignItemFn) -> ForeignItemFn {
1397 ForeignItemFn {
1398 decl: Box::new(_visitor.fold_fn_decl(* _i . decl)),
1399 }
1400}
1401# [ cfg ( feature = "full" ) ]
1402pub fn walk_foreign_item_kind<V: Folder + ?Sized>(_visitor: &mut V, _i: ForeignItemKind) -> ForeignItemKind {
1403 use ::ForeignItemKind::*;
1404 match _i {
1405 Fn(_binding_0, ) => {
1406 Fn (
1407 _visitor.fold_foreign_item_fn(_binding_0),
1408 )
1409 }
1410 Static(_binding_0, ) => {
1411 Static (
1412 _visitor.fold_foreign_item_static(_binding_0),
1413 )
1414 }
1415 }
1416}
1417# [ cfg ( feature = "full" ) ]
1418pub fn walk_foreign_item_static<V: Folder + ?Sized>(_visitor: &mut V, _i: ForeignItemStatic) -> ForeignItemStatic {
1419 ForeignItemStatic {
1420 static_token: _i . static_token,
1421 ty: Box::new(_visitor.fold_ty(* _i . ty)),
1422 colon_token: _i . colon_token,
1423 mutbl: _visitor.fold_mutability(_i . mutbl),
1424 }
1425}
1426
1427pub fn walk_function_ret_ty<V: Folder + ?Sized>(_visitor: &mut V, _i: FunctionRetTy) -> FunctionRetTy {
1428 use ::FunctionRetTy::*;
1429 match _i {
1430 Default => { Default }
1431 Ty(_binding_0, _binding_1, ) => {
1432 Ty (
1433 _visitor.fold_ty(_binding_0),
1434 _binding_1,
1435 )
1436 }
1437 }
1438}
1439
1440pub fn walk_generics<V: Folder + ?Sized>(_visitor: &mut V, _i: Generics) -> Generics {
1441 Generics {
1442 lt_token: _i . lt_token,
1443 gt_token: _i . gt_token,
1444 lifetimes: FoldHelper::lift(_i . lifetimes, |it| { _visitor.fold_lifetime_def(it) }),
1445 ty_params: FoldHelper::lift(_i . ty_params, |it| { _visitor.fold_ty_param(it) }),
1446 where_clause: _visitor.fold_where_clause(_i . where_clause),
1447 }
1448}
1449# [ cfg ( feature = "full" ) ]
1450pub fn walk_impl_item<V: Folder + ?Sized>(_visitor: &mut V, _i: ImplItem) -> ImplItem {
1451 ImplItem {
1452 attrs: FoldHelper::lift(_i . attrs, |it| { _visitor.fold_attribute(it) }),
1453 node: _visitor.fold_impl_item_kind(_i . node),
1454 }
1455}
1456# [ cfg ( feature = "full" ) ]
1457pub fn walk_impl_item_const<V: Folder + ?Sized>(_visitor: &mut V, _i: ImplItemConst) -> ImplItemConst {
1458 ImplItemConst {
1459 vis: _visitor.fold_visibility(_i . vis),
1460 defaultness: _visitor.fold_defaultness(_i . defaultness),
1461 const_token: _i . const_token,
1462 ident: _i . ident,
1463 colon_token: _i . colon_token,
1464 ty: _visitor.fold_ty(_i . ty),
1465 eq_token: _i . eq_token,
1466 expr: _visitor.fold_expr(_i . expr),
1467 semi_token: _i . semi_token,
1468 }
1469}
1470# [ cfg ( feature = "full" ) ]
1471pub fn walk_impl_item_kind<V: Folder + ?Sized>(_visitor: &mut V, _i: ImplItemKind) -> ImplItemKind {
1472 use ::ImplItemKind::*;
1473 match _i {
1474 Const(_binding_0, ) => {
1475 Const (
1476 _visitor.fold_impl_item_const(_binding_0),
1477 )
1478 }
1479 Method(_binding_0, ) => {
1480 Method (
1481 _visitor.fold_impl_item_method(_binding_0),
1482 )
1483 }
1484 Type(_binding_0, ) => {
1485 Type (
1486 _visitor.fold_impl_item_type(_binding_0),
1487 )
1488 }
1489 Macro(_binding_0, ) => {
1490 Macro (
1491 _visitor.fold_mac(_binding_0),
1492 )
1493 }
1494 }
1495}
1496# [ cfg ( feature = "full" ) ]
1497pub fn walk_impl_item_method<V: Folder + ?Sized>(_visitor: &mut V, _i: ImplItemMethod) -> ImplItemMethod {
1498 ImplItemMethod {
1499 vis: _visitor.fold_visibility(_i . vis),
1500 defaultness: _visitor.fold_defaultness(_i . defaultness),
1501 sig: _visitor.fold_method_sig(_i . sig),
1502 block: _visitor.fold_block(_i . block),
1503 }
1504}
1505# [ cfg ( feature = "full" ) ]
1506pub fn walk_impl_item_type<V: Folder + ?Sized>(_visitor: &mut V, _i: ImplItemType) -> ImplItemType {
1507 ImplItemType {
1508 vis: _visitor.fold_visibility(_i . vis),
1509 defaultness: _visitor.fold_defaultness(_i . defaultness),
1510 type_token: _i . type_token,
1511 ident: _i . ident,
1512 eq_token: _i . eq_token,
1513 ty: _visitor.fold_ty(_i . ty),
1514 semi_token: _i . semi_token,
1515 }
1516}
1517# [ cfg ( feature = "full" ) ]
1518pub fn walk_impl_polarity<V: Folder + ?Sized>(_visitor: &mut V, _i: ImplPolarity) -> ImplPolarity {
1519 use ::ImplPolarity::*;
1520 match _i {
1521 Positive => { Positive }
1522 Negative(_binding_0, ) => {
1523 Negative (
1524 _binding_0,
1525 )
1526 }
1527 }
1528}
1529# [ cfg ( feature = "full" ) ]
1530pub fn walk_in_place_kind<V: Folder + ?Sized>(_visitor: &mut V, _i: InPlaceKind) -> InPlaceKind {
1531 use ::InPlaceKind::*;
1532 match _i {
1533 Arrow(_binding_0, ) => {
1534 Arrow (
1535 _binding_0,
1536 )
1537 }
1538 In(_binding_0, ) => {
1539 In (
1540 _binding_0,
1541 )
1542 }
1543 }
1544}
1545# [ cfg ( feature = "full" ) ]
1546pub fn walk_item<V: Folder + ?Sized>(_visitor: &mut V, _i: Item) -> Item {
1547 Item {
1548 attrs: FoldHelper::lift(_i . attrs, |it| { _visitor.fold_attribute(it) }),
1549 node: _visitor.fold_item_kind(_i . node),
1550 }
1551}
1552# [ cfg ( feature = "full" ) ]
1553pub fn walk_item_const<V: Folder + ?Sized>(_visitor: &mut V, _i: ItemConst) -> ItemConst {
1554 ItemConst {
1555 vis: _visitor.fold_visibility(_i . vis),
1556 const_token: _i . const_token,
1557 ident: _i . ident,
1558 colon_token: _i . colon_token,
1559 ty: Box::new(_visitor.fold_ty(* _i . ty)),
1560 eq_token: _i . eq_token,
1561 expr: Box::new(_visitor.fold_expr(* _i . expr)),
1562 semi_token: _i . semi_token,
1563 }
1564}
1565# [ cfg ( feature = "full" ) ]
1566pub fn walk_item_default_impl<V: Folder + ?Sized>(_visitor: &mut V, _i: ItemDefaultImpl) -> ItemDefaultImpl {
1567 ItemDefaultImpl {
1568 unsafety: _visitor.fold_unsafety(_i . unsafety),
1569 impl_token: _i . impl_token,
1570 path: _visitor.fold_path(_i . path),
1571 for_token: _i . for_token,
1572 dot2_token: _i . dot2_token,
1573 brace_token: _i . brace_token,
1574 }
1575}
1576# [ cfg ( feature = "full" ) ]
1577pub fn walk_item_enum<V: Folder + ?Sized>(_visitor: &mut V, _i: ItemEnum) -> ItemEnum {
1578 ItemEnum {
1579 vis: _visitor.fold_visibility(_i . vis),
1580 enum_token: _i . enum_token,
1581 ident: _i . ident,
1582 generics: _visitor.fold_generics(_i . generics),
1583 brace_token: _i . brace_token,
1584 variants: FoldHelper::lift(_i . variants, |it| { _visitor.fold_variant(it) }),
1585 }
1586}
1587# [ cfg ( feature = "full" ) ]
1588pub fn walk_item_extern_crate<V: Folder + ?Sized>(_visitor: &mut V, _i: ItemExternCrate) -> ItemExternCrate {
1589 ItemExternCrate {
1590 vis: _visitor.fold_visibility(_i . vis),
1591 extern_token: _i . extern_token,
1592 crate_token: _i . crate_token,
1593 ident: _i . ident,
1594 rename: _i . rename,
1595 semi_token: _i . semi_token,
1596 }
1597}
1598# [ cfg ( feature = "full" ) ]
1599pub fn walk_item_fn<V: Folder + ?Sized>(_visitor: &mut V, _i: ItemFn) -> ItemFn {
1600 ItemFn {
1601 vis: _visitor.fold_visibility(_i . vis),
1602 constness: _visitor.fold_constness(_i . constness),
1603 unsafety: _visitor.fold_unsafety(_i . unsafety),
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04001604 abi: (_i . abi).map(|it| { _visitor.fold_abi(it) }),
Nika Layzell27726662017-10-24 23:16:35 -04001605 decl: Box::new(_visitor.fold_fn_decl(* _i . decl)),
1606 ident: _i . ident,
1607 block: Box::new(_visitor.fold_block(* _i . block)),
1608 }
1609}
1610# [ cfg ( feature = "full" ) ]
1611pub fn walk_item_foreign_mod<V: Folder + ?Sized>(_visitor: &mut V, _i: ItemForeignMod) -> ItemForeignMod {
1612 ItemForeignMod {
1613 abi: _visitor.fold_abi(_i . abi),
1614 brace_token: _i . brace_token,
1615 items: FoldHelper::lift(_i . items, |it| { _visitor.fold_foreign_item(it) }),
1616 }
1617}
1618# [ cfg ( feature = "full" ) ]
1619pub fn walk_item_impl<V: Folder + ?Sized>(_visitor: &mut V, _i: ItemImpl) -> ItemImpl {
1620 ItemImpl {
1621 defaultness: _visitor.fold_defaultness(_i . defaultness),
1622 unsafety: _visitor.fold_unsafety(_i . unsafety),
1623 impl_token: _i . impl_token,
1624 generics: _visitor.fold_generics(_i . generics),
1625 trait_: _i . trait_,
1626 self_ty: Box::new(_visitor.fold_ty(* _i . self_ty)),
1627 brace_token: _i . brace_token,
1628 items: FoldHelper::lift(_i . items, |it| { _visitor.fold_impl_item(it) }),
1629 }
1630}
1631# [ cfg ( feature = "full" ) ]
1632pub fn walk_item_kind<V: Folder + ?Sized>(_visitor: &mut V, _i: ItemKind) -> ItemKind {
1633 use ::ItemKind::*;
1634 match _i {
1635 ExternCrate(_binding_0, ) => {
1636 ExternCrate (
1637 _visitor.fold_item_extern_crate(_binding_0),
1638 )
1639 }
1640 Use(_binding_0, ) => {
1641 Use (
1642 _visitor.fold_item_use(_binding_0),
1643 )
1644 }
1645 Static(_binding_0, ) => {
1646 Static (
1647 _visitor.fold_item_static(_binding_0),
1648 )
1649 }
1650 Const(_binding_0, ) => {
1651 Const (
1652 _visitor.fold_item_const(_binding_0),
1653 )
1654 }
1655 Fn(_binding_0, ) => {
1656 Fn (
1657 _visitor.fold_item_fn(_binding_0),
1658 )
1659 }
1660 Mod(_binding_0, ) => {
1661 Mod (
1662 _visitor.fold_item_mod(_binding_0),
1663 )
1664 }
1665 ForeignMod(_binding_0, ) => {
1666 ForeignMod (
1667 _visitor.fold_item_foreign_mod(_binding_0),
1668 )
1669 }
1670 Ty(_binding_0, ) => {
1671 Ty (
1672 _visitor.fold_item_ty(_binding_0),
1673 )
1674 }
1675 Enum(_binding_0, ) => {
1676 Enum (
1677 _visitor.fold_item_enum(_binding_0),
1678 )
1679 }
1680 Struct(_binding_0, ) => {
1681 Struct (
1682 _visitor.fold_item_struct(_binding_0),
1683 )
1684 }
1685 Union(_binding_0, ) => {
1686 Union (
1687 _visitor.fold_item_union(_binding_0),
1688 )
1689 }
1690 Trait(_binding_0, ) => {
1691 Trait (
1692 _visitor.fold_item_trait(_binding_0),
1693 )
1694 }
1695 DefaultImpl(_binding_0, ) => {
1696 DefaultImpl (
1697 _visitor.fold_item_default_impl(_binding_0),
1698 )
1699 }
1700 Impl(_binding_0, ) => {
1701 Impl (
1702 _visitor.fold_item_impl(_binding_0),
1703 )
1704 }
1705 Mac(_binding_0, ) => {
1706 Mac (
1707 _visitor.fold_mac(_binding_0),
1708 )
1709 }
1710 }
1711}
1712# [ cfg ( feature = "full" ) ]
1713pub fn walk_item_mod<V: Folder + ?Sized>(_visitor: &mut V, _i: ItemMod) -> ItemMod {
1714 ItemMod {
1715 vis: _visitor.fold_visibility(_i . vis),
1716 mod_token: _i . mod_token,
1717 ident: _i . ident,
1718 content: _i . content,
1719 semi: _i . semi,
1720 }
1721}
1722# [ cfg ( feature = "full" ) ]
1723pub fn walk_item_static<V: Folder + ?Sized>(_visitor: &mut V, _i: ItemStatic) -> ItemStatic {
1724 ItemStatic {
1725 vis: _visitor.fold_visibility(_i . vis),
1726 static_token: _i . static_token,
1727 mutbl: _visitor.fold_mutability(_i . mutbl),
1728 ident: _i . ident,
1729 colon_token: _i . colon_token,
1730 ty: Box::new(_visitor.fold_ty(* _i . ty)),
1731 eq_token: _i . eq_token,
1732 expr: Box::new(_visitor.fold_expr(* _i . expr)),
1733 semi_token: _i . semi_token,
1734 }
1735}
1736# [ cfg ( feature = "full" ) ]
1737pub fn walk_item_struct<V: Folder + ?Sized>(_visitor: &mut V, _i: ItemStruct) -> ItemStruct {
1738 ItemStruct {
1739 vis: _visitor.fold_visibility(_i . vis),
1740 struct_token: _i . struct_token,
1741 ident: _i . ident,
1742 generics: _visitor.fold_generics(_i . generics),
1743 data: _visitor.fold_variant_data(_i . data),
1744 semi_token: _i . semi_token,
1745 }
1746}
1747# [ cfg ( feature = "full" ) ]
1748pub fn walk_item_trait<V: Folder + ?Sized>(_visitor: &mut V, _i: ItemTrait) -> ItemTrait {
1749 ItemTrait {
1750 vis: _visitor.fold_visibility(_i . vis),
1751 unsafety: _visitor.fold_unsafety(_i . unsafety),
1752 trait_token: _i . trait_token,
1753 ident: _i . ident,
1754 generics: _visitor.fold_generics(_i . generics),
1755 colon_token: _i . colon_token,
1756 supertraits: FoldHelper::lift(_i . supertraits, |it| { _visitor.fold_ty_param_bound(it) }),
1757 brace_token: _i . brace_token,
1758 items: FoldHelper::lift(_i . items, |it| { _visitor.fold_trait_item(it) }),
1759 }
1760}
1761# [ cfg ( feature = "full" ) ]
1762pub fn walk_item_ty<V: Folder + ?Sized>(_visitor: &mut V, _i: ItemTy) -> ItemTy {
1763 ItemTy {
1764 vis: _visitor.fold_visibility(_i . vis),
1765 type_token: _i . type_token,
1766 ident: _i . ident,
1767 generics: _visitor.fold_generics(_i . generics),
1768 eq_token: _i . eq_token,
1769 ty: Box::new(_visitor.fold_ty(* _i . ty)),
1770 semi_token: _i . semi_token,
1771 }
1772}
1773# [ cfg ( feature = "full" ) ]
1774pub fn walk_item_union<V: Folder + ?Sized>(_visitor: &mut V, _i: ItemUnion) -> ItemUnion {
1775 ItemUnion {
1776 vis: _visitor.fold_visibility(_i . vis),
1777 union_token: _i . union_token,
1778 ident: _i . ident,
1779 generics: _visitor.fold_generics(_i . generics),
1780 data: _visitor.fold_variant_data(_i . data),
1781 }
1782}
1783# [ cfg ( feature = "full" ) ]
1784pub fn walk_item_use<V: Folder + ?Sized>(_visitor: &mut V, _i: ItemUse) -> ItemUse {
1785 ItemUse {
1786 vis: _visitor.fold_visibility(_i . vis),
1787 use_token: _i . use_token,
1788 path: Box::new(_visitor.fold_view_path(* _i . path)),
1789 semi_token: _i . semi_token,
1790 }
1791}
1792
1793pub fn walk_lifetime_def<V: Folder + ?Sized>(_visitor: &mut V, _i: LifetimeDef) -> LifetimeDef {
1794 LifetimeDef {
1795 attrs: FoldHelper::lift(_i . attrs, |it| { _visitor.fold_attribute(it) }),
1796 lifetime: _i . lifetime,
1797 colon_token: _i . colon_token,
1798 bounds: _i . bounds,
1799 }
1800}
1801# [ cfg ( feature = "full" ) ]
1802pub fn walk_local<V: Folder + ?Sized>(_visitor: &mut V, _i: Local) -> Local {
1803 Local {
1804 let_token: _i . let_token,
1805 colon_token: _i . colon_token,
1806 eq_token: _i . eq_token,
1807 semi_token: _i . semi_token,
1808 pat: Box::new(_visitor.fold_pat(* _i . pat)),
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04001809 ty: (_i . ty).map(|it| { Box::new(_visitor.fold_ty(* it)) }),
1810 init: (_i . init).map(|it| { Box::new(_visitor.fold_expr(* it)) }),
Nika Layzell27726662017-10-24 23:16:35 -04001811 attrs: FoldHelper::lift(_i . attrs, |it| { _visitor.fold_attribute(it) }),
1812 }
1813}
1814
1815pub fn walk_mac<V: Folder + ?Sized>(_visitor: &mut V, _i: Mac) -> Mac {
1816 Mac {
1817 path: _visitor.fold_path(_i . path),
1818 bang_token: _i . bang_token,
1819 ident: _i . ident,
1820 tokens: _i . tokens,
1821 }
1822}
1823# [ cfg ( feature = "full" ) ]
1824pub fn walk_mac_stmt_style<V: Folder + ?Sized>(_visitor: &mut V, _i: MacStmtStyle) -> MacStmtStyle {
1825 use ::MacStmtStyle::*;
1826 match _i {
1827 Semicolon(_binding_0, ) => {
1828 Semicolon (
1829 _binding_0,
1830 )
1831 }
1832 Braces => { Braces }
1833 NoBraces => { NoBraces }
1834 }
1835}
1836
1837pub fn walk_meta_item<V: Folder + ?Sized>(_visitor: &mut V, _i: MetaItem) -> MetaItem {
1838 use ::MetaItem::*;
1839 match _i {
1840 Term(_binding_0, ) => {
1841 Term (
1842 _binding_0,
1843 )
1844 }
1845 List(_binding_0, ) => {
1846 List (
1847 _visitor.fold_meta_item_list(_binding_0),
1848 )
1849 }
1850 NameValue(_binding_0, ) => {
1851 NameValue (
1852 _visitor.fold_meta_name_value(_binding_0),
1853 )
1854 }
1855 }
1856}
1857
1858pub fn walk_meta_item_list<V: Folder + ?Sized>(_visitor: &mut V, _i: MetaItemList) -> MetaItemList {
1859 MetaItemList {
1860 ident: _i . ident,
1861 paren_token: _i . paren_token,
1862 nested: FoldHelper::lift(_i . nested, |it| { _visitor.fold_nested_meta_item(it) }),
1863 }
1864}
1865
1866pub fn walk_meta_name_value<V: Folder + ?Sized>(_visitor: &mut V, _i: MetaNameValue) -> MetaNameValue {
1867 MetaNameValue {
1868 ident: _i . ident,
1869 eq_token: _i . eq_token,
1870 lit: _i . lit,
1871 }
1872}
1873# [ cfg ( feature = "full" ) ]
1874pub fn walk_method_sig<V: Folder + ?Sized>(_visitor: &mut V, _i: MethodSig) -> MethodSig {
1875 MethodSig {
1876 constness: _visitor.fold_constness(_i . constness),
1877 unsafety: _visitor.fold_unsafety(_i . unsafety),
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04001878 abi: (_i . abi).map(|it| { _visitor.fold_abi(it) }),
Nika Layzell27726662017-10-24 23:16:35 -04001879 ident: _i . ident,
1880 decl: _visitor.fold_fn_decl(_i . decl),
1881 }
1882}
1883
1884pub fn walk_mut_ty<V: Folder + ?Sized>(_visitor: &mut V, _i: MutTy) -> MutTy {
1885 MutTy {
1886 ty: _visitor.fold_ty(_i . ty),
1887 mutability: _visitor.fold_mutability(_i . mutability),
1888 }
1889}
1890
1891pub fn walk_mutability<V: Folder + ?Sized>(_visitor: &mut V, _i: Mutability) -> Mutability {
1892 use ::Mutability::*;
1893 match _i {
1894 Mutable(_binding_0, ) => {
1895 Mutable (
1896 _binding_0,
1897 )
1898 }
1899 Immutable => { Immutable }
1900 }
1901}
1902
1903pub fn walk_nested_meta_item<V: Folder + ?Sized>(_visitor: &mut V, _i: NestedMetaItem) -> NestedMetaItem {
1904 use ::NestedMetaItem::*;
1905 match _i {
1906 MetaItem(_binding_0, ) => {
1907 MetaItem (
1908 _visitor.fold_meta_item(_binding_0),
1909 )
1910 }
1911 Literal(_binding_0, ) => {
1912 Literal (
1913 _binding_0,
1914 )
1915 }
1916 }
1917}
1918
1919pub fn walk_parenthesized_parameter_data<V: Folder + ?Sized>(_visitor: &mut V, _i: ParenthesizedParameterData) -> ParenthesizedParameterData {
1920 ParenthesizedParameterData {
1921 paren_token: _i . paren_token,
1922 inputs: FoldHelper::lift(_i . inputs, |it| { _visitor.fold_ty(it) }),
1923 output: _visitor.fold_function_ret_ty(_i . output),
1924 }
1925}
1926# [ cfg ( feature = "full" ) ]
1927pub fn walk_pat<V: Folder + ?Sized>(_visitor: &mut V, _i: Pat) -> Pat {
1928 use ::Pat::*;
1929 match _i {
1930 Wild(_binding_0, ) => {
1931 Wild (
1932 _visitor.fold_pat_wild(_binding_0),
1933 )
1934 }
1935 Ident(_binding_0, ) => {
1936 Ident (
1937 _visitor.fold_pat_ident(_binding_0),
1938 )
1939 }
1940 Struct(_binding_0, ) => {
1941 Struct (
1942 _visitor.fold_pat_struct(_binding_0),
1943 )
1944 }
1945 TupleStruct(_binding_0, ) => {
1946 TupleStruct (
1947 _visitor.fold_pat_tuple_struct(_binding_0),
1948 )
1949 }
1950 Path(_binding_0, ) => {
1951 Path (
1952 _visitor.fold_pat_path(_binding_0),
1953 )
1954 }
1955 Tuple(_binding_0, ) => {
1956 Tuple (
1957 _visitor.fold_pat_tuple(_binding_0),
1958 )
1959 }
1960 Box(_binding_0, ) => {
1961 Box (
1962 _visitor.fold_pat_box(_binding_0),
1963 )
1964 }
1965 Ref(_binding_0, ) => {
1966 Ref (
1967 _visitor.fold_pat_ref(_binding_0),
1968 )
1969 }
1970 Lit(_binding_0, ) => {
1971 Lit (
1972 _visitor.fold_pat_lit(_binding_0),
1973 )
1974 }
1975 Range(_binding_0, ) => {
1976 Range (
1977 _visitor.fold_pat_range(_binding_0),
1978 )
1979 }
1980 Slice(_binding_0, ) => {
1981 Slice (
1982 _visitor.fold_pat_slice(_binding_0),
1983 )
1984 }
1985 Mac(_binding_0, ) => {
1986 Mac (
1987 _visitor.fold_mac(_binding_0),
1988 )
1989 }
1990 }
1991}
1992# [ cfg ( feature = "full" ) ]
1993pub fn walk_pat_box<V: Folder + ?Sized>(_visitor: &mut V, _i: PatBox) -> PatBox {
1994 PatBox {
1995 pat: Box::new(_visitor.fold_pat(* _i . pat)),
1996 box_token: _i . box_token,
1997 }
1998}
1999# [ cfg ( feature = "full" ) ]
2000pub fn walk_pat_ident<V: Folder + ?Sized>(_visitor: &mut V, _i: PatIdent) -> PatIdent {
2001 PatIdent {
2002 mode: _visitor.fold_binding_mode(_i . mode),
2003 ident: _i . ident,
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04002004 subpat: (_i . subpat).map(|it| { Box::new(_visitor.fold_pat(* it)) }),
Nika Layzell27726662017-10-24 23:16:35 -04002005 at_token: _i . at_token,
2006 }
2007}
2008# [ cfg ( feature = "full" ) ]
2009pub fn walk_pat_lit<V: Folder + ?Sized>(_visitor: &mut V, _i: PatLit) -> PatLit {
2010 PatLit {
2011 expr: Box::new(_visitor.fold_expr(* _i . expr)),
2012 }
2013}
2014# [ cfg ( feature = "full" ) ]
2015pub fn walk_pat_path<V: Folder + ?Sized>(_visitor: &mut V, _i: PatPath) -> PatPath {
2016 PatPath {
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04002017 qself: (_i . qself).map(|it| { _visitor.fold_qself(it) }),
Nika Layzell27726662017-10-24 23:16:35 -04002018 path: _visitor.fold_path(_i . path),
2019 }
2020}
2021# [ cfg ( feature = "full" ) ]
2022pub fn walk_pat_range<V: Folder + ?Sized>(_visitor: &mut V, _i: PatRange) -> PatRange {
2023 PatRange {
2024 lo: Box::new(_visitor.fold_expr(* _i . lo)),
2025 hi: Box::new(_visitor.fold_expr(* _i . hi)),
2026 limits: _visitor.fold_range_limits(_i . limits),
2027 }
2028}
2029# [ cfg ( feature = "full" ) ]
2030pub fn walk_pat_ref<V: Folder + ?Sized>(_visitor: &mut V, _i: PatRef) -> PatRef {
2031 PatRef {
2032 pat: Box::new(_visitor.fold_pat(* _i . pat)),
2033 mutbl: _visitor.fold_mutability(_i . mutbl),
2034 and_token: _i . and_token,
2035 }
2036}
2037# [ cfg ( feature = "full" ) ]
2038pub fn walk_pat_slice<V: Folder + ?Sized>(_visitor: &mut V, _i: PatSlice) -> PatSlice {
2039 PatSlice {
2040 front: FoldHelper::lift(_i . front, |it| { _visitor.fold_pat(it) }),
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04002041 middle: (_i . middle).map(|it| { Box::new(_visitor.fold_pat(* it)) }),
Nika Layzell27726662017-10-24 23:16:35 -04002042 back: FoldHelper::lift(_i . back, |it| { _visitor.fold_pat(it) }),
2043 dot2_token: _i . dot2_token,
2044 comma_token: _i . comma_token,
2045 bracket_token: _i . bracket_token,
2046 }
2047}
2048# [ cfg ( feature = "full" ) ]
2049pub fn walk_pat_struct<V: Folder + ?Sized>(_visitor: &mut V, _i: PatStruct) -> PatStruct {
2050 PatStruct {
2051 path: _visitor.fold_path(_i . path),
2052 fields: FoldHelper::lift(_i . fields, |it| { _visitor.fold_field_pat(it) }),
2053 brace_token: _i . brace_token,
2054 dot2_token: _i . dot2_token,
2055 }
2056}
2057# [ cfg ( feature = "full" ) ]
2058pub fn walk_pat_tuple<V: Folder + ?Sized>(_visitor: &mut V, _i: PatTuple) -> PatTuple {
2059 PatTuple {
2060 pats: FoldHelper::lift(_i . pats, |it| { _visitor.fold_pat(it) }),
2061 dots_pos: _i . dots_pos,
2062 paren_token: _i . paren_token,
2063 dot2_token: _i . dot2_token,
2064 comma_token: _i . comma_token,
2065 }
2066}
2067# [ cfg ( feature = "full" ) ]
2068pub fn walk_pat_tuple_struct<V: Folder + ?Sized>(_visitor: &mut V, _i: PatTupleStruct) -> PatTupleStruct {
2069 PatTupleStruct {
2070 path: _visitor.fold_path(_i . path),
2071 pat: _visitor.fold_pat_tuple(_i . pat),
2072 }
2073}
2074# [ cfg ( feature = "full" ) ]
2075pub fn walk_pat_wild<V: Folder + ?Sized>(_visitor: &mut V, _i: PatWild) -> PatWild {
2076 PatWild {
2077 underscore_token: _i . underscore_token,
2078 }
2079}
2080
2081pub fn walk_path<V: Folder + ?Sized>(_visitor: &mut V, _i: Path) -> Path {
2082 Path {
2083 leading_colon: _i . leading_colon,
2084 segments: FoldHelper::lift(_i . segments, |it| { _visitor.fold_path_segment(it) }),
2085 }
2086}
2087# [ cfg ( feature = "full" ) ]
2088pub fn walk_path_glob<V: Folder + ?Sized>(_visitor: &mut V, _i: PathGlob) -> PathGlob {
2089 PathGlob {
2090 path: _visitor.fold_path(_i . path),
2091 colon2_token: _i . colon2_token,
2092 star_token: _i . star_token,
2093 }
2094}
2095# [ cfg ( feature = "full" ) ]
2096pub fn walk_path_list<V: Folder + ?Sized>(_visitor: &mut V, _i: PathList) -> PathList {
2097 PathList {
2098 path: _visitor.fold_path(_i . path),
2099 colon2_token: _i . colon2_token,
2100 brace_token: _i . brace_token,
2101 items: FoldHelper::lift(_i . items, |it| { _visitor.fold_path_list_item(it) }),
2102 }
2103}
2104# [ cfg ( feature = "full" ) ]
2105pub fn walk_path_list_item<V: Folder + ?Sized>(_visitor: &mut V, _i: PathListItem) -> PathListItem {
2106 PathListItem {
2107 name: _i . name,
2108 rename: _i . rename,
2109 as_token: _i . as_token,
2110 }
2111}
2112
2113pub fn walk_path_parameters<V: Folder + ?Sized>(_visitor: &mut V, _i: PathParameters) -> PathParameters {
2114 use ::PathParameters::*;
2115 match _i {
2116 None => { None }
2117 AngleBracketed(_binding_0, ) => {
2118 AngleBracketed (
2119 _visitor.fold_angle_bracketed_parameter_data(_binding_0),
2120 )
2121 }
2122 Parenthesized(_binding_0, ) => {
2123 Parenthesized (
2124 _visitor.fold_parenthesized_parameter_data(_binding_0),
2125 )
2126 }
2127 }
2128}
2129
2130pub fn walk_path_segment<V: Folder + ?Sized>(_visitor: &mut V, _i: PathSegment) -> PathSegment {
2131 PathSegment {
2132 ident: _i . ident,
2133 parameters: _visitor.fold_path_parameters(_i . parameters),
2134 }
2135}
2136# [ cfg ( feature = "full" ) ]
2137pub fn walk_path_simple<V: Folder + ?Sized>(_visitor: &mut V, _i: PathSimple) -> PathSimple {
2138 PathSimple {
2139 path: _visitor.fold_path(_i . path),
2140 as_token: _i . as_token,
2141 rename: _i . rename,
2142 }
2143}
2144
2145pub fn walk_poly_trait_ref<V: Folder + ?Sized>(_visitor: &mut V, _i: PolyTraitRef) -> PolyTraitRef {
2146 PolyTraitRef {
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04002147 bound_lifetimes: (_i . bound_lifetimes).map(|it| { _visitor.fold_bound_lifetimes(it) }),
Nika Layzell27726662017-10-24 23:16:35 -04002148 trait_ref: _visitor.fold_path(_i . trait_ref),
2149 }
2150}
2151
2152pub fn walk_qself<V: Folder + ?Sized>(_visitor: &mut V, _i: QSelf) -> QSelf {
2153 QSelf {
2154 lt_token: _i . lt_token,
2155 ty: Box::new(_visitor.fold_ty(* _i . ty)),
2156 position: _i . position,
2157 as_token: _i . as_token,
2158 gt_token: _i . gt_token,
2159 }
2160}
2161# [ cfg ( feature = "full" ) ]
2162pub fn walk_range_limits<V: Folder + ?Sized>(_visitor: &mut V, _i: RangeLimits) -> RangeLimits {
2163 use ::RangeLimits::*;
2164 match _i {
2165 HalfOpen(_binding_0, ) => {
2166 HalfOpen (
2167 _binding_0,
2168 )
2169 }
2170 Closed(_binding_0, ) => {
2171 Closed (
2172 _binding_0,
2173 )
2174 }
2175 }
2176}
2177# [ cfg ( feature = "full" ) ]
2178pub fn walk_stmt<V: Folder + ?Sized>(_visitor: &mut V, _i: Stmt) -> Stmt {
2179 use ::Stmt::*;
2180 match _i {
2181 Local(_binding_0, ) => {
2182 Local (
2183 Box::new(_visitor.fold_local(* _binding_0)),
2184 )
2185 }
2186 Item(_binding_0, ) => {
2187 Item (
2188 Box::new(_visitor.fold_item(* _binding_0)),
2189 )
2190 }
2191 Expr(_binding_0, ) => {
2192 Expr (
2193 Box::new(_visitor.fold_expr(* _binding_0)),
2194 )
2195 }
2196 Semi(_binding_0, _binding_1, ) => {
2197 Semi (
2198 Box::new(_visitor.fold_expr(* _binding_0)),
2199 _binding_1,
2200 )
2201 }
2202 Mac(_binding_0, ) => {
2203 Mac (
2204 _binding_0,
2205 )
2206 }
2207 }
2208}
2209
2210pub fn walk_trait_bound_modifier<V: Folder + ?Sized>(_visitor: &mut V, _i: TraitBoundModifier) -> TraitBoundModifier {
2211 use ::TraitBoundModifier::*;
2212 match _i {
2213 None => { None }
2214 Maybe(_binding_0, ) => {
2215 Maybe (
2216 _binding_0,
2217 )
2218 }
2219 }
2220}
2221# [ cfg ( feature = "full" ) ]
2222pub fn walk_trait_item<V: Folder + ?Sized>(_visitor: &mut V, _i: TraitItem) -> TraitItem {
2223 TraitItem {
2224 attrs: FoldHelper::lift(_i . attrs, |it| { _visitor.fold_attribute(it) }),
2225 node: _visitor.fold_trait_item_kind(_i . node),
2226 }
2227}
2228# [ cfg ( feature = "full" ) ]
2229pub fn walk_trait_item_const<V: Folder + ?Sized>(_visitor: &mut V, _i: TraitItemConst) -> TraitItemConst {
2230 TraitItemConst {
2231 const_token: _i . const_token,
2232 ident: _i . ident,
2233 colon_token: _i . colon_token,
2234 ty: _visitor.fold_ty(_i . ty),
2235 default: _i . default,
2236 semi_token: _i . semi_token,
2237 }
2238}
2239# [ cfg ( feature = "full" ) ]
2240pub fn walk_trait_item_kind<V: Folder + ?Sized>(_visitor: &mut V, _i: TraitItemKind) -> TraitItemKind {
2241 use ::TraitItemKind::*;
2242 match _i {
2243 Const(_binding_0, ) => {
2244 Const (
2245 _visitor.fold_trait_item_const(_binding_0),
2246 )
2247 }
2248 Method(_binding_0, ) => {
2249 Method (
2250 _visitor.fold_trait_item_method(_binding_0),
2251 )
2252 }
2253 Type(_binding_0, ) => {
2254 Type (
2255 _visitor.fold_trait_item_type(_binding_0),
2256 )
2257 }
2258 Macro(_binding_0, ) => {
2259 Macro (
2260 _visitor.fold_mac(_binding_0),
2261 )
2262 }
2263 }
2264}
2265# [ cfg ( feature = "full" ) ]
2266pub fn walk_trait_item_method<V: Folder + ?Sized>(_visitor: &mut V, _i: TraitItemMethod) -> TraitItemMethod {
2267 TraitItemMethod {
2268 sig: _visitor.fold_method_sig(_i . sig),
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04002269 default: (_i . default).map(|it| { _visitor.fold_block(it) }),
Nika Layzell27726662017-10-24 23:16:35 -04002270 semi_token: _i . semi_token,
2271 }
2272}
2273# [ cfg ( feature = "full" ) ]
2274pub fn walk_trait_item_type<V: Folder + ?Sized>(_visitor: &mut V, _i: TraitItemType) -> TraitItemType {
2275 TraitItemType {
2276 type_token: _i . type_token,
2277 ident: _i . ident,
2278 colon_token: _i . colon_token,
2279 bounds: FoldHelper::lift(_i . bounds, |it| { _visitor.fold_ty_param_bound(it) }),
2280 default: _i . default,
2281 semi_token: _i . semi_token,
2282 }
2283}
2284
2285pub fn walk_ty<V: Folder + ?Sized>(_visitor: &mut V, _i: Ty) -> Ty {
2286 use ::Ty::*;
2287 match _i {
2288 Slice(_binding_0, ) => {
2289 Slice (
2290 _visitor.fold_ty_slice(_binding_0),
2291 )
2292 }
2293 Array(_binding_0, ) => {
2294 Array (
2295 _visitor.fold_ty_array(_binding_0),
2296 )
2297 }
2298 Ptr(_binding_0, ) => {
2299 Ptr (
2300 _visitor.fold_ty_ptr(_binding_0),
2301 )
2302 }
2303 Rptr(_binding_0, ) => {
2304 Rptr (
2305 _visitor.fold_ty_rptr(_binding_0),
2306 )
2307 }
2308 BareFn(_binding_0, ) => {
2309 BareFn (
2310 _visitor.fold_ty_bare_fn(_binding_0),
2311 )
2312 }
2313 Never(_binding_0, ) => {
2314 Never (
2315 _visitor.fold_ty_never(_binding_0),
2316 )
2317 }
2318 Tup(_binding_0, ) => {
2319 Tup (
2320 _visitor.fold_ty_tup(_binding_0),
2321 )
2322 }
2323 Path(_binding_0, ) => {
2324 Path (
2325 _visitor.fold_ty_path(_binding_0),
2326 )
2327 }
2328 TraitObject(_binding_0, ) => {
2329 TraitObject (
2330 _visitor.fold_ty_trait_object(_binding_0),
2331 )
2332 }
2333 ImplTrait(_binding_0, ) => {
2334 ImplTrait (
2335 _visitor.fold_ty_impl_trait(_binding_0),
2336 )
2337 }
2338 Paren(_binding_0, ) => {
2339 Paren (
2340 _visitor.fold_ty_paren(_binding_0),
2341 )
2342 }
2343 Group(_binding_0, ) => {
2344 Group (
2345 _visitor.fold_ty_group(_binding_0),
2346 )
2347 }
2348 Infer(_binding_0, ) => {
2349 Infer (
2350 _visitor.fold_ty_infer(_binding_0),
2351 )
2352 }
2353 Mac(_binding_0, ) => {
2354 Mac (
2355 _visitor.fold_mac(_binding_0),
2356 )
2357 }
2358 }
2359}
2360
2361pub fn walk_ty_array<V: Folder + ?Sized>(_visitor: &mut V, _i: TyArray) -> TyArray {
2362 TyArray {
2363 bracket_token: _i . bracket_token,
2364 ty: Box::new(_visitor.fold_ty(* _i . ty)),
2365 semi_token: _i . semi_token,
2366 amt: _visitor.fold_expr(_i . amt),
2367 }
2368}
2369
2370pub fn walk_ty_bare_fn<V: Folder + ?Sized>(_visitor: &mut V, _i: TyBareFn) -> TyBareFn {
2371 TyBareFn {
2372 ty: Box::new(_visitor.fold_bare_fn_ty(* _i . ty)),
2373 }
2374}
2375
2376pub fn walk_ty_group<V: Folder + ?Sized>(_visitor: &mut V, _i: TyGroup) -> TyGroup {
2377 TyGroup {
2378 group_token: _i . group_token,
2379 ty: Box::new(_visitor.fold_ty(* _i . ty)),
2380 }
2381}
2382
2383pub fn walk_ty_impl_trait<V: Folder + ?Sized>(_visitor: &mut V, _i: TyImplTrait) -> TyImplTrait {
2384 TyImplTrait {
2385 impl_token: _i . impl_token,
2386 bounds: FoldHelper::lift(_i . bounds, |it| { _visitor.fold_ty_param_bound(it) }),
2387 }
2388}
2389
2390pub fn walk_ty_infer<V: Folder + ?Sized>(_visitor: &mut V, _i: TyInfer) -> TyInfer {
2391 TyInfer {
2392 underscore_token: _i . underscore_token,
2393 }
2394}
2395
2396pub fn walk_ty_never<V: Folder + ?Sized>(_visitor: &mut V, _i: TyNever) -> TyNever {
2397 TyNever {
2398 bang_token: _i . bang_token,
2399 }
2400}
2401
2402pub fn walk_ty_param<V: Folder + ?Sized>(_visitor: &mut V, _i: TyParam) -> TyParam {
2403 TyParam {
2404 attrs: FoldHelper::lift(_i . attrs, |it| { _visitor.fold_attribute(it) }),
2405 ident: _i . ident,
2406 colon_token: _i . colon_token,
2407 bounds: FoldHelper::lift(_i . bounds, |it| { _visitor.fold_ty_param_bound(it) }),
2408 eq_token: _i . eq_token,
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04002409 default: (_i . default).map(|it| { _visitor.fold_ty(it) }),
Nika Layzell27726662017-10-24 23:16:35 -04002410 }
2411}
2412
2413pub fn walk_ty_param_bound<V: Folder + ?Sized>(_visitor: &mut V, _i: TyParamBound) -> TyParamBound {
2414 use ::TyParamBound::*;
2415 match _i {
2416 Trait(_binding_0, _binding_1, ) => {
2417 Trait (
2418 _visitor.fold_poly_trait_ref(_binding_0),
2419 _visitor.fold_trait_bound_modifier(_binding_1),
2420 )
2421 }
2422 Region(_binding_0, ) => {
2423 Region (
2424 _binding_0,
2425 )
2426 }
2427 }
2428}
2429
2430pub fn walk_ty_paren<V: Folder + ?Sized>(_visitor: &mut V, _i: TyParen) -> TyParen {
2431 TyParen {
2432 paren_token: _i . paren_token,
2433 ty: Box::new(_visitor.fold_ty(* _i . ty)),
2434 }
2435}
2436
2437pub fn walk_ty_path<V: Folder + ?Sized>(_visitor: &mut V, _i: TyPath) -> TyPath {
2438 TyPath {
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04002439 qself: (_i . qself).map(|it| { _visitor.fold_qself(it) }),
Nika Layzell27726662017-10-24 23:16:35 -04002440 path: _visitor.fold_path(_i . path),
2441 }
2442}
2443
2444pub fn walk_ty_ptr<V: Folder + ?Sized>(_visitor: &mut V, _i: TyPtr) -> TyPtr {
2445 TyPtr {
2446 star_token: _i . star_token,
2447 const_token: _i . const_token,
2448 ty: Box::new(_visitor.fold_mut_ty(* _i . ty)),
2449 }
2450}
2451
2452pub fn walk_ty_rptr<V: Folder + ?Sized>(_visitor: &mut V, _i: TyRptr) -> TyRptr {
2453 TyRptr {
2454 and_token: _i . and_token,
2455 lifetime: _i . lifetime,
2456 ty: Box::new(_visitor.fold_mut_ty(* _i . ty)),
2457 }
2458}
2459
2460pub fn walk_ty_slice<V: Folder + ?Sized>(_visitor: &mut V, _i: TySlice) -> TySlice {
2461 TySlice {
2462 ty: Box::new(_visitor.fold_ty(* _i . ty)),
2463 bracket_token: _i . bracket_token,
2464 }
2465}
2466
2467pub fn walk_ty_trait_object<V: Folder + ?Sized>(_visitor: &mut V, _i: TyTraitObject) -> TyTraitObject {
2468 TyTraitObject {
2469 bounds: FoldHelper::lift(_i . bounds, |it| { _visitor.fold_ty_param_bound(it) }),
2470 }
2471}
2472
2473pub fn walk_ty_tup<V: Folder + ?Sized>(_visitor: &mut V, _i: TyTup) -> TyTup {
2474 TyTup {
2475 paren_token: _i . paren_token,
2476 tys: FoldHelper::lift(_i . tys, |it| { _visitor.fold_ty(it) }),
2477 lone_comma: _i . lone_comma,
2478 }
2479}
2480
2481pub fn walk_type_binding<V: Folder + ?Sized>(_visitor: &mut V, _i: TypeBinding) -> TypeBinding {
2482 TypeBinding {
2483 ident: _i . ident,
2484 eq_token: _i . eq_token,
2485 ty: _visitor.fold_ty(_i . ty),
2486 }
2487}
2488
2489pub fn walk_un_op<V: Folder + ?Sized>(_visitor: &mut V, _i: UnOp) -> UnOp {
2490 use ::UnOp::*;
2491 match _i {
2492 Deref(_binding_0, ) => {
2493 Deref (
2494 _binding_0,
2495 )
2496 }
2497 Not(_binding_0, ) => {
2498 Not (
2499 _binding_0,
2500 )
2501 }
2502 Neg(_binding_0, ) => {
2503 Neg (
2504 _binding_0,
2505 )
2506 }
2507 }
2508}
2509
2510pub fn walk_unsafety<V: Folder + ?Sized>(_visitor: &mut V, _i: Unsafety) -> Unsafety {
2511 use ::Unsafety::*;
2512 match _i {
2513 Unsafe(_binding_0, ) => {
2514 Unsafe (
2515 _binding_0,
2516 )
2517 }
2518 Normal => { Normal }
2519 }
2520}
2521
2522pub fn walk_variant<V: Folder + ?Sized>(_visitor: &mut V, _i: Variant) -> Variant {
2523 Variant {
2524 ident: _i . ident,
2525 attrs: FoldHelper::lift(_i . attrs, |it| { _visitor.fold_attribute(it) }),
2526 data: _visitor.fold_variant_data(_i . data),
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04002527 discriminant: (_i . discriminant).map(|it| { _visitor.fold_expr(it) }),
Nika Layzell27726662017-10-24 23:16:35 -04002528 eq_token: _i . eq_token,
2529 }
2530}
2531
2532pub fn walk_variant_data<V: Folder + ?Sized>(_visitor: &mut V, _i: VariantData) -> VariantData {
2533 use ::VariantData::*;
2534 match _i {
2535 Struct(_binding_0, _binding_1, ) => {
2536 Struct (
2537 FoldHelper::lift(_binding_0, |it| { _visitor.fold_field(it) }),
2538 _binding_1,
2539 )
2540 }
2541 Tuple(_binding_0, _binding_1, ) => {
2542 Tuple (
2543 FoldHelper::lift(_binding_0, |it| { _visitor.fold_field(it) }),
2544 _binding_1,
2545 )
2546 }
2547 Unit => { Unit }
2548 }
2549}
2550# [ cfg ( feature = "full" ) ]
2551pub fn walk_view_path<V: Folder + ?Sized>(_visitor: &mut V, _i: ViewPath) -> ViewPath {
2552 use ::ViewPath::*;
2553 match _i {
2554 Simple(_binding_0, ) => {
2555 Simple (
2556 _visitor.fold_path_simple(_binding_0),
2557 )
2558 }
2559 Glob(_binding_0, ) => {
2560 Glob (
2561 _visitor.fold_path_glob(_binding_0),
2562 )
2563 }
2564 List(_binding_0, ) => {
2565 List (
2566 _visitor.fold_path_list(_binding_0),
2567 )
2568 }
2569 }
2570}
2571
2572pub fn walk_vis_crate<V: Folder + ?Sized>(_visitor: &mut V, _i: VisCrate) -> VisCrate {
2573 VisCrate {
2574 pub_token: _i . pub_token,
2575 paren_token: _i . paren_token,
2576 crate_token: _i . crate_token,
2577 }
2578}
2579
2580pub fn walk_vis_inherited<V: Folder + ?Sized>(_visitor: &mut V, _i: VisInherited) -> VisInherited {
2581 VisInherited {
2582 }
2583}
2584
2585pub fn walk_vis_public<V: Folder + ?Sized>(_visitor: &mut V, _i: VisPublic) -> VisPublic {
2586 VisPublic {
2587 pub_token: _i . pub_token,
2588 }
2589}
2590
2591pub fn walk_vis_restricted<V: Folder + ?Sized>(_visitor: &mut V, _i: VisRestricted) -> VisRestricted {
2592 VisRestricted {
2593 pub_token: _i . pub_token,
2594 paren_token: _i . paren_token,
2595 in_token: _i . in_token,
2596 path: Box::new(_visitor.fold_path(* _i . path)),
2597 }
2598}
2599
2600pub fn walk_visibility<V: Folder + ?Sized>(_visitor: &mut V, _i: Visibility) -> Visibility {
2601 use ::Visibility::*;
2602 match _i {
2603 Public(_binding_0, ) => {
2604 Public (
2605 _visitor.fold_vis_public(_binding_0),
2606 )
2607 }
2608 Crate(_binding_0, ) => {
2609 Crate (
2610 _visitor.fold_vis_crate(_binding_0),
2611 )
2612 }
2613 Restricted(_binding_0, ) => {
2614 Restricted (
2615 _visitor.fold_vis_restricted(_binding_0),
2616 )
2617 }
2618 Inherited(_binding_0, ) => {
2619 Inherited (
2620 _visitor.fold_vis_inherited(_binding_0),
2621 )
2622 }
2623 }
2624}
2625
2626pub fn walk_where_bound_predicate<V: Folder + ?Sized>(_visitor: &mut V, _i: WhereBoundPredicate) -> WhereBoundPredicate {
2627 WhereBoundPredicate {
Nika Layzell4ab8d6e2017-10-26 09:45:49 -04002628 bound_lifetimes: (_i . bound_lifetimes).map(|it| { _visitor.fold_bound_lifetimes(it) }),
Nika Layzell27726662017-10-24 23:16:35 -04002629 bounded_ty: _visitor.fold_ty(_i . bounded_ty),
2630 colon_token: _i . colon_token,
2631 bounds: FoldHelper::lift(_i . bounds, |it| { _visitor.fold_ty_param_bound(it) }),
2632 }
2633}
2634
2635pub fn walk_where_clause<V: Folder + ?Sized>(_visitor: &mut V, _i: WhereClause) -> WhereClause {
2636 WhereClause {
2637 where_token: _i . where_token,
2638 predicates: FoldHelper::lift(_i . predicates, |it| { _visitor.fold_where_predicate(it) }),
2639 }
2640}
2641
2642pub fn walk_where_eq_predicate<V: Folder + ?Sized>(_visitor: &mut V, _i: WhereEqPredicate) -> WhereEqPredicate {
2643 WhereEqPredicate {
2644 lhs_ty: _visitor.fold_ty(_i . lhs_ty),
2645 eq_token: _i . eq_token,
2646 rhs_ty: _visitor.fold_ty(_i . rhs_ty),
2647 }
2648}
2649
2650pub fn walk_where_predicate<V: Folder + ?Sized>(_visitor: &mut V, _i: WherePredicate) -> WherePredicate {
2651 use ::WherePredicate::*;
2652 match _i {
2653 BoundPredicate(_binding_0, ) => {
2654 BoundPredicate (
2655 _visitor.fold_where_bound_predicate(_binding_0),
2656 )
2657 }
2658 RegionPredicate(_binding_0, ) => {
2659 RegionPredicate (
2660 _visitor.fold_where_region_predicate(_binding_0),
2661 )
2662 }
2663 EqPredicate(_binding_0, ) => {
2664 EqPredicate (
2665 _visitor.fold_where_eq_predicate(_binding_0),
2666 )
2667 }
2668 }
2669}
2670
2671pub fn walk_where_region_predicate<V: Folder + ?Sized>(_visitor: &mut V, _i: WhereRegionPredicate) -> WhereRegionPredicate {
2672 WhereRegionPredicate {
2673 lifetime: _i . lifetime,
2674 colon_token: _i . colon_token,
2675 bounds: _i . bounds,
2676 }
2677}
2678