blob: 1f140ffe71670f7cf689644e36f46decfe5abfee [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_block(&mut self, i: &'ast Block) { visit_block(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040066
Nika Layzellc86173a2017-11-18 13:55:22 -050067fn visit_body(&mut self, i: &'ast Body) { visit_body(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040068
Nika Layzellc86173a2017-11-18 13:55:22 -050069fn visit_body_enum(&mut self, i: &'ast BodyEnum) { visit_body_enum(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040070
Nika Layzellc86173a2017-11-18 13:55:22 -050071fn visit_body_struct(&mut self, i: &'ast BodyStruct) { visit_body_struct(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040072
Nika Layzellc86173a2017-11-18 13:55:22 -050073fn visit_bound_lifetimes(&mut self, i: &'ast BoundLifetimes) { visit_bound_lifetimes(self, i) }
Nika Layzellf1fdc0b2017-12-04 19:58:32 -050074
75fn visit_const_param(&mut self, i: &'ast ConstParam) { visit_const_param(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040076
Nika Layzellc86173a2017-11-18 13:55:22 -050077fn visit_derive_input(&mut self, i: &'ast DeriveInput) { visit_derive_input(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040078
Nika Layzellc86173a2017-11-18 13:55:22 -050079fn visit_expr(&mut self, i: &'ast Expr) { visit_expr(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040080# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050081fn visit_expr_addr_of(&mut self, i: &'ast ExprAddrOf) { visit_expr_addr_of(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040082# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050083fn visit_expr_array(&mut self, i: &'ast ExprArray) { visit_expr_array(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040084# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050085fn visit_expr_assign(&mut self, i: &'ast ExprAssign) { visit_expr_assign(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040086# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050087fn visit_expr_assign_op(&mut self, i: &'ast ExprAssignOp) { visit_expr_assign_op(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040088
Nika Layzellc86173a2017-11-18 13:55:22 -050089fn visit_expr_binary(&mut self, i: &'ast ExprBinary) { visit_expr_binary(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040090# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050091fn visit_expr_block(&mut self, i: &'ast ExprBlock) { visit_expr_block(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040092# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050093fn visit_expr_box(&mut self, i: &'ast ExprBox) { visit_expr_box(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040094# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050095fn visit_expr_break(&mut self, i: &'ast ExprBreak) { visit_expr_break(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040096
Nika Layzellc86173a2017-11-18 13:55:22 -050097fn visit_expr_call(&mut self, i: &'ast ExprCall) { visit_expr_call(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040098
Nika Layzellc86173a2017-11-18 13:55:22 -050099fn visit_expr_cast(&mut self, i: &'ast ExprCast) { visit_expr_cast(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400100# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500101fn visit_expr_catch(&mut self, i: &'ast ExprCatch) { visit_expr_catch(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400102# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500103fn visit_expr_closure(&mut self, i: &'ast ExprClosure) { visit_expr_closure(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400104# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500105fn visit_expr_continue(&mut self, i: &'ast ExprContinue) { visit_expr_continue(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400106# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500107fn visit_expr_field(&mut self, i: &'ast ExprField) { visit_expr_field(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400108# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500109fn visit_expr_for_loop(&mut self, i: &'ast ExprForLoop) { visit_expr_for_loop(self, i) }
David Tolnaye98775f2017-12-28 23:17:00 -0500110# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500111fn visit_expr_group(&mut self, i: &'ast ExprGroup) { visit_expr_group(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400112# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500113fn visit_expr_if(&mut self, i: &'ast ExprIf) { visit_expr_if(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400114# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500115fn visit_expr_if_let(&mut self, i: &'ast ExprIfLet) { visit_expr_if_let(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400116# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500117fn visit_expr_in_place(&mut self, i: &'ast ExprInPlace) { visit_expr_in_place(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400118
Nika Layzellc86173a2017-11-18 13:55:22 -0500119fn visit_expr_index(&mut self, i: &'ast ExprIndex) { visit_expr_index(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400120
David Tolnay8c91b882017-12-28 23:04:32 -0500121fn visit_expr_lit(&mut self, i: &'ast ExprLit) { visit_expr_lit(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400122# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500123fn visit_expr_loop(&mut self, i: &'ast ExprLoop) { visit_expr_loop(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400124# [ cfg ( feature = "full" ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500125fn visit_expr_macro(&mut self, i: &'ast ExprMacro) { visit_expr_macro(self, i) }
126# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500127fn visit_expr_match(&mut self, i: &'ast ExprMatch) { visit_expr_match(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400128# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500129fn visit_expr_method_call(&mut self, i: &'ast ExprMethodCall) { visit_expr_method_call(self, i) }
David Tolnaye98775f2017-12-28 23:17:00 -0500130# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500131fn visit_expr_paren(&mut self, i: &'ast ExprParen) { visit_expr_paren(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400132
Nika Layzellc86173a2017-11-18 13:55:22 -0500133fn visit_expr_path(&mut self, i: &'ast ExprPath) { visit_expr_path(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400134# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500135fn visit_expr_range(&mut self, i: &'ast ExprRange) { visit_expr_range(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400136# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500137fn visit_expr_repeat(&mut self, i: &'ast ExprRepeat) { visit_expr_repeat(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400138# [ cfg ( feature = "full" ) ]
David Tolnayc246cd32017-12-28 23:14:32 -0500139fn visit_expr_return(&mut self, i: &'ast ExprReturn) { visit_expr_return(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400140# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500141fn visit_expr_struct(&mut self, i: &'ast ExprStruct) { visit_expr_struct(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400142# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500143fn visit_expr_try(&mut self, i: &'ast ExprTry) { visit_expr_try(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400144# [ cfg ( feature = "full" ) ]
David Tolnay05362582017-12-26 01:33:57 -0500145fn visit_expr_tuple(&mut self, i: &'ast ExprTuple) { visit_expr_tuple(self, i) }
David Tolnay0cf94f22017-12-28 23:46:26 -0500146# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500147fn visit_expr_type(&mut self, i: &'ast ExprType) { visit_expr_type(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400148
Nika Layzellc86173a2017-11-18 13:55:22 -0500149fn visit_expr_unary(&mut self, i: &'ast ExprUnary) { visit_expr_unary(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400150# [ cfg ( feature = "full" ) ]
Nika Layzell640832a2017-12-04 13:37:09 -0500151fn visit_expr_unsafe(&mut self, i: &'ast ExprUnsafe) { visit_expr_unsafe(self, i) }
152# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500153fn visit_expr_while(&mut self, i: &'ast ExprWhile) { visit_expr_while(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400154# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500155fn visit_expr_while_let(&mut self, i: &'ast ExprWhileLet) { visit_expr_while_let(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400156# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500157fn visit_expr_yield(&mut self, i: &'ast ExprYield) { visit_expr_yield(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400158
Nika Layzellc86173a2017-11-18 13:55:22 -0500159fn visit_field(&mut self, i: &'ast Field) { visit_field(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400160# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500161fn visit_field_pat(&mut self, i: &'ast FieldPat) { visit_field_pat(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400162# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500163fn visit_field_value(&mut self, i: &'ast FieldValue) { visit_field_value(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400164# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500165fn visit_file(&mut self, i: &'ast File) { visit_file(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400166# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500167fn visit_fn_arg(&mut self, i: &'ast FnArg) { visit_fn_arg(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400168# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500169fn visit_fn_decl(&mut self, i: &'ast FnDecl) { visit_fn_decl(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400170# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500171fn visit_foreign_item(&mut self, i: &'ast ForeignItem) { visit_foreign_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400172# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500173fn visit_foreign_item_fn(&mut self, i: &'ast ForeignItemFn) { visit_foreign_item_fn(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400174# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500175fn visit_foreign_item_static(&mut self, i: &'ast ForeignItemStatic) { visit_foreign_item_static(self, i) }
David Tolnay199bcbb2017-11-12 10:33:52 -0800176# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500177fn visit_foreign_item_type(&mut self, i: &'ast ForeignItemType) { visit_foreign_item_type(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400178
Nika Layzellc08227a2017-12-04 16:30:17 -0500179fn visit_generic_argument(&mut self, i: &'ast GenericArgument) { visit_generic_argument(self, i) }
David Tolnayd60cfec2017-12-29 00:21:38 -0500180# [ cfg ( feature = "full" ) ]
181fn visit_generic_method_argument(&mut self, i: &'ast GenericMethodArgument) { visit_generic_method_argument(self, i) }
Nika Layzell357885a2017-12-04 15:47:07 -0500182
David Tolnayc2f1aba2017-11-12 20:29:22 -0800183fn visit_generic_param(&mut self, i: &'ast GenericParam) { visit_generic_param(self, i) }
184
Nika Layzellc86173a2017-11-18 13:55:22 -0500185fn visit_generics(&mut self, i: &'ast Generics) { visit_generics(self, i) }
Nika Layzellefb83ba2017-12-19 18:23:55 -0500186
187fn visit_ident(&mut self, i: &'ast Ident) { visit_ident(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400188# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500189fn visit_impl_item(&mut self, i: &'ast ImplItem) { visit_impl_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400190# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500191fn visit_impl_item_const(&mut self, i: &'ast ImplItemConst) { visit_impl_item_const(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400192# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500193fn visit_impl_item_macro(&mut self, i: &'ast ImplItemMacro) { visit_impl_item_macro(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400194# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500195fn visit_impl_item_method(&mut self, i: &'ast ImplItemMethod) { visit_impl_item_method(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400196# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500197fn visit_impl_item_type(&mut self, i: &'ast ImplItemType) { visit_impl_item_type(self, i) }
David Tolnay14982012017-12-29 00:49:51 -0500198
David Tolnay85b69a42017-12-27 20:43:10 -0500199fn visit_index(&mut self, i: &'ast Index) { visit_index(self, i) }
200# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500201fn visit_item(&mut self, i: &'ast Item) { visit_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400202# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500203fn visit_item_const(&mut self, i: &'ast ItemConst) { visit_item_const(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400204# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500205fn visit_item_default_impl(&mut self, i: &'ast ItemDefaultImpl) { visit_item_default_impl(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400206# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500207fn visit_item_enum(&mut self, i: &'ast ItemEnum) { visit_item_enum(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400208# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500209fn visit_item_extern_crate(&mut self, i: &'ast ItemExternCrate) { visit_item_extern_crate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400210# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500211fn visit_item_fn(&mut self, i: &'ast ItemFn) { visit_item_fn(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400212# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500213fn visit_item_foreign_mod(&mut self, i: &'ast ItemForeignMod) { visit_item_foreign_mod(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400214# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500215fn visit_item_impl(&mut self, i: &'ast ItemImpl) { visit_item_impl(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400216# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500217fn visit_item_macro(&mut self, i: &'ast ItemMacro) { visit_item_macro(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400218# [ cfg ( feature = "full" ) ]
David Tolnay500d8322017-12-18 00:32:51 -0800219fn visit_item_macro2(&mut self, i: &'ast ItemMacro2) { visit_item_macro2(self, i) }
220# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500221fn visit_item_mod(&mut self, i: &'ast ItemMod) { visit_item_mod(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400222# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500223fn visit_item_static(&mut self, i: &'ast ItemStatic) { visit_item_static(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400224# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500225fn visit_item_struct(&mut self, i: &'ast ItemStruct) { visit_item_struct(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400226# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500227fn visit_item_trait(&mut self, i: &'ast ItemTrait) { visit_item_trait(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400228# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500229fn visit_item_type(&mut self, i: &'ast ItemType) { visit_item_type(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400230# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500231fn visit_item_union(&mut self, i: &'ast ItemUnion) { visit_item_union(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400232# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500233fn visit_item_use(&mut self, i: &'ast ItemUse) { visit_item_use(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400234
David Tolnay4ba63a02017-12-28 15:53:05 -0500235fn visit_lifetime(&mut self, i: &'ast Lifetime) { visit_lifetime(self, i) }
236
Nika Layzellc86173a2017-11-18 13:55:22 -0500237fn visit_lifetime_def(&mut self, i: &'ast LifetimeDef) { visit_lifetime_def(self, i) }
David Tolnay4ba63a02017-12-28 15:53:05 -0500238
239fn visit_lit(&mut self, i: &'ast Lit) { visit_lit(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400240# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500241fn visit_local(&mut self, i: &'ast Local) { visit_local(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400242
Nika Layzellc86173a2017-11-18 13:55:22 -0500243fn visit_macro(&mut self, i: &'ast Macro) { visit_macro(self, i) }
David Tolnay14982012017-12-29 00:49:51 -0500244
David Tolnay85b69a42017-12-27 20:43:10 -0500245fn visit_member(&mut self, i: &'ast Member) { visit_member(self, i) }
David Tolnaydecf28d2017-11-11 11:56:45 -0800246
Nika Layzellc86173a2017-11-18 13:55:22 -0500247fn visit_meta_item(&mut self, i: &'ast MetaItem) { visit_meta_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400248
Nika Layzellc86173a2017-11-18 13:55:22 -0500249fn visit_meta_item_list(&mut self, i: &'ast MetaItemList) { visit_meta_item_list(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400250
Nika Layzellc86173a2017-11-18 13:55:22 -0500251fn visit_meta_name_value(&mut self, i: &'ast MetaNameValue) { visit_meta_name_value(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400252# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500253fn visit_method_sig(&mut self, i: &'ast MethodSig) { visit_method_sig(self, i) }
David Tolnayd60cfec2017-12-29 00:21:38 -0500254# [ cfg ( feature = "full" ) ]
255fn visit_method_turbofish(&mut self, i: &'ast MethodTurbofish) { visit_method_turbofish(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400256
Nika Layzellc86173a2017-11-18 13:55:22 -0500257fn visit_nested_meta_item(&mut self, i: &'ast NestedMetaItem) { visit_nested_meta_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400258
Nika Layzellc08227a2017-12-04 16:30:17 -0500259fn visit_parenthesized_generic_arguments(&mut self, i: &'ast ParenthesizedGenericArguments) { visit_parenthesized_generic_arguments(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400260# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500261fn visit_pat(&mut self, i: &'ast Pat) { visit_pat(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400262# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500263fn visit_pat_box(&mut self, i: &'ast PatBox) { visit_pat_box(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400264# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500265fn visit_pat_ident(&mut self, i: &'ast PatIdent) { visit_pat_ident(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400266# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500267fn visit_pat_lit(&mut self, i: &'ast PatLit) { visit_pat_lit(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400268# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500269fn visit_pat_path(&mut self, i: &'ast PatPath) { visit_pat_path(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400270# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500271fn visit_pat_range(&mut self, i: &'ast PatRange) { visit_pat_range(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400272# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500273fn visit_pat_ref(&mut self, i: &'ast PatRef) { visit_pat_ref(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400274# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500275fn visit_pat_slice(&mut self, i: &'ast PatSlice) { visit_pat_slice(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400276# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500277fn visit_pat_struct(&mut self, i: &'ast PatStruct) { visit_pat_struct(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400278# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500279fn visit_pat_tuple(&mut self, i: &'ast PatTuple) { visit_pat_tuple(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400280# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500281fn visit_pat_tuple_struct(&mut self, i: &'ast PatTupleStruct) { visit_pat_tuple_struct(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400282# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500283fn visit_pat_wild(&mut self, i: &'ast PatWild) { visit_pat_wild(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400284
Nika Layzellc86173a2017-11-18 13:55:22 -0500285fn visit_path(&mut self, i: &'ast Path) { visit_path(self, i) }
Nika Layzellc08227a2017-12-04 16:30:17 -0500286
287fn visit_path_arguments(&mut self, i: &'ast PathArguments) { visit_path_arguments(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400288
Nika Layzellc86173a2017-11-18 13:55:22 -0500289fn visit_path_segment(&mut self, i: &'ast PathSegment) { visit_path_segment(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400290
Nika Layzellc86173a2017-11-18 13:55:22 -0500291fn visit_poly_trait_ref(&mut self, i: &'ast PolyTraitRef) { visit_poly_trait_ref(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400292
Nika Layzellc86173a2017-11-18 13:55:22 -0500293fn visit_qself(&mut self, i: &'ast QSelf) { visit_qself(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400294# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500295fn visit_range_limits(&mut self, i: &'ast RangeLimits) { visit_range_limits(self, i) }
David Tolnayf93b90d2017-11-11 19:21:26 -0800296
Nika Layzellc86173a2017-11-18 13:55:22 -0500297fn visit_return_type(&mut self, i: &'ast ReturnType) { visit_return_type(self, i) }
Nika Layzellefb83ba2017-12-19 18:23:55 -0500298
299fn visit_span(&mut self, i: &'ast Span) { visit_span(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400300# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500301fn visit_stmt(&mut self, i: &'ast Stmt) { visit_stmt(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400302
Nika Layzellc86173a2017-11-18 13:55:22 -0500303fn visit_trait_bound_modifier(&mut self, i: &'ast TraitBoundModifier) { visit_trait_bound_modifier(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400304# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500305fn visit_trait_item(&mut self, i: &'ast TraitItem) { visit_trait_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400306# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500307fn visit_trait_item_const(&mut self, i: &'ast TraitItemConst) { visit_trait_item_const(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400308# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500309fn visit_trait_item_macro(&mut self, i: &'ast TraitItemMacro) { visit_trait_item_macro(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400310# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500311fn visit_trait_item_method(&mut self, i: &'ast TraitItemMethod) { visit_trait_item_method(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400312# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500313fn visit_trait_item_type(&mut self, i: &'ast TraitItemType) { visit_trait_item_type(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400314
Nika Layzellc86173a2017-11-18 13:55:22 -0500315fn visit_type(&mut self, i: &'ast Type) { visit_type(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400316
Nika Layzellc86173a2017-11-18 13:55:22 -0500317fn visit_type_array(&mut self, i: &'ast TypeArray) { visit_type_array(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400318
Nika Layzellc86173a2017-11-18 13:55:22 -0500319fn visit_type_bare_fn(&mut self, i: &'ast TypeBareFn) { visit_type_bare_fn(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400320
Nika Layzellc86173a2017-11-18 13:55:22 -0500321fn visit_type_binding(&mut self, i: &'ast TypeBinding) { visit_type_binding(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400322
Nika Layzellc86173a2017-11-18 13:55:22 -0500323fn visit_type_group(&mut self, i: &'ast TypeGroup) { visit_type_group(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800324
Nika Layzellc86173a2017-11-18 13:55:22 -0500325fn visit_type_impl_trait(&mut self, i: &'ast TypeImplTrait) { visit_type_impl_trait(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800326
Nika Layzellc86173a2017-11-18 13:55:22 -0500327fn visit_type_infer(&mut self, i: &'ast TypeInfer) { visit_type_infer(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800328
Nika Layzellc86173a2017-11-18 13:55:22 -0500329fn visit_type_never(&mut self, i: &'ast TypeNever) { visit_type_never(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800330
Nika Layzellc86173a2017-11-18 13:55:22 -0500331fn visit_type_param(&mut self, i: &'ast TypeParam) { visit_type_param(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800332
Nika Layzellc86173a2017-11-18 13:55:22 -0500333fn visit_type_param_bound(&mut self, i: &'ast TypeParamBound) { visit_type_param_bound(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800334
Nika Layzellc86173a2017-11-18 13:55:22 -0500335fn visit_type_paren(&mut self, i: &'ast TypeParen) { visit_type_paren(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800336
Nika Layzellc86173a2017-11-18 13:55:22 -0500337fn visit_type_path(&mut self, i: &'ast TypePath) { visit_type_path(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800338
Nika Layzellc86173a2017-11-18 13:55:22 -0500339fn visit_type_ptr(&mut self, i: &'ast TypePtr) { visit_type_ptr(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800340
Nika Layzellc86173a2017-11-18 13:55:22 -0500341fn visit_type_reference(&mut self, i: &'ast TypeReference) { visit_type_reference(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800342
Nika Layzellc86173a2017-11-18 13:55:22 -0500343fn visit_type_slice(&mut self, i: &'ast TypeSlice) { visit_type_slice(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800344
Nika Layzellc86173a2017-11-18 13:55:22 -0500345fn visit_type_trait_object(&mut self, i: &'ast TypeTraitObject) { visit_type_trait_object(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800346
David Tolnay05362582017-12-26 01:33:57 -0500347fn visit_type_tuple(&mut self, i: &'ast TypeTuple) { visit_type_tuple(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800348
Nika Layzellc86173a2017-11-18 13:55:22 -0500349fn visit_un_op(&mut self, i: &'ast UnOp) { visit_un_op(self, i) }
David Tolnay5f332a92017-12-26 00:42:45 -0500350# [ cfg ( feature = "full" ) ]
351fn visit_use_glob(&mut self, i: &'ast UseGlob) { visit_use_glob(self, i) }
352# [ cfg ( feature = "full" ) ]
353fn visit_use_list(&mut self, i: &'ast UseList) { visit_use_list(self, i) }
354# [ cfg ( feature = "full" ) ]
355fn visit_use_path(&mut self, i: &'ast UsePath) { visit_use_path(self, i) }
356# [ cfg ( feature = "full" ) ]
357fn visit_use_tree(&mut self, i: &'ast UseTree) { visit_use_tree(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400358
Nika Layzellc86173a2017-11-18 13:55:22 -0500359fn visit_variant(&mut self, i: &'ast Variant) { visit_variant(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400360
Nika Layzellc86173a2017-11-18 13:55:22 -0500361fn visit_variant_data(&mut self, i: &'ast VariantData) { visit_variant_data(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400362
Nika Layzellc86173a2017-11-18 13:55:22 -0500363fn visit_vis_crate(&mut self, i: &'ast VisCrate) { visit_vis_crate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400364
Nika Layzellc86173a2017-11-18 13:55:22 -0500365fn visit_vis_public(&mut self, i: &'ast VisPublic) { visit_vis_public(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400366
Nika Layzellc86173a2017-11-18 13:55:22 -0500367fn visit_vis_restricted(&mut self, i: &'ast VisRestricted) { visit_vis_restricted(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400368
Nika Layzellc86173a2017-11-18 13:55:22 -0500369fn visit_visibility(&mut self, i: &'ast Visibility) { visit_visibility(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400370
Nika Layzellc86173a2017-11-18 13:55:22 -0500371fn visit_where_bound_predicate(&mut self, i: &'ast WhereBoundPredicate) { visit_where_bound_predicate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400372
Nika Layzellc86173a2017-11-18 13:55:22 -0500373fn visit_where_clause(&mut self, i: &'ast WhereClause) { visit_where_clause(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400374
Nika Layzellc86173a2017-11-18 13:55:22 -0500375fn visit_where_eq_predicate(&mut self, i: &'ast WhereEqPredicate) { visit_where_eq_predicate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400376
Nika Layzellc86173a2017-11-18 13:55:22 -0500377fn visit_where_predicate(&mut self, i: &'ast WherePredicate) { visit_where_predicate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400378
Nika Layzellc86173a2017-11-18 13:55:22 -0500379fn visit_where_region_predicate(&mut self, i: &'ast WhereRegionPredicate) { visit_where_region_predicate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400380
381}
382
383
Nika Layzellc86173a2017-11-18 13:55:22 -0500384pub fn visit_abi<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Abi) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500385 tokens_helper(_visitor, &(& _i . extern_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500386 _visitor.visit_abi_kind(& _i . kind);
Nika Layzell27726662017-10-24 23:16:35 -0400387}
388
Nika Layzellc86173a2017-11-18 13:55:22 -0500389pub fn visit_abi_kind<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast AbiKind) {
Nika Layzell27726662017-10-24 23:16:35 -0400390 use ::AbiKind::*;
391 match *_i {
392 Named(ref _binding_0, ) => {
David Tolnay4ba63a02017-12-28 15:53:05 -0500393 _visitor.visit_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400394 }
395 Default => { }
396 }
397}
398
Nika Layzellc08227a2017-12-04 16:30:17 -0500399pub fn visit_angle_bracketed_generic_arguments<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast AngleBracketedGenericArguments) {
David Tolnay2d4e08a2017-12-28 23:54:07 -0500400 if let Some(ref it) = _i . colon2_token { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500401 tokens_helper(_visitor, &(& _i . lt_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500402 for el in & _i . args { let it = el.item(); _visitor.visit_generic_argument(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500403 tokens_helper(_visitor, &(& _i . gt_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400404}
405# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500406pub fn visit_arg_captured<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ArgCaptured) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500407 _visitor.visit_pat(& _i . pat);
David Tolnaycc0f0372017-12-28 19:11:04 -0500408 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500409 _visitor.visit_type(& _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -0400410}
411# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500412pub fn visit_arg_self<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ArgSelf) {
David Tolnay24237fb2017-12-29 02:15:26 -0500413 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500414 tokens_helper(_visitor, &(& _i . self_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400415}
416# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500417pub fn visit_arg_self_ref<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ArgSelfRef) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500418 tokens_helper(_visitor, &(& _i . and_token).0);
David Tolnay4ba63a02017-12-28 15:53:05 -0500419 if let Some(ref it) = _i . lifetime { _visitor.visit_lifetime(it) };
David Tolnay24237fb2017-12-29 02:15:26 -0500420 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500421 tokens_helper(_visitor, &(& _i . self_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400422}
423# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500424pub fn visit_arm<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Arm) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500425 for it in & _i . attrs { _visitor.visit_attribute(it) };
426 for el in & _i . pats { let it = el.item(); _visitor.visit_pat(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500427 if let Some(ref it) = _i . if_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a918742017-12-28 16:54:41 -0500428 if let Some(ref it) = _i . guard { _visitor.visit_expr(& * * it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500429 tokens_helper(_visitor, &(& _i . rocket_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500430 _visitor.visit_expr(& * _i . body);
David Tolnaycc0f0372017-12-28 19:11:04 -0500431 if let Some(ref it) = _i . comma { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -0400432}
433
Nika Layzellc86173a2017-11-18 13:55:22 -0500434pub fn visit_attr_style<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast AttrStyle) {
Nika Layzell27726662017-10-24 23:16:35 -0400435 use ::AttrStyle::*;
436 match *_i {
437 Outer => { }
438 Inner(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500439 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400440 }
441 }
442}
443
Nika Layzellc86173a2017-11-18 13:55:22 -0500444pub fn visit_attribute<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Attribute) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500445 tokens_helper(_visitor, &(& _i . pound_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500446 _visitor.visit_attr_style(& _i . style);
David Tolnay1e01f9c2017-12-28 20:16:19 -0500447 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500448 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -0400449 // Skipped field _i . tts;
450 // Skipped field _i . is_sugared_doc;
451}
452
Nika Layzellc86173a2017-11-18 13:55:22 -0500453pub fn visit_bare_fn_arg<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BareFnArg) {
David Tolnay5c4c0b52017-12-28 17:58:54 -0500454 if let Some(ref it) = _i . name {
455 _visitor.visit_bare_fn_arg_name(& ( it ) . 0);
David Tolnaycc0f0372017-12-28 19:11:04 -0500456 tokens_helper(_visitor, &(& ( it ) . 1).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -0500457 };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500458 _visitor.visit_type(& _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -0400459}
460
Nika Layzellc86173a2017-11-18 13:55:22 -0500461pub fn visit_bare_fn_arg_name<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BareFnArgName) {
Nika Layzell27726662017-10-24 23:16:35 -0400462 use ::BareFnArgName::*;
463 match *_i {
464 Named(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500465 _visitor.visit_ident(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400466 }
467 Wild(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500468 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400469 }
470 }
471}
472
Nika Layzellc86173a2017-11-18 13:55:22 -0500473pub fn visit_bare_fn_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BareFnType) {
David Tolnay9b258702017-12-29 02:24:41 -0500474 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500475 if let Some(ref it) = _i . abi { _visitor.visit_abi(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500476 tokens_helper(_visitor, &(& _i . fn_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500477 if let Some(ref it) = _i . lifetimes { _visitor.visit_bound_lifetimes(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -0500478 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500479 for el in & _i . inputs { let it = el.item(); _visitor.visit_bare_fn_arg(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500480 if let Some(ref it) = _i . variadic { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500481 _visitor.visit_return_type(& _i . output);
Nika Layzell27726662017-10-24 23:16:35 -0400482}
483
Nika Layzellc86173a2017-11-18 13:55:22 -0500484pub fn visit_bin_op<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BinOp) {
Nika Layzell27726662017-10-24 23:16:35 -0400485 use ::BinOp::*;
486 match *_i {
487 Add(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500488 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400489 }
490 Sub(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500491 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400492 }
493 Mul(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500494 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400495 }
496 Div(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500497 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400498 }
499 Rem(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500500 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400501 }
502 And(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500503 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400504 }
505 Or(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500506 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400507 }
508 BitXor(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500509 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400510 }
511 BitAnd(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500512 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400513 }
514 BitOr(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500515 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400516 }
517 Shl(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500518 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400519 }
520 Shr(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500521 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400522 }
523 Eq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500524 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400525 }
526 Lt(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500527 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400528 }
529 Le(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500530 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400531 }
532 Ne(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500533 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400534 }
535 Ge(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500536 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400537 }
538 Gt(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500539 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400540 }
541 AddEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500542 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400543 }
544 SubEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500545 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400546 }
547 MulEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500548 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400549 }
550 DivEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500551 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400552 }
553 RemEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500554 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400555 }
556 BitXorEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500557 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400558 }
559 BitAndEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500560 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400561 }
562 BitOrEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500563 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400564 }
565 ShlEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500566 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400567 }
568 ShrEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500569 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400570 }
571 }
572}
573# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500574pub fn visit_block<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Block) {
David Tolnay1e01f9c2017-12-28 20:16:19 -0500575 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500576 for it in & _i . stmts { _visitor.visit_stmt(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400577}
578
Nika Layzellc86173a2017-11-18 13:55:22 -0500579pub fn visit_body<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Body) {
Nika Layzell27726662017-10-24 23:16:35 -0400580 use ::Body::*;
581 match *_i {
582 Enum(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500583 _visitor.visit_body_enum(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400584 }
585 Struct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500586 _visitor.visit_body_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400587 }
588 }
589}
590
Nika Layzellc86173a2017-11-18 13:55:22 -0500591pub fn visit_body_enum<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BodyEnum) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500592 tokens_helper(_visitor, &(& _i . enum_token).0);
David Tolnay1e01f9c2017-12-28 20:16:19 -0500593 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500594 for el in & _i . variants { let it = el.item(); _visitor.visit_variant(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400595}
596
Nika Layzellc86173a2017-11-18 13:55:22 -0500597pub fn visit_body_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BodyStruct) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500598 _visitor.visit_variant_data(& _i . data);
David Tolnaycc0f0372017-12-28 19:11:04 -0500599 tokens_helper(_visitor, &(& _i . struct_token).0);
600 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -0400601}
602
Nika Layzellc86173a2017-11-18 13:55:22 -0500603pub fn visit_bound_lifetimes<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BoundLifetimes) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500604 tokens_helper(_visitor, &(& _i . for_token).0);
605 tokens_helper(_visitor, &(& _i . lt_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500606 for el in & _i . lifetimes { let it = el.item(); _visitor.visit_lifetime_def(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500607 tokens_helper(_visitor, &(& _i . gt_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400608}
Nika Layzellf1fdc0b2017-12-04 19:58:32 -0500609
610pub fn visit_const_param<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ConstParam) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500611 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500612 tokens_helper(_visitor, &(& _i . const_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500613 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -0500614 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500615 _visitor.visit_type(& _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -0500616 if let Some(ref it) = _i . eq_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500617 if let Some(ref it) = _i . default { _visitor.visit_expr(it) };
Nika Layzellf1fdc0b2017-12-04 19:58:32 -0500618}
Nika Layzell27726662017-10-24 23:16:35 -0400619
Nika Layzellc86173a2017-11-18 13:55:22 -0500620pub fn visit_derive_input<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast DeriveInput) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500621 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500622 _visitor.visit_visibility(& _i . vis);
623 _visitor.visit_ident(& _i . ident);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500624 _visitor.visit_generics(& _i . generics);
625 _visitor.visit_body(& _i . body);
Nika Layzell27726662017-10-24 23:16:35 -0400626}
627
Nika Layzellc86173a2017-11-18 13:55:22 -0500628pub fn visit_expr<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Expr) {
David Tolnay8c91b882017-12-28 23:04:32 -0500629 use ::Expr::*;
Nika Layzell27726662017-10-24 23:16:35 -0400630 match *_i {
631 Box(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500632 full!(_visitor.visit_expr_box(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400633 }
634 InPlace(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500635 full!(_visitor.visit_expr_in_place(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400636 }
637 Array(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500638 full!(_visitor.visit_expr_array(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400639 }
640 Call(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500641 _visitor.visit_expr_call(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400642 }
643 MethodCall(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500644 full!(_visitor.visit_expr_method_call(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400645 }
David Tolnay05362582017-12-26 01:33:57 -0500646 Tuple(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500647 full!(_visitor.visit_expr_tuple(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400648 }
649 Binary(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500650 _visitor.visit_expr_binary(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400651 }
652 Unary(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500653 _visitor.visit_expr_unary(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400654 }
655 Lit(ref _binding_0, ) => {
David Tolnay8c91b882017-12-28 23:04:32 -0500656 _visitor.visit_expr_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400657 }
658 Cast(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500659 _visitor.visit_expr_cast(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400660 }
661 Type(ref _binding_0, ) => {
David Tolnay0cf94f22017-12-28 23:46:26 -0500662 full!(_visitor.visit_expr_type(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400663 }
664 If(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500665 full!(_visitor.visit_expr_if(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400666 }
667 IfLet(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500668 full!(_visitor.visit_expr_if_let(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400669 }
670 While(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500671 full!(_visitor.visit_expr_while(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400672 }
673 WhileLet(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500674 full!(_visitor.visit_expr_while_let(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400675 }
676 ForLoop(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500677 full!(_visitor.visit_expr_for_loop(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400678 }
679 Loop(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500680 full!(_visitor.visit_expr_loop(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400681 }
682 Match(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500683 full!(_visitor.visit_expr_match(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400684 }
685 Closure(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500686 full!(_visitor.visit_expr_closure(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400687 }
Nika Layzell640832a2017-12-04 13:37:09 -0500688 Unsafe(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500689 full!(_visitor.visit_expr_unsafe(_binding_0));
Nika Layzell640832a2017-12-04 13:37:09 -0500690 }
Nika Layzell27726662017-10-24 23:16:35 -0400691 Block(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500692 full!(_visitor.visit_expr_block(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400693 }
694 Assign(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500695 full!(_visitor.visit_expr_assign(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400696 }
697 AssignOp(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500698 full!(_visitor.visit_expr_assign_op(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400699 }
700 Field(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500701 full!(_visitor.visit_expr_field(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400702 }
Nika Layzell27726662017-10-24 23:16:35 -0400703 Index(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500704 _visitor.visit_expr_index(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400705 }
706 Range(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500707 full!(_visitor.visit_expr_range(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400708 }
709 Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500710 _visitor.visit_expr_path(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400711 }
712 AddrOf(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500713 full!(_visitor.visit_expr_addr_of(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400714 }
715 Break(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500716 full!(_visitor.visit_expr_break(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400717 }
718 Continue(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500719 full!(_visitor.visit_expr_continue(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400720 }
David Tolnayc246cd32017-12-28 23:14:32 -0500721 Return(ref _binding_0, ) => {
722 full!(_visitor.visit_expr_return(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400723 }
David Tolnaydecf28d2017-11-11 11:56:45 -0800724 Macro(ref _binding_0, ) => {
David Tolnay8c91b882017-12-28 23:04:32 -0500725 full!(_visitor.visit_expr_macro(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400726 }
727 Struct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500728 full!(_visitor.visit_expr_struct(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400729 }
730 Repeat(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500731 full!(_visitor.visit_expr_repeat(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400732 }
733 Paren(ref _binding_0, ) => {
David Tolnaye98775f2017-12-28 23:17:00 -0500734 full!(_visitor.visit_expr_paren(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400735 }
736 Group(ref _binding_0, ) => {
David Tolnaye98775f2017-12-28 23:17:00 -0500737 full!(_visitor.visit_expr_group(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400738 }
739 Try(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500740 full!(_visitor.visit_expr_try(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400741 }
742 Catch(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500743 full!(_visitor.visit_expr_catch(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400744 }
745 Yield(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500746 full!(_visitor.visit_expr_yield(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400747 }
748 }
749}
750# [ cfg ( feature = "full" ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500751pub fn visit_expr_addr_of<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprAddrOf) {
752 for it in & _i . attrs { _visitor.visit_attribute(it) };
753 tokens_helper(_visitor, &(& _i . and_token).0);
David Tolnay24237fb2017-12-29 02:15:26 -0500754 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnay8c91b882017-12-28 23:04:32 -0500755 _visitor.visit_expr(& * _i . expr);
756}
757# [ cfg ( feature = "full" ) ]
758pub fn visit_expr_array<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprArray) {
759 for it in & _i . attrs { _visitor.visit_attribute(it) };
760 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnay2a86fdd2017-12-28 23:34:28 -0500761 for el in & _i . elems { let it = el.item(); _visitor.visit_expr(it) };
David Tolnay8c91b882017-12-28 23:04:32 -0500762}
763# [ cfg ( feature = "full" ) ]
764pub fn visit_expr_assign<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprAssign) {
765 for it in & _i . attrs { _visitor.visit_attribute(it) };
766 _visitor.visit_expr(& * _i . left);
767 tokens_helper(_visitor, &(& _i . eq_token).0);
768 _visitor.visit_expr(& * _i . right);
769}
770# [ cfg ( feature = "full" ) ]
771pub fn visit_expr_assign_op<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprAssignOp) {
772 for it in & _i . attrs { _visitor.visit_attribute(it) };
773 _visitor.visit_expr(& * _i . left);
774 _visitor.visit_bin_op(& _i . op);
775 _visitor.visit_expr(& * _i . right);
776}
777
778pub fn visit_expr_binary<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBinary) {
779 for it in & _i . attrs { _visitor.visit_attribute(it) };
780 _visitor.visit_expr(& * _i . left);
781 _visitor.visit_bin_op(& _i . op);
782 _visitor.visit_expr(& * _i . right);
783}
784# [ cfg ( feature = "full" ) ]
785pub fn visit_expr_block<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBlock) {
786 for it in & _i . attrs { _visitor.visit_attribute(it) };
787 _visitor.visit_block(& _i . block);
788}
789# [ cfg ( feature = "full" ) ]
790pub fn visit_expr_box<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBox) {
791 for it in & _i . attrs { _visitor.visit_attribute(it) };
792 tokens_helper(_visitor, &(& _i . box_token).0);
793 _visitor.visit_expr(& * _i . expr);
794}
795# [ cfg ( feature = "full" ) ]
796pub fn visit_expr_break<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBreak) {
797 for it in & _i . attrs { _visitor.visit_attribute(it) };
798 tokens_helper(_visitor, &(& _i . break_token).0);
799 if let Some(ref it) = _i . label { _visitor.visit_lifetime(it) };
800 if let Some(ref it) = _i . expr { _visitor.visit_expr(& * * it) };
801}
802
803pub fn visit_expr_call<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprCall) {
804 for it in & _i . attrs { _visitor.visit_attribute(it) };
805 _visitor.visit_expr(& * _i . func);
806 tokens_helper(_visitor, &(& _i . paren_token).0);
807 for el in & _i . args { let it = el.item(); _visitor.visit_expr(it) };
808}
809
810pub fn visit_expr_cast<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprCast) {
811 for it in & _i . attrs { _visitor.visit_attribute(it) };
812 _visitor.visit_expr(& * _i . expr);
813 tokens_helper(_visitor, &(& _i . as_token).0);
814 _visitor.visit_type(& * _i . ty);
815}
816# [ cfg ( feature = "full" ) ]
817pub fn visit_expr_catch<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprCatch) {
818 for it in & _i . attrs { _visitor.visit_attribute(it) };
819 tokens_helper(_visitor, &(& _i . do_token).0);
820 tokens_helper(_visitor, &(& _i . catch_token).0);
821 _visitor.visit_block(& _i . block);
822}
823# [ cfg ( feature = "full" ) ]
824pub fn visit_expr_closure<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprClosure) {
825 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnayefc96fb2017-12-29 02:03:15 -0500826 if let Some(ref it) = _i . capture { tokens_helper(_visitor, &(it).0) };
David Tolnay8c91b882017-12-28 23:04:32 -0500827 tokens_helper(_visitor, &(& _i . or1_token).0);
828 for el in & _i . inputs { let it = el.item(); _visitor.visit_fn_arg(it) };
829 tokens_helper(_visitor, &(& _i . or2_token).0);
830 _visitor.visit_return_type(& _i . output);
831 _visitor.visit_expr(& * _i . body);
832}
833# [ cfg ( feature = "full" ) ]
834pub fn visit_expr_continue<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprContinue) {
835 for it in & _i . attrs { _visitor.visit_attribute(it) };
836 tokens_helper(_visitor, &(& _i . continue_token).0);
837 if let Some(ref it) = _i . label { _visitor.visit_lifetime(it) };
838}
839# [ cfg ( feature = "full" ) ]
840pub fn visit_expr_field<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprField) {
841 for it in & _i . attrs { _visitor.visit_attribute(it) };
842 _visitor.visit_expr(& * _i . base);
843 tokens_helper(_visitor, &(& _i . dot_token).0);
844 _visitor.visit_member(& _i . member);
845}
846# [ cfg ( feature = "full" ) ]
847pub fn visit_expr_for_loop<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprForLoop) {
848 for it in & _i . attrs { _visitor.visit_attribute(it) };
849 if let Some(ref it) = _i . label { _visitor.visit_lifetime(it) };
850 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
851 tokens_helper(_visitor, &(& _i . for_token).0);
852 _visitor.visit_pat(& * _i . pat);
853 tokens_helper(_visitor, &(& _i . in_token).0);
854 _visitor.visit_expr(& * _i . expr);
855 _visitor.visit_block(& _i . body);
856}
David Tolnaye98775f2017-12-28 23:17:00 -0500857# [ cfg ( feature = "full" ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500858pub fn visit_expr_group<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprGroup) {
859 for it in & _i . attrs { _visitor.visit_attribute(it) };
860 tokens_helper(_visitor, &(& _i . group_token).0);
861 _visitor.visit_expr(& * _i . expr);
862}
863# [ cfg ( feature = "full" ) ]
864pub fn visit_expr_if<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIf) {
865 for it in & _i . attrs { _visitor.visit_attribute(it) };
866 tokens_helper(_visitor, &(& _i . if_token).0);
867 _visitor.visit_expr(& * _i . cond);
David Tolnay2ccf32a2017-12-29 00:34:26 -0500868 _visitor.visit_block(& _i . then_branch);
869 if let Some(ref it) = _i . else_branch {
870 tokens_helper(_visitor, &(& ( it ) . 0).0);
871 _visitor.visit_expr(& * ( it ) . 1);
872 };
David Tolnay8c91b882017-12-28 23:04:32 -0500873}
874# [ cfg ( feature = "full" ) ]
875pub fn visit_expr_if_let<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIfLet) {
876 for it in & _i . attrs { _visitor.visit_attribute(it) };
877 tokens_helper(_visitor, &(& _i . if_token).0);
878 tokens_helper(_visitor, &(& _i . let_token).0);
879 _visitor.visit_pat(& * _i . pat);
880 tokens_helper(_visitor, &(& _i . eq_token).0);
881 _visitor.visit_expr(& * _i . expr);
David Tolnay2ccf32a2017-12-29 00:34:26 -0500882 _visitor.visit_block(& _i . then_branch);
883 if let Some(ref it) = _i . else_branch {
884 tokens_helper(_visitor, &(& ( it ) . 0).0);
885 _visitor.visit_expr(& * ( it ) . 1);
886 };
David Tolnay8c91b882017-12-28 23:04:32 -0500887}
888# [ cfg ( feature = "full" ) ]
889pub fn visit_expr_in_place<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprInPlace) {
890 for it in & _i . attrs { _visitor.visit_attribute(it) };
891 _visitor.visit_expr(& * _i . place);
David Tolnay8701a5c2017-12-28 23:31:10 -0500892 tokens_helper(_visitor, &(& _i . arrow_token).0);
David Tolnay8c91b882017-12-28 23:04:32 -0500893 _visitor.visit_expr(& * _i . value);
894}
895
896pub fn visit_expr_index<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIndex) {
897 for it in & _i . attrs { _visitor.visit_attribute(it) };
898 _visitor.visit_expr(& * _i . expr);
899 tokens_helper(_visitor, &(& _i . bracket_token).0);
900 _visitor.visit_expr(& * _i . index);
901}
902
903pub fn visit_expr_lit<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprLit) {
904 for it in & _i . attrs { _visitor.visit_attribute(it) };
905 _visitor.visit_lit(& _i . lit);
906}
907# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500908pub fn visit_expr_loop<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprLoop) {
David Tolnay8c91b882017-12-28 23:04:32 -0500909 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4ba63a02017-12-28 15:53:05 -0500910 if let Some(ref it) = _i . label { _visitor.visit_lifetime(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500911 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500912 tokens_helper(_visitor, &(& _i . loop_token).0);
913 _visitor.visit_block(& _i . body);
Nika Layzell27726662017-10-24 23:16:35 -0400914}
915# [ cfg ( feature = "full" ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500916pub fn visit_expr_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprMacro) {
917 for it in & _i . attrs { _visitor.visit_attribute(it) };
918 _visitor.visit_macro(& _i . mac);
919}
920# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500921pub fn visit_expr_match<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprMatch) {
David Tolnay8c91b882017-12-28 23:04:32 -0500922 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500923 tokens_helper(_visitor, &(& _i . match_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500924 _visitor.visit_expr(& * _i . expr);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500925 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500926 for it in & _i . arms { _visitor.visit_arm(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400927}
928# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500929pub fn visit_expr_method_call<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprMethodCall) {
David Tolnay8c91b882017-12-28 23:04:32 -0500930 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay76418512017-12-28 23:47:47 -0500931 _visitor.visit_expr(& * _i . receiver);
David Tolnaycc0f0372017-12-28 19:11:04 -0500932 tokens_helper(_visitor, &(& _i . dot_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500933 _visitor.visit_ident(& _i . method);
David Tolnayd60cfec2017-12-29 00:21:38 -0500934 if let Some(ref it) = _i . turbofish { _visitor.visit_method_turbofish(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500935 tokens_helper(_visitor, &(& _i . paren_token).0);
936 for el in & _i . args { let it = el.item(); _visitor.visit_expr(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400937}
David Tolnaye98775f2017-12-28 23:17:00 -0500938# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500939pub fn visit_expr_paren<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprParen) {
David Tolnay8c91b882017-12-28 23:04:32 -0500940 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -0500941 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500942 _visitor.visit_expr(& * _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -0400943}
944
Nika Layzellc86173a2017-11-18 13:55:22 -0500945pub fn visit_expr_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprPath) {
David Tolnay8c91b882017-12-28 23:04:32 -0500946 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500947 if let Some(ref it) = _i . qself { _visitor.visit_qself(it) };
948 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -0400949}
950# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500951pub fn visit_expr_range<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprRange) {
David Tolnay8c91b882017-12-28 23:04:32 -0500952 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a918742017-12-28 16:54:41 -0500953 if let Some(ref it) = _i . from { _visitor.visit_expr(& * * it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500954 _visitor.visit_range_limits(& _i . limits);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500955 if let Some(ref it) = _i . to { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -0400956}
957# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500958pub fn visit_expr_repeat<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprRepeat) {
David Tolnay8c91b882017-12-28 23:04:32 -0500959 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -0500960 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500961 _visitor.visit_expr(& * _i . expr);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500962 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500963 _visitor.visit_expr(& * _i . amt);
Nika Layzell27726662017-10-24 23:16:35 -0400964}
965# [ cfg ( feature = "full" ) ]
David Tolnayc246cd32017-12-28 23:14:32 -0500966pub fn visit_expr_return<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprReturn) {
David Tolnay8c91b882017-12-28 23:04:32 -0500967 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500968 tokens_helper(_visitor, &(& _i . return_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500969 if let Some(ref it) = _i . expr { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -0400970}
971# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500972pub fn visit_expr_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprStruct) {
David Tolnay8c91b882017-12-28 23:04:32 -0500973 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500974 _visitor.visit_path(& _i . path);
David Tolnay1e01f9c2017-12-28 20:16:19 -0500975 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500976 for el in & _i . fields { let it = el.item(); _visitor.visit_field_value(it) };
977 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
978 if let Some(ref it) = _i . rest { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -0400979}
980# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500981pub fn visit_expr_try<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprTry) {
David Tolnay8c91b882017-12-28 23:04:32 -0500982 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a918742017-12-28 16:54:41 -0500983 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -0500984 tokens_helper(_visitor, &(& _i . question_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400985}
986# [ cfg ( feature = "full" ) ]
David Tolnay05362582017-12-26 01:33:57 -0500987pub fn visit_expr_tuple<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprTuple) {
David Tolnay8c91b882017-12-28 23:04:32 -0500988 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -0500989 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay2a86fdd2017-12-28 23:34:28 -0500990 for el in & _i . elems { let it = el.item(); _visitor.visit_expr(it) };
David Tolnay05362582017-12-26 01:33:57 -0500991}
David Tolnay0cf94f22017-12-28 23:46:26 -0500992# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500993pub fn visit_expr_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprType) {
David Tolnay8c91b882017-12-28 23:04:32 -0500994 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a918742017-12-28 16:54:41 -0500995 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -0500996 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500997 _visitor.visit_type(& * _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -0400998}
999
Nika Layzellc86173a2017-11-18 13:55:22 -05001000pub fn visit_expr_unary<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprUnary) {
David Tolnay8c91b882017-12-28 23:04:32 -05001001 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001002 _visitor.visit_un_op(& _i . op);
David Tolnay4a918742017-12-28 16:54:41 -05001003 _visitor.visit_expr(& * _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -04001004}
1005# [ cfg ( feature = "full" ) ]
Nika Layzell640832a2017-12-04 13:37:09 -05001006pub fn visit_expr_unsafe<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprUnsafe) {
David Tolnay8c91b882017-12-28 23:04:32 -05001007 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001008 tokens_helper(_visitor, &(& _i . unsafe_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001009 _visitor.visit_block(& _i . block);
Nika Layzell640832a2017-12-04 13:37:09 -05001010}
1011# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001012pub fn visit_expr_while<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprWhile) {
David Tolnay8c91b882017-12-28 23:04:32 -05001013 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4ba63a02017-12-28 15:53:05 -05001014 if let Some(ref it) = _i . label { _visitor.visit_lifetime(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001015 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
1016 tokens_helper(_visitor, &(& _i . while_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001017 _visitor.visit_expr(& * _i . cond);
1018 _visitor.visit_block(& _i . body);
Nika Layzell27726662017-10-24 23:16:35 -04001019}
1020# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001021pub fn visit_expr_while_let<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprWhileLet) {
David Tolnay8c91b882017-12-28 23:04:32 -05001022 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4ba63a02017-12-28 15:53:05 -05001023 if let Some(ref it) = _i . label { _visitor.visit_lifetime(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001024 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
1025 tokens_helper(_visitor, &(& _i . while_token).0);
1026 tokens_helper(_visitor, &(& _i . let_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001027 _visitor.visit_pat(& * _i . pat);
David Tolnaycc0f0372017-12-28 19:11:04 -05001028 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001029 _visitor.visit_expr(& * _i . expr);
1030 _visitor.visit_block(& _i . body);
Nika Layzell27726662017-10-24 23:16:35 -04001031}
1032# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001033pub fn visit_expr_yield<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprYield) {
David Tolnay8c91b882017-12-28 23:04:32 -05001034 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001035 tokens_helper(_visitor, &(& _i . yield_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001036 if let Some(ref it) = _i . expr { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -04001037}
1038
Nika Layzellc86173a2017-11-18 13:55:22 -05001039pub fn visit_field<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Field) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001040 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001041 _visitor.visit_visibility(& _i . vis);
1042 if let Some(ref it) = _i . ident { _visitor.visit_ident(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001043 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001044 _visitor.visit_type(& _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -04001045}
1046# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001047pub fn visit_field_pat<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldPat) {
David Tolnay4a3f59a2017-12-28 21:21:12 -05001048 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay85b69a42017-12-27 20:43:10 -05001049 _visitor.visit_member(& _i . member);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001050 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a918742017-12-28 16:54:41 -05001051 _visitor.visit_pat(& * _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001052}
1053# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001054pub fn visit_field_value<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldValue) {
David Tolnay85b69a42017-12-27 20:43:10 -05001055 for it in & _i . attrs { _visitor.visit_attribute(it) };
1056 _visitor.visit_member(& _i . member);
David Tolnaycc0f0372017-12-28 19:11:04 -05001057 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001058 _visitor.visit_expr(& _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -04001059}
1060# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001061pub fn visit_file<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast File) {
Nika Layzell27726662017-10-24 23:16:35 -04001062 // Skipped field _i . shebang;
David Tolnayf0d63bf2017-12-26 12:29:47 -05001063 for it in & _i . attrs { _visitor.visit_attribute(it) };
1064 for it in & _i . items { _visitor.visit_item(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001065}
1066# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001067pub fn visit_fn_arg<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FnArg) {
Nika Layzell27726662017-10-24 23:16:35 -04001068 use ::FnArg::*;
1069 match *_i {
1070 SelfRef(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001071 _visitor.visit_arg_self_ref(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001072 }
1073 SelfValue(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001074 _visitor.visit_arg_self(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001075 }
1076 Captured(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001077 _visitor.visit_arg_captured(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001078 }
David Tolnay80ed55f2017-12-27 22:54:40 -05001079 Inferred(ref _binding_0, ) => {
1080 _visitor.visit_pat(_binding_0);
1081 }
Nika Layzell27726662017-10-24 23:16:35 -04001082 Ignored(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001083 _visitor.visit_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001084 }
1085 }
1086}
1087# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001088pub fn visit_fn_decl<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FnDecl) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001089 tokens_helper(_visitor, &(& _i . fn_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001090 _visitor.visit_generics(& _i . generics);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001091 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001092 for el in & _i . inputs { let it = el.item(); _visitor.visit_fn_arg(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001093 if let Some(ref it) = _i . variadic { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001094 _visitor.visit_return_type(& _i . output);
Nika Layzell27726662017-10-24 23:16:35 -04001095}
1096# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001097pub fn visit_foreign_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItem) {
David Tolnay8894f602017-11-11 12:11:04 -08001098 use ::ForeignItem::*;
Nika Layzell27726662017-10-24 23:16:35 -04001099 match *_i {
1100 Fn(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001101 _visitor.visit_foreign_item_fn(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001102 }
1103 Static(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001104 _visitor.visit_foreign_item_static(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001105 }
David Tolnay199bcbb2017-11-12 10:33:52 -08001106 Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001107 _visitor.visit_foreign_item_type(_binding_0);
David Tolnay199bcbb2017-11-12 10:33:52 -08001108 }
Nika Layzell27726662017-10-24 23:16:35 -04001109 }
1110}
1111# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001112pub fn visit_foreign_item_fn<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemFn) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001113 for it in & _i . attrs { _visitor.visit_attribute(it) };
1114 _visitor.visit_visibility(& _i . vis);
1115 _visitor.visit_ident(& _i . ident);
David Tolnay4a918742017-12-28 16:54:41 -05001116 _visitor.visit_fn_decl(& * _i . decl);
David Tolnaycc0f0372017-12-28 19:11:04 -05001117 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay8894f602017-11-11 12:11:04 -08001118}
1119# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001120pub fn visit_foreign_item_static<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemStatic) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001121 for it in & _i . attrs { _visitor.visit_attribute(it) };
1122 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001123 tokens_helper(_visitor, &(& _i . static_token).0);
David Tolnay24237fb2017-12-29 02:15:26 -05001124 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001125 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001126 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001127 _visitor.visit_type(& * _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001128 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001129}
David Tolnay199bcbb2017-11-12 10:33:52 -08001130# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001131pub fn visit_foreign_item_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001132 for it in & _i . attrs { _visitor.visit_attribute(it) };
1133 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001134 tokens_helper(_visitor, &(& _i . type_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001135 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001136 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay199bcbb2017-11-12 10:33:52 -08001137}
Nika Layzell27726662017-10-24 23:16:35 -04001138
Nika Layzellc08227a2017-12-04 16:30:17 -05001139pub fn visit_generic_argument<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast GenericArgument) {
1140 use ::GenericArgument::*;
Nika Layzell357885a2017-12-04 15:47:07 -05001141 match *_i {
1142 Lifetime(ref _binding_0, ) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05001143 _visitor.visit_lifetime(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001144 }
1145 Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001146 _visitor.visit_type(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001147 }
1148 TypeBinding(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001149 _visitor.visit_type_binding(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001150 }
Nika Layzellc680e612017-12-04 19:07:20 -05001151 Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001152 _visitor.visit_expr(_binding_0);
Nika Layzellc680e612017-12-04 19:07:20 -05001153 }
Nika Layzell357885a2017-12-04 15:47:07 -05001154 }
1155}
David Tolnayd60cfec2017-12-29 00:21:38 -05001156# [ cfg ( feature = "full" ) ]
1157pub fn visit_generic_method_argument<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast GenericMethodArgument) {
1158 use ::GenericMethodArgument::*;
1159 match *_i {
1160 Type(ref _binding_0, ) => {
1161 _visitor.visit_type(_binding_0);
1162 }
1163 Const(ref _binding_0, ) => {
1164 _visitor.visit_expr(_binding_0);
1165 }
1166 }
1167}
Nika Layzell357885a2017-12-04 15:47:07 -05001168
David Tolnayc2f1aba2017-11-12 20:29:22 -08001169pub fn visit_generic_param<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast GenericParam) {
1170 use ::GenericParam::*;
1171 match *_i {
1172 Lifetime(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001173 _visitor.visit_lifetime_def(_binding_0);
David Tolnayc2f1aba2017-11-12 20:29:22 -08001174 }
1175 Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001176 _visitor.visit_type_param(_binding_0);
David Tolnayc2f1aba2017-11-12 20:29:22 -08001177 }
Nika Layzellf1fdc0b2017-12-04 19:58:32 -05001178 Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001179 _visitor.visit_const_param(_binding_0);
Nika Layzellf1fdc0b2017-12-04 19:58:32 -05001180 }
David Tolnayc2f1aba2017-11-12 20:29:22 -08001181 }
1182}
1183
Nika Layzellc86173a2017-11-18 13:55:22 -05001184pub fn visit_generics<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Generics) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001185 if let Some(ref it) = _i . lt_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001186 for el in & _i . params { let it = el.item(); _visitor.visit_generic_param(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001187 if let Some(ref it) = _i . gt_token { tokens_helper(_visitor, &(it).0) };
David Tolnayac997dd2017-12-27 23:18:22 -05001188 if let Some(ref it) = _i . where_clause { _visitor.visit_where_clause(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001189}
Nika Layzellefb83ba2017-12-19 18:23:55 -05001190
1191pub fn visit_ident<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Ident) {
David Tolnay4ba63a02017-12-28 15:53:05 -05001192 // Skipped field _i . sym;
1193 _visitor.visit_span(& _i . span);
Nika Layzellefb83ba2017-12-19 18:23:55 -05001194}
Nika Layzell27726662017-10-24 23:16:35 -04001195# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001196pub fn visit_impl_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItem) {
David Tolnay857628c2017-11-11 12:25:31 -08001197 use ::ImplItem::*;
Nika Layzell27726662017-10-24 23:16:35 -04001198 match *_i {
1199 Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001200 _visitor.visit_impl_item_const(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001201 }
1202 Method(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001203 _visitor.visit_impl_item_method(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001204 }
1205 Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001206 _visitor.visit_impl_item_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001207 }
1208 Macro(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001209 _visitor.visit_impl_item_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001210 }
1211 }
1212}
1213# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001214pub fn visit_impl_item_const<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemConst) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001215 for it in & _i . attrs { _visitor.visit_attribute(it) };
1216 _visitor.visit_visibility(& _i . vis);
David Tolnay360a6342017-12-29 02:22:11 -05001217 if let Some(ref it) = _i . defaultness { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001218 tokens_helper(_visitor, &(& _i . const_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001219 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001220 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001221 _visitor.visit_type(& _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001222 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001223 _visitor.visit_expr(& _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -05001224 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay857628c2017-11-11 12:25:31 -08001225}
1226# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001227pub fn visit_impl_item_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemMacro) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001228 for it in & _i . attrs { _visitor.visit_attribute(it) };
1229 _visitor.visit_macro(& _i . mac);
David Tolnaycc0f0372017-12-28 19:11:04 -05001230 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
David Tolnay857628c2017-11-11 12:25:31 -08001231}
1232# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001233pub fn visit_impl_item_method<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemMethod) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001234 for it in & _i . attrs { _visitor.visit_attribute(it) };
1235 _visitor.visit_visibility(& _i . vis);
David Tolnay360a6342017-12-29 02:22:11 -05001236 if let Some(ref it) = _i . defaultness { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001237 _visitor.visit_method_sig(& _i . sig);
1238 _visitor.visit_block(& _i . block);
Nika Layzell27726662017-10-24 23:16:35 -04001239}
1240# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001241pub fn visit_impl_item_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001242 for it in & _i . attrs { _visitor.visit_attribute(it) };
1243 _visitor.visit_visibility(& _i . vis);
David Tolnay360a6342017-12-29 02:22:11 -05001244 if let Some(ref it) = _i . defaultness { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001245 tokens_helper(_visitor, &(& _i . type_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001246 _visitor.visit_ident(& _i . ident);
1247 _visitor.visit_generics(& _i . generics);
David Tolnaycc0f0372017-12-28 19:11:04 -05001248 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001249 _visitor.visit_type(& _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001250 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001251}
David Tolnay14982012017-12-29 00:49:51 -05001252
David Tolnay85b69a42017-12-27 20:43:10 -05001253pub fn visit_index<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Index) {
1254 // Skipped field _i . index;
1255 _visitor.visit_span(& _i . span);
1256}
1257# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001258pub fn visit_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Item) {
David Tolnayc6b55bc2017-11-09 22:48:38 -08001259 use ::Item::*;
Nika Layzell27726662017-10-24 23:16:35 -04001260 match *_i {
1261 ExternCrate(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001262 _visitor.visit_item_extern_crate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001263 }
1264 Use(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001265 _visitor.visit_item_use(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001266 }
1267 Static(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001268 _visitor.visit_item_static(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001269 }
1270 Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001271 _visitor.visit_item_const(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001272 }
1273 Fn(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001274 _visitor.visit_item_fn(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001275 }
1276 Mod(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001277 _visitor.visit_item_mod(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001278 }
1279 ForeignMod(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001280 _visitor.visit_item_foreign_mod(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001281 }
David Tolnayfd6bf5c2017-11-12 09:41:14 -08001282 Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001283 _visitor.visit_item_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001284 }
1285 Enum(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001286 _visitor.visit_item_enum(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001287 }
1288 Struct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001289 _visitor.visit_item_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001290 }
1291 Union(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001292 _visitor.visit_item_union(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001293 }
1294 Trait(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001295 _visitor.visit_item_trait(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001296 }
1297 DefaultImpl(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001298 _visitor.visit_item_default_impl(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001299 }
1300 Impl(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001301 _visitor.visit_item_impl(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001302 }
David Tolnaydecf28d2017-11-11 11:56:45 -08001303 Macro(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001304 _visitor.visit_item_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001305 }
David Tolnay500d8322017-12-18 00:32:51 -08001306 Macro2(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001307 _visitor.visit_item_macro2(_binding_0);
David Tolnay500d8322017-12-18 00:32:51 -08001308 }
Nika Layzell27726662017-10-24 23:16:35 -04001309 }
1310}
1311# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001312pub fn visit_item_const<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemConst) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001313 for it in & _i . attrs { _visitor.visit_attribute(it) };
1314 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001315 tokens_helper(_visitor, &(& _i . const_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001316 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001317 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001318 _visitor.visit_type(& * _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001319 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001320 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -05001321 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnayc6b55bc2017-11-09 22:48:38 -08001322}
1323# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001324pub fn visit_item_default_impl<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemDefaultImpl) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001325 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay9b258702017-12-29 02:24:41 -05001326 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001327 tokens_helper(_visitor, &(& _i . impl_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001328 _visitor.visit_path(& _i . path);
David Tolnaycc0f0372017-12-28 19:11:04 -05001329 tokens_helper(_visitor, &(& _i . for_token).0);
1330 tokens_helper(_visitor, &(& _i . dot2_token).0);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001331 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayc6b55bc2017-11-09 22:48:38 -08001332}
1333# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001334pub fn visit_item_enum<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemEnum) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001335 for it in & _i . attrs { _visitor.visit_attribute(it) };
1336 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001337 tokens_helper(_visitor, &(& _i . enum_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001338 _visitor.visit_ident(& _i . ident);
1339 _visitor.visit_generics(& _i . generics);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001340 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001341 for el in & _i . variants { let it = el.item(); _visitor.visit_variant(it) };
David Tolnayc6b55bc2017-11-09 22:48:38 -08001342}
1343# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001344pub fn visit_item_extern_crate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemExternCrate) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001345 for it in & _i . attrs { _visitor.visit_attribute(it) };
1346 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001347 tokens_helper(_visitor, &(& _i . extern_token).0);
1348 tokens_helper(_visitor, &(& _i . crate_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001349 _visitor.visit_ident(& _i . ident);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001350 if let Some(ref it) = _i . rename {
David Tolnaycc0f0372017-12-28 19:11:04 -05001351 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001352 _visitor.visit_ident(& ( it ) . 1);
1353 };
David Tolnaycc0f0372017-12-28 19:11:04 -05001354 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnayc6b55bc2017-11-09 22:48:38 -08001355}
1356# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001357pub fn visit_item_fn<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemFn) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001358 for it in & _i . attrs { _visitor.visit_attribute(it) };
1359 _visitor.visit_visibility(& _i . vis);
David Tolnay360a6342017-12-29 02:22:11 -05001360 if let Some(ref it) = _i . constness { tokens_helper(_visitor, &(it).0) };
David Tolnay9b258702017-12-29 02:24:41 -05001361 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001362 if let Some(ref it) = _i . abi { _visitor.visit_abi(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001363 _visitor.visit_ident(& _i . ident);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001364 _visitor.visit_fn_decl(& * _i . decl);
David Tolnay4a918742017-12-28 16:54:41 -05001365 _visitor.visit_block(& * _i . block);
David Tolnayc6b55bc2017-11-09 22:48:38 -08001366}
1367# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001368pub fn visit_item_foreign_mod<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemForeignMod) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001369 for it in & _i . attrs { _visitor.visit_attribute(it) };
1370 _visitor.visit_abi(& _i . abi);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001371 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001372 for it in & _i . items { _visitor.visit_foreign_item(it) };
David Tolnayc6b55bc2017-11-09 22:48:38 -08001373}
1374# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001375pub fn visit_item_impl<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemImpl) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001376 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay360a6342017-12-29 02:22:11 -05001377 if let Some(ref it) = _i . defaultness { tokens_helper(_visitor, &(it).0) };
David Tolnay9b258702017-12-29 02:24:41 -05001378 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001379 tokens_helper(_visitor, &(& _i . impl_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001380 _visitor.visit_generics(& _i . generics);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001381 if let Some(ref it) = _i . trait_ {
David Tolnay360a6342017-12-29 02:22:11 -05001382 if let Some(ref it) = ( it ) . 0 { tokens_helper(_visitor, &(it).0) };
David Tolnay5c4c0b52017-12-28 17:58:54 -05001383 _visitor.visit_path(& ( it ) . 1);
David Tolnaycc0f0372017-12-28 19:11:04 -05001384 tokens_helper(_visitor, &(& ( it ) . 2).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001385 };
David Tolnay4a918742017-12-28 16:54:41 -05001386 _visitor.visit_type(& * _i . self_ty);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001387 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001388 for it in & _i . items { _visitor.visit_impl_item(it) };
David Tolnayc6b55bc2017-11-09 22:48:38 -08001389}
1390# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001391pub fn visit_item_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMacro) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001392 for it in & _i . attrs { _visitor.visit_attribute(it) };
1393 if let Some(ref it) = _i . ident { _visitor.visit_ident(it) };
1394 _visitor.visit_macro(& _i . mac);
David Tolnaycc0f0372017-12-28 19:11:04 -05001395 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
David Tolnayc6b55bc2017-11-09 22:48:38 -08001396}
1397# [ cfg ( feature = "full" ) ]
David Tolnay500d8322017-12-18 00:32:51 -08001398pub fn visit_item_macro2<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMacro2) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001399 for it in & _i . attrs { _visitor.visit_attribute(it) };
1400 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001401 tokens_helper(_visitor, &(& _i . macro_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001402 _visitor.visit_ident(& _i . ident);
David Tolnay500d8322017-12-18 00:32:51 -08001403 // Skipped field _i . args;
1404 // Skipped field _i . body;
1405}
1406# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001407pub fn visit_item_mod<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMod) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001408 for it in & _i . attrs { _visitor.visit_attribute(it) };
1409 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001410 tokens_helper(_visitor, &(& _i . mod_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001411 _visitor.visit_ident(& _i . ident);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001412 if let Some(ref it) = _i . content {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001413 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001414 for it in & ( it ) . 1 { _visitor.visit_item(it) };
1415 };
David Tolnaycc0f0372017-12-28 19:11:04 -05001416 if let Some(ref it) = _i . semi { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04001417}
1418# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001419pub fn visit_item_static<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemStatic) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001420 for it in & _i . attrs { _visitor.visit_attribute(it) };
1421 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001422 tokens_helper(_visitor, &(& _i . static_token).0);
David Tolnay24237fb2017-12-29 02:15:26 -05001423 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001424 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001425 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001426 _visitor.visit_type(& * _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001427 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001428 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -05001429 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001430}
1431# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001432pub fn visit_item_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemStruct) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001433 for it in & _i . attrs { _visitor.visit_attribute(it) };
1434 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001435 tokens_helper(_visitor, &(& _i . struct_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001436 _visitor.visit_ident(& _i . ident);
1437 _visitor.visit_generics(& _i . generics);
1438 _visitor.visit_variant_data(& _i . data);
David Tolnaycc0f0372017-12-28 19:11:04 -05001439 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04001440}
1441# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001442pub fn visit_item_trait<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemTrait) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001443 for it in & _i . attrs { _visitor.visit_attribute(it) };
1444 _visitor.visit_visibility(& _i . vis);
David Tolnay9b258702017-12-29 02:24:41 -05001445 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001446 if let Some(ref it) = _i . auto_token { tokens_helper(_visitor, &(it).0) };
1447 tokens_helper(_visitor, &(& _i . trait_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001448 _visitor.visit_ident(& _i . ident);
1449 _visitor.visit_generics(& _i . generics);
David Tolnaycc0f0372017-12-28 19:11:04 -05001450 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001451 for el in & _i . supertraits { let it = el.item(); _visitor.visit_type_param_bound(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -05001452 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001453 for it in & _i . items { _visitor.visit_trait_item(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001454}
1455# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001456pub fn visit_item_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001457 for it in & _i . attrs { _visitor.visit_attribute(it) };
1458 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001459 tokens_helper(_visitor, &(& _i . type_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001460 _visitor.visit_ident(& _i . ident);
1461 _visitor.visit_generics(& _i . generics);
David Tolnaycc0f0372017-12-28 19:11:04 -05001462 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001463 _visitor.visit_type(& * _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001464 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001465}
1466# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001467pub fn visit_item_union<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemUnion) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001468 for it in & _i . attrs { _visitor.visit_attribute(it) };
1469 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001470 tokens_helper(_visitor, &(& _i . union_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001471 _visitor.visit_ident(& _i . ident);
1472 _visitor.visit_generics(& _i . generics);
1473 _visitor.visit_variant_data(& _i . data);
Nika Layzell27726662017-10-24 23:16:35 -04001474}
1475# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001476pub fn visit_item_use<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemUse) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001477 for it in & _i . attrs { _visitor.visit_attribute(it) };
1478 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001479 tokens_helper(_visitor, &(& _i . use_token).0);
1480 if let Some(ref it) = _i . leading_colon { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001481 for el in & _i . prefix { let it = el.item(); _visitor.visit_ident(it) };
1482 _visitor.visit_use_tree(& _i . tree);
David Tolnaycc0f0372017-12-28 19:11:04 -05001483 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001484}
1485
David Tolnay4ba63a02017-12-28 15:53:05 -05001486pub fn visit_lifetime<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Lifetime) {
1487 // Skipped field _i . sym;
1488 _visitor.visit_span(& _i . span);
1489}
1490
Nika Layzellc86173a2017-11-18 13:55:22 -05001491pub fn visit_lifetime_def<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LifetimeDef) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001492 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4ba63a02017-12-28 15:53:05 -05001493 _visitor.visit_lifetime(& _i . lifetime);
David Tolnaycc0f0372017-12-28 19:11:04 -05001494 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4ba63a02017-12-28 15:53:05 -05001495 for el in & _i . bounds { let it = el.item(); _visitor.visit_lifetime(it) };
1496}
1497
1498pub fn visit_lit<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Lit) {
1499 // Skipped field _i . value;
1500 _visitor.visit_span(& _i . span);
Nika Layzell27726662017-10-24 23:16:35 -04001501}
1502# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001503pub fn visit_local<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Local) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001504 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001505 tokens_helper(_visitor, &(& _i . let_token).0);
1506 _visitor.visit_pat(& * _i . pat);
1507 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
1508 if let Some(ref it) = _i . ty { _visitor.visit_type(& * * it) };
1509 if let Some(ref it) = _i . eq_token { tokens_helper(_visitor, &(it).0) };
1510 if let Some(ref it) = _i . init { _visitor.visit_expr(& * * it) };
1511 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001512}
Nika Layzell27726662017-10-24 23:16:35 -04001513
Nika Layzellc86173a2017-11-18 13:55:22 -05001514pub fn visit_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Macro) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001515 _visitor.visit_path(& _i . path);
David Tolnaycc0f0372017-12-28 19:11:04 -05001516 tokens_helper(_visitor, &(& _i . bang_token).0);
David Tolnaydecf28d2017-11-11 11:56:45 -08001517 // Skipped field _i . tokens;
1518}
David Tolnay14982012017-12-29 00:49:51 -05001519
David Tolnay85b69a42017-12-27 20:43:10 -05001520pub fn visit_member<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Member) {
1521 use ::Member::*;
1522 match *_i {
1523 Named(ref _binding_0, ) => {
1524 _visitor.visit_ident(_binding_0);
1525 }
1526 Unnamed(ref _binding_0, ) => {
1527 _visitor.visit_index(_binding_0);
1528 }
1529 }
1530}
David Tolnaydecf28d2017-11-11 11:56:45 -08001531
Nika Layzellc86173a2017-11-18 13:55:22 -05001532pub fn visit_meta_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MetaItem) {
Nika Layzell27726662017-10-24 23:16:35 -04001533 use ::MetaItem::*;
1534 match *_i {
1535 Term(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001536 _visitor.visit_ident(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001537 }
1538 List(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001539 _visitor.visit_meta_item_list(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001540 }
1541 NameValue(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001542 _visitor.visit_meta_name_value(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001543 }
1544 }
1545}
1546
Nika Layzellc86173a2017-11-18 13:55:22 -05001547pub fn visit_meta_item_list<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MetaItemList) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001548 _visitor.visit_ident(& _i . ident);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001549 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001550 for el in & _i . nested { let it = el.item(); _visitor.visit_nested_meta_item(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001551}
1552
Nika Layzellc86173a2017-11-18 13:55:22 -05001553pub fn visit_meta_name_value<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MetaNameValue) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001554 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001555 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4ba63a02017-12-28 15:53:05 -05001556 _visitor.visit_lit(& _i . lit);
Nika Layzell27726662017-10-24 23:16:35 -04001557}
1558# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001559pub fn visit_method_sig<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MethodSig) {
David Tolnay360a6342017-12-29 02:22:11 -05001560 if let Some(ref it) = _i . constness { tokens_helper(_visitor, &(it).0) };
David Tolnay9b258702017-12-29 02:24:41 -05001561 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001562 if let Some(ref it) = _i . abi { _visitor.visit_abi(it) };
1563 _visitor.visit_ident(& _i . ident);
1564 _visitor.visit_fn_decl(& _i . decl);
Nika Layzell27726662017-10-24 23:16:35 -04001565}
David Tolnayd60cfec2017-12-29 00:21:38 -05001566# [ cfg ( feature = "full" ) ]
1567pub fn visit_method_turbofish<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MethodTurbofish) {
1568 tokens_helper(_visitor, &(& _i . colon2_token).0);
1569 tokens_helper(_visitor, &(& _i . lt_token).0);
1570 for el in & _i . args { let it = el.item(); _visitor.visit_generic_method_argument(it) };
1571 tokens_helper(_visitor, &(& _i . gt_token).0);
1572}
Nika Layzell27726662017-10-24 23:16:35 -04001573
Nika Layzellc86173a2017-11-18 13:55:22 -05001574pub fn visit_nested_meta_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast NestedMetaItem) {
Nika Layzell27726662017-10-24 23:16:35 -04001575 use ::NestedMetaItem::*;
1576 match *_i {
1577 MetaItem(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001578 _visitor.visit_meta_item(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001579 }
1580 Literal(ref _binding_0, ) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05001581 _visitor.visit_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001582 }
1583 }
1584}
1585
Nika Layzellc08227a2017-12-04 16:30:17 -05001586pub fn visit_parenthesized_generic_arguments<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ParenthesizedGenericArguments) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001587 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001588 for el in & _i . inputs { let it = el.item(); _visitor.visit_type(it) };
1589 _visitor.visit_return_type(& _i . output);
Nika Layzell27726662017-10-24 23:16:35 -04001590}
1591# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001592pub fn visit_pat<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Pat) {
Nika Layzell27726662017-10-24 23:16:35 -04001593 use ::Pat::*;
1594 match *_i {
1595 Wild(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001596 _visitor.visit_pat_wild(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001597 }
1598 Ident(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001599 _visitor.visit_pat_ident(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001600 }
1601 Struct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001602 _visitor.visit_pat_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001603 }
1604 TupleStruct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001605 _visitor.visit_pat_tuple_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001606 }
1607 Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001608 _visitor.visit_pat_path(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001609 }
1610 Tuple(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001611 _visitor.visit_pat_tuple(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001612 }
1613 Box(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001614 _visitor.visit_pat_box(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001615 }
1616 Ref(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001617 _visitor.visit_pat_ref(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001618 }
1619 Lit(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001620 _visitor.visit_pat_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001621 }
1622 Range(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001623 _visitor.visit_pat_range(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001624 }
1625 Slice(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001626 _visitor.visit_pat_slice(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001627 }
David Tolnaydecf28d2017-11-11 11:56:45 -08001628 Macro(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001629 _visitor.visit_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001630 }
1631 }
1632}
1633# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001634pub fn visit_pat_box<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatBox) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001635 tokens_helper(_visitor, &(& _i . box_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001636 _visitor.visit_pat(& * _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001637}
1638# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001639pub fn visit_pat_ident<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatIdent) {
David Tolnay24237fb2017-12-29 02:15:26 -05001640 if let Some(ref it) = _i . by_ref { tokens_helper(_visitor, &(it).0) };
1641 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001642 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001643 if let Some(ref it) = _i . at_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001644 if let Some(ref it) = _i . subpat { _visitor.visit_pat(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -04001645}
1646# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001647pub fn visit_pat_lit<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatLit) {
David Tolnay4a918742017-12-28 16:54:41 -05001648 _visitor.visit_expr(& * _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -04001649}
1650# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001651pub fn visit_pat_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatPath) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001652 if let Some(ref it) = _i . qself { _visitor.visit_qself(it) };
1653 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -04001654}
1655# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001656pub fn visit_pat_range<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatRange) {
David Tolnay4a918742017-12-28 16:54:41 -05001657 _visitor.visit_expr(& * _i . lo);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001658 _visitor.visit_range_limits(& _i . limits);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001659 _visitor.visit_expr(& * _i . hi);
Nika Layzell27726662017-10-24 23:16:35 -04001660}
1661# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001662pub fn visit_pat_ref<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatRef) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001663 tokens_helper(_visitor, &(& _i . and_token).0);
David Tolnay24237fb2017-12-29 02:15:26 -05001664 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001665 _visitor.visit_pat(& * _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001666}
1667# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001668pub fn visit_pat_slice<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatSlice) {
David Tolnay4a3f59a2017-12-28 21:21:12 -05001669 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001670 for el in & _i . front { let it = el.item(); _visitor.visit_pat(it) };
David Tolnay4a918742017-12-28 16:54:41 -05001671 if let Some(ref it) = _i . middle { _visitor.visit_pat(& * * it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001672 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
David Tolnay41871922017-12-29 01:53:45 -05001673 if let Some(ref it) = _i . comma_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001674 for el in & _i . back { let it = el.item(); _visitor.visit_pat(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001675}
1676# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001677pub fn visit_pat_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatStruct) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001678 _visitor.visit_path(& _i . path);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001679 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001680 for el in & _i . fields { let it = el.item(); _visitor.visit_field_pat(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001681 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04001682}
1683# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001684pub fn visit_pat_tuple<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatTuple) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001685 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay41871922017-12-29 01:53:45 -05001686 for el in & _i . front { let it = el.item(); _visitor.visit_pat(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001687 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
David Tolnay41871922017-12-29 01:53:45 -05001688 if let Some(ref it) = _i . comma_token { tokens_helper(_visitor, &(it).0) };
1689 for el in & _i . back { let it = el.item(); _visitor.visit_pat(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001690}
1691# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001692pub fn visit_pat_tuple_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatTupleStruct) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001693 _visitor.visit_path(& _i . path);
1694 _visitor.visit_pat_tuple(& _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001695}
1696# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001697pub fn visit_pat_wild<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatWild) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001698 tokens_helper(_visitor, &(& _i . underscore_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001699}
1700
Nika Layzellc86173a2017-11-18 13:55:22 -05001701pub fn visit_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Path) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001702 if let Some(ref it) = _i . leading_colon { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001703 for el in & _i . segments { let it = el.item(); _visitor.visit_path_segment(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001704}
Nika Layzellc08227a2017-12-04 16:30:17 -05001705
1706pub fn visit_path_arguments<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PathArguments) {
1707 use ::PathArguments::*;
1708 match *_i {
1709 None => { }
1710 AngleBracketed(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001711 _visitor.visit_angle_bracketed_generic_arguments(_binding_0);
Nika Layzellc08227a2017-12-04 16:30:17 -05001712 }
1713 Parenthesized(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001714 _visitor.visit_parenthesized_generic_arguments(_binding_0);
Nika Layzellc08227a2017-12-04 16:30:17 -05001715 }
1716 }
1717}
Nika Layzell27726662017-10-24 23:16:35 -04001718
Nika Layzellc86173a2017-11-18 13:55:22 -05001719pub fn visit_path_segment<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PathSegment) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001720 _visitor.visit_ident(& _i . ident);
1721 _visitor.visit_path_arguments(& _i . arguments);
Nika Layzell27726662017-10-24 23:16:35 -04001722}
Nika Layzell27726662017-10-24 23:16:35 -04001723
Nika Layzellc86173a2017-11-18 13:55:22 -05001724pub fn visit_poly_trait_ref<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PolyTraitRef) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001725 if let Some(ref it) = _i . bound_lifetimes { _visitor.visit_bound_lifetimes(it) };
1726 _visitor.visit_path(& _i . trait_ref);
Nika Layzell27726662017-10-24 23:16:35 -04001727}
1728
Nika Layzellc86173a2017-11-18 13:55:22 -05001729pub fn visit_qself<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast QSelf) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001730 tokens_helper(_visitor, &(& _i . lt_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001731 _visitor.visit_type(& * _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -04001732 // Skipped field _i . position;
David Tolnaycc0f0372017-12-28 19:11:04 -05001733 if let Some(ref it) = _i . as_token { tokens_helper(_visitor, &(it).0) };
1734 tokens_helper(_visitor, &(& _i . gt_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001735}
1736# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001737pub fn visit_range_limits<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast RangeLimits) {
Nika Layzell27726662017-10-24 23:16:35 -04001738 use ::RangeLimits::*;
1739 match *_i {
1740 HalfOpen(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05001741 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04001742 }
1743 Closed(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05001744 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04001745 }
1746 }
1747}
David Tolnayf93b90d2017-11-11 19:21:26 -08001748
Nika Layzellc86173a2017-11-18 13:55:22 -05001749pub fn visit_return_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ReturnType) {
David Tolnayf93b90d2017-11-11 19:21:26 -08001750 use ::ReturnType::*;
1751 match *_i {
1752 Default => { }
David Tolnayfd6bf5c2017-11-12 09:41:14 -08001753 Type(ref _binding_0, ref _binding_1, ) => {
David Tolnay4a3f59a2017-12-28 21:21:12 -05001754 tokens_helper(_visitor, &(_binding_0).0);
1755 _visitor.visit_type(& * * _binding_1);
David Tolnayf93b90d2017-11-11 19:21:26 -08001756 }
1757 }
1758}
Nika Layzellefb83ba2017-12-19 18:23:55 -05001759
1760pub fn visit_span<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Span) {
1761}
Nika Layzell27726662017-10-24 23:16:35 -04001762# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001763pub fn visit_stmt<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Stmt) {
Nika Layzell27726662017-10-24 23:16:35 -04001764 use ::Stmt::*;
1765 match *_i {
1766 Local(ref _binding_0, ) => {
David Tolnay4a918742017-12-28 16:54:41 -05001767 _visitor.visit_local(& * * _binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001768 }
1769 Item(ref _binding_0, ) => {
David Tolnay4a918742017-12-28 16:54:41 -05001770 _visitor.visit_item(& * * _binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001771 }
1772 Expr(ref _binding_0, ) => {
David Tolnay4a918742017-12-28 16:54:41 -05001773 _visitor.visit_expr(& * * _binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001774 }
1775 Semi(ref _binding_0, ref _binding_1, ) => {
David Tolnay4a918742017-12-28 16:54:41 -05001776 _visitor.visit_expr(& * * _binding_0);
David Tolnaycc0f0372017-12-28 19:11:04 -05001777 tokens_helper(_visitor, &(_binding_1).0);
Nika Layzell27726662017-10-24 23:16:35 -04001778 }
Nika Layzell27726662017-10-24 23:16:35 -04001779 }
1780}
1781
Nika Layzellc86173a2017-11-18 13:55:22 -05001782pub fn visit_trait_bound_modifier<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitBoundModifier) {
Nika Layzell27726662017-10-24 23:16:35 -04001783 use ::TraitBoundModifier::*;
1784 match *_i {
1785 None => { }
1786 Maybe(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05001787 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04001788 }
1789 }
1790}
1791# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001792pub fn visit_trait_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItem) {
David Tolnayda705bd2017-11-10 21:58:05 -08001793 use ::TraitItem::*;
Nika Layzell27726662017-10-24 23:16:35 -04001794 match *_i {
1795 Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001796 _visitor.visit_trait_item_const(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001797 }
1798 Method(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001799 _visitor.visit_trait_item_method(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001800 }
1801 Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001802 _visitor.visit_trait_item_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001803 }
1804 Macro(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001805 _visitor.visit_trait_item_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001806 }
1807 }
1808}
1809# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001810pub fn visit_trait_item_const<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemConst) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001811 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001812 tokens_helper(_visitor, &(& _i . const_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001813 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001814 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001815 _visitor.visit_type(& _i . ty);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001816 if let Some(ref it) = _i . default {
David Tolnaycc0f0372017-12-28 19:11:04 -05001817 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001818 _visitor.visit_expr(& ( it ) . 1);
1819 };
David Tolnaycc0f0372017-12-28 19:11:04 -05001820 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnayda705bd2017-11-10 21:58:05 -08001821}
1822# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001823pub fn visit_trait_item_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemMacro) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001824 for it in & _i . attrs { _visitor.visit_attribute(it) };
1825 _visitor.visit_macro(& _i . mac);
David Tolnaycc0f0372017-12-28 19:11:04 -05001826 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
David Tolnayda705bd2017-11-10 21:58:05 -08001827}
1828# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001829pub fn visit_trait_item_method<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemMethod) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001830 for it in & _i . attrs { _visitor.visit_attribute(it) };
1831 _visitor.visit_method_sig(& _i . sig);
1832 if let Some(ref it) = _i . default { _visitor.visit_block(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001833 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04001834}
1835# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001836pub fn visit_trait_item_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001837 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001838 tokens_helper(_visitor, &(& _i . type_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001839 _visitor.visit_ident(& _i . ident);
1840 _visitor.visit_generics(& _i . generics);
David Tolnaycc0f0372017-12-28 19:11:04 -05001841 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001842 for el in & _i . bounds { let it = el.item(); _visitor.visit_type_param_bound(it) };
David Tolnay5c4c0b52017-12-28 17:58:54 -05001843 if let Some(ref it) = _i . default {
David Tolnaycc0f0372017-12-28 19:11:04 -05001844 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001845 _visitor.visit_type(& ( it ) . 1);
1846 };
David Tolnaycc0f0372017-12-28 19:11:04 -05001847 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001848}
1849
Nika Layzellc86173a2017-11-18 13:55:22 -05001850pub fn visit_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Type) {
David Tolnayfd6bf5c2017-11-12 09:41:14 -08001851 use ::Type::*;
Nika Layzell27726662017-10-24 23:16:35 -04001852 match *_i {
1853 Slice(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001854 _visitor.visit_type_slice(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001855 }
1856 Array(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001857 _visitor.visit_type_array(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001858 }
1859 Ptr(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001860 _visitor.visit_type_ptr(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001861 }
David Tolnay0a89b4d2017-11-13 00:55:45 -08001862 Reference(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001863 _visitor.visit_type_reference(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001864 }
1865 BareFn(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001866 _visitor.visit_type_bare_fn(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001867 }
1868 Never(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001869 _visitor.visit_type_never(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001870 }
David Tolnay05362582017-12-26 01:33:57 -05001871 Tuple(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001872 _visitor.visit_type_tuple(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001873 }
1874 Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001875 _visitor.visit_type_path(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001876 }
1877 TraitObject(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001878 _visitor.visit_type_trait_object(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001879 }
1880 ImplTrait(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001881 _visitor.visit_type_impl_trait(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001882 }
1883 Paren(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001884 _visitor.visit_type_paren(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001885 }
1886 Group(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001887 _visitor.visit_type_group(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001888 }
1889 Infer(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001890 _visitor.visit_type_infer(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001891 }
David Tolnaydecf28d2017-11-11 11:56:45 -08001892 Macro(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001893 _visitor.visit_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001894 }
1895 }
1896}
1897
Nika Layzellc86173a2017-11-18 13:55:22 -05001898pub fn visit_type_array<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeArray) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001899 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05001900 _visitor.visit_type(& * _i . elem);
David Tolnaycc0f0372017-12-28 19:11:04 -05001901 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05001902 _visitor.visit_expr(& _i . len);
Nika Layzell27726662017-10-24 23:16:35 -04001903}
1904
Nika Layzellc86173a2017-11-18 13:55:22 -05001905pub fn visit_type_bare_fn<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeBareFn) {
David Tolnay4a918742017-12-28 16:54:41 -05001906 _visitor.visit_bare_fn_type(& * _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -04001907}
1908
Nika Layzellc86173a2017-11-18 13:55:22 -05001909pub fn visit_type_binding<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeBinding) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001910 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001911 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001912 _visitor.visit_type(& _i . ty);
David Tolnayfd6bf5c2017-11-12 09:41:14 -08001913}
1914
Nika Layzellc86173a2017-11-18 13:55:22 -05001915pub fn visit_type_group<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeGroup) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001916 tokens_helper(_visitor, &(& _i . group_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05001917 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04001918}
1919
Nika Layzellc86173a2017-11-18 13:55:22 -05001920pub fn visit_type_impl_trait<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeImplTrait) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001921 tokens_helper(_visitor, &(& _i . impl_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001922 for el in & _i . bounds { let it = el.item(); _visitor.visit_type_param_bound(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001923}
1924
Nika Layzellc86173a2017-11-18 13:55:22 -05001925pub fn visit_type_infer<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeInfer) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001926 tokens_helper(_visitor, &(& _i . underscore_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001927}
1928
Nika Layzellc86173a2017-11-18 13:55:22 -05001929pub fn visit_type_never<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeNever) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001930 tokens_helper(_visitor, &(& _i . bang_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001931}
1932
Nika Layzellc86173a2017-11-18 13:55:22 -05001933pub fn visit_type_param<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParam) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001934 for it in & _i . attrs { _visitor.visit_attribute(it) };
1935 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001936 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001937 for el in & _i . bounds { let it = el.item(); _visitor.visit_type_param_bound(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001938 if let Some(ref it) = _i . eq_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001939 if let Some(ref it) = _i . default { _visitor.visit_type(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001940}
1941
Nika Layzellc86173a2017-11-18 13:55:22 -05001942pub fn visit_type_param_bound<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParamBound) {
David Tolnayfd6bf5c2017-11-12 09:41:14 -08001943 use ::TypeParamBound::*;
Nika Layzell27726662017-10-24 23:16:35 -04001944 match *_i {
1945 Trait(ref _binding_0, ref _binding_1, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001946 _visitor.visit_poly_trait_ref(_binding_0);
1947 _visitor.visit_trait_bound_modifier(_binding_1);
Nika Layzell27726662017-10-24 23:16:35 -04001948 }
1949 Region(ref _binding_0, ) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05001950 _visitor.visit_lifetime(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001951 }
1952 }
1953}
1954
Nika Layzellc86173a2017-11-18 13:55:22 -05001955pub fn visit_type_paren<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParen) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001956 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05001957 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04001958}
1959
Nika Layzellc86173a2017-11-18 13:55:22 -05001960pub fn visit_type_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypePath) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001961 if let Some(ref it) = _i . qself { _visitor.visit_qself(it) };
1962 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -04001963}
1964
Nika Layzellc86173a2017-11-18 13:55:22 -05001965pub fn visit_type_ptr<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypePtr) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001966 tokens_helper(_visitor, &(& _i . star_token).0);
1967 if let Some(ref it) = _i . const_token { tokens_helper(_visitor, &(it).0) };
David Tolnay136aaa32017-12-29 02:37:36 -05001968 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
1969 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04001970}
1971
Nika Layzellc86173a2017-11-18 13:55:22 -05001972pub fn visit_type_reference<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeReference) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001973 tokens_helper(_visitor, &(& _i . and_token).0);
David Tolnay4ba63a02017-12-28 15:53:05 -05001974 if let Some(ref it) = _i . lifetime { _visitor.visit_lifetime(it) };
David Tolnay136aaa32017-12-29 02:37:36 -05001975 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
1976 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04001977}
1978
Nika Layzellc86173a2017-11-18 13:55:22 -05001979pub fn visit_type_slice<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeSlice) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001980 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05001981 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04001982}
1983
Nika Layzellc86173a2017-11-18 13:55:22 -05001984pub fn visit_type_trait_object<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeTraitObject) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001985 if let Some(ref it) = _i . dyn_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001986 for el in & _i . bounds { let it = el.item(); _visitor.visit_type_param_bound(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001987}
1988
David Tolnay05362582017-12-26 01:33:57 -05001989pub fn visit_type_tuple<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeTuple) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001990 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05001991 for el in & _i . elems { let it = el.item(); _visitor.visit_type(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001992}
1993
Nika Layzellc86173a2017-11-18 13:55:22 -05001994pub fn visit_un_op<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UnOp) {
Nika Layzell27726662017-10-24 23:16:35 -04001995 use ::UnOp::*;
1996 match *_i {
1997 Deref(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05001998 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04001999 }
2000 Not(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05002001 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04002002 }
2003 Neg(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05002004 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04002005 }
2006 }
2007}
David Tolnay5f332a92017-12-26 00:42:45 -05002008# [ cfg ( feature = "full" ) ]
2009pub fn visit_use_glob<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseGlob) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002010 tokens_helper(_visitor, &(& _i . star_token).0);
David Tolnay5f332a92017-12-26 00:42:45 -05002011}
2012# [ cfg ( feature = "full" ) ]
2013pub fn visit_use_list<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseList) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002014 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05002015 for el in & _i . items { let it = el.item(); _visitor.visit_use_tree(it) };
David Tolnay5f332a92017-12-26 00:42:45 -05002016}
2017# [ cfg ( feature = "full" ) ]
2018pub fn visit_use_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UsePath) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002019 _visitor.visit_ident(& _i . ident);
David Tolnay5c4c0b52017-12-28 17:58:54 -05002020 if let Some(ref it) = _i . rename {
David Tolnaycc0f0372017-12-28 19:11:04 -05002021 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05002022 _visitor.visit_ident(& ( it ) . 1);
2023 };
David Tolnay5f332a92017-12-26 00:42:45 -05002024}
2025# [ cfg ( feature = "full" ) ]
2026pub fn visit_use_tree<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseTree) {
2027 use ::UseTree::*;
2028 match *_i {
2029 Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002030 _visitor.visit_use_path(_binding_0);
David Tolnay5f332a92017-12-26 00:42:45 -05002031 }
2032 Glob(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002033 _visitor.visit_use_glob(_binding_0);
David Tolnay5f332a92017-12-26 00:42:45 -05002034 }
2035 List(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002036 _visitor.visit_use_list(_binding_0);
David Tolnay5f332a92017-12-26 00:42:45 -05002037 }
2038 }
2039}
Nika Layzell27726662017-10-24 23:16:35 -04002040
Nika Layzellc86173a2017-11-18 13:55:22 -05002041pub fn visit_variant<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Variant) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002042 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05002043 _visitor.visit_ident(& _i . ident);
David Tolnayf0d63bf2017-12-26 12:29:47 -05002044 _visitor.visit_variant_data(& _i . data);
David Tolnaye67902a2017-12-28 22:12:00 -05002045 if let Some(ref it) = _i . discriminant {
2046 tokens_helper(_visitor, &(& ( it ) . 0).0);
2047 _visitor.visit_expr(& ( it ) . 1);
2048 };
Nika Layzell27726662017-10-24 23:16:35 -04002049}
2050
Nika Layzellc86173a2017-11-18 13:55:22 -05002051pub fn visit_variant_data<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VariantData) {
Nika Layzell27726662017-10-24 23:16:35 -04002052 use ::VariantData::*;
2053 match *_i {
2054 Struct(ref _binding_0, ref _binding_1, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002055 for el in _binding_0 { let it = el.item(); _visitor.visit_field(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -05002056 tokens_helper(_visitor, &(_binding_1).0);
Nika Layzell27726662017-10-24 23:16:35 -04002057 }
2058 Tuple(ref _binding_0, ref _binding_1, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002059 for el in _binding_0 { let it = el.item(); _visitor.visit_field(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -05002060 tokens_helper(_visitor, &(_binding_1).0);
Nika Layzell27726662017-10-24 23:16:35 -04002061 }
2062 Unit => { }
2063 }
2064}
Nika Layzell27726662017-10-24 23:16:35 -04002065
Nika Layzellc86173a2017-11-18 13:55:22 -05002066pub fn visit_vis_crate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisCrate) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002067 tokens_helper(_visitor, &(& _i . pub_token).0);
David Tolnay1e01f9c2017-12-28 20:16:19 -05002068 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnaycc0f0372017-12-28 19:11:04 -05002069 tokens_helper(_visitor, &(& _i . crate_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04002070}
2071
Nika Layzellc86173a2017-11-18 13:55:22 -05002072pub fn visit_vis_public<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisPublic) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002073 tokens_helper(_visitor, &(& _i . pub_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04002074}
2075
Nika Layzellc86173a2017-11-18 13:55:22 -05002076pub fn visit_vis_restricted<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisRestricted) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002077 tokens_helper(_visitor, &(& _i . pub_token).0);
David Tolnay1e01f9c2017-12-28 20:16:19 -05002078 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnaycc0f0372017-12-28 19:11:04 -05002079 if let Some(ref it) = _i . in_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a918742017-12-28 16:54:41 -05002080 _visitor.visit_path(& * _i . path);
Nika Layzell27726662017-10-24 23:16:35 -04002081}
2082
Nika Layzellc86173a2017-11-18 13:55:22 -05002083pub fn visit_visibility<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Visibility) {
Nika Layzell27726662017-10-24 23:16:35 -04002084 use ::Visibility::*;
2085 match *_i {
2086 Public(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002087 _visitor.visit_vis_public(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002088 }
2089 Crate(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002090 _visitor.visit_vis_crate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002091 }
2092 Restricted(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002093 _visitor.visit_vis_restricted(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002094 }
David Tolnayfcfb9002017-12-28 22:04:29 -05002095 Inherited => { }
Nika Layzell27726662017-10-24 23:16:35 -04002096 }
2097}
2098
Nika Layzellc86173a2017-11-18 13:55:22 -05002099pub fn visit_where_bound_predicate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WhereBoundPredicate) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002100 if let Some(ref it) = _i . bound_lifetimes { _visitor.visit_bound_lifetimes(it) };
2101 _visitor.visit_type(& _i . bounded_ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05002102 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05002103 for el in & _i . bounds { let it = el.item(); _visitor.visit_type_param_bound(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002104}
2105
Nika Layzellc86173a2017-11-18 13:55:22 -05002106pub fn visit_where_clause<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WhereClause) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002107 tokens_helper(_visitor, &(& _i . where_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05002108 for el in & _i . predicates { let it = el.item(); _visitor.visit_where_predicate(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002109}
2110
Nika Layzellc86173a2017-11-18 13:55:22 -05002111pub fn visit_where_eq_predicate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WhereEqPredicate) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002112 _visitor.visit_type(& _i . lhs_ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05002113 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05002114 _visitor.visit_type(& _i . rhs_ty);
Nika Layzell27726662017-10-24 23:16:35 -04002115}
2116
Nika Layzellc86173a2017-11-18 13:55:22 -05002117pub fn visit_where_predicate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WherePredicate) {
Nika Layzell27726662017-10-24 23:16:35 -04002118 use ::WherePredicate::*;
2119 match *_i {
2120 BoundPredicate(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002121 _visitor.visit_where_bound_predicate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002122 }
2123 RegionPredicate(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002124 _visitor.visit_where_region_predicate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002125 }
2126 EqPredicate(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002127 _visitor.visit_where_eq_predicate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002128 }
2129 }
2130}
2131
Nika Layzellc86173a2017-11-18 13:55:22 -05002132pub fn visit_where_region_predicate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WhereRegionPredicate) {
David Tolnay4ba63a02017-12-28 15:53:05 -05002133 _visitor.visit_lifetime(& _i . lifetime);
David Tolnaycc0f0372017-12-28 19:11:04 -05002134 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4ba63a02017-12-28 15:53:05 -05002135 for el in & _i . bounds { let it = el.item(); _visitor.visit_lifetime(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002136}
2137