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