blob: e63cffb961e3140c82c991c5f41cd383b949fdd8 [file] [log] [blame]
Nika Layzell27726662017-10-24 23:16:35 -04001// THIS FILE IS AUTOMATICALLY GENERATED; DO NOT EDIT
2
3//! AST walker. Each overridden visit method has full control over what
4//! happens with its node, it can do its own traversal of the node's children,
5//! call `visit::walk_*` to apply the default traversal algorithm, or prevent
6//! deeper traversal by doing nothing.
7
David Tolnay0afc9b32017-12-27 13:38:24 -05008#![cfg_attr(rustfmt, rustfmt_skip)]
9
David Tolnayf0d63bf2017-12-26 12:29:47 -050010#![cfg_attr(feature = "cargo-clippy", allow(match_same_arms))]
11
Nika Layzella6f46c42017-10-26 15:26:16 -040012use *;
David Tolnay98942562017-12-26 21:24:35 -050013use proc_macro2::Span;
David Tolnaycc0f0372017-12-28 19:11:04 -050014use gen::helper::visit::*;
Nika Layzell27726662017-10-24 23:16:35 -040015
Nika Layzell4ab8d6e2017-10-26 09:45:49 -040016
17#[cfg(feature = "full")]
18macro_rules! full {
19 ($e:expr) => { $e }
20}
21
22#[cfg(not(feature = "full"))]
23macro_rules! full {
24 ($e:expr) => { unreachable!() }
25}
26
27
Nika Layzell27726662017-10-24 23:16:35 -040028/// Each method of the Visitor trait is a hook to be potentially
29/// overridden. Each method's default implementation recursively visits
30/// the substructure of the input via the corresponding `walk` method;
31/// e.g. the `visit_mod` method by default calls `visit::walk_mod`.
32///
33/// If you want to ensure that your code handles every variant
34/// explicitly, you need to override each method. (And you also need
35/// to monitor future changes to `Visitor` in case a new method with a
36/// new default implementation gets introduced.)
Nika Layzellc86173a2017-11-18 13:55:22 -050037pub trait Visitor<'ast> {
Nika Layzell27726662017-10-24 23:16:35 -040038
Nika Layzellc86173a2017-11-18 13:55:22 -050039fn visit_abi(&mut self, i: &'ast Abi) { visit_abi(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040040
Nika Layzellc86173a2017-11-18 13:55:22 -050041fn visit_abi_kind(&mut self, i: &'ast AbiKind) { visit_abi_kind(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040042
Nika Layzellc08227a2017-12-04 16:30:17 -050043fn visit_angle_bracketed_generic_arguments(&mut self, i: &'ast AngleBracketedGenericArguments) { visit_angle_bracketed_generic_arguments(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040044# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050045fn visit_arg_captured(&mut self, i: &'ast ArgCaptured) { visit_arg_captured(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040046# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050047fn visit_arg_self(&mut self, i: &'ast ArgSelf) { visit_arg_self(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040048# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050049fn visit_arg_self_ref(&mut self, i: &'ast ArgSelfRef) { visit_arg_self_ref(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040050# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050051fn visit_arm(&mut self, i: &'ast Arm) { visit_arm(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040052
Nika Layzellc86173a2017-11-18 13:55:22 -050053fn visit_attr_style(&mut self, i: &'ast AttrStyle) { visit_attr_style(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040054
Nika Layzellc86173a2017-11-18 13:55:22 -050055fn visit_attribute(&mut self, i: &'ast Attribute) { visit_attribute(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040056
Nika Layzellc86173a2017-11-18 13:55:22 -050057fn visit_bare_fn_arg(&mut self, i: &'ast BareFnArg) { visit_bare_fn_arg(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040058
Nika Layzellc86173a2017-11-18 13:55:22 -050059fn visit_bare_fn_arg_name(&mut self, i: &'ast BareFnArgName) { visit_bare_fn_arg_name(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040060
Nika Layzellc86173a2017-11-18 13:55:22 -050061fn visit_bare_fn_type(&mut self, i: &'ast BareFnType) { visit_bare_fn_type(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040062
Nika Layzellc86173a2017-11-18 13:55:22 -050063fn visit_bin_op(&mut self, i: &'ast BinOp) { visit_bin_op(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040064# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050065fn visit_binding_mode(&mut self, i: &'ast BindingMode) { visit_binding_mode(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040066# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050067fn visit_block(&mut self, i: &'ast Block) { visit_block(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040068
Nika Layzellc86173a2017-11-18 13:55:22 -050069fn visit_body(&mut self, i: &'ast Body) { visit_body(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040070
Nika Layzellc86173a2017-11-18 13:55:22 -050071fn visit_body_enum(&mut self, i: &'ast BodyEnum) { visit_body_enum(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040072
Nika Layzellc86173a2017-11-18 13:55:22 -050073fn visit_body_struct(&mut self, i: &'ast BodyStruct) { visit_body_struct(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040074
Nika Layzellc86173a2017-11-18 13:55:22 -050075fn visit_bound_lifetimes(&mut self, i: &'ast BoundLifetimes) { visit_bound_lifetimes(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040076# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050077fn visit_capture_by(&mut self, i: &'ast CaptureBy) { visit_capture_by(self, i) }
Nika Layzellf1fdc0b2017-12-04 19:58:32 -050078
79fn visit_const_param(&mut self, i: &'ast ConstParam) { visit_const_param(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040080# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050081fn visit_constness(&mut self, i: &'ast Constness) { visit_constness(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040082# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050083fn visit_defaultness(&mut self, i: &'ast Defaultness) { visit_defaultness(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040084
Nika Layzellc86173a2017-11-18 13:55:22 -050085fn visit_derive_input(&mut self, i: &'ast DeriveInput) { visit_derive_input(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040086
Nika Layzellc86173a2017-11-18 13:55:22 -050087fn visit_expr(&mut self, i: &'ast Expr) { visit_expr(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040088# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050089fn visit_expr_addr_of(&mut self, i: &'ast ExprAddrOf) { visit_expr_addr_of(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040090# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050091fn visit_expr_array(&mut self, i: &'ast ExprArray) { visit_expr_array(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040092# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050093fn visit_expr_assign(&mut self, i: &'ast ExprAssign) { visit_expr_assign(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040094# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050095fn visit_expr_assign_op(&mut self, i: &'ast ExprAssignOp) { visit_expr_assign_op(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040096
Nika Layzellc86173a2017-11-18 13:55:22 -050097fn visit_expr_binary(&mut self, i: &'ast ExprBinary) { visit_expr_binary(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040098# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050099fn visit_expr_block(&mut self, i: &'ast ExprBlock) { visit_expr_block(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400100# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500101fn visit_expr_box(&mut self, i: &'ast ExprBox) { visit_expr_box(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400102# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500103fn visit_expr_break(&mut self, i: &'ast ExprBreak) { visit_expr_break(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400104
Nika Layzellc86173a2017-11-18 13:55:22 -0500105fn visit_expr_call(&mut self, i: &'ast ExprCall) { visit_expr_call(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400106
Nika Layzellc86173a2017-11-18 13:55:22 -0500107fn visit_expr_cast(&mut self, i: &'ast ExprCast) { visit_expr_cast(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400108# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500109fn visit_expr_catch(&mut self, i: &'ast ExprCatch) { visit_expr_catch(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400110# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500111fn visit_expr_closure(&mut self, i: &'ast ExprClosure) { visit_expr_closure(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400112# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500113fn visit_expr_continue(&mut self, i: &'ast ExprContinue) { visit_expr_continue(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400114# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500115fn visit_expr_field(&mut self, i: &'ast ExprField) { visit_expr_field(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400116# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500117fn visit_expr_for_loop(&mut self, i: &'ast ExprForLoop) { visit_expr_for_loop(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400118
Nika Layzellc86173a2017-11-18 13:55:22 -0500119fn visit_expr_group(&mut self, i: &'ast ExprGroup) { visit_expr_group(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400120# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500121fn visit_expr_if(&mut self, i: &'ast ExprIf) { visit_expr_if(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400122# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500123fn visit_expr_if_let(&mut self, i: &'ast ExprIfLet) { visit_expr_if_let(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400124# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500125fn visit_expr_in_place(&mut self, i: &'ast ExprInPlace) { visit_expr_in_place(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400126
Nika Layzellc86173a2017-11-18 13:55:22 -0500127fn visit_expr_index(&mut self, i: &'ast ExprIndex) { visit_expr_index(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400128
Nika Layzellc86173a2017-11-18 13:55:22 -0500129fn visit_expr_kind(&mut self, i: &'ast ExprKind) { visit_expr_kind(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400130# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500131fn visit_expr_loop(&mut self, i: &'ast ExprLoop) { visit_expr_loop(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400132# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500133fn visit_expr_match(&mut self, i: &'ast ExprMatch) { visit_expr_match(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400134# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500135fn visit_expr_method_call(&mut self, i: &'ast ExprMethodCall) { visit_expr_method_call(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400136
Nika Layzellc86173a2017-11-18 13:55:22 -0500137fn visit_expr_paren(&mut self, i: &'ast ExprParen) { visit_expr_paren(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400138
Nika Layzellc86173a2017-11-18 13:55:22 -0500139fn visit_expr_path(&mut self, i: &'ast ExprPath) { visit_expr_path(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400140# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500141fn visit_expr_range(&mut self, i: &'ast ExprRange) { visit_expr_range(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400142# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500143fn visit_expr_repeat(&mut self, i: &'ast ExprRepeat) { visit_expr_repeat(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400144# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500145fn visit_expr_ret(&mut self, i: &'ast ExprRet) { visit_expr_ret(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400146# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500147fn visit_expr_struct(&mut self, i: &'ast ExprStruct) { visit_expr_struct(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400148# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500149fn visit_expr_try(&mut self, i: &'ast ExprTry) { visit_expr_try(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400150# [ cfg ( feature = "full" ) ]
David Tolnay05362582017-12-26 01:33:57 -0500151fn visit_expr_tuple(&mut self, i: &'ast ExprTuple) { visit_expr_tuple(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400152
Nika Layzellc86173a2017-11-18 13:55:22 -0500153fn visit_expr_type(&mut self, i: &'ast ExprType) { visit_expr_type(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400154
Nika Layzellc86173a2017-11-18 13:55:22 -0500155fn visit_expr_unary(&mut self, i: &'ast ExprUnary) { visit_expr_unary(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400156# [ cfg ( feature = "full" ) ]
Nika Layzell640832a2017-12-04 13:37:09 -0500157fn visit_expr_unsafe(&mut self, i: &'ast ExprUnsafe) { visit_expr_unsafe(self, i) }
158# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500159fn visit_expr_while(&mut self, i: &'ast ExprWhile) { visit_expr_while(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400160# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500161fn visit_expr_while_let(&mut self, i: &'ast ExprWhileLet) { visit_expr_while_let(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400162# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500163fn visit_expr_yield(&mut self, i: &'ast ExprYield) { visit_expr_yield(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400164
Nika Layzellc86173a2017-11-18 13:55:22 -0500165fn visit_field(&mut self, i: &'ast Field) { visit_field(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400166# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500167fn visit_field_pat(&mut self, i: &'ast FieldPat) { visit_field_pat(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400168# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500169fn visit_field_value(&mut self, i: &'ast FieldValue) { visit_field_value(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400170# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500171fn visit_file(&mut self, i: &'ast File) { visit_file(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400172# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500173fn visit_fn_arg(&mut self, i: &'ast FnArg) { visit_fn_arg(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400174# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500175fn visit_fn_decl(&mut self, i: &'ast FnDecl) { visit_fn_decl(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400176# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500177fn visit_foreign_item(&mut self, i: &'ast ForeignItem) { visit_foreign_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400178# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500179fn visit_foreign_item_fn(&mut self, i: &'ast ForeignItemFn) { visit_foreign_item_fn(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400180# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500181fn visit_foreign_item_static(&mut self, i: &'ast ForeignItemStatic) { visit_foreign_item_static(self, i) }
David Tolnay199bcbb2017-11-12 10:33:52 -0800182# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500183fn visit_foreign_item_type(&mut self, i: &'ast ForeignItemType) { visit_foreign_item_type(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400184
Nika Layzellc08227a2017-12-04 16:30:17 -0500185fn visit_generic_argument(&mut self, i: &'ast GenericArgument) { visit_generic_argument(self, i) }
Nika Layzell357885a2017-12-04 15:47:07 -0500186
David Tolnayc2f1aba2017-11-12 20:29:22 -0800187fn visit_generic_param(&mut self, i: &'ast GenericParam) { visit_generic_param(self, i) }
188
Nika Layzellc86173a2017-11-18 13:55:22 -0500189fn visit_generics(&mut self, i: &'ast Generics) { visit_generics(self, i) }
Nika Layzellefb83ba2017-12-19 18:23:55 -0500190
191fn visit_ident(&mut self, i: &'ast Ident) { visit_ident(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400192# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500193fn visit_impl_item(&mut self, i: &'ast ImplItem) { visit_impl_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400194# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500195fn visit_impl_item_const(&mut self, i: &'ast ImplItemConst) { visit_impl_item_const(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400196# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500197fn visit_impl_item_macro(&mut self, i: &'ast ImplItemMacro) { visit_impl_item_macro(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400198# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500199fn visit_impl_item_method(&mut self, i: &'ast ImplItemMethod) { visit_impl_item_method(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400200# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500201fn visit_impl_item_type(&mut self, i: &'ast ImplItemType) { visit_impl_item_type(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400202# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500203fn visit_impl_polarity(&mut self, i: &'ast ImplPolarity) { visit_impl_polarity(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400204# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500205fn visit_in_place_kind(&mut self, i: &'ast InPlaceKind) { visit_in_place_kind(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400206# [ cfg ( feature = "full" ) ]
David Tolnay85b69a42017-12-27 20:43:10 -0500207fn visit_index(&mut self, i: &'ast Index) { visit_index(self, i) }
208# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500209fn visit_item(&mut self, i: &'ast Item) { visit_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400210# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500211fn visit_item_const(&mut self, i: &'ast ItemConst) { visit_item_const(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400212# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500213fn visit_item_default_impl(&mut self, i: &'ast ItemDefaultImpl) { visit_item_default_impl(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400214# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500215fn visit_item_enum(&mut self, i: &'ast ItemEnum) { visit_item_enum(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400216# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500217fn visit_item_extern_crate(&mut self, i: &'ast ItemExternCrate) { visit_item_extern_crate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400218# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500219fn visit_item_fn(&mut self, i: &'ast ItemFn) { visit_item_fn(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400220# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500221fn visit_item_foreign_mod(&mut self, i: &'ast ItemForeignMod) { visit_item_foreign_mod(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400222# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500223fn visit_item_impl(&mut self, i: &'ast ItemImpl) { visit_item_impl(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400224# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500225fn visit_item_macro(&mut self, i: &'ast ItemMacro) { visit_item_macro(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400226# [ cfg ( feature = "full" ) ]
David Tolnay500d8322017-12-18 00:32:51 -0800227fn visit_item_macro2(&mut self, i: &'ast ItemMacro2) { visit_item_macro2(self, i) }
228# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500229fn visit_item_mod(&mut self, i: &'ast ItemMod) { visit_item_mod(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400230# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500231fn visit_item_static(&mut self, i: &'ast ItemStatic) { visit_item_static(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400232# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500233fn visit_item_struct(&mut self, i: &'ast ItemStruct) { visit_item_struct(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400234# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500235fn visit_item_trait(&mut self, i: &'ast ItemTrait) { visit_item_trait(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400236# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500237fn visit_item_type(&mut self, i: &'ast ItemType) { visit_item_type(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400238# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500239fn visit_item_union(&mut self, i: &'ast ItemUnion) { visit_item_union(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400240# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500241fn visit_item_use(&mut self, i: &'ast ItemUse) { visit_item_use(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400242
David Tolnay4ba63a02017-12-28 15:53:05 -0500243fn visit_lifetime(&mut self, i: &'ast Lifetime) { visit_lifetime(self, i) }
244
Nika Layzellc86173a2017-11-18 13:55:22 -0500245fn visit_lifetime_def(&mut self, i: &'ast LifetimeDef) { visit_lifetime_def(self, i) }
David Tolnay4ba63a02017-12-28 15:53:05 -0500246
247fn visit_lit(&mut self, i: &'ast Lit) { visit_lit(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400248# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500249fn visit_local(&mut self, i: &'ast Local) { visit_local(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400250
Nika Layzellc86173a2017-11-18 13:55:22 -0500251fn visit_macro(&mut self, i: &'ast Macro) { visit_macro(self, i) }
David Tolnay85b69a42017-12-27 20:43:10 -0500252# [ cfg ( feature = "full" ) ]
253fn visit_member(&mut self, i: &'ast Member) { visit_member(self, i) }
David Tolnaydecf28d2017-11-11 11:56:45 -0800254
Nika Layzellc86173a2017-11-18 13:55:22 -0500255fn visit_meta_item(&mut self, i: &'ast MetaItem) { visit_meta_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400256
Nika Layzellc86173a2017-11-18 13:55:22 -0500257fn visit_meta_item_list(&mut self, i: &'ast MetaItemList) { visit_meta_item_list(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400258
Nika Layzellc86173a2017-11-18 13:55:22 -0500259fn visit_meta_name_value(&mut self, i: &'ast MetaNameValue) { visit_meta_name_value(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400260# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500261fn visit_method_sig(&mut self, i: &'ast MethodSig) { visit_method_sig(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400262
Nika Layzellc86173a2017-11-18 13:55:22 -0500263fn visit_mut_type(&mut self, i: &'ast MutType) { visit_mut_type(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400264
Nika Layzellc86173a2017-11-18 13:55:22 -0500265fn visit_mutability(&mut self, i: &'ast Mutability) { visit_mutability(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400266
Nika Layzellc86173a2017-11-18 13:55:22 -0500267fn visit_nested_meta_item(&mut self, i: &'ast NestedMetaItem) { visit_nested_meta_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400268
Nika Layzellc08227a2017-12-04 16:30:17 -0500269fn visit_parenthesized_generic_arguments(&mut self, i: &'ast ParenthesizedGenericArguments) { visit_parenthesized_generic_arguments(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400270# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500271fn visit_pat(&mut self, i: &'ast Pat) { visit_pat(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400272# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500273fn visit_pat_box(&mut self, i: &'ast PatBox) { visit_pat_box(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400274# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500275fn visit_pat_ident(&mut self, i: &'ast PatIdent) { visit_pat_ident(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400276# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500277fn visit_pat_lit(&mut self, i: &'ast PatLit) { visit_pat_lit(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400278# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500279fn visit_pat_path(&mut self, i: &'ast PatPath) { visit_pat_path(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400280# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500281fn visit_pat_range(&mut self, i: &'ast PatRange) { visit_pat_range(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400282# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500283fn visit_pat_ref(&mut self, i: &'ast PatRef) { visit_pat_ref(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400284# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500285fn visit_pat_slice(&mut self, i: &'ast PatSlice) { visit_pat_slice(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400286# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500287fn visit_pat_struct(&mut self, i: &'ast PatStruct) { visit_pat_struct(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400288# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500289fn visit_pat_tuple(&mut self, i: &'ast PatTuple) { visit_pat_tuple(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400290# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500291fn visit_pat_tuple_struct(&mut self, i: &'ast PatTupleStruct) { visit_pat_tuple_struct(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400292# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500293fn visit_pat_wild(&mut self, i: &'ast PatWild) { visit_pat_wild(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400294
Nika Layzellc86173a2017-11-18 13:55:22 -0500295fn visit_path(&mut self, i: &'ast Path) { visit_path(self, i) }
Nika Layzellc08227a2017-12-04 16:30:17 -0500296
297fn visit_path_arguments(&mut self, i: &'ast PathArguments) { visit_path_arguments(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400298
Nika Layzellc86173a2017-11-18 13:55:22 -0500299fn visit_path_segment(&mut self, i: &'ast PathSegment) { visit_path_segment(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400300
Nika Layzellc86173a2017-11-18 13:55:22 -0500301fn visit_poly_trait_ref(&mut self, i: &'ast PolyTraitRef) { visit_poly_trait_ref(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400302
Nika Layzellc86173a2017-11-18 13:55:22 -0500303fn visit_qself(&mut self, i: &'ast QSelf) { visit_qself(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400304# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500305fn visit_range_limits(&mut self, i: &'ast RangeLimits) { visit_range_limits(self, i) }
David Tolnayf93b90d2017-11-11 19:21:26 -0800306
Nika Layzellc86173a2017-11-18 13:55:22 -0500307fn visit_return_type(&mut self, i: &'ast ReturnType) { visit_return_type(self, i) }
Nika Layzellefb83ba2017-12-19 18:23:55 -0500308
309fn visit_span(&mut self, i: &'ast Span) { visit_span(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400310# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500311fn visit_stmt(&mut self, i: &'ast Stmt) { visit_stmt(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400312
Nika Layzellc86173a2017-11-18 13:55:22 -0500313fn visit_trait_bound_modifier(&mut self, i: &'ast TraitBoundModifier) { visit_trait_bound_modifier(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400314# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500315fn visit_trait_item(&mut self, i: &'ast TraitItem) { visit_trait_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400316# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500317fn visit_trait_item_const(&mut self, i: &'ast TraitItemConst) { visit_trait_item_const(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400318# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500319fn visit_trait_item_macro(&mut self, i: &'ast TraitItemMacro) { visit_trait_item_macro(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400320# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500321fn visit_trait_item_method(&mut self, i: &'ast TraitItemMethod) { visit_trait_item_method(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400322# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500323fn visit_trait_item_type(&mut self, i: &'ast TraitItemType) { visit_trait_item_type(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400324
Nika Layzellc86173a2017-11-18 13:55:22 -0500325fn visit_type(&mut self, i: &'ast Type) { visit_type(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400326
Nika Layzellc86173a2017-11-18 13:55:22 -0500327fn visit_type_array(&mut self, i: &'ast TypeArray) { visit_type_array(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400328
Nika Layzellc86173a2017-11-18 13:55:22 -0500329fn visit_type_bare_fn(&mut self, i: &'ast TypeBareFn) { visit_type_bare_fn(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400330
Nika Layzellc86173a2017-11-18 13:55:22 -0500331fn visit_type_binding(&mut self, i: &'ast TypeBinding) { visit_type_binding(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400332
Nika Layzellc86173a2017-11-18 13:55:22 -0500333fn visit_type_group(&mut self, i: &'ast TypeGroup) { visit_type_group(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800334
Nika Layzellc86173a2017-11-18 13:55:22 -0500335fn visit_type_impl_trait(&mut self, i: &'ast TypeImplTrait) { visit_type_impl_trait(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800336
Nika Layzellc86173a2017-11-18 13:55:22 -0500337fn visit_type_infer(&mut self, i: &'ast TypeInfer) { visit_type_infer(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800338
Nika Layzellc86173a2017-11-18 13:55:22 -0500339fn visit_type_never(&mut self, i: &'ast TypeNever) { visit_type_never(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800340
Nika Layzellc86173a2017-11-18 13:55:22 -0500341fn visit_type_param(&mut self, i: &'ast TypeParam) { visit_type_param(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800342
Nika Layzellc86173a2017-11-18 13:55:22 -0500343fn visit_type_param_bound(&mut self, i: &'ast TypeParamBound) { visit_type_param_bound(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800344
Nika Layzellc86173a2017-11-18 13:55:22 -0500345fn visit_type_paren(&mut self, i: &'ast TypeParen) { visit_type_paren(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800346
Nika Layzellc86173a2017-11-18 13:55:22 -0500347fn visit_type_path(&mut self, i: &'ast TypePath) { visit_type_path(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800348
Nika Layzellc86173a2017-11-18 13:55:22 -0500349fn visit_type_ptr(&mut self, i: &'ast TypePtr) { visit_type_ptr(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800350
Nika Layzellc86173a2017-11-18 13:55:22 -0500351fn visit_type_reference(&mut self, i: &'ast TypeReference) { visit_type_reference(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800352
Nika Layzellc86173a2017-11-18 13:55:22 -0500353fn visit_type_slice(&mut self, i: &'ast TypeSlice) { visit_type_slice(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800354
Nika Layzellc86173a2017-11-18 13:55:22 -0500355fn visit_type_trait_object(&mut self, i: &'ast TypeTraitObject) { visit_type_trait_object(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800356
David Tolnay05362582017-12-26 01:33:57 -0500357fn visit_type_tuple(&mut self, i: &'ast TypeTuple) { visit_type_tuple(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800358
Nika Layzellc86173a2017-11-18 13:55:22 -0500359fn visit_un_op(&mut self, i: &'ast UnOp) { visit_un_op(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400360
Nika Layzellc86173a2017-11-18 13:55:22 -0500361fn visit_unsafety(&mut self, i: &'ast Unsafety) { visit_unsafety(self, i) }
David Tolnay5f332a92017-12-26 00:42:45 -0500362# [ cfg ( feature = "full" ) ]
363fn visit_use_glob(&mut self, i: &'ast UseGlob) { visit_use_glob(self, i) }
364# [ cfg ( feature = "full" ) ]
365fn visit_use_list(&mut self, i: &'ast UseList) { visit_use_list(self, i) }
366# [ cfg ( feature = "full" ) ]
367fn visit_use_path(&mut self, i: &'ast UsePath) { visit_use_path(self, i) }
368# [ cfg ( feature = "full" ) ]
369fn visit_use_tree(&mut self, i: &'ast UseTree) { visit_use_tree(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400370
Nika Layzellc86173a2017-11-18 13:55:22 -0500371fn visit_variant(&mut self, i: &'ast Variant) { visit_variant(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400372
Nika Layzellc86173a2017-11-18 13:55:22 -0500373fn visit_variant_data(&mut self, i: &'ast VariantData) { visit_variant_data(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400374
Nika Layzellc86173a2017-11-18 13:55:22 -0500375fn visit_vis_crate(&mut self, i: &'ast VisCrate) { visit_vis_crate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400376
Nika Layzellc86173a2017-11-18 13:55:22 -0500377fn visit_vis_inherited(&mut self, i: &'ast VisInherited) { visit_vis_inherited(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400378
Nika Layzellc86173a2017-11-18 13:55:22 -0500379fn visit_vis_public(&mut self, i: &'ast VisPublic) { visit_vis_public(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400380
Nika Layzellc86173a2017-11-18 13:55:22 -0500381fn visit_vis_restricted(&mut self, i: &'ast VisRestricted) { visit_vis_restricted(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400382
Nika Layzellc86173a2017-11-18 13:55:22 -0500383fn visit_visibility(&mut self, i: &'ast Visibility) { visit_visibility(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400384
Nika Layzellc86173a2017-11-18 13:55:22 -0500385fn visit_where_bound_predicate(&mut self, i: &'ast WhereBoundPredicate) { visit_where_bound_predicate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400386
Nika Layzellc86173a2017-11-18 13:55:22 -0500387fn visit_where_clause(&mut self, i: &'ast WhereClause) { visit_where_clause(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400388
Nika Layzellc86173a2017-11-18 13:55:22 -0500389fn visit_where_eq_predicate(&mut self, i: &'ast WhereEqPredicate) { visit_where_eq_predicate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400390
Nika Layzellc86173a2017-11-18 13:55:22 -0500391fn visit_where_predicate(&mut self, i: &'ast WherePredicate) { visit_where_predicate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400392
Nika Layzellc86173a2017-11-18 13:55:22 -0500393fn visit_where_region_predicate(&mut self, i: &'ast WhereRegionPredicate) { visit_where_region_predicate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400394
395}
396
397
Nika Layzellc86173a2017-11-18 13:55:22 -0500398pub fn visit_abi<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Abi) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500399 tokens_helper(_visitor, &(& _i . extern_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500400 _visitor.visit_abi_kind(& _i . kind);
Nika Layzell27726662017-10-24 23:16:35 -0400401}
402
Nika Layzellc86173a2017-11-18 13:55:22 -0500403pub fn visit_abi_kind<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast AbiKind) {
Nika Layzell27726662017-10-24 23:16:35 -0400404 use ::AbiKind::*;
405 match *_i {
406 Named(ref _binding_0, ) => {
David Tolnay4ba63a02017-12-28 15:53:05 -0500407 _visitor.visit_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400408 }
409 Default => { }
410 }
411}
412
Nika Layzellc08227a2017-12-04 16:30:17 -0500413pub fn visit_angle_bracketed_generic_arguments<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast AngleBracketedGenericArguments) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500414 if let Some(ref it) = _i . turbofish { tokens_helper(_visitor, &(it).0) };
415 tokens_helper(_visitor, &(& _i . lt_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500416 for el in & _i . args { let it = el.item(); _visitor.visit_generic_argument(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500417 tokens_helper(_visitor, &(& _i . gt_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400418}
419# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500420pub fn visit_arg_captured<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ArgCaptured) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500421 _visitor.visit_pat(& _i . pat);
David Tolnaycc0f0372017-12-28 19:11:04 -0500422 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500423 _visitor.visit_type(& _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -0400424}
425# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500426pub fn visit_arg_self<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ArgSelf) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500427 _visitor.visit_mutability(& _i . mutbl);
David Tolnaycc0f0372017-12-28 19:11:04 -0500428 tokens_helper(_visitor, &(& _i . self_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400429}
430# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500431pub fn visit_arg_self_ref<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ArgSelfRef) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500432 tokens_helper(_visitor, &(& _i . and_token).0);
David Tolnay4ba63a02017-12-28 15:53:05 -0500433 if let Some(ref it) = _i . lifetime { _visitor.visit_lifetime(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500434 _visitor.visit_mutability(& _i . mutbl);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500435 tokens_helper(_visitor, &(& _i . self_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400436}
437# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500438pub fn visit_arm<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Arm) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500439 for it in & _i . attrs { _visitor.visit_attribute(it) };
440 for el in & _i . pats { let it = el.item(); _visitor.visit_pat(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500441 if let Some(ref it) = _i . if_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a918742017-12-28 16:54:41 -0500442 if let Some(ref it) = _i . guard { _visitor.visit_expr(& * * it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500443 tokens_helper(_visitor, &(& _i . rocket_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500444 _visitor.visit_expr(& * _i . body);
David Tolnaycc0f0372017-12-28 19:11:04 -0500445 if let Some(ref it) = _i . comma { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -0400446}
447
Nika Layzellc86173a2017-11-18 13:55:22 -0500448pub fn visit_attr_style<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast AttrStyle) {
Nika Layzell27726662017-10-24 23:16:35 -0400449 use ::AttrStyle::*;
450 match *_i {
451 Outer => { }
452 Inner(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500453 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400454 }
455 }
456}
457
Nika Layzellc86173a2017-11-18 13:55:22 -0500458pub fn visit_attribute<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Attribute) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500459 tokens_helper(_visitor, &(& _i . pound_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500460 _visitor.visit_attr_style(& _i . style);
David Tolnay1e01f9c2017-12-28 20:16:19 -0500461 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500462 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -0400463 // Skipped field _i . tts;
464 // Skipped field _i . is_sugared_doc;
465}
466
Nika Layzellc86173a2017-11-18 13:55:22 -0500467pub fn visit_bare_fn_arg<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BareFnArg) {
David Tolnay5c4c0b52017-12-28 17:58:54 -0500468 if let Some(ref it) = _i . name {
469 _visitor.visit_bare_fn_arg_name(& ( it ) . 0);
David Tolnaycc0f0372017-12-28 19:11:04 -0500470 tokens_helper(_visitor, &(& ( it ) . 1).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -0500471 };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500472 _visitor.visit_type(& _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -0400473}
474
Nika Layzellc86173a2017-11-18 13:55:22 -0500475pub fn visit_bare_fn_arg_name<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BareFnArgName) {
Nika Layzell27726662017-10-24 23:16:35 -0400476 use ::BareFnArgName::*;
477 match *_i {
478 Named(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500479 _visitor.visit_ident(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400480 }
481 Wild(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500482 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400483 }
484 }
485}
486
Nika Layzellc86173a2017-11-18 13:55:22 -0500487pub fn visit_bare_fn_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BareFnType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500488 _visitor.visit_unsafety(& _i . unsafety);
489 if let Some(ref it) = _i . abi { _visitor.visit_abi(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500490 tokens_helper(_visitor, &(& _i . fn_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500491 if let Some(ref it) = _i . lifetimes { _visitor.visit_bound_lifetimes(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -0500492 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500493 for el in & _i . inputs { let it = el.item(); _visitor.visit_bare_fn_arg(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500494 if let Some(ref it) = _i . variadic { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500495 _visitor.visit_return_type(& _i . output);
Nika Layzell27726662017-10-24 23:16:35 -0400496}
497
Nika Layzellc86173a2017-11-18 13:55:22 -0500498pub fn visit_bin_op<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BinOp) {
Nika Layzell27726662017-10-24 23:16:35 -0400499 use ::BinOp::*;
500 match *_i {
501 Add(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500502 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400503 }
504 Sub(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500505 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400506 }
507 Mul(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500508 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400509 }
510 Div(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500511 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400512 }
513 Rem(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500514 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400515 }
516 And(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500517 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400518 }
519 Or(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500520 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400521 }
522 BitXor(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500523 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400524 }
525 BitAnd(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500526 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400527 }
528 BitOr(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500529 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400530 }
531 Shl(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500532 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400533 }
534 Shr(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500535 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400536 }
537 Eq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500538 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400539 }
540 Lt(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500541 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400542 }
543 Le(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500544 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400545 }
546 Ne(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500547 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400548 }
549 Ge(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500550 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400551 }
552 Gt(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500553 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400554 }
555 AddEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500556 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400557 }
558 SubEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500559 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400560 }
561 MulEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500562 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400563 }
564 DivEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500565 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400566 }
567 RemEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500568 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400569 }
570 BitXorEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500571 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400572 }
573 BitAndEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500574 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400575 }
576 BitOrEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500577 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400578 }
579 ShlEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500580 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400581 }
582 ShrEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500583 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400584 }
585 }
586}
587# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500588pub fn visit_binding_mode<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BindingMode) {
Nika Layzell27726662017-10-24 23:16:35 -0400589 use ::BindingMode::*;
590 match *_i {
591 ByRef(ref _binding_0, ref _binding_1, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500592 tokens_helper(_visitor, &(_binding_0).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500593 _visitor.visit_mutability(_binding_1);
Nika Layzell27726662017-10-24 23:16:35 -0400594 }
595 ByValue(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500596 _visitor.visit_mutability(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400597 }
598 }
599}
600# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500601pub fn visit_block<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Block) {
David Tolnay1e01f9c2017-12-28 20:16:19 -0500602 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500603 for it in & _i . stmts { _visitor.visit_stmt(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400604}
605
Nika Layzellc86173a2017-11-18 13:55:22 -0500606pub fn visit_body<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Body) {
Nika Layzell27726662017-10-24 23:16:35 -0400607 use ::Body::*;
608 match *_i {
609 Enum(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500610 _visitor.visit_body_enum(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400611 }
612 Struct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500613 _visitor.visit_body_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400614 }
615 }
616}
617
Nika Layzellc86173a2017-11-18 13:55:22 -0500618pub fn visit_body_enum<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BodyEnum) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500619 tokens_helper(_visitor, &(& _i . enum_token).0);
David Tolnay1e01f9c2017-12-28 20:16:19 -0500620 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500621 for el in & _i . variants { let it = el.item(); _visitor.visit_variant(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400622}
623
Nika Layzellc86173a2017-11-18 13:55:22 -0500624pub fn visit_body_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BodyStruct) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500625 _visitor.visit_variant_data(& _i . data);
David Tolnaycc0f0372017-12-28 19:11:04 -0500626 tokens_helper(_visitor, &(& _i . struct_token).0);
627 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -0400628}
629
Nika Layzellc86173a2017-11-18 13:55:22 -0500630pub fn visit_bound_lifetimes<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BoundLifetimes) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500631 tokens_helper(_visitor, &(& _i . for_token).0);
632 tokens_helper(_visitor, &(& _i . lt_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500633 for el in & _i . lifetimes { let it = el.item(); _visitor.visit_lifetime_def(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500634 tokens_helper(_visitor, &(& _i . gt_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400635}
636# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500637pub fn visit_capture_by<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast CaptureBy) {
Nika Layzell27726662017-10-24 23:16:35 -0400638 use ::CaptureBy::*;
639 match *_i {
640 Value(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500641 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400642 }
643 Ref => { }
644 }
645}
Nika Layzellf1fdc0b2017-12-04 19:58:32 -0500646
647pub fn visit_const_param<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ConstParam) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500648 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500649 tokens_helper(_visitor, &(& _i . const_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500650 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -0500651 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500652 _visitor.visit_type(& _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -0500653 if let Some(ref it) = _i . eq_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500654 if let Some(ref it) = _i . default { _visitor.visit_expr(it) };
Nika Layzellf1fdc0b2017-12-04 19:58:32 -0500655}
Nika Layzell27726662017-10-24 23:16:35 -0400656# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500657pub fn visit_constness<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Constness) {
Nika Layzell27726662017-10-24 23:16:35 -0400658 use ::Constness::*;
659 match *_i {
660 Const(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500661 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400662 }
663 NotConst => { }
664 }
665}
666# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500667pub fn visit_defaultness<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Defaultness) {
Nika Layzell27726662017-10-24 23:16:35 -0400668 use ::Defaultness::*;
669 match *_i {
670 Default(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500671 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400672 }
673 Final => { }
674 }
675}
676
Nika Layzellc86173a2017-11-18 13:55:22 -0500677pub fn visit_derive_input<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast DeriveInput) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500678 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500679 _visitor.visit_visibility(& _i . vis);
680 _visitor.visit_ident(& _i . ident);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500681 _visitor.visit_generics(& _i . generics);
682 _visitor.visit_body(& _i . body);
Nika Layzell27726662017-10-24 23:16:35 -0400683}
684
Nika Layzellc86173a2017-11-18 13:55:22 -0500685pub fn visit_expr<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Expr) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500686 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500687 _visitor.visit_expr_kind(& _i . node);
Nika Layzell27726662017-10-24 23:16:35 -0400688}
689# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500690pub fn visit_expr_addr_of<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprAddrOf) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500691 tokens_helper(_visitor, &(& _i . and_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500692 _visitor.visit_mutability(& _i . mutbl);
David Tolnay4a918742017-12-28 16:54:41 -0500693 _visitor.visit_expr(& * _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -0400694}
695# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500696pub fn visit_expr_array<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprArray) {
David Tolnay1e01f9c2017-12-28 20:16:19 -0500697 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500698 for el in & _i . exprs { let it = el.item(); _visitor.visit_expr(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400699}
700# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500701pub fn visit_expr_assign<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprAssign) {
David Tolnay4a918742017-12-28 16:54:41 -0500702 _visitor.visit_expr(& * _i . left);
David Tolnaycc0f0372017-12-28 19:11:04 -0500703 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500704 _visitor.visit_expr(& * _i . right);
Nika Layzell27726662017-10-24 23:16:35 -0400705}
706# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500707pub fn visit_expr_assign_op<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprAssignOp) {
David Tolnay4a918742017-12-28 16:54:41 -0500708 _visitor.visit_expr(& * _i . left);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500709 _visitor.visit_bin_op(& _i . op);
David Tolnay4a918742017-12-28 16:54:41 -0500710 _visitor.visit_expr(& * _i . right);
Nika Layzell27726662017-10-24 23:16:35 -0400711}
712
Nika Layzellc86173a2017-11-18 13:55:22 -0500713pub fn visit_expr_binary<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBinary) {
David Tolnay4a918742017-12-28 16:54:41 -0500714 _visitor.visit_expr(& * _i . left);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500715 _visitor.visit_bin_op(& _i . op);
David Tolnay4a918742017-12-28 16:54:41 -0500716 _visitor.visit_expr(& * _i . right);
Nika Layzell27726662017-10-24 23:16:35 -0400717}
718# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500719pub fn visit_expr_block<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBlock) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500720 _visitor.visit_block(& _i . block);
Nika Layzell27726662017-10-24 23:16:35 -0400721}
722# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500723pub fn visit_expr_box<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBox) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500724 tokens_helper(_visitor, &(& _i . box_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500725 _visitor.visit_expr(& * _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -0400726}
727# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500728pub fn visit_expr_break<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBreak) {
David Tolnay4a3f59a2017-12-28 21:21:12 -0500729 tokens_helper(_visitor, &(& _i . break_token).0);
David Tolnay4ba63a02017-12-28 15:53:05 -0500730 if let Some(ref it) = _i . label { _visitor.visit_lifetime(it) };
David Tolnay4a918742017-12-28 16:54:41 -0500731 if let Some(ref it) = _i . expr { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -0400732}
733
Nika Layzellc86173a2017-11-18 13:55:22 -0500734pub fn visit_expr_call<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprCall) {
David Tolnay4a918742017-12-28 16:54:41 -0500735 _visitor.visit_expr(& * _i . func);
David Tolnay1e01f9c2017-12-28 20:16:19 -0500736 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500737 for el in & _i . args { let it = el.item(); _visitor.visit_expr(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400738}
739
Nika Layzellc86173a2017-11-18 13:55:22 -0500740pub fn visit_expr_cast<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprCast) {
David Tolnay4a918742017-12-28 16:54:41 -0500741 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -0500742 tokens_helper(_visitor, &(& _i . as_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500743 _visitor.visit_type(& * _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -0400744}
745# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500746pub fn visit_expr_catch<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprCatch) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500747 tokens_helper(_visitor, &(& _i . do_token).0);
748 tokens_helper(_visitor, &(& _i . catch_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500749 _visitor.visit_block(& _i . block);
Nika Layzell27726662017-10-24 23:16:35 -0400750}
751# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500752pub fn visit_expr_closure<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprClosure) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500753 _visitor.visit_capture_by(& _i . capture);
David Tolnaycc0f0372017-12-28 19:11:04 -0500754 tokens_helper(_visitor, &(& _i . or1_token).0);
David Tolnay7f675742017-12-27 22:43:21 -0500755 for el in & _i . inputs { let it = el.item(); _visitor.visit_fn_arg(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500756 tokens_helper(_visitor, &(& _i . or2_token).0);
David Tolnay7f675742017-12-27 22:43:21 -0500757 _visitor.visit_return_type(& _i . output);
David Tolnay4a918742017-12-28 16:54:41 -0500758 _visitor.visit_expr(& * _i . body);
Nika Layzell27726662017-10-24 23:16:35 -0400759}
760# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500761pub fn visit_expr_continue<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprContinue) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500762 tokens_helper(_visitor, &(& _i . continue_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500763 if let Some(ref it) = _i . label { _visitor.visit_lifetime(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400764}
765# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500766pub fn visit_expr_field<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprField) {
David Tolnay4a918742017-12-28 16:54:41 -0500767 _visitor.visit_expr(& * _i . base);
David Tolnaycc0f0372017-12-28 19:11:04 -0500768 tokens_helper(_visitor, &(& _i . dot_token).0);
David Tolnay85b69a42017-12-27 20:43:10 -0500769 _visitor.visit_member(& _i . member);
Nika Layzell27726662017-10-24 23:16:35 -0400770}
771# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500772pub fn visit_expr_for_loop<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprForLoop) {
David Tolnay4a3f59a2017-12-28 21:21:12 -0500773 if let Some(ref it) = _i . label { _visitor.visit_lifetime(it) };
774 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
775 tokens_helper(_visitor, &(& _i . for_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500776 _visitor.visit_pat(& * _i . pat);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500777 tokens_helper(_visitor, &(& _i . in_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500778 _visitor.visit_expr(& * _i . expr);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500779 _visitor.visit_block(& _i . body);
Nika Layzell27726662017-10-24 23:16:35 -0400780}
781
Nika Layzellc86173a2017-11-18 13:55:22 -0500782pub fn visit_expr_group<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprGroup) {
David Tolnay1e01f9c2017-12-28 20:16:19 -0500783 tokens_helper(_visitor, &(& _i . group_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500784 _visitor.visit_expr(& * _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -0400785}
786# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500787pub fn visit_expr_if<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIf) {
David Tolnay4a3f59a2017-12-28 21:21:12 -0500788 tokens_helper(_visitor, &(& _i . if_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500789 _visitor.visit_expr(& * _i . cond);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500790 _visitor.visit_block(& _i . if_true);
David Tolnaycc0f0372017-12-28 19:11:04 -0500791 if let Some(ref it) = _i . else_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500792 if let Some(ref it) = _i . if_false { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -0400793}
794# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500795pub fn visit_expr_if_let<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIfLet) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500796 tokens_helper(_visitor, &(& _i . if_token).0);
797 tokens_helper(_visitor, &(& _i . let_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500798 _visitor.visit_pat(& * _i . pat);
David Tolnaycc0f0372017-12-28 19:11:04 -0500799 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500800 _visitor.visit_expr(& * _i . expr);
801 _visitor.visit_block(& _i . if_true);
David Tolnaycc0f0372017-12-28 19:11:04 -0500802 if let Some(ref it) = _i . else_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500803 if let Some(ref it) = _i . if_false { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -0400804}
805# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500806pub fn visit_expr_in_place<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprInPlace) {
David Tolnay4a918742017-12-28 16:54:41 -0500807 _visitor.visit_expr(& * _i . place);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500808 _visitor.visit_in_place_kind(& _i . kind);
David Tolnay4a918742017-12-28 16:54:41 -0500809 _visitor.visit_expr(& * _i . value);
Nika Layzell27726662017-10-24 23:16:35 -0400810}
811
Nika Layzellc86173a2017-11-18 13:55:22 -0500812pub fn visit_expr_index<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIndex) {
David Tolnay4a918742017-12-28 16:54:41 -0500813 _visitor.visit_expr(& * _i . expr);
David Tolnay1e01f9c2017-12-28 20:16:19 -0500814 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500815 _visitor.visit_expr(& * _i . index);
Nika Layzell27726662017-10-24 23:16:35 -0400816}
817
Nika Layzellc86173a2017-11-18 13:55:22 -0500818pub fn visit_expr_kind<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprKind) {
Nika Layzell27726662017-10-24 23:16:35 -0400819 use ::ExprKind::*;
820 match *_i {
821 Box(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500822 full!(_visitor.visit_expr_box(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400823 }
824 InPlace(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500825 full!(_visitor.visit_expr_in_place(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400826 }
827 Array(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500828 full!(_visitor.visit_expr_array(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400829 }
830 Call(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500831 _visitor.visit_expr_call(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400832 }
833 MethodCall(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500834 full!(_visitor.visit_expr_method_call(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400835 }
David Tolnay05362582017-12-26 01:33:57 -0500836 Tuple(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500837 full!(_visitor.visit_expr_tuple(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400838 }
839 Binary(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500840 _visitor.visit_expr_binary(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400841 }
842 Unary(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500843 _visitor.visit_expr_unary(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400844 }
845 Lit(ref _binding_0, ) => {
David Tolnay4ba63a02017-12-28 15:53:05 -0500846 _visitor.visit_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400847 }
848 Cast(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500849 _visitor.visit_expr_cast(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400850 }
851 Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500852 _visitor.visit_expr_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400853 }
854 If(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500855 full!(_visitor.visit_expr_if(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400856 }
857 IfLet(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500858 full!(_visitor.visit_expr_if_let(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400859 }
860 While(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500861 full!(_visitor.visit_expr_while(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400862 }
863 WhileLet(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500864 full!(_visitor.visit_expr_while_let(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400865 }
866 ForLoop(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500867 full!(_visitor.visit_expr_for_loop(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400868 }
869 Loop(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500870 full!(_visitor.visit_expr_loop(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400871 }
872 Match(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500873 full!(_visitor.visit_expr_match(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400874 }
875 Closure(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500876 full!(_visitor.visit_expr_closure(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400877 }
Nika Layzell640832a2017-12-04 13:37:09 -0500878 Unsafe(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500879 full!(_visitor.visit_expr_unsafe(_binding_0));
Nika Layzell640832a2017-12-04 13:37:09 -0500880 }
Nika Layzell27726662017-10-24 23:16:35 -0400881 Block(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500882 full!(_visitor.visit_expr_block(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400883 }
884 Assign(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500885 full!(_visitor.visit_expr_assign(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400886 }
887 AssignOp(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500888 full!(_visitor.visit_expr_assign_op(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400889 }
890 Field(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500891 full!(_visitor.visit_expr_field(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400892 }
Nika Layzell27726662017-10-24 23:16:35 -0400893 Index(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500894 _visitor.visit_expr_index(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400895 }
896 Range(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500897 full!(_visitor.visit_expr_range(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400898 }
899 Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500900 _visitor.visit_expr_path(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400901 }
902 AddrOf(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500903 full!(_visitor.visit_expr_addr_of(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400904 }
905 Break(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500906 full!(_visitor.visit_expr_break(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400907 }
908 Continue(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500909 full!(_visitor.visit_expr_continue(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400910 }
911 Ret(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500912 full!(_visitor.visit_expr_ret(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400913 }
David Tolnaydecf28d2017-11-11 11:56:45 -0800914 Macro(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500915 _visitor.visit_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400916 }
917 Struct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500918 full!(_visitor.visit_expr_struct(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400919 }
920 Repeat(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500921 full!(_visitor.visit_expr_repeat(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400922 }
923 Paren(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500924 _visitor.visit_expr_paren(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400925 }
926 Group(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500927 _visitor.visit_expr_group(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400928 }
929 Try(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500930 full!(_visitor.visit_expr_try(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400931 }
932 Catch(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500933 full!(_visitor.visit_expr_catch(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400934 }
935 Yield(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500936 full!(_visitor.visit_expr_yield(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400937 }
938 }
939}
940# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500941pub fn visit_expr_loop<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprLoop) {
David Tolnay4ba63a02017-12-28 15:53:05 -0500942 if let Some(ref it) = _i . label { _visitor.visit_lifetime(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500943 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500944 tokens_helper(_visitor, &(& _i . loop_token).0);
945 _visitor.visit_block(& _i . body);
Nika Layzell27726662017-10-24 23:16:35 -0400946}
947# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500948pub fn visit_expr_match<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprMatch) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500949 tokens_helper(_visitor, &(& _i . match_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500950 _visitor.visit_expr(& * _i . expr);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500951 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500952 for it in & _i . arms { _visitor.visit_arm(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400953}
954# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500955pub fn visit_expr_method_call<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprMethodCall) {
David Tolnay4a918742017-12-28 16:54:41 -0500956 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -0500957 tokens_helper(_visitor, &(& _i . dot_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500958 _visitor.visit_ident(& _i . method);
David Tolnaycc0f0372017-12-28 19:11:04 -0500959 if let Some(ref it) = _i . colon2_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500960 if let Some(ref it) = _i . lt_token { tokens_helper(_visitor, &(it).0) };
961 for el in & _i . typarams { let it = el.item(); _visitor.visit_type(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500962 if let Some(ref it) = _i . gt_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500963 tokens_helper(_visitor, &(& _i . paren_token).0);
964 for el in & _i . args { let it = el.item(); _visitor.visit_expr(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400965}
966
Nika Layzellc86173a2017-11-18 13:55:22 -0500967pub fn visit_expr_paren<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprParen) {
David Tolnay1e01f9c2017-12-28 20:16:19 -0500968 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500969 _visitor.visit_expr(& * _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -0400970}
971
Nika Layzellc86173a2017-11-18 13:55:22 -0500972pub fn visit_expr_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprPath) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500973 if let Some(ref it) = _i . qself { _visitor.visit_qself(it) };
974 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -0400975}
976# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500977pub fn visit_expr_range<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprRange) {
David Tolnay4a918742017-12-28 16:54:41 -0500978 if let Some(ref it) = _i . from { _visitor.visit_expr(& * * it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500979 _visitor.visit_range_limits(& _i . limits);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500980 if let Some(ref it) = _i . to { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -0400981}
982# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500983pub fn visit_expr_repeat<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprRepeat) {
David Tolnay1e01f9c2017-12-28 20:16:19 -0500984 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500985 _visitor.visit_expr(& * _i . expr);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500986 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500987 _visitor.visit_expr(& * _i . amt);
Nika Layzell27726662017-10-24 23:16:35 -0400988}
989# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500990pub fn visit_expr_ret<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprRet) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500991 tokens_helper(_visitor, &(& _i . return_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500992 if let Some(ref it) = _i . expr { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -0400993}
994# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500995pub fn visit_expr_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprStruct) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500996 _visitor.visit_path(& _i . path);
David Tolnay1e01f9c2017-12-28 20:16:19 -0500997 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500998 for el in & _i . fields { let it = el.item(); _visitor.visit_field_value(it) };
999 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
1000 if let Some(ref it) = _i . rest { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -04001001}
1002# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001003pub fn visit_expr_try<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprTry) {
David Tolnay4a918742017-12-28 16:54:41 -05001004 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -05001005 tokens_helper(_visitor, &(& _i . question_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001006}
1007# [ cfg ( feature = "full" ) ]
David Tolnay05362582017-12-26 01:33:57 -05001008pub fn visit_expr_tuple<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprTuple) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001009 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001010 for el in & _i . args { let it = el.item(); _visitor.visit_expr(it) };
David Tolnay05362582017-12-26 01:33:57 -05001011}
Nika Layzell27726662017-10-24 23:16:35 -04001012
Nika Layzellc86173a2017-11-18 13:55:22 -05001013pub fn visit_expr_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprType) {
David Tolnay4a918742017-12-28 16:54:41 -05001014 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -05001015 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001016 _visitor.visit_type(& * _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -04001017}
1018
Nika Layzellc86173a2017-11-18 13:55:22 -05001019pub fn visit_expr_unary<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprUnary) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001020 _visitor.visit_un_op(& _i . op);
David Tolnay4a918742017-12-28 16:54:41 -05001021 _visitor.visit_expr(& * _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -04001022}
1023# [ cfg ( feature = "full" ) ]
Nika Layzell640832a2017-12-04 13:37:09 -05001024pub fn visit_expr_unsafe<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprUnsafe) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001025 tokens_helper(_visitor, &(& _i . unsafe_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001026 _visitor.visit_block(& _i . block);
Nika Layzell640832a2017-12-04 13:37:09 -05001027}
1028# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001029pub fn visit_expr_while<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprWhile) {
David Tolnay4ba63a02017-12-28 15:53:05 -05001030 if let Some(ref it) = _i . label { _visitor.visit_lifetime(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001031 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
1032 tokens_helper(_visitor, &(& _i . while_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001033 _visitor.visit_expr(& * _i . cond);
1034 _visitor.visit_block(& _i . body);
Nika Layzell27726662017-10-24 23:16:35 -04001035}
1036# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001037pub fn visit_expr_while_let<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprWhileLet) {
David Tolnay4ba63a02017-12-28 15:53:05 -05001038 if let Some(ref it) = _i . label { _visitor.visit_lifetime(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001039 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
1040 tokens_helper(_visitor, &(& _i . while_token).0);
1041 tokens_helper(_visitor, &(& _i . let_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001042 _visitor.visit_pat(& * _i . pat);
David Tolnaycc0f0372017-12-28 19:11:04 -05001043 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001044 _visitor.visit_expr(& * _i . expr);
1045 _visitor.visit_block(& _i . body);
Nika Layzell27726662017-10-24 23:16:35 -04001046}
1047# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001048pub fn visit_expr_yield<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprYield) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001049 tokens_helper(_visitor, &(& _i . yield_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001050 if let Some(ref it) = _i . expr { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -04001051}
1052
Nika Layzellc86173a2017-11-18 13:55:22 -05001053pub fn visit_field<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Field) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001054 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001055 _visitor.visit_visibility(& _i . vis);
1056 if let Some(ref it) = _i . ident { _visitor.visit_ident(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001057 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001058 _visitor.visit_type(& _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -04001059}
1060# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001061pub fn visit_field_pat<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldPat) {
David Tolnay4a3f59a2017-12-28 21:21:12 -05001062 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay85b69a42017-12-27 20:43:10 -05001063 _visitor.visit_member(& _i . member);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001064 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a918742017-12-28 16:54:41 -05001065 _visitor.visit_pat(& * _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001066 // Skipped field _i . is_shorthand;
Nika Layzell27726662017-10-24 23:16:35 -04001067}
1068# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001069pub fn visit_field_value<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldValue) {
David Tolnay85b69a42017-12-27 20:43:10 -05001070 for it in & _i . attrs { _visitor.visit_attribute(it) };
1071 _visitor.visit_member(& _i . member);
David Tolnaycc0f0372017-12-28 19:11:04 -05001072 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001073 _visitor.visit_expr(& _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -04001074 // Skipped field _i . is_shorthand;
Nika Layzell27726662017-10-24 23:16:35 -04001075}
1076# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001077pub fn visit_file<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast File) {
Nika Layzell27726662017-10-24 23:16:35 -04001078 // Skipped field _i . shebang;
David Tolnayf0d63bf2017-12-26 12:29:47 -05001079 for it in & _i . attrs { _visitor.visit_attribute(it) };
1080 for it in & _i . items { _visitor.visit_item(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001081}
1082# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001083pub fn visit_fn_arg<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FnArg) {
Nika Layzell27726662017-10-24 23:16:35 -04001084 use ::FnArg::*;
1085 match *_i {
1086 SelfRef(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001087 _visitor.visit_arg_self_ref(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001088 }
1089 SelfValue(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001090 _visitor.visit_arg_self(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001091 }
1092 Captured(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001093 _visitor.visit_arg_captured(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001094 }
David Tolnay80ed55f2017-12-27 22:54:40 -05001095 Inferred(ref _binding_0, ) => {
1096 _visitor.visit_pat(_binding_0);
1097 }
Nika Layzell27726662017-10-24 23:16:35 -04001098 Ignored(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001099 _visitor.visit_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001100 }
1101 }
1102}
1103# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001104pub fn visit_fn_decl<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FnDecl) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001105 tokens_helper(_visitor, &(& _i . fn_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001106 _visitor.visit_generics(& _i . generics);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001107 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001108 for el in & _i . inputs { let it = el.item(); _visitor.visit_fn_arg(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001109 if let Some(ref it) = _i . variadic { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001110 _visitor.visit_return_type(& _i . output);
Nika Layzell27726662017-10-24 23:16:35 -04001111}
1112# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001113pub fn visit_foreign_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItem) {
David Tolnay8894f602017-11-11 12:11:04 -08001114 use ::ForeignItem::*;
Nika Layzell27726662017-10-24 23:16:35 -04001115 match *_i {
1116 Fn(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001117 _visitor.visit_foreign_item_fn(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001118 }
1119 Static(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001120 _visitor.visit_foreign_item_static(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001121 }
David Tolnay199bcbb2017-11-12 10:33:52 -08001122 Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001123 _visitor.visit_foreign_item_type(_binding_0);
David Tolnay199bcbb2017-11-12 10:33:52 -08001124 }
Nika Layzell27726662017-10-24 23:16:35 -04001125 }
1126}
1127# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001128pub fn visit_foreign_item_fn<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemFn) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001129 for it in & _i . attrs { _visitor.visit_attribute(it) };
1130 _visitor.visit_visibility(& _i . vis);
1131 _visitor.visit_ident(& _i . ident);
David Tolnay4a918742017-12-28 16:54:41 -05001132 _visitor.visit_fn_decl(& * _i . decl);
David Tolnaycc0f0372017-12-28 19:11:04 -05001133 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay8894f602017-11-11 12:11:04 -08001134}
1135# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001136pub fn visit_foreign_item_static<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemStatic) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001137 for it in & _i . attrs { _visitor.visit_attribute(it) };
1138 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001139 tokens_helper(_visitor, &(& _i . static_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001140 _visitor.visit_mutability(& _i . mutbl);
1141 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001142 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001143 _visitor.visit_type(& * _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001144 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001145}
David Tolnay199bcbb2017-11-12 10:33:52 -08001146# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001147pub fn visit_foreign_item_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001148 for it in & _i . attrs { _visitor.visit_attribute(it) };
1149 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001150 tokens_helper(_visitor, &(& _i . type_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001151 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001152 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay199bcbb2017-11-12 10:33:52 -08001153}
Nika Layzell27726662017-10-24 23:16:35 -04001154
Nika Layzellc08227a2017-12-04 16:30:17 -05001155pub fn visit_generic_argument<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast GenericArgument) {
1156 use ::GenericArgument::*;
Nika Layzell357885a2017-12-04 15:47:07 -05001157 match *_i {
1158 Lifetime(ref _binding_0, ) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05001159 _visitor.visit_lifetime(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001160 }
1161 Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001162 _visitor.visit_type(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001163 }
1164 TypeBinding(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001165 _visitor.visit_type_binding(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001166 }
Nika Layzellc680e612017-12-04 19:07:20 -05001167 Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001168 _visitor.visit_expr(_binding_0);
Nika Layzellc680e612017-12-04 19:07:20 -05001169 }
Nika Layzell357885a2017-12-04 15:47:07 -05001170 }
1171}
1172
David Tolnayc2f1aba2017-11-12 20:29:22 -08001173pub fn visit_generic_param<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast GenericParam) {
1174 use ::GenericParam::*;
1175 match *_i {
1176 Lifetime(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001177 _visitor.visit_lifetime_def(_binding_0);
David Tolnayc2f1aba2017-11-12 20:29:22 -08001178 }
1179 Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001180 _visitor.visit_type_param(_binding_0);
David Tolnayc2f1aba2017-11-12 20:29:22 -08001181 }
Nika Layzellf1fdc0b2017-12-04 19:58:32 -05001182 Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001183 _visitor.visit_const_param(_binding_0);
Nika Layzellf1fdc0b2017-12-04 19:58:32 -05001184 }
David Tolnayc2f1aba2017-11-12 20:29:22 -08001185 }
1186}
1187
Nika Layzellc86173a2017-11-18 13:55:22 -05001188pub fn visit_generics<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Generics) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001189 if let Some(ref it) = _i . lt_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001190 for el in & _i . params { let it = el.item(); _visitor.visit_generic_param(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001191 if let Some(ref it) = _i . gt_token { tokens_helper(_visitor, &(it).0) };
David Tolnayac997dd2017-12-27 23:18:22 -05001192 if let Some(ref it) = _i . where_clause { _visitor.visit_where_clause(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001193}
Nika Layzellefb83ba2017-12-19 18:23:55 -05001194
1195pub fn visit_ident<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Ident) {
David Tolnay4ba63a02017-12-28 15:53:05 -05001196 // Skipped field _i . sym;
1197 _visitor.visit_span(& _i . span);
Nika Layzellefb83ba2017-12-19 18:23:55 -05001198}
Nika Layzell27726662017-10-24 23:16:35 -04001199# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001200pub fn visit_impl_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItem) {
David Tolnay857628c2017-11-11 12:25:31 -08001201 use ::ImplItem::*;
Nika Layzell27726662017-10-24 23:16:35 -04001202 match *_i {
1203 Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001204 _visitor.visit_impl_item_const(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001205 }
1206 Method(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001207 _visitor.visit_impl_item_method(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001208 }
1209 Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001210 _visitor.visit_impl_item_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001211 }
1212 Macro(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001213 _visitor.visit_impl_item_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001214 }
1215 }
1216}
1217# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001218pub fn visit_impl_item_const<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemConst) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001219 for it in & _i . attrs { _visitor.visit_attribute(it) };
1220 _visitor.visit_visibility(& _i . vis);
1221 _visitor.visit_defaultness(& _i . defaultness);
David Tolnaycc0f0372017-12-28 19:11:04 -05001222 tokens_helper(_visitor, &(& _i . const_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001223 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001224 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001225 _visitor.visit_type(& _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001226 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001227 _visitor.visit_expr(& _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -05001228 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay857628c2017-11-11 12:25:31 -08001229}
1230# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001231pub fn visit_impl_item_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemMacro) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001232 for it in & _i . attrs { _visitor.visit_attribute(it) };
1233 _visitor.visit_macro(& _i . mac);
David Tolnaycc0f0372017-12-28 19:11:04 -05001234 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
David Tolnay857628c2017-11-11 12:25:31 -08001235}
1236# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001237pub fn visit_impl_item_method<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemMethod) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001238 for it in & _i . attrs { _visitor.visit_attribute(it) };
1239 _visitor.visit_visibility(& _i . vis);
1240 _visitor.visit_defaultness(& _i . defaultness);
1241 _visitor.visit_method_sig(& _i . sig);
1242 _visitor.visit_block(& _i . block);
Nika Layzell27726662017-10-24 23:16:35 -04001243}
1244# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001245pub fn visit_impl_item_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001246 for it in & _i . attrs { _visitor.visit_attribute(it) };
1247 _visitor.visit_visibility(& _i . vis);
1248 _visitor.visit_defaultness(& _i . defaultness);
David Tolnaycc0f0372017-12-28 19:11:04 -05001249 tokens_helper(_visitor, &(& _i . type_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001250 _visitor.visit_ident(& _i . ident);
1251 _visitor.visit_generics(& _i . generics);
David Tolnaycc0f0372017-12-28 19:11:04 -05001252 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001253 _visitor.visit_type(& _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001254 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001255}
1256# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001257pub fn visit_impl_polarity<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplPolarity) {
Nika Layzell27726662017-10-24 23:16:35 -04001258 use ::ImplPolarity::*;
1259 match *_i {
1260 Positive => { }
1261 Negative(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05001262 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04001263 }
1264 }
1265}
1266# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001267pub fn visit_in_place_kind<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast InPlaceKind) {
Nika Layzell27726662017-10-24 23:16:35 -04001268 use ::InPlaceKind::*;
1269 match *_i {
1270 Arrow(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05001271 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04001272 }
1273 In(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05001274 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04001275 }
1276 }
1277}
1278# [ cfg ( feature = "full" ) ]
David Tolnay85b69a42017-12-27 20:43:10 -05001279pub fn visit_index<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Index) {
1280 // Skipped field _i . index;
1281 _visitor.visit_span(& _i . span);
1282}
1283# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001284pub fn visit_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Item) {
David Tolnayc6b55bc2017-11-09 22:48:38 -08001285 use ::Item::*;
Nika Layzell27726662017-10-24 23:16:35 -04001286 match *_i {
1287 ExternCrate(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001288 _visitor.visit_item_extern_crate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001289 }
1290 Use(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001291 _visitor.visit_item_use(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001292 }
1293 Static(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001294 _visitor.visit_item_static(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001295 }
1296 Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001297 _visitor.visit_item_const(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001298 }
1299 Fn(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001300 _visitor.visit_item_fn(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001301 }
1302 Mod(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001303 _visitor.visit_item_mod(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001304 }
1305 ForeignMod(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001306 _visitor.visit_item_foreign_mod(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001307 }
David Tolnayfd6bf5c2017-11-12 09:41:14 -08001308 Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001309 _visitor.visit_item_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001310 }
1311 Enum(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001312 _visitor.visit_item_enum(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001313 }
1314 Struct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001315 _visitor.visit_item_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001316 }
1317 Union(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001318 _visitor.visit_item_union(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001319 }
1320 Trait(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001321 _visitor.visit_item_trait(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001322 }
1323 DefaultImpl(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001324 _visitor.visit_item_default_impl(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001325 }
1326 Impl(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001327 _visitor.visit_item_impl(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001328 }
David Tolnaydecf28d2017-11-11 11:56:45 -08001329 Macro(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001330 _visitor.visit_item_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001331 }
David Tolnay500d8322017-12-18 00:32:51 -08001332 Macro2(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001333 _visitor.visit_item_macro2(_binding_0);
David Tolnay500d8322017-12-18 00:32:51 -08001334 }
Nika Layzell27726662017-10-24 23:16:35 -04001335 }
1336}
1337# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001338pub fn visit_item_const<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemConst) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001339 for it in & _i . attrs { _visitor.visit_attribute(it) };
1340 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001341 tokens_helper(_visitor, &(& _i . const_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001342 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001343 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001344 _visitor.visit_type(& * _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001345 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001346 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -05001347 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnayc6b55bc2017-11-09 22:48:38 -08001348}
1349# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001350pub fn visit_item_default_impl<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemDefaultImpl) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001351 for it in & _i . attrs { _visitor.visit_attribute(it) };
1352 _visitor.visit_unsafety(& _i . unsafety);
David Tolnaycc0f0372017-12-28 19:11:04 -05001353 tokens_helper(_visitor, &(& _i . impl_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001354 _visitor.visit_path(& _i . path);
David Tolnaycc0f0372017-12-28 19:11:04 -05001355 tokens_helper(_visitor, &(& _i . for_token).0);
1356 tokens_helper(_visitor, &(& _i . dot2_token).0);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001357 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayc6b55bc2017-11-09 22:48:38 -08001358}
1359# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001360pub fn visit_item_enum<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemEnum) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001361 for it in & _i . attrs { _visitor.visit_attribute(it) };
1362 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001363 tokens_helper(_visitor, &(& _i . enum_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001364 _visitor.visit_ident(& _i . ident);
1365 _visitor.visit_generics(& _i . generics);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001366 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001367 for el in & _i . variants { let it = el.item(); _visitor.visit_variant(it) };
David Tolnayc6b55bc2017-11-09 22:48:38 -08001368}
1369# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001370pub fn visit_item_extern_crate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemExternCrate) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001371 for it in & _i . attrs { _visitor.visit_attribute(it) };
1372 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001373 tokens_helper(_visitor, &(& _i . extern_token).0);
1374 tokens_helper(_visitor, &(& _i . crate_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001375 _visitor.visit_ident(& _i . ident);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001376 if let Some(ref it) = _i . rename {
David Tolnaycc0f0372017-12-28 19:11:04 -05001377 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001378 _visitor.visit_ident(& ( it ) . 1);
1379 };
David Tolnaycc0f0372017-12-28 19:11:04 -05001380 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnayc6b55bc2017-11-09 22:48:38 -08001381}
1382# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001383pub fn visit_item_fn<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemFn) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001384 for it in & _i . attrs { _visitor.visit_attribute(it) };
1385 _visitor.visit_visibility(& _i . vis);
1386 _visitor.visit_constness(& _i . constness);
1387 _visitor.visit_unsafety(& _i . unsafety);
1388 if let Some(ref it) = _i . abi { _visitor.visit_abi(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001389 _visitor.visit_ident(& _i . ident);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001390 _visitor.visit_fn_decl(& * _i . decl);
David Tolnay4a918742017-12-28 16:54:41 -05001391 _visitor.visit_block(& * _i . block);
David Tolnayc6b55bc2017-11-09 22:48:38 -08001392}
1393# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001394pub fn visit_item_foreign_mod<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemForeignMod) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001395 for it in & _i . attrs { _visitor.visit_attribute(it) };
1396 _visitor.visit_abi(& _i . abi);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001397 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001398 for it in & _i . items { _visitor.visit_foreign_item(it) };
David Tolnayc6b55bc2017-11-09 22:48:38 -08001399}
1400# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001401pub fn visit_item_impl<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemImpl) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001402 for it in & _i . attrs { _visitor.visit_attribute(it) };
1403 _visitor.visit_defaultness(& _i . defaultness);
1404 _visitor.visit_unsafety(& _i . unsafety);
David Tolnaycc0f0372017-12-28 19:11:04 -05001405 tokens_helper(_visitor, &(& _i . impl_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001406 _visitor.visit_generics(& _i . generics);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001407 if let Some(ref it) = _i . trait_ {
1408 _visitor.visit_impl_polarity(& ( it ) . 0);
1409 _visitor.visit_path(& ( it ) . 1);
David Tolnaycc0f0372017-12-28 19:11:04 -05001410 tokens_helper(_visitor, &(& ( it ) . 2).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001411 };
David Tolnay4a918742017-12-28 16:54:41 -05001412 _visitor.visit_type(& * _i . self_ty);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001413 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001414 for it in & _i . items { _visitor.visit_impl_item(it) };
David Tolnayc6b55bc2017-11-09 22:48:38 -08001415}
1416# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001417pub fn visit_item_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMacro) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001418 for it in & _i . attrs { _visitor.visit_attribute(it) };
1419 if let Some(ref it) = _i . ident { _visitor.visit_ident(it) };
1420 _visitor.visit_macro(& _i . mac);
David Tolnaycc0f0372017-12-28 19:11:04 -05001421 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
David Tolnayc6b55bc2017-11-09 22:48:38 -08001422}
1423# [ cfg ( feature = "full" ) ]
David Tolnay500d8322017-12-18 00:32:51 -08001424pub fn visit_item_macro2<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMacro2) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001425 for it in & _i . attrs { _visitor.visit_attribute(it) };
1426 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001427 tokens_helper(_visitor, &(& _i . macro_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001428 _visitor.visit_ident(& _i . ident);
David Tolnay500d8322017-12-18 00:32:51 -08001429 // Skipped field _i . args;
1430 // Skipped field _i . body;
1431}
1432# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001433pub fn visit_item_mod<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMod) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001434 for it in & _i . attrs { _visitor.visit_attribute(it) };
1435 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001436 tokens_helper(_visitor, &(& _i . mod_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001437 _visitor.visit_ident(& _i . ident);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001438 if let Some(ref it) = _i . content {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001439 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001440 for it in & ( it ) . 1 { _visitor.visit_item(it) };
1441 };
David Tolnaycc0f0372017-12-28 19:11:04 -05001442 if let Some(ref it) = _i . semi { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04001443}
1444# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001445pub fn visit_item_static<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemStatic) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001446 for it in & _i . attrs { _visitor.visit_attribute(it) };
1447 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001448 tokens_helper(_visitor, &(& _i . static_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001449 _visitor.visit_mutability(& _i . mutbl);
1450 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001451 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001452 _visitor.visit_type(& * _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001453 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001454 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -05001455 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001456}
1457# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001458pub fn visit_item_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemStruct) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001459 for it in & _i . attrs { _visitor.visit_attribute(it) };
1460 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001461 tokens_helper(_visitor, &(& _i . struct_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001462 _visitor.visit_ident(& _i . ident);
1463 _visitor.visit_generics(& _i . generics);
1464 _visitor.visit_variant_data(& _i . data);
David Tolnaycc0f0372017-12-28 19:11:04 -05001465 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04001466}
1467# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001468pub fn visit_item_trait<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemTrait) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001469 for it in & _i . attrs { _visitor.visit_attribute(it) };
1470 _visitor.visit_visibility(& _i . vis);
1471 _visitor.visit_unsafety(& _i . unsafety);
David Tolnaycc0f0372017-12-28 19:11:04 -05001472 if let Some(ref it) = _i . auto_token { tokens_helper(_visitor, &(it).0) };
1473 tokens_helper(_visitor, &(& _i . trait_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001474 _visitor.visit_ident(& _i . ident);
1475 _visitor.visit_generics(& _i . generics);
David Tolnaycc0f0372017-12-28 19:11:04 -05001476 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001477 for el in & _i . supertraits { let it = el.item(); _visitor.visit_type_param_bound(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -05001478 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001479 for it in & _i . items { _visitor.visit_trait_item(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001480}
1481# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001482pub fn visit_item_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001483 for it in & _i . attrs { _visitor.visit_attribute(it) };
1484 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001485 tokens_helper(_visitor, &(& _i . type_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001486 _visitor.visit_ident(& _i . ident);
1487 _visitor.visit_generics(& _i . generics);
David Tolnaycc0f0372017-12-28 19:11:04 -05001488 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001489 _visitor.visit_type(& * _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001490 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001491}
1492# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001493pub fn visit_item_union<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemUnion) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001494 for it in & _i . attrs { _visitor.visit_attribute(it) };
1495 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001496 tokens_helper(_visitor, &(& _i . union_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001497 _visitor.visit_ident(& _i . ident);
1498 _visitor.visit_generics(& _i . generics);
1499 _visitor.visit_variant_data(& _i . data);
Nika Layzell27726662017-10-24 23:16:35 -04001500}
1501# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001502pub fn visit_item_use<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemUse) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001503 for it in & _i . attrs { _visitor.visit_attribute(it) };
1504 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001505 tokens_helper(_visitor, &(& _i . use_token).0);
1506 if let Some(ref it) = _i . leading_colon { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001507 for el in & _i . prefix { let it = el.item(); _visitor.visit_ident(it) };
1508 _visitor.visit_use_tree(& _i . tree);
David Tolnaycc0f0372017-12-28 19:11:04 -05001509 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001510}
1511
David Tolnay4ba63a02017-12-28 15:53:05 -05001512pub fn visit_lifetime<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Lifetime) {
1513 // Skipped field _i . sym;
1514 _visitor.visit_span(& _i . span);
1515}
1516
Nika Layzellc86173a2017-11-18 13:55:22 -05001517pub fn visit_lifetime_def<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LifetimeDef) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001518 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4ba63a02017-12-28 15:53:05 -05001519 _visitor.visit_lifetime(& _i . lifetime);
David Tolnaycc0f0372017-12-28 19:11:04 -05001520 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4ba63a02017-12-28 15:53:05 -05001521 for el in & _i . bounds { let it = el.item(); _visitor.visit_lifetime(it) };
1522}
1523
1524pub fn visit_lit<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Lit) {
1525 // Skipped field _i . value;
1526 _visitor.visit_span(& _i . span);
Nika Layzell27726662017-10-24 23:16:35 -04001527}
1528# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001529pub fn visit_local<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Local) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001530 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001531 tokens_helper(_visitor, &(& _i . let_token).0);
1532 _visitor.visit_pat(& * _i . pat);
1533 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
1534 if let Some(ref it) = _i . ty { _visitor.visit_type(& * * it) };
1535 if let Some(ref it) = _i . eq_token { tokens_helper(_visitor, &(it).0) };
1536 if let Some(ref it) = _i . init { _visitor.visit_expr(& * * it) };
1537 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001538}
Nika Layzell27726662017-10-24 23:16:35 -04001539
Nika Layzellc86173a2017-11-18 13:55:22 -05001540pub fn visit_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Macro) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001541 _visitor.visit_path(& _i . path);
David Tolnaycc0f0372017-12-28 19:11:04 -05001542 tokens_helper(_visitor, &(& _i . bang_token).0);
David Tolnaydecf28d2017-11-11 11:56:45 -08001543 // Skipped field _i . tokens;
1544}
David Tolnay85b69a42017-12-27 20:43:10 -05001545# [ cfg ( feature = "full" ) ]
1546pub fn visit_member<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Member) {
1547 use ::Member::*;
1548 match *_i {
1549 Named(ref _binding_0, ) => {
1550 _visitor.visit_ident(_binding_0);
1551 }
1552 Unnamed(ref _binding_0, ) => {
1553 _visitor.visit_index(_binding_0);
1554 }
1555 }
1556}
David Tolnaydecf28d2017-11-11 11:56:45 -08001557
Nika Layzellc86173a2017-11-18 13:55:22 -05001558pub fn visit_meta_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MetaItem) {
Nika Layzell27726662017-10-24 23:16:35 -04001559 use ::MetaItem::*;
1560 match *_i {
1561 Term(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001562 _visitor.visit_ident(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001563 }
1564 List(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001565 _visitor.visit_meta_item_list(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001566 }
1567 NameValue(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001568 _visitor.visit_meta_name_value(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001569 }
1570 }
1571}
1572
Nika Layzellc86173a2017-11-18 13:55:22 -05001573pub fn visit_meta_item_list<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MetaItemList) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001574 _visitor.visit_ident(& _i . ident);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001575 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001576 for el in & _i . nested { let it = el.item(); _visitor.visit_nested_meta_item(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001577}
1578
Nika Layzellc86173a2017-11-18 13:55:22 -05001579pub fn visit_meta_name_value<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MetaNameValue) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001580 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001581 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4ba63a02017-12-28 15:53:05 -05001582 _visitor.visit_lit(& _i . lit);
Nika Layzell27726662017-10-24 23:16:35 -04001583}
1584# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001585pub fn visit_method_sig<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MethodSig) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001586 _visitor.visit_constness(& _i . constness);
1587 _visitor.visit_unsafety(& _i . unsafety);
1588 if let Some(ref it) = _i . abi { _visitor.visit_abi(it) };
1589 _visitor.visit_ident(& _i . ident);
1590 _visitor.visit_fn_decl(& _i . decl);
Nika Layzell27726662017-10-24 23:16:35 -04001591}
1592
Nika Layzellc86173a2017-11-18 13:55:22 -05001593pub fn visit_mut_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MutType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001594 _visitor.visit_mutability(& _i . mutability);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001595 _visitor.visit_type(& _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -04001596}
1597
Nika Layzellc86173a2017-11-18 13:55:22 -05001598pub fn visit_mutability<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Mutability) {
Nika Layzell27726662017-10-24 23:16:35 -04001599 use ::Mutability::*;
1600 match *_i {
1601 Mutable(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05001602 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04001603 }
1604 Immutable => { }
1605 }
1606}
1607
Nika Layzellc86173a2017-11-18 13:55:22 -05001608pub fn visit_nested_meta_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast NestedMetaItem) {
Nika Layzell27726662017-10-24 23:16:35 -04001609 use ::NestedMetaItem::*;
1610 match *_i {
1611 MetaItem(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001612 _visitor.visit_meta_item(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001613 }
1614 Literal(ref _binding_0, ) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05001615 _visitor.visit_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001616 }
1617 }
1618}
1619
Nika Layzellc08227a2017-12-04 16:30:17 -05001620pub fn visit_parenthesized_generic_arguments<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ParenthesizedGenericArguments) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001621 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001622 for el in & _i . inputs { let it = el.item(); _visitor.visit_type(it) };
1623 _visitor.visit_return_type(& _i . output);
Nika Layzell27726662017-10-24 23:16:35 -04001624}
1625# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001626pub fn visit_pat<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Pat) {
Nika Layzell27726662017-10-24 23:16:35 -04001627 use ::Pat::*;
1628 match *_i {
1629 Wild(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001630 _visitor.visit_pat_wild(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001631 }
1632 Ident(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001633 _visitor.visit_pat_ident(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001634 }
1635 Struct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001636 _visitor.visit_pat_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001637 }
1638 TupleStruct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001639 _visitor.visit_pat_tuple_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001640 }
1641 Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001642 _visitor.visit_pat_path(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001643 }
1644 Tuple(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001645 _visitor.visit_pat_tuple(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001646 }
1647 Box(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001648 _visitor.visit_pat_box(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001649 }
1650 Ref(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001651 _visitor.visit_pat_ref(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001652 }
1653 Lit(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001654 _visitor.visit_pat_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001655 }
1656 Range(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001657 _visitor.visit_pat_range(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001658 }
1659 Slice(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001660 _visitor.visit_pat_slice(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001661 }
David Tolnaydecf28d2017-11-11 11:56:45 -08001662 Macro(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001663 _visitor.visit_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001664 }
1665 }
1666}
1667# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001668pub fn visit_pat_box<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatBox) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001669 tokens_helper(_visitor, &(& _i . box_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001670 _visitor.visit_pat(& * _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001671}
1672# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001673pub fn visit_pat_ident<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatIdent) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001674 _visitor.visit_binding_mode(& _i . mode);
1675 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001676 if let Some(ref it) = _i . at_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001677 if let Some(ref it) = _i . subpat { _visitor.visit_pat(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -04001678}
1679# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001680pub fn visit_pat_lit<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatLit) {
David Tolnay4a918742017-12-28 16:54:41 -05001681 _visitor.visit_expr(& * _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -04001682}
1683# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001684pub fn visit_pat_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatPath) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001685 if let Some(ref it) = _i . qself { _visitor.visit_qself(it) };
1686 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -04001687}
1688# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001689pub fn visit_pat_range<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatRange) {
David Tolnay4a918742017-12-28 16:54:41 -05001690 _visitor.visit_expr(& * _i . lo);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001691 _visitor.visit_range_limits(& _i . limits);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001692 _visitor.visit_expr(& * _i . hi);
Nika Layzell27726662017-10-24 23:16:35 -04001693}
1694# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001695pub fn visit_pat_ref<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatRef) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001696 tokens_helper(_visitor, &(& _i . and_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001697 _visitor.visit_mutability(& _i . mutbl);
1698 _visitor.visit_pat(& * _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001699}
1700# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001701pub fn visit_pat_slice<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatSlice) {
David Tolnay4a3f59a2017-12-28 21:21:12 -05001702 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001703 for el in & _i . front { let it = el.item(); _visitor.visit_pat(it) };
David Tolnay4a918742017-12-28 16:54:41 -05001704 if let Some(ref it) = _i . middle { _visitor.visit_pat(& * * it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001705 if let Some(ref it) = _i . comma_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001706 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
1707 for el in & _i . back { let it = el.item(); _visitor.visit_pat(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001708}
1709# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001710pub fn visit_pat_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatStruct) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001711 _visitor.visit_path(& _i . path);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001712 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001713 for el in & _i . fields { let it = el.item(); _visitor.visit_field_pat(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001714 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04001715}
1716# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001717pub fn visit_pat_tuple<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatTuple) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001718 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001719 for el in & _i . pats { let it = el.item(); _visitor.visit_pat(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001720 if let Some(ref it) = _i . comma_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001721 // Skipped field _i . dots_pos;
1722 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04001723}
1724# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001725pub fn visit_pat_tuple_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatTupleStruct) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001726 _visitor.visit_path(& _i . path);
1727 _visitor.visit_pat_tuple(& _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001728}
1729# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001730pub fn visit_pat_wild<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatWild) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001731 tokens_helper(_visitor, &(& _i . underscore_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001732}
1733
Nika Layzellc86173a2017-11-18 13:55:22 -05001734pub fn visit_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Path) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001735 if let Some(ref it) = _i . leading_colon { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001736 for el in & _i . segments { let it = el.item(); _visitor.visit_path_segment(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001737}
Nika Layzellc08227a2017-12-04 16:30:17 -05001738
1739pub fn visit_path_arguments<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PathArguments) {
1740 use ::PathArguments::*;
1741 match *_i {
1742 None => { }
1743 AngleBracketed(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001744 _visitor.visit_angle_bracketed_generic_arguments(_binding_0);
Nika Layzellc08227a2017-12-04 16:30:17 -05001745 }
1746 Parenthesized(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001747 _visitor.visit_parenthesized_generic_arguments(_binding_0);
Nika Layzellc08227a2017-12-04 16:30:17 -05001748 }
1749 }
1750}
Nika Layzell27726662017-10-24 23:16:35 -04001751
Nika Layzellc86173a2017-11-18 13:55:22 -05001752pub fn visit_path_segment<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PathSegment) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001753 _visitor.visit_ident(& _i . ident);
1754 _visitor.visit_path_arguments(& _i . arguments);
Nika Layzell27726662017-10-24 23:16:35 -04001755}
Nika Layzell27726662017-10-24 23:16:35 -04001756
Nika Layzellc86173a2017-11-18 13:55:22 -05001757pub fn visit_poly_trait_ref<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PolyTraitRef) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001758 if let Some(ref it) = _i . bound_lifetimes { _visitor.visit_bound_lifetimes(it) };
1759 _visitor.visit_path(& _i . trait_ref);
Nika Layzell27726662017-10-24 23:16:35 -04001760}
1761
Nika Layzellc86173a2017-11-18 13:55:22 -05001762pub fn visit_qself<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast QSelf) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001763 tokens_helper(_visitor, &(& _i . lt_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001764 _visitor.visit_type(& * _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -04001765 // Skipped field _i . position;
David Tolnaycc0f0372017-12-28 19:11:04 -05001766 if let Some(ref it) = _i . as_token { tokens_helper(_visitor, &(it).0) };
1767 tokens_helper(_visitor, &(& _i . gt_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001768}
1769# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001770pub fn visit_range_limits<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast RangeLimits) {
Nika Layzell27726662017-10-24 23:16:35 -04001771 use ::RangeLimits::*;
1772 match *_i {
1773 HalfOpen(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05001774 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04001775 }
1776 Closed(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05001777 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04001778 }
1779 }
1780}
David Tolnayf93b90d2017-11-11 19:21:26 -08001781
Nika Layzellc86173a2017-11-18 13:55:22 -05001782pub fn visit_return_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ReturnType) {
David Tolnayf93b90d2017-11-11 19:21:26 -08001783 use ::ReturnType::*;
1784 match *_i {
1785 Default => { }
David Tolnayfd6bf5c2017-11-12 09:41:14 -08001786 Type(ref _binding_0, ref _binding_1, ) => {
David Tolnay4a3f59a2017-12-28 21:21:12 -05001787 tokens_helper(_visitor, &(_binding_0).0);
1788 _visitor.visit_type(& * * _binding_1);
David Tolnayf93b90d2017-11-11 19:21:26 -08001789 }
1790 }
1791}
Nika Layzellefb83ba2017-12-19 18:23:55 -05001792
1793pub fn visit_span<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Span) {
1794}
Nika Layzell27726662017-10-24 23:16:35 -04001795# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001796pub fn visit_stmt<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Stmt) {
Nika Layzell27726662017-10-24 23:16:35 -04001797 use ::Stmt::*;
1798 match *_i {
1799 Local(ref _binding_0, ) => {
David Tolnay4a918742017-12-28 16:54:41 -05001800 _visitor.visit_local(& * * _binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001801 }
1802 Item(ref _binding_0, ) => {
David Tolnay4a918742017-12-28 16:54:41 -05001803 _visitor.visit_item(& * * _binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001804 }
1805 Expr(ref _binding_0, ) => {
David Tolnay4a918742017-12-28 16:54:41 -05001806 _visitor.visit_expr(& * * _binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001807 }
1808 Semi(ref _binding_0, ref _binding_1, ) => {
David Tolnay4a918742017-12-28 16:54:41 -05001809 _visitor.visit_expr(& * * _binding_0);
David Tolnaycc0f0372017-12-28 19:11:04 -05001810 tokens_helper(_visitor, &(_binding_1).0);
Nika Layzell27726662017-10-24 23:16:35 -04001811 }
Nika Layzell27726662017-10-24 23:16:35 -04001812 }
1813}
1814
Nika Layzellc86173a2017-11-18 13:55:22 -05001815pub fn visit_trait_bound_modifier<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitBoundModifier) {
Nika Layzell27726662017-10-24 23:16:35 -04001816 use ::TraitBoundModifier::*;
1817 match *_i {
1818 None => { }
1819 Maybe(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05001820 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04001821 }
1822 }
1823}
1824# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001825pub fn visit_trait_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItem) {
David Tolnayda705bd2017-11-10 21:58:05 -08001826 use ::TraitItem::*;
Nika Layzell27726662017-10-24 23:16:35 -04001827 match *_i {
1828 Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001829 _visitor.visit_trait_item_const(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001830 }
1831 Method(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001832 _visitor.visit_trait_item_method(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001833 }
1834 Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001835 _visitor.visit_trait_item_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001836 }
1837 Macro(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001838 _visitor.visit_trait_item_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001839 }
1840 }
1841}
1842# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001843pub fn visit_trait_item_const<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemConst) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001844 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001845 tokens_helper(_visitor, &(& _i . const_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001846 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001847 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001848 _visitor.visit_type(& _i . ty);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001849 if let Some(ref it) = _i . default {
David Tolnaycc0f0372017-12-28 19:11:04 -05001850 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001851 _visitor.visit_expr(& ( it ) . 1);
1852 };
David Tolnaycc0f0372017-12-28 19:11:04 -05001853 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnayda705bd2017-11-10 21:58:05 -08001854}
1855# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001856pub fn visit_trait_item_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemMacro) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001857 for it in & _i . attrs { _visitor.visit_attribute(it) };
1858 _visitor.visit_macro(& _i . mac);
David Tolnaycc0f0372017-12-28 19:11:04 -05001859 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
David Tolnayda705bd2017-11-10 21:58:05 -08001860}
1861# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001862pub fn visit_trait_item_method<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemMethod) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001863 for it in & _i . attrs { _visitor.visit_attribute(it) };
1864 _visitor.visit_method_sig(& _i . sig);
1865 if let Some(ref it) = _i . default { _visitor.visit_block(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001866 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04001867}
1868# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001869pub fn visit_trait_item_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001870 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001871 tokens_helper(_visitor, &(& _i . type_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001872 _visitor.visit_ident(& _i . ident);
1873 _visitor.visit_generics(& _i . generics);
David Tolnaycc0f0372017-12-28 19:11:04 -05001874 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001875 for el in & _i . bounds { let it = el.item(); _visitor.visit_type_param_bound(it) };
David Tolnay5c4c0b52017-12-28 17:58:54 -05001876 if let Some(ref it) = _i . default {
David Tolnaycc0f0372017-12-28 19:11:04 -05001877 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001878 _visitor.visit_type(& ( it ) . 1);
1879 };
David Tolnaycc0f0372017-12-28 19:11:04 -05001880 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001881}
1882
Nika Layzellc86173a2017-11-18 13:55:22 -05001883pub fn visit_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Type) {
David Tolnayfd6bf5c2017-11-12 09:41:14 -08001884 use ::Type::*;
Nika Layzell27726662017-10-24 23:16:35 -04001885 match *_i {
1886 Slice(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001887 _visitor.visit_type_slice(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001888 }
1889 Array(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001890 _visitor.visit_type_array(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001891 }
1892 Ptr(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001893 _visitor.visit_type_ptr(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001894 }
David Tolnay0a89b4d2017-11-13 00:55:45 -08001895 Reference(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001896 _visitor.visit_type_reference(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001897 }
1898 BareFn(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001899 _visitor.visit_type_bare_fn(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001900 }
1901 Never(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001902 _visitor.visit_type_never(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001903 }
David Tolnay05362582017-12-26 01:33:57 -05001904 Tuple(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001905 _visitor.visit_type_tuple(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001906 }
1907 Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001908 _visitor.visit_type_path(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001909 }
1910 TraitObject(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001911 _visitor.visit_type_trait_object(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001912 }
1913 ImplTrait(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001914 _visitor.visit_type_impl_trait(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001915 }
1916 Paren(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001917 _visitor.visit_type_paren(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001918 }
1919 Group(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001920 _visitor.visit_type_group(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001921 }
1922 Infer(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001923 _visitor.visit_type_infer(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001924 }
David Tolnaydecf28d2017-11-11 11:56:45 -08001925 Macro(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001926 _visitor.visit_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001927 }
1928 }
1929}
1930
Nika Layzellc86173a2017-11-18 13:55:22 -05001931pub fn visit_type_array<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeArray) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001932 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001933 _visitor.visit_type(& * _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001934 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001935 _visitor.visit_expr(& _i . amt);
Nika Layzell27726662017-10-24 23:16:35 -04001936}
1937
Nika Layzellc86173a2017-11-18 13:55:22 -05001938pub fn visit_type_bare_fn<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeBareFn) {
David Tolnay4a918742017-12-28 16:54:41 -05001939 _visitor.visit_bare_fn_type(& * _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -04001940}
1941
Nika Layzellc86173a2017-11-18 13:55:22 -05001942pub fn visit_type_binding<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeBinding) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001943 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001944 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001945 _visitor.visit_type(& _i . ty);
David Tolnayfd6bf5c2017-11-12 09:41:14 -08001946}
1947
Nika Layzellc86173a2017-11-18 13:55:22 -05001948pub fn visit_type_group<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeGroup) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001949 tokens_helper(_visitor, &(& _i . group_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001950 _visitor.visit_type(& * _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -04001951}
1952
Nika Layzellc86173a2017-11-18 13:55:22 -05001953pub fn visit_type_impl_trait<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeImplTrait) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001954 tokens_helper(_visitor, &(& _i . impl_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001955 for el in & _i . bounds { let it = el.item(); _visitor.visit_type_param_bound(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001956}
1957
Nika Layzellc86173a2017-11-18 13:55:22 -05001958pub fn visit_type_infer<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeInfer) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001959 tokens_helper(_visitor, &(& _i . underscore_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001960}
1961
Nika Layzellc86173a2017-11-18 13:55:22 -05001962pub fn visit_type_never<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeNever) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001963 tokens_helper(_visitor, &(& _i . bang_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001964}
1965
Nika Layzellc86173a2017-11-18 13:55:22 -05001966pub fn visit_type_param<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParam) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001967 for it in & _i . attrs { _visitor.visit_attribute(it) };
1968 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001969 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001970 for el in & _i . bounds { let it = el.item(); _visitor.visit_type_param_bound(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001971 if let Some(ref it) = _i . eq_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001972 if let Some(ref it) = _i . default { _visitor.visit_type(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001973}
1974
Nika Layzellc86173a2017-11-18 13:55:22 -05001975pub fn visit_type_param_bound<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParamBound) {
David Tolnayfd6bf5c2017-11-12 09:41:14 -08001976 use ::TypeParamBound::*;
Nika Layzell27726662017-10-24 23:16:35 -04001977 match *_i {
1978 Trait(ref _binding_0, ref _binding_1, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001979 _visitor.visit_poly_trait_ref(_binding_0);
1980 _visitor.visit_trait_bound_modifier(_binding_1);
Nika Layzell27726662017-10-24 23:16:35 -04001981 }
1982 Region(ref _binding_0, ) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05001983 _visitor.visit_lifetime(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001984 }
1985 }
1986}
1987
Nika Layzellc86173a2017-11-18 13:55:22 -05001988pub fn visit_type_paren<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParen) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001989 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001990 _visitor.visit_type(& * _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -04001991}
1992
Nika Layzellc86173a2017-11-18 13:55:22 -05001993pub fn visit_type_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypePath) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001994 if let Some(ref it) = _i . qself { _visitor.visit_qself(it) };
1995 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -04001996}
1997
Nika Layzellc86173a2017-11-18 13:55:22 -05001998pub fn visit_type_ptr<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypePtr) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001999 tokens_helper(_visitor, &(& _i . star_token).0);
2000 if let Some(ref it) = _i . const_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a918742017-12-28 16:54:41 -05002001 _visitor.visit_mut_type(& * _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -04002002}
2003
Nika Layzellc86173a2017-11-18 13:55:22 -05002004pub fn visit_type_reference<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeReference) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002005 tokens_helper(_visitor, &(& _i . and_token).0);
David Tolnay4ba63a02017-12-28 15:53:05 -05002006 if let Some(ref it) = _i . lifetime { _visitor.visit_lifetime(it) };
David Tolnay4a918742017-12-28 16:54:41 -05002007 _visitor.visit_mut_type(& * _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -04002008}
2009
Nika Layzellc86173a2017-11-18 13:55:22 -05002010pub fn visit_type_slice<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeSlice) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002011 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05002012 _visitor.visit_type(& * _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -04002013}
2014
Nika Layzellc86173a2017-11-18 13:55:22 -05002015pub fn visit_type_trait_object<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeTraitObject) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002016 if let Some(ref it) = _i . dyn_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05002017 for el in & _i . bounds { let it = el.item(); _visitor.visit_type_param_bound(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002018}
2019
David Tolnay05362582017-12-26 01:33:57 -05002020pub fn visit_type_tuple<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeTuple) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002021 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05002022 for el in & _i . tys { let it = el.item(); _visitor.visit_type(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002023}
2024
Nika Layzellc86173a2017-11-18 13:55:22 -05002025pub fn visit_un_op<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UnOp) {
Nika Layzell27726662017-10-24 23:16:35 -04002026 use ::UnOp::*;
2027 match *_i {
2028 Deref(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05002029 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04002030 }
2031 Not(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05002032 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04002033 }
2034 Neg(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05002035 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04002036 }
2037 }
2038}
2039
Nika Layzellc86173a2017-11-18 13:55:22 -05002040pub fn visit_unsafety<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Unsafety) {
Nika Layzell27726662017-10-24 23:16:35 -04002041 use ::Unsafety::*;
2042 match *_i {
2043 Unsafe(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05002044 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04002045 }
2046 Normal => { }
2047 }
2048}
David Tolnay5f332a92017-12-26 00:42:45 -05002049# [ cfg ( feature = "full" ) ]
2050pub fn visit_use_glob<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseGlob) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002051 tokens_helper(_visitor, &(& _i . star_token).0);
David Tolnay5f332a92017-12-26 00:42:45 -05002052}
2053# [ cfg ( feature = "full" ) ]
2054pub fn visit_use_list<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseList) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002055 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05002056 for el in & _i . items { let it = el.item(); _visitor.visit_use_tree(it) };
David Tolnay5f332a92017-12-26 00:42:45 -05002057}
2058# [ cfg ( feature = "full" ) ]
2059pub fn visit_use_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UsePath) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002060 _visitor.visit_ident(& _i . ident);
David Tolnay5c4c0b52017-12-28 17:58:54 -05002061 if let Some(ref it) = _i . rename {
David Tolnaycc0f0372017-12-28 19:11:04 -05002062 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05002063 _visitor.visit_ident(& ( it ) . 1);
2064 };
David Tolnay5f332a92017-12-26 00:42:45 -05002065}
2066# [ cfg ( feature = "full" ) ]
2067pub fn visit_use_tree<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseTree) {
2068 use ::UseTree::*;
2069 match *_i {
2070 Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002071 _visitor.visit_use_path(_binding_0);
David Tolnay5f332a92017-12-26 00:42:45 -05002072 }
2073 Glob(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002074 _visitor.visit_use_glob(_binding_0);
David Tolnay5f332a92017-12-26 00:42:45 -05002075 }
2076 List(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002077 _visitor.visit_use_list(_binding_0);
David Tolnay5f332a92017-12-26 00:42:45 -05002078 }
2079 }
2080}
Nika Layzell27726662017-10-24 23:16:35 -04002081
Nika Layzellc86173a2017-11-18 13:55:22 -05002082pub fn visit_variant<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Variant) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002083 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05002084 _visitor.visit_ident(& _i . ident);
David Tolnayf0d63bf2017-12-26 12:29:47 -05002085 _visitor.visit_variant_data(& _i . data);
David Tolnaycc0f0372017-12-28 19:11:04 -05002086 if let Some(ref it) = _i . eq_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05002087 if let Some(ref it) = _i . discriminant { _visitor.visit_expr(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002088}
2089
Nika Layzellc86173a2017-11-18 13:55:22 -05002090pub fn visit_variant_data<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VariantData) {
Nika Layzell27726662017-10-24 23:16:35 -04002091 use ::VariantData::*;
2092 match *_i {
2093 Struct(ref _binding_0, ref _binding_1, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002094 for el in _binding_0 { let it = el.item(); _visitor.visit_field(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -05002095 tokens_helper(_visitor, &(_binding_1).0);
Nika Layzell27726662017-10-24 23:16:35 -04002096 }
2097 Tuple(ref _binding_0, ref _binding_1, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002098 for el in _binding_0 { let it = el.item(); _visitor.visit_field(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -05002099 tokens_helper(_visitor, &(_binding_1).0);
Nika Layzell27726662017-10-24 23:16:35 -04002100 }
2101 Unit => { }
2102 }
2103}
Nika Layzell27726662017-10-24 23:16:35 -04002104
Nika Layzellc86173a2017-11-18 13:55:22 -05002105pub fn visit_vis_crate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisCrate) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002106 tokens_helper(_visitor, &(& _i . pub_token).0);
David Tolnay1e01f9c2017-12-28 20:16:19 -05002107 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnaycc0f0372017-12-28 19:11:04 -05002108 tokens_helper(_visitor, &(& _i . crate_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04002109}
2110
Nika Layzellc86173a2017-11-18 13:55:22 -05002111pub fn visit_vis_inherited<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisInherited) {
Nika Layzell27726662017-10-24 23:16:35 -04002112}
2113
Nika Layzellc86173a2017-11-18 13:55:22 -05002114pub fn visit_vis_public<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisPublic) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002115 tokens_helper(_visitor, &(& _i . pub_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04002116}
2117
Nika Layzellc86173a2017-11-18 13:55:22 -05002118pub fn visit_vis_restricted<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisRestricted) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002119 tokens_helper(_visitor, &(& _i . pub_token).0);
David Tolnay1e01f9c2017-12-28 20:16:19 -05002120 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnaycc0f0372017-12-28 19:11:04 -05002121 if let Some(ref it) = _i . in_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a918742017-12-28 16:54:41 -05002122 _visitor.visit_path(& * _i . path);
Nika Layzell27726662017-10-24 23:16:35 -04002123}
2124
Nika Layzellc86173a2017-11-18 13:55:22 -05002125pub fn visit_visibility<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Visibility) {
Nika Layzell27726662017-10-24 23:16:35 -04002126 use ::Visibility::*;
2127 match *_i {
2128 Public(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002129 _visitor.visit_vis_public(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002130 }
2131 Crate(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002132 _visitor.visit_vis_crate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002133 }
2134 Restricted(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002135 _visitor.visit_vis_restricted(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002136 }
2137 Inherited(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002138 _visitor.visit_vis_inherited(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002139 }
2140 }
2141}
2142
Nika Layzellc86173a2017-11-18 13:55:22 -05002143pub fn visit_where_bound_predicate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WhereBoundPredicate) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002144 if let Some(ref it) = _i . bound_lifetimes { _visitor.visit_bound_lifetimes(it) };
2145 _visitor.visit_type(& _i . bounded_ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05002146 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05002147 for el in & _i . bounds { let it = el.item(); _visitor.visit_type_param_bound(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002148}
2149
Nika Layzellc86173a2017-11-18 13:55:22 -05002150pub fn visit_where_clause<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WhereClause) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002151 tokens_helper(_visitor, &(& _i . where_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05002152 for el in & _i . predicates { let it = el.item(); _visitor.visit_where_predicate(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002153}
2154
Nika Layzellc86173a2017-11-18 13:55:22 -05002155pub fn visit_where_eq_predicate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WhereEqPredicate) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002156 _visitor.visit_type(& _i . lhs_ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05002157 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05002158 _visitor.visit_type(& _i . rhs_ty);
Nika Layzell27726662017-10-24 23:16:35 -04002159}
2160
Nika Layzellc86173a2017-11-18 13:55:22 -05002161pub fn visit_where_predicate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WherePredicate) {
Nika Layzell27726662017-10-24 23:16:35 -04002162 use ::WherePredicate::*;
2163 match *_i {
2164 BoundPredicate(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002165 _visitor.visit_where_bound_predicate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002166 }
2167 RegionPredicate(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002168 _visitor.visit_where_region_predicate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002169 }
2170 EqPredicate(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002171 _visitor.visit_where_eq_predicate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002172 }
2173 }
2174}
2175
Nika Layzellc86173a2017-11-18 13:55:22 -05002176pub fn visit_where_region_predicate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WhereRegionPredicate) {
David Tolnay4ba63a02017-12-28 15:53:05 -05002177 _visitor.visit_lifetime(& _i . lifetime);
David Tolnaycc0f0372017-12-28 19:11:04 -05002178 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4ba63a02017-12-28 15:53:05 -05002179 for el in & _i . bounds { let it = el.item(); _visitor.visit_lifetime(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002180}
2181