blob: 5f0cb022d5b143e1cae5e192187b292f18d98542 [file] [log] [blame]
Nika Layzell27726662017-10-24 23:16:35 -04001// THIS FILE IS AUTOMATICALLY GENERATED; DO NOT EDIT
2
David Tolnay0afc9b32017-12-27 13:38:24 -05003#![cfg_attr(rustfmt, rustfmt_skip)]
4
David Tolnayf0d63bf2017-12-26 12:29:47 -05005#![cfg_attr(feature = "cargo-clippy", allow(match_same_arms))]
6
Nika Layzella6f46c42017-10-26 15:26:16 -04007use *;
David Tolnay0a0d78c2018-01-05 15:24:01 -08008#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay6eff4da2018-01-01 20:27:45 -08009use punctuated::Punctuated;
David Tolnay98942562017-12-26 21:24:35 -050010use proc_macro2::Span;
David Tolnay0a0d78c2018-01-05 15:24:01 -080011#[cfg(any(feature = "full", feature = "derive"))]
David Tolnaycc0f0372017-12-28 19:11:04 -050012use gen::helper::visit::*;
Nika Layzell27726662017-10-24 23:16:35 -040013
Nika Layzell4ab8d6e2017-10-26 09:45:49 -040014
15#[cfg(feature = "full")]
16macro_rules! full {
17 ($e:expr) => { $e }
18}
19
David Tolnay0a0d78c2018-01-05 15:24:01 -080020#[cfg(all(feature = "derive", not(feature = "full")))]
Nika Layzell4ab8d6e2017-10-26 09:45:49 -040021macro_rules! full {
22 ($e:expr) => { unreachable!() }
23}
24
25
David Tolnayded2d682018-01-06 18:53:53 -080026/// Syntax tree traversal to walk a shared borrow of a syntax tree.
Nika Layzell27726662017-10-24 23:16:35 -040027///
David Tolnayded2d682018-01-06 18:53:53 -080028/// See the [module documentation] for details.
29///
30/// [module documentation]: index.html
David Tolnay4b4c4b62018-01-06 13:48:05 -080031pub trait Visit<'ast> {
David Tolnay3cfd1d32018-01-03 00:22:08 -080032# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050033fn visit_abi(&mut self, i: &'ast Abi) { visit_abi(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080034# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc08227a2017-12-04 16:30:17 -050035fn visit_angle_bracketed_generic_arguments(&mut self, i: &'ast AngleBracketedGenericArguments) { visit_angle_bracketed_generic_arguments(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040036# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050037fn visit_arg_captured(&mut self, i: &'ast ArgCaptured) { visit_arg_captured(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040038# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050039fn visit_arg_self(&mut self, i: &'ast ArgSelf) { visit_arg_self(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040040# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050041fn visit_arg_self_ref(&mut self, i: &'ast ArgSelfRef) { visit_arg_self_ref(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080042# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050043fn visit_arm(&mut self, i: &'ast Arm) { visit_arm(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080044# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050045fn visit_attr_style(&mut self, i: &'ast AttrStyle) { visit_attr_style(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080046# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050047fn visit_attribute(&mut self, i: &'ast Attribute) { visit_attribute(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080048# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050049fn visit_bare_fn_arg(&mut self, i: &'ast BareFnArg) { visit_bare_fn_arg(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080050# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050051fn visit_bare_fn_arg_name(&mut self, i: &'ast BareFnArgName) { visit_bare_fn_arg_name(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080052# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050053fn visit_bin_op(&mut self, i: &'ast BinOp) { visit_bin_op(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080054# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay506e43a2017-12-29 11:34:36 -050055fn visit_binding(&mut self, i: &'ast Binding) { visit_binding(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080056# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050057fn visit_block(&mut self, i: &'ast Block) { visit_block(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080058# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050059fn visit_bound_lifetimes(&mut self, i: &'ast BoundLifetimes) { visit_bound_lifetimes(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080060# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellf1fdc0b2017-12-04 19:58:32 -050061fn visit_const_param(&mut self, i: &'ast ConstParam) { visit_const_param(self, i) }
David Tolnay0a0d78c2018-01-05 15:24:01 -080062# [ cfg ( feature = "derive" ) ]
David Tolnaye3d41b72017-12-31 15:24:00 -050063fn visit_data(&mut self, i: &'ast Data) { visit_data(self, i) }
David Tolnay0a0d78c2018-01-05 15:24:01 -080064# [ cfg ( feature = "derive" ) ]
David Tolnaye3d41b72017-12-31 15:24:00 -050065fn visit_data_enum(&mut self, i: &'ast DataEnum) { visit_data_enum(self, i) }
David Tolnay0a0d78c2018-01-05 15:24:01 -080066# [ cfg ( feature = "derive" ) ]
David Tolnaye3d41b72017-12-31 15:24:00 -050067fn visit_data_struct(&mut self, i: &'ast DataStruct) { visit_data_struct(self, i) }
David Tolnay0a0d78c2018-01-05 15:24:01 -080068# [ cfg ( feature = "derive" ) ]
David Tolnaye3d41b72017-12-31 15:24:00 -050069fn visit_data_union(&mut self, i: &'ast DataUnion) { visit_data_union(self, i) }
David Tolnay0a0d78c2018-01-05 15:24:01 -080070# [ cfg ( feature = "derive" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050071fn visit_derive_input(&mut self, i: &'ast DeriveInput) { visit_derive_input(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080072# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050073fn visit_expr(&mut self, i: &'ast Expr) { visit_expr(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080074# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050075fn visit_expr_addr_of(&mut self, i: &'ast ExprAddrOf) { visit_expr_addr_of(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080076# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050077fn visit_expr_array(&mut self, i: &'ast ExprArray) { visit_expr_array(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080078# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050079fn visit_expr_assign(&mut self, i: &'ast ExprAssign) { visit_expr_assign(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080080# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050081fn visit_expr_assign_op(&mut self, i: &'ast ExprAssignOp) { visit_expr_assign_op(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080082# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050083fn visit_expr_binary(&mut self, i: &'ast ExprBinary) { visit_expr_binary(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080084# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050085fn visit_expr_block(&mut self, i: &'ast ExprBlock) { visit_expr_block(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080086# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050087fn visit_expr_box(&mut self, i: &'ast ExprBox) { visit_expr_box(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080088# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050089fn visit_expr_break(&mut self, i: &'ast ExprBreak) { visit_expr_break(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080090# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050091fn visit_expr_call(&mut self, i: &'ast ExprCall) { visit_expr_call(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080092# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050093fn visit_expr_cast(&mut self, i: &'ast ExprCast) { visit_expr_cast(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080094# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050095fn visit_expr_catch(&mut self, i: &'ast ExprCatch) { visit_expr_catch(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080096# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050097fn visit_expr_closure(&mut self, i: &'ast ExprClosure) { visit_expr_closure(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080098# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050099fn visit_expr_continue(&mut self, i: &'ast ExprContinue) { visit_expr_continue(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800100# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500101fn visit_expr_field(&mut self, i: &'ast ExprField) { visit_expr_field(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800102# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500103fn visit_expr_for_loop(&mut self, i: &'ast ExprForLoop) { visit_expr_for_loop(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800104# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500105fn visit_expr_group(&mut self, i: &'ast ExprGroup) { visit_expr_group(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800106# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500107fn visit_expr_if(&mut self, i: &'ast ExprIf) { visit_expr_if(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800108# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500109fn visit_expr_if_let(&mut self, i: &'ast ExprIfLet) { visit_expr_if_let(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800110# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500111fn visit_expr_in_place(&mut self, i: &'ast ExprInPlace) { visit_expr_in_place(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800112# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500113fn visit_expr_index(&mut self, i: &'ast ExprIndex) { visit_expr_index(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800114# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500115fn visit_expr_lit(&mut self, i: &'ast ExprLit) { visit_expr_lit(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800116# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500117fn visit_expr_loop(&mut self, i: &'ast ExprLoop) { visit_expr_loop(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800118# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500119fn visit_expr_macro(&mut self, i: &'ast ExprMacro) { visit_expr_macro(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800120# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500121fn visit_expr_match(&mut self, i: &'ast ExprMatch) { visit_expr_match(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800122# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500123fn visit_expr_method_call(&mut self, i: &'ast ExprMethodCall) { visit_expr_method_call(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800124# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500125fn visit_expr_paren(&mut self, i: &'ast ExprParen) { visit_expr_paren(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800126# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500127fn visit_expr_path(&mut self, i: &'ast ExprPath) { visit_expr_path(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800128# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500129fn visit_expr_range(&mut self, i: &'ast ExprRange) { visit_expr_range(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800130# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500131fn visit_expr_repeat(&mut self, i: &'ast ExprRepeat) { visit_expr_repeat(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800132# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayc246cd32017-12-28 23:14:32 -0500133fn visit_expr_return(&mut self, i: &'ast ExprReturn) { visit_expr_return(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800134# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500135fn visit_expr_struct(&mut self, i: &'ast ExprStruct) { visit_expr_struct(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800136# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500137fn visit_expr_try(&mut self, i: &'ast ExprTry) { visit_expr_try(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800138# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay05362582017-12-26 01:33:57 -0500139fn visit_expr_tuple(&mut self, i: &'ast ExprTuple) { visit_expr_tuple(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800140# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500141fn visit_expr_type(&mut self, i: &'ast ExprType) { visit_expr_type(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800142# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500143fn visit_expr_unary(&mut self, i: &'ast ExprUnary) { visit_expr_unary(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800144# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzell640832a2017-12-04 13:37:09 -0500145fn visit_expr_unsafe(&mut self, i: &'ast ExprUnsafe) { visit_expr_unsafe(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800146# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay2ae520a2017-12-29 11:19:50 -0500147fn visit_expr_verbatim(&mut self, i: &'ast ExprVerbatim) { visit_expr_verbatim(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800148# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500149fn visit_expr_while(&mut self, i: &'ast ExprWhile) { visit_expr_while(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800150# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500151fn visit_expr_while_let(&mut self, i: &'ast ExprWhileLet) { visit_expr_while_let(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800152# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500153fn visit_expr_yield(&mut self, i: &'ast ExprYield) { visit_expr_yield(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800154# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500155fn visit_field(&mut self, i: &'ast Field) { visit_field(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800156# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500157fn visit_field_pat(&mut self, i: &'ast FieldPat) { visit_field_pat(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800158# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500159fn visit_field_value(&mut self, i: &'ast FieldValue) { visit_field_value(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800160# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnaye3d41b72017-12-31 15:24:00 -0500161fn visit_fields(&mut self, i: &'ast Fields) { visit_fields(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800162# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnaye3d41b72017-12-31 15:24:00 -0500163fn visit_fields_named(&mut self, i: &'ast FieldsNamed) { visit_fields_named(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800164# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnaye3d41b72017-12-31 15:24:00 -0500165fn visit_fields_unnamed(&mut self, i: &'ast FieldsUnnamed) { visit_fields_unnamed(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400166# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500167fn visit_file(&mut self, i: &'ast File) { visit_file(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400168# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500169fn visit_fn_arg(&mut self, i: &'ast FnArg) { visit_fn_arg(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400170# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500171fn visit_fn_decl(&mut self, i: &'ast FnDecl) { visit_fn_decl(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400172# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500173fn visit_foreign_item(&mut self, i: &'ast ForeignItem) { visit_foreign_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400174# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500175fn visit_foreign_item_fn(&mut self, i: &'ast ForeignItemFn) { visit_foreign_item_fn(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400176# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500177fn visit_foreign_item_static(&mut self, i: &'ast ForeignItemStatic) { visit_foreign_item_static(self, i) }
David Tolnay199bcbb2017-11-12 10:33:52 -0800178# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500179fn visit_foreign_item_type(&mut self, i: &'ast ForeignItemType) { visit_foreign_item_type(self, i) }
David Tolnay2ae520a2017-12-29 11:19:50 -0500180# [ cfg ( feature = "full" ) ]
181fn visit_foreign_item_verbatim(&mut self, i: &'ast ForeignItemVerbatim) { visit_foreign_item_verbatim(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800182# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc08227a2017-12-04 16:30:17 -0500183fn visit_generic_argument(&mut self, i: &'ast GenericArgument) { visit_generic_argument(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800184# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnayd60cfec2017-12-29 00:21:38 -0500185fn visit_generic_method_argument(&mut self, i: &'ast GenericMethodArgument) { visit_generic_method_argument(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800186# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayc2f1aba2017-11-12 20:29:22 -0800187fn visit_generic_param(&mut self, i: &'ast GenericParam) { visit_generic_param(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800188# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500189fn visit_generics(&mut self, i: &'ast Generics) { visit_generics(self, i) }
Nika Layzellefb83ba2017-12-19 18:23:55 -0500190
191fn visit_ident(&mut self, i: &'ast Ident) { visit_ident(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400192# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500193fn visit_impl_item(&mut self, i: &'ast ImplItem) { visit_impl_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400194# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500195fn visit_impl_item_const(&mut self, i: &'ast ImplItemConst) { visit_impl_item_const(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400196# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500197fn visit_impl_item_macro(&mut self, i: &'ast ImplItemMacro) { visit_impl_item_macro(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400198# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500199fn visit_impl_item_method(&mut self, i: &'ast ImplItemMethod) { visit_impl_item_method(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400200# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500201fn visit_impl_item_type(&mut self, i: &'ast ImplItemType) { visit_impl_item_type(self, i) }
David Tolnay2ae520a2017-12-29 11:19:50 -0500202# [ cfg ( feature = "full" ) ]
203fn visit_impl_item_verbatim(&mut self, i: &'ast ImplItemVerbatim) { visit_impl_item_verbatim(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800204# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay85b69a42017-12-27 20:43:10 -0500205fn visit_index(&mut self, i: &'ast Index) { visit_index(self, i) }
206# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500207fn visit_item(&mut self, i: &'ast Item) { visit_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400208# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500209fn visit_item_const(&mut self, i: &'ast ItemConst) { visit_item_const(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400210# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500211fn visit_item_enum(&mut self, i: &'ast ItemEnum) { visit_item_enum(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400212# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500213fn visit_item_extern_crate(&mut self, i: &'ast ItemExternCrate) { visit_item_extern_crate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400214# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500215fn visit_item_fn(&mut self, i: &'ast ItemFn) { visit_item_fn(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400216# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500217fn visit_item_foreign_mod(&mut self, i: &'ast ItemForeignMod) { visit_item_foreign_mod(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400218# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500219fn visit_item_impl(&mut self, i: &'ast ItemImpl) { visit_item_impl(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400220# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500221fn visit_item_macro(&mut self, i: &'ast ItemMacro) { visit_item_macro(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400222# [ cfg ( feature = "full" ) ]
David Tolnay500d8322017-12-18 00:32:51 -0800223fn visit_item_macro2(&mut self, i: &'ast ItemMacro2) { visit_item_macro2(self, i) }
224# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500225fn visit_item_mod(&mut self, i: &'ast ItemMod) { visit_item_mod(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400226# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500227fn visit_item_static(&mut self, i: &'ast ItemStatic) { visit_item_static(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400228# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500229fn visit_item_struct(&mut self, i: &'ast ItemStruct) { visit_item_struct(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400230# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500231fn visit_item_trait(&mut self, i: &'ast ItemTrait) { visit_item_trait(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400232# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500233fn visit_item_type(&mut self, i: &'ast ItemType) { visit_item_type(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400234# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500235fn visit_item_union(&mut self, i: &'ast ItemUnion) { visit_item_union(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400236# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500237fn visit_item_use(&mut self, i: &'ast ItemUse) { visit_item_use(self, i) }
David Tolnay2ae520a2017-12-29 11:19:50 -0500238# [ cfg ( feature = "full" ) ]
239fn visit_item_verbatim(&mut self, i: &'ast ItemVerbatim) { visit_item_verbatim(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800240# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnaybcd498f2017-12-29 12:02:33 -0500241fn visit_label(&mut self, i: &'ast Label) { visit_label(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800242# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4ba63a02017-12-28 15:53:05 -0500243fn visit_lifetime(&mut self, i: &'ast Lifetime) { visit_lifetime(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800244# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500245fn visit_lifetime_def(&mut self, i: &'ast LifetimeDef) { visit_lifetime_def(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800246# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4ba63a02017-12-28 15:53:05 -0500247fn visit_lit(&mut self, i: &'ast Lit) { visit_lit(self, i) }
David Tolnay360efd22018-01-04 23:35:26 -0800248# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
249fn visit_lit_bool(&mut self, i: &'ast LitBool) { visit_lit_bool(self, i) }
250# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
251fn visit_lit_byte(&mut self, i: &'ast LitByte) { visit_lit_byte(self, i) }
252# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
253fn visit_lit_byte_str(&mut self, i: &'ast LitByteStr) { visit_lit_byte_str(self, i) }
254# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
255fn visit_lit_char(&mut self, i: &'ast LitChar) { visit_lit_char(self, i) }
256# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
257fn visit_lit_float(&mut self, i: &'ast LitFloat) { visit_lit_float(self, i) }
258# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
259fn visit_lit_int(&mut self, i: &'ast LitInt) { visit_lit_int(self, i) }
260# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
261fn visit_lit_str(&mut self, i: &'ast LitStr) { visit_lit_str(self, i) }
262# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
263fn visit_lit_verbatim(&mut self, i: &'ast LitVerbatim) { visit_lit_verbatim(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800264# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500265fn visit_local(&mut self, i: &'ast Local) { visit_local(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800266# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500267fn visit_macro(&mut self, i: &'ast Macro) { visit_macro(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800268# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayab919512017-12-30 23:31:51 -0500269fn visit_macro_delimiter(&mut self, i: &'ast MacroDelimiter) { visit_macro_delimiter(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800270# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay85b69a42017-12-27 20:43:10 -0500271fn visit_member(&mut self, i: &'ast Member) { visit_member(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800272# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500273fn visit_meta_item(&mut self, i: &'ast MetaItem) { visit_meta_item(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800274# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500275fn visit_meta_item_list(&mut self, i: &'ast MetaItemList) { visit_meta_item_list(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800276# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500277fn visit_meta_name_value(&mut self, i: &'ast MetaNameValue) { visit_meta_name_value(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400278# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500279fn visit_method_sig(&mut self, i: &'ast MethodSig) { visit_method_sig(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800280# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnayd60cfec2017-12-29 00:21:38 -0500281fn visit_method_turbofish(&mut self, i: &'ast MethodTurbofish) { visit_method_turbofish(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800282# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500283fn visit_nested_meta_item(&mut self, i: &'ast NestedMetaItem) { visit_nested_meta_item(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800284# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc08227a2017-12-04 16:30:17 -0500285fn visit_parenthesized_generic_arguments(&mut self, i: &'ast ParenthesizedGenericArguments) { visit_parenthesized_generic_arguments(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800286# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500287fn visit_pat(&mut self, i: &'ast Pat) { visit_pat(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800288# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500289fn visit_pat_box(&mut self, i: &'ast PatBox) { visit_pat_box(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800290# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500291fn visit_pat_ident(&mut self, i: &'ast PatIdent) { visit_pat_ident(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800292# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500293fn visit_pat_lit(&mut self, i: &'ast PatLit) { visit_pat_lit(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800294# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay323279a2017-12-29 11:26:32 -0500295fn visit_pat_macro(&mut self, i: &'ast PatMacro) { visit_pat_macro(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800296# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500297fn visit_pat_path(&mut self, i: &'ast PatPath) { visit_pat_path(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800298# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500299fn visit_pat_range(&mut self, i: &'ast PatRange) { visit_pat_range(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800300# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500301fn visit_pat_ref(&mut self, i: &'ast PatRef) { visit_pat_ref(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800302# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500303fn visit_pat_slice(&mut self, i: &'ast PatSlice) { visit_pat_slice(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800304# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500305fn visit_pat_struct(&mut self, i: &'ast PatStruct) { visit_pat_struct(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800306# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500307fn visit_pat_tuple(&mut self, i: &'ast PatTuple) { visit_pat_tuple(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800308# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500309fn visit_pat_tuple_struct(&mut self, i: &'ast PatTupleStruct) { visit_pat_tuple_struct(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800310# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay2ae520a2017-12-29 11:19:50 -0500311fn visit_pat_verbatim(&mut self, i: &'ast PatVerbatim) { visit_pat_verbatim(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800312# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500313fn visit_pat_wild(&mut self, i: &'ast PatWild) { visit_pat_wild(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800314# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500315fn visit_path(&mut self, i: &'ast Path) { visit_path(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800316# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc08227a2017-12-04 16:30:17 -0500317fn visit_path_arguments(&mut self, i: &'ast PathArguments) { visit_path_arguments(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800318# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500319fn visit_path_segment(&mut self, i: &'ast PathSegment) { visit_path_segment(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800320# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayd4add852018-01-01 20:13:24 -0800321fn visit_predicate_eq(&mut self, i: &'ast PredicateEq) { visit_predicate_eq(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800322# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayd4add852018-01-01 20:13:24 -0800323fn visit_predicate_lifetime(&mut self, i: &'ast PredicateLifetime) { visit_predicate_lifetime(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800324# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayd4add852018-01-01 20:13:24 -0800325fn visit_predicate_type(&mut self, i: &'ast PredicateType) { visit_predicate_type(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800326# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500327fn visit_qself(&mut self, i: &'ast QSelf) { visit_qself(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800328# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500329fn visit_range_limits(&mut self, i: &'ast RangeLimits) { visit_range_limits(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800330# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500331fn visit_return_type(&mut self, i: &'ast ReturnType) { visit_return_type(self, i) }
Nika Layzellefb83ba2017-12-19 18:23:55 -0500332
333fn visit_span(&mut self, i: &'ast Span) { visit_span(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800334# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500335fn visit_stmt(&mut self, i: &'ast Stmt) { visit_stmt(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800336# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay40fb8ce2018-01-02 10:53:46 -0800337fn visit_trait_bound(&mut self, i: &'ast TraitBound) { visit_trait_bound(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800338# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500339fn visit_trait_bound_modifier(&mut self, i: &'ast TraitBoundModifier) { visit_trait_bound_modifier(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400340# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500341fn visit_trait_item(&mut self, i: &'ast TraitItem) { visit_trait_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400342# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500343fn visit_trait_item_const(&mut self, i: &'ast TraitItemConst) { visit_trait_item_const(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400344# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500345fn visit_trait_item_macro(&mut self, i: &'ast TraitItemMacro) { visit_trait_item_macro(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400346# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500347fn visit_trait_item_method(&mut self, i: &'ast TraitItemMethod) { visit_trait_item_method(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400348# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500349fn visit_trait_item_type(&mut self, i: &'ast TraitItemType) { visit_trait_item_type(self, i) }
David Tolnay2ae520a2017-12-29 11:19:50 -0500350# [ cfg ( feature = "full" ) ]
351fn visit_trait_item_verbatim(&mut self, i: &'ast TraitItemVerbatim) { visit_trait_item_verbatim(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800352# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500353fn visit_type(&mut self, i: &'ast Type) { visit_type(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800354# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500355fn visit_type_array(&mut self, i: &'ast TypeArray) { visit_type_array(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800356# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500357fn visit_type_bare_fn(&mut self, i: &'ast TypeBareFn) { visit_type_bare_fn(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800358# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500359fn visit_type_group(&mut self, i: &'ast TypeGroup) { visit_type_group(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800360# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500361fn visit_type_impl_trait(&mut self, i: &'ast TypeImplTrait) { visit_type_impl_trait(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800362# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500363fn visit_type_infer(&mut self, i: &'ast TypeInfer) { visit_type_infer(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800364# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay323279a2017-12-29 11:26:32 -0500365fn visit_type_macro(&mut self, i: &'ast TypeMacro) { visit_type_macro(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800366# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500367fn visit_type_never(&mut self, i: &'ast TypeNever) { visit_type_never(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800368# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500369fn visit_type_param(&mut self, i: &'ast TypeParam) { visit_type_param(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800370# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500371fn visit_type_param_bound(&mut self, i: &'ast TypeParamBound) { visit_type_param_bound(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800372# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500373fn visit_type_paren(&mut self, i: &'ast TypeParen) { visit_type_paren(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800374# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500375fn visit_type_path(&mut self, i: &'ast TypePath) { visit_type_path(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800376# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500377fn visit_type_ptr(&mut self, i: &'ast TypePtr) { visit_type_ptr(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800378# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500379fn visit_type_reference(&mut self, i: &'ast TypeReference) { visit_type_reference(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800380# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500381fn visit_type_slice(&mut self, i: &'ast TypeSlice) { visit_type_slice(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800382# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500383fn visit_type_trait_object(&mut self, i: &'ast TypeTraitObject) { visit_type_trait_object(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800384# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay05362582017-12-26 01:33:57 -0500385fn visit_type_tuple(&mut self, i: &'ast TypeTuple) { visit_type_tuple(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800386# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay2ae520a2017-12-29 11:19:50 -0500387fn visit_type_verbatim(&mut self, i: &'ast TypeVerbatim) { visit_type_verbatim(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800388# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500389fn visit_un_op(&mut self, i: &'ast UnOp) { visit_un_op(self, i) }
David Tolnay5f332a92017-12-26 00:42:45 -0500390# [ cfg ( feature = "full" ) ]
391fn visit_use_glob(&mut self, i: &'ast UseGlob) { visit_use_glob(self, i) }
392# [ cfg ( feature = "full" ) ]
393fn visit_use_list(&mut self, i: &'ast UseList) { visit_use_list(self, i) }
394# [ cfg ( feature = "full" ) ]
395fn visit_use_path(&mut self, i: &'ast UsePath) { visit_use_path(self, i) }
396# [ cfg ( feature = "full" ) ]
397fn visit_use_tree(&mut self, i: &'ast UseTree) { visit_use_tree(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800398# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500399fn visit_variant(&mut self, i: &'ast Variant) { visit_variant(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800400# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500401fn visit_vis_crate(&mut self, i: &'ast VisCrate) { visit_vis_crate(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800402# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500403fn visit_vis_public(&mut self, i: &'ast VisPublic) { visit_vis_public(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800404# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500405fn visit_vis_restricted(&mut self, i: &'ast VisRestricted) { visit_vis_restricted(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800406# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500407fn visit_visibility(&mut self, i: &'ast Visibility) { visit_visibility(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800408# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500409fn visit_where_clause(&mut self, i: &'ast WhereClause) { visit_where_clause(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800410# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500411fn visit_where_predicate(&mut self, i: &'ast WherePredicate) { visit_where_predicate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400412
Nika Layzell27726662017-10-24 23:16:35 -0400413}
414
David Tolnay3cfd1d32018-01-03 00:22:08 -0800415# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800416pub fn visit_abi<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Abi) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500417 tokens_helper(_visitor, &(& _i . extern_token).0);
David Tolnayd5125762017-12-29 02:42:17 -0500418 if let Some(ref it) = _i . name { _visitor.visit_lit(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400419}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800420# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800421pub fn visit_angle_bracketed_generic_arguments<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast AngleBracketedGenericArguments) {
David Tolnay2d4e08a2017-12-28 23:54:07 -0500422 if let Some(ref it) = _i . colon2_token { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500423 tokens_helper(_visitor, &(& _i . lt_token).0);
David Tolnay56080682018-01-06 14:01:52 -0800424 for el in Punctuated::pairs(& _i . args) { let it = el.value(); _visitor.visit_generic_argument(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500425 tokens_helper(_visitor, &(& _i . gt_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400426}
427# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800428pub fn visit_arg_captured<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ArgCaptured) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500429 _visitor.visit_pat(& _i . pat);
David Tolnaycc0f0372017-12-28 19:11:04 -0500430 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500431 _visitor.visit_type(& _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -0400432}
433# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800434pub fn visit_arg_self<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ArgSelf) {
David Tolnay24237fb2017-12-29 02:15:26 -0500435 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500436 tokens_helper(_visitor, &(& _i . self_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400437}
438# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800439pub fn visit_arg_self_ref<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ArgSelfRef) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500440 tokens_helper(_visitor, &(& _i . and_token).0);
David Tolnay4ba63a02017-12-28 15:53:05 -0500441 if let Some(ref it) = _i . lifetime { _visitor.visit_lifetime(it) };
David Tolnay24237fb2017-12-29 02:15:26 -0500442 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500443 tokens_helper(_visitor, &(& _i . self_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400444}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800445# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800446pub fn visit_arm<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Arm) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500447 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay56080682018-01-06 14:01:52 -0800448 for el in Punctuated::pairs(& _i . pats) { let it = el.value(); _visitor.visit_pat(it) };
David Tolnay8b4d3022017-12-29 12:11:10 -0500449 if let Some(ref it) = _i . guard {
450 tokens_helper(_visitor, &(& ( it ) . 0).0);
451 _visitor.visit_expr(& * ( it ) . 1);
452 };
David Tolnaycc0f0372017-12-28 19:11:04 -0500453 tokens_helper(_visitor, &(& _i . rocket_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500454 _visitor.visit_expr(& * _i . body);
David Tolnaycc0f0372017-12-28 19:11:04 -0500455 if let Some(ref it) = _i . comma { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -0400456}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800457# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800458pub fn visit_attr_style<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast AttrStyle) {
Nika Layzell27726662017-10-24 23:16:35 -0400459 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -0500460 AttrStyle::Outer => { }
461 AttrStyle::Inner(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500462 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400463 }
464 }
465}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800466# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800467pub fn visit_attribute<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Attribute) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500468 tokens_helper(_visitor, &(& _i . pound_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500469 _visitor.visit_attr_style(& _i . style);
David Tolnay1e01f9c2017-12-28 20:16:19 -0500470 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500471 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -0400472 // Skipped field _i . tts;
473 // Skipped field _i . is_sugared_doc;
474}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800475# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800476pub fn visit_bare_fn_arg<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BareFnArg) {
David Tolnay5c4c0b52017-12-28 17:58:54 -0500477 if let Some(ref it) = _i . name {
478 _visitor.visit_bare_fn_arg_name(& ( it ) . 0);
David Tolnaycc0f0372017-12-28 19:11:04 -0500479 tokens_helper(_visitor, &(& ( it ) . 1).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -0500480 };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500481 _visitor.visit_type(& _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -0400482}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800483# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800484pub fn visit_bare_fn_arg_name<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BareFnArgName) {
Nika Layzell27726662017-10-24 23:16:35 -0400485 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -0500486 BareFnArgName::Named(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500487 _visitor.visit_ident(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400488 }
David Tolnay6702ade2017-12-30 23:38:15 -0500489 BareFnArgName::Wild(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500490 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400491 }
492 }
493}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800494# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800495pub fn visit_bin_op<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BinOp) {
Nika Layzell27726662017-10-24 23:16:35 -0400496 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -0500497 BinOp::Add(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500498 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400499 }
David Tolnay6702ade2017-12-30 23:38:15 -0500500 BinOp::Sub(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500501 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400502 }
David Tolnay6702ade2017-12-30 23:38:15 -0500503 BinOp::Mul(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500504 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400505 }
David Tolnay6702ade2017-12-30 23:38:15 -0500506 BinOp::Div(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500507 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400508 }
David Tolnay6702ade2017-12-30 23:38:15 -0500509 BinOp::Rem(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500510 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400511 }
David Tolnay6702ade2017-12-30 23:38:15 -0500512 BinOp::And(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500513 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400514 }
David Tolnay6702ade2017-12-30 23:38:15 -0500515 BinOp::Or(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500516 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400517 }
David Tolnay6702ade2017-12-30 23:38:15 -0500518 BinOp::BitXor(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500519 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400520 }
David Tolnay6702ade2017-12-30 23:38:15 -0500521 BinOp::BitAnd(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500522 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400523 }
David Tolnay6702ade2017-12-30 23:38:15 -0500524 BinOp::BitOr(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500525 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400526 }
David Tolnay6702ade2017-12-30 23:38:15 -0500527 BinOp::Shl(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500528 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400529 }
David Tolnay6702ade2017-12-30 23:38:15 -0500530 BinOp::Shr(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500531 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400532 }
David Tolnay6702ade2017-12-30 23:38:15 -0500533 BinOp::Eq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500534 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400535 }
David Tolnay6702ade2017-12-30 23:38:15 -0500536 BinOp::Lt(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500537 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400538 }
David Tolnay6702ade2017-12-30 23:38:15 -0500539 BinOp::Le(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500540 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400541 }
David Tolnay6702ade2017-12-30 23:38:15 -0500542 BinOp::Ne(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500543 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400544 }
David Tolnay6702ade2017-12-30 23:38:15 -0500545 BinOp::Ge(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500546 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400547 }
David Tolnay6702ade2017-12-30 23:38:15 -0500548 BinOp::Gt(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500549 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400550 }
David Tolnay6702ade2017-12-30 23:38:15 -0500551 BinOp::AddEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500552 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400553 }
David Tolnay6702ade2017-12-30 23:38:15 -0500554 BinOp::SubEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500555 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400556 }
David Tolnay6702ade2017-12-30 23:38:15 -0500557 BinOp::MulEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500558 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400559 }
David Tolnay6702ade2017-12-30 23:38:15 -0500560 BinOp::DivEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500561 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400562 }
David Tolnay6702ade2017-12-30 23:38:15 -0500563 BinOp::RemEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500564 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400565 }
David Tolnay6702ade2017-12-30 23:38:15 -0500566 BinOp::BitXorEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500567 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400568 }
David Tolnay6702ade2017-12-30 23:38:15 -0500569 BinOp::BitAndEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500570 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400571 }
David Tolnay6702ade2017-12-30 23:38:15 -0500572 BinOp::BitOrEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500573 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400574 }
David Tolnay6702ade2017-12-30 23:38:15 -0500575 BinOp::ShlEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500576 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400577 }
David Tolnay6702ade2017-12-30 23:38:15 -0500578 BinOp::ShrEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500579 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400580 }
581 }
582}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800583# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800584pub fn visit_binding<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Binding) {
David Tolnay506e43a2017-12-29 11:34:36 -0500585 _visitor.visit_ident(& _i . ident);
586 tokens_helper(_visitor, &(& _i . eq_token).0);
587 _visitor.visit_type(& _i . ty);
588}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800589# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800590pub fn visit_block<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Block) {
David Tolnay1e01f9c2017-12-28 20:16:19 -0500591 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500592 for it in & _i . stmts { _visitor.visit_stmt(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400593}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800594# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800595pub fn visit_bound_lifetimes<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BoundLifetimes) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500596 tokens_helper(_visitor, &(& _i . for_token).0);
597 tokens_helper(_visitor, &(& _i . lt_token).0);
David Tolnay56080682018-01-06 14:01:52 -0800598 for el in Punctuated::pairs(& _i . lifetimes) { let it = el.value(); _visitor.visit_lifetime_def(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500599 tokens_helper(_visitor, &(& _i . gt_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400600}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800601# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800602pub fn visit_const_param<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ConstParam) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500603 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500604 tokens_helper(_visitor, &(& _i . const_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500605 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -0500606 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500607 _visitor.visit_type(& _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -0500608 if let Some(ref it) = _i . eq_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500609 if let Some(ref it) = _i . default { _visitor.visit_expr(it) };
Nika Layzellf1fdc0b2017-12-04 19:58:32 -0500610}
David Tolnay0a0d78c2018-01-05 15:24:01 -0800611# [ cfg ( feature = "derive" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800612pub fn visit_data<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Data) {
David Tolnaye3d41b72017-12-31 15:24:00 -0500613 match *_i {
614 Data::Struct(ref _binding_0, ) => {
615 _visitor.visit_data_struct(_binding_0);
616 }
617 Data::Enum(ref _binding_0, ) => {
618 _visitor.visit_data_enum(_binding_0);
619 }
620 Data::Union(ref _binding_0, ) => {
621 _visitor.visit_data_union(_binding_0);
622 }
623 }
624}
David Tolnay0a0d78c2018-01-05 15:24:01 -0800625# [ cfg ( feature = "derive" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800626pub fn visit_data_enum<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast DataEnum) {
David Tolnaye3d41b72017-12-31 15:24:00 -0500627 tokens_helper(_visitor, &(& _i . enum_token).0);
628 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay56080682018-01-06 14:01:52 -0800629 for el in Punctuated::pairs(& _i . variants) { let it = el.value(); _visitor.visit_variant(it) };
David Tolnaye3d41b72017-12-31 15:24:00 -0500630}
David Tolnay0a0d78c2018-01-05 15:24:01 -0800631# [ cfg ( feature = "derive" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800632pub fn visit_data_struct<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast DataStruct) {
David Tolnaye3d41b72017-12-31 15:24:00 -0500633 tokens_helper(_visitor, &(& _i . struct_token).0);
634 _visitor.visit_fields(& _i . fields);
635 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
636}
David Tolnay0a0d78c2018-01-05 15:24:01 -0800637# [ cfg ( feature = "derive" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800638pub fn visit_data_union<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast DataUnion) {
David Tolnaye3d41b72017-12-31 15:24:00 -0500639 tokens_helper(_visitor, &(& _i . union_token).0);
640 _visitor.visit_fields_named(& _i . fields);
641}
David Tolnay0a0d78c2018-01-05 15:24:01 -0800642# [ cfg ( feature = "derive" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800643pub fn visit_derive_input<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast DeriveInput) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500644 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500645 _visitor.visit_visibility(& _i . vis);
646 _visitor.visit_ident(& _i . ident);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500647 _visitor.visit_generics(& _i . generics);
David Tolnaye3d41b72017-12-31 15:24:00 -0500648 _visitor.visit_data(& _i . data);
Nika Layzell27726662017-10-24 23:16:35 -0400649}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800650# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800651pub fn visit_expr<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Expr) {
Nika Layzell27726662017-10-24 23:16:35 -0400652 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -0500653 Expr::Box(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500654 full!(_visitor.visit_expr_box(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400655 }
David Tolnay6702ade2017-12-30 23:38:15 -0500656 Expr::InPlace(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500657 full!(_visitor.visit_expr_in_place(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400658 }
David Tolnay6702ade2017-12-30 23:38:15 -0500659 Expr::Array(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500660 full!(_visitor.visit_expr_array(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400661 }
David Tolnay6702ade2017-12-30 23:38:15 -0500662 Expr::Call(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500663 _visitor.visit_expr_call(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400664 }
David Tolnay6702ade2017-12-30 23:38:15 -0500665 Expr::MethodCall(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500666 full!(_visitor.visit_expr_method_call(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400667 }
David Tolnay6702ade2017-12-30 23:38:15 -0500668 Expr::Tuple(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500669 full!(_visitor.visit_expr_tuple(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400670 }
David Tolnay6702ade2017-12-30 23:38:15 -0500671 Expr::Binary(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500672 _visitor.visit_expr_binary(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400673 }
David Tolnay6702ade2017-12-30 23:38:15 -0500674 Expr::Unary(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500675 _visitor.visit_expr_unary(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400676 }
David Tolnay6702ade2017-12-30 23:38:15 -0500677 Expr::Lit(ref _binding_0, ) => {
David Tolnay8c91b882017-12-28 23:04:32 -0500678 _visitor.visit_expr_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400679 }
David Tolnay6702ade2017-12-30 23:38:15 -0500680 Expr::Cast(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500681 _visitor.visit_expr_cast(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400682 }
David Tolnay6702ade2017-12-30 23:38:15 -0500683 Expr::Type(ref _binding_0, ) => {
David Tolnay0cf94f22017-12-28 23:46:26 -0500684 full!(_visitor.visit_expr_type(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400685 }
David Tolnay6702ade2017-12-30 23:38:15 -0500686 Expr::If(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500687 full!(_visitor.visit_expr_if(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400688 }
David Tolnay6702ade2017-12-30 23:38:15 -0500689 Expr::IfLet(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500690 full!(_visitor.visit_expr_if_let(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400691 }
David Tolnay6702ade2017-12-30 23:38:15 -0500692 Expr::While(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500693 full!(_visitor.visit_expr_while(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400694 }
David Tolnay6702ade2017-12-30 23:38:15 -0500695 Expr::WhileLet(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500696 full!(_visitor.visit_expr_while_let(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400697 }
David Tolnay6702ade2017-12-30 23:38:15 -0500698 Expr::ForLoop(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500699 full!(_visitor.visit_expr_for_loop(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400700 }
David Tolnay6702ade2017-12-30 23:38:15 -0500701 Expr::Loop(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500702 full!(_visitor.visit_expr_loop(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400703 }
David Tolnay6702ade2017-12-30 23:38:15 -0500704 Expr::Match(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500705 full!(_visitor.visit_expr_match(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400706 }
David Tolnay6702ade2017-12-30 23:38:15 -0500707 Expr::Closure(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500708 full!(_visitor.visit_expr_closure(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400709 }
David Tolnay6702ade2017-12-30 23:38:15 -0500710 Expr::Unsafe(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500711 full!(_visitor.visit_expr_unsafe(_binding_0));
Nika Layzell640832a2017-12-04 13:37:09 -0500712 }
David Tolnay6702ade2017-12-30 23:38:15 -0500713 Expr::Block(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500714 full!(_visitor.visit_expr_block(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400715 }
David Tolnay6702ade2017-12-30 23:38:15 -0500716 Expr::Assign(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500717 full!(_visitor.visit_expr_assign(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400718 }
David Tolnay6702ade2017-12-30 23:38:15 -0500719 Expr::AssignOp(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500720 full!(_visitor.visit_expr_assign_op(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400721 }
David Tolnay6702ade2017-12-30 23:38:15 -0500722 Expr::Field(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500723 full!(_visitor.visit_expr_field(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400724 }
David Tolnay6702ade2017-12-30 23:38:15 -0500725 Expr::Index(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500726 _visitor.visit_expr_index(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400727 }
David Tolnay6702ade2017-12-30 23:38:15 -0500728 Expr::Range(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500729 full!(_visitor.visit_expr_range(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400730 }
David Tolnay6702ade2017-12-30 23:38:15 -0500731 Expr::Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500732 _visitor.visit_expr_path(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400733 }
David Tolnay6702ade2017-12-30 23:38:15 -0500734 Expr::AddrOf(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500735 full!(_visitor.visit_expr_addr_of(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400736 }
David Tolnay6702ade2017-12-30 23:38:15 -0500737 Expr::Break(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500738 full!(_visitor.visit_expr_break(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400739 }
David Tolnay6702ade2017-12-30 23:38:15 -0500740 Expr::Continue(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500741 full!(_visitor.visit_expr_continue(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400742 }
David Tolnay6702ade2017-12-30 23:38:15 -0500743 Expr::Return(ref _binding_0, ) => {
David Tolnayc246cd32017-12-28 23:14:32 -0500744 full!(_visitor.visit_expr_return(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400745 }
David Tolnay6702ade2017-12-30 23:38:15 -0500746 Expr::Macro(ref _binding_0, ) => {
David Tolnay8c91b882017-12-28 23:04:32 -0500747 full!(_visitor.visit_expr_macro(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400748 }
David Tolnay6702ade2017-12-30 23:38:15 -0500749 Expr::Struct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500750 full!(_visitor.visit_expr_struct(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400751 }
David Tolnay6702ade2017-12-30 23:38:15 -0500752 Expr::Repeat(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500753 full!(_visitor.visit_expr_repeat(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400754 }
David Tolnay6702ade2017-12-30 23:38:15 -0500755 Expr::Paren(ref _binding_0, ) => {
David Tolnaye98775f2017-12-28 23:17:00 -0500756 full!(_visitor.visit_expr_paren(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400757 }
David Tolnay6702ade2017-12-30 23:38:15 -0500758 Expr::Group(ref _binding_0, ) => {
David Tolnaye98775f2017-12-28 23:17:00 -0500759 full!(_visitor.visit_expr_group(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400760 }
David Tolnay6702ade2017-12-30 23:38:15 -0500761 Expr::Try(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500762 full!(_visitor.visit_expr_try(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400763 }
David Tolnay6702ade2017-12-30 23:38:15 -0500764 Expr::Catch(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500765 full!(_visitor.visit_expr_catch(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400766 }
David Tolnay6702ade2017-12-30 23:38:15 -0500767 Expr::Yield(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500768 full!(_visitor.visit_expr_yield(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400769 }
David Tolnay6702ade2017-12-30 23:38:15 -0500770 Expr::Verbatim(ref _binding_0, ) => {
David Tolnay2ae520a2017-12-29 11:19:50 -0500771 _visitor.visit_expr_verbatim(_binding_0);
772 }
Nika Layzell27726662017-10-24 23:16:35 -0400773 }
774}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800775# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800776pub fn visit_expr_addr_of<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprAddrOf) {
David Tolnay8c91b882017-12-28 23:04:32 -0500777 for it in & _i . attrs { _visitor.visit_attribute(it) };
778 tokens_helper(_visitor, &(& _i . and_token).0);
David Tolnay24237fb2017-12-29 02:15:26 -0500779 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnay8c91b882017-12-28 23:04:32 -0500780 _visitor.visit_expr(& * _i . expr);
781}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800782# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800783pub fn visit_expr_array<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprArray) {
David Tolnay8c91b882017-12-28 23:04:32 -0500784 for it in & _i . attrs { _visitor.visit_attribute(it) };
785 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnay56080682018-01-06 14:01:52 -0800786 for el in Punctuated::pairs(& _i . elems) { let it = el.value(); _visitor.visit_expr(it) };
David Tolnay8c91b882017-12-28 23:04:32 -0500787}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800788# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800789pub fn visit_expr_assign<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprAssign) {
David Tolnay8c91b882017-12-28 23:04:32 -0500790 for it in & _i . attrs { _visitor.visit_attribute(it) };
791 _visitor.visit_expr(& * _i . left);
792 tokens_helper(_visitor, &(& _i . eq_token).0);
793 _visitor.visit_expr(& * _i . right);
794}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800795# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800796pub fn visit_expr_assign_op<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprAssignOp) {
David Tolnay8c91b882017-12-28 23:04:32 -0500797 for it in & _i . attrs { _visitor.visit_attribute(it) };
798 _visitor.visit_expr(& * _i . left);
799 _visitor.visit_bin_op(& _i . op);
800 _visitor.visit_expr(& * _i . right);
801}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800802# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800803pub fn visit_expr_binary<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBinary) {
David Tolnay8c91b882017-12-28 23:04:32 -0500804 for it in & _i . attrs { _visitor.visit_attribute(it) };
805 _visitor.visit_expr(& * _i . left);
806 _visitor.visit_bin_op(& _i . op);
807 _visitor.visit_expr(& * _i . right);
808}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800809# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800810pub fn visit_expr_block<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBlock) {
David Tolnay8c91b882017-12-28 23:04:32 -0500811 for it in & _i . attrs { _visitor.visit_attribute(it) };
812 _visitor.visit_block(& _i . block);
813}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800814# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800815pub fn visit_expr_box<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBox) {
David Tolnay8c91b882017-12-28 23:04:32 -0500816 for it in & _i . attrs { _visitor.visit_attribute(it) };
817 tokens_helper(_visitor, &(& _i . box_token).0);
818 _visitor.visit_expr(& * _i . expr);
819}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800820# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800821pub fn visit_expr_break<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBreak) {
David Tolnay8c91b882017-12-28 23:04:32 -0500822 for it in & _i . attrs { _visitor.visit_attribute(it) };
823 tokens_helper(_visitor, &(& _i . break_token).0);
824 if let Some(ref it) = _i . label { _visitor.visit_lifetime(it) };
825 if let Some(ref it) = _i . expr { _visitor.visit_expr(& * * it) };
826}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800827# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800828pub fn visit_expr_call<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprCall) {
David Tolnay8c91b882017-12-28 23:04:32 -0500829 for it in & _i . attrs { _visitor.visit_attribute(it) };
830 _visitor.visit_expr(& * _i . func);
831 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay56080682018-01-06 14:01:52 -0800832 for el in Punctuated::pairs(& _i . args) { let it = el.value(); _visitor.visit_expr(it) };
David Tolnay8c91b882017-12-28 23:04:32 -0500833}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800834# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800835pub fn visit_expr_cast<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprCast) {
David Tolnay8c91b882017-12-28 23:04:32 -0500836 for it in & _i . attrs { _visitor.visit_attribute(it) };
837 _visitor.visit_expr(& * _i . expr);
838 tokens_helper(_visitor, &(& _i . as_token).0);
839 _visitor.visit_type(& * _i . ty);
840}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800841# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800842pub fn visit_expr_catch<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprCatch) {
David Tolnay8c91b882017-12-28 23:04:32 -0500843 for it in & _i . attrs { _visitor.visit_attribute(it) };
844 tokens_helper(_visitor, &(& _i . do_token).0);
845 tokens_helper(_visitor, &(& _i . catch_token).0);
846 _visitor.visit_block(& _i . block);
847}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800848# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800849pub fn visit_expr_closure<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprClosure) {
David Tolnay8c91b882017-12-28 23:04:32 -0500850 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnayefc96fb2017-12-29 02:03:15 -0500851 if let Some(ref it) = _i . capture { tokens_helper(_visitor, &(it).0) };
David Tolnay8c91b882017-12-28 23:04:32 -0500852 tokens_helper(_visitor, &(& _i . or1_token).0);
David Tolnay56080682018-01-06 14:01:52 -0800853 for el in Punctuated::pairs(& _i . inputs) { let it = el.value(); _visitor.visit_fn_arg(it) };
David Tolnay8c91b882017-12-28 23:04:32 -0500854 tokens_helper(_visitor, &(& _i . or2_token).0);
855 _visitor.visit_return_type(& _i . output);
856 _visitor.visit_expr(& * _i . body);
857}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800858# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800859pub fn visit_expr_continue<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprContinue) {
David Tolnay8c91b882017-12-28 23:04:32 -0500860 for it in & _i . attrs { _visitor.visit_attribute(it) };
861 tokens_helper(_visitor, &(& _i . continue_token).0);
862 if let Some(ref it) = _i . label { _visitor.visit_lifetime(it) };
863}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800864# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800865pub fn visit_expr_field<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprField) {
David Tolnay8c91b882017-12-28 23:04:32 -0500866 for it in & _i . attrs { _visitor.visit_attribute(it) };
867 _visitor.visit_expr(& * _i . base);
868 tokens_helper(_visitor, &(& _i . dot_token).0);
869 _visitor.visit_member(& _i . member);
870}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800871# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800872pub fn visit_expr_for_loop<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprForLoop) {
David Tolnay8c91b882017-12-28 23:04:32 -0500873 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaybcd498f2017-12-29 12:02:33 -0500874 if let Some(ref it) = _i . label { _visitor.visit_label(it) };
David Tolnay8c91b882017-12-28 23:04:32 -0500875 tokens_helper(_visitor, &(& _i . for_token).0);
876 _visitor.visit_pat(& * _i . pat);
877 tokens_helper(_visitor, &(& _i . in_token).0);
878 _visitor.visit_expr(& * _i . expr);
879 _visitor.visit_block(& _i . body);
880}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800881# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800882pub fn visit_expr_group<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprGroup) {
David Tolnay8c91b882017-12-28 23:04:32 -0500883 for it in & _i . attrs { _visitor.visit_attribute(it) };
884 tokens_helper(_visitor, &(& _i . group_token).0);
885 _visitor.visit_expr(& * _i . expr);
886}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800887# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800888pub fn visit_expr_if<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIf) {
David Tolnay8c91b882017-12-28 23:04:32 -0500889 for it in & _i . attrs { _visitor.visit_attribute(it) };
890 tokens_helper(_visitor, &(& _i . if_token).0);
891 _visitor.visit_expr(& * _i . cond);
David Tolnay2ccf32a2017-12-29 00:34:26 -0500892 _visitor.visit_block(& _i . then_branch);
893 if let Some(ref it) = _i . else_branch {
894 tokens_helper(_visitor, &(& ( it ) . 0).0);
895 _visitor.visit_expr(& * ( it ) . 1);
896 };
David Tolnay8c91b882017-12-28 23:04:32 -0500897}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800898# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800899pub fn visit_expr_if_let<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIfLet) {
David Tolnay8c91b882017-12-28 23:04:32 -0500900 for it in & _i . attrs { _visitor.visit_attribute(it) };
901 tokens_helper(_visitor, &(& _i . if_token).0);
902 tokens_helper(_visitor, &(& _i . let_token).0);
903 _visitor.visit_pat(& * _i . pat);
904 tokens_helper(_visitor, &(& _i . eq_token).0);
905 _visitor.visit_expr(& * _i . expr);
David Tolnay2ccf32a2017-12-29 00:34:26 -0500906 _visitor.visit_block(& _i . then_branch);
907 if let Some(ref it) = _i . else_branch {
908 tokens_helper(_visitor, &(& ( it ) . 0).0);
909 _visitor.visit_expr(& * ( it ) . 1);
910 };
David Tolnay8c91b882017-12-28 23:04:32 -0500911}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800912# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800913pub fn visit_expr_in_place<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprInPlace) {
David Tolnay8c91b882017-12-28 23:04:32 -0500914 for it in & _i . attrs { _visitor.visit_attribute(it) };
915 _visitor.visit_expr(& * _i . place);
David Tolnay8701a5c2017-12-28 23:31:10 -0500916 tokens_helper(_visitor, &(& _i . arrow_token).0);
David Tolnay8c91b882017-12-28 23:04:32 -0500917 _visitor.visit_expr(& * _i . value);
918}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800919# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800920pub fn visit_expr_index<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIndex) {
David Tolnay8c91b882017-12-28 23:04:32 -0500921 for it in & _i . attrs { _visitor.visit_attribute(it) };
922 _visitor.visit_expr(& * _i . expr);
923 tokens_helper(_visitor, &(& _i . bracket_token).0);
924 _visitor.visit_expr(& * _i . index);
925}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800926# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800927pub fn visit_expr_lit<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprLit) {
David Tolnay8c91b882017-12-28 23:04:32 -0500928 for it in & _i . attrs { _visitor.visit_attribute(it) };
929 _visitor.visit_lit(& _i . lit);
930}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800931# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800932pub fn visit_expr_loop<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprLoop) {
David Tolnay8c91b882017-12-28 23:04:32 -0500933 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaybcd498f2017-12-29 12:02:33 -0500934 if let Some(ref it) = _i . label { _visitor.visit_label(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500935 tokens_helper(_visitor, &(& _i . loop_token).0);
936 _visitor.visit_block(& _i . body);
Nika Layzell27726662017-10-24 23:16:35 -0400937}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800938# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800939pub fn visit_expr_macro<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprMacro) {
David Tolnay8c91b882017-12-28 23:04:32 -0500940 for it in & _i . attrs { _visitor.visit_attribute(it) };
941 _visitor.visit_macro(& _i . mac);
942}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800943# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800944pub fn visit_expr_match<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprMatch) {
David Tolnay8c91b882017-12-28 23:04:32 -0500945 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500946 tokens_helper(_visitor, &(& _i . match_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500947 _visitor.visit_expr(& * _i . expr);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500948 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500949 for it in & _i . arms { _visitor.visit_arm(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400950}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800951# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800952pub fn visit_expr_method_call<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprMethodCall) {
David Tolnay8c91b882017-12-28 23:04:32 -0500953 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay76418512017-12-28 23:47:47 -0500954 _visitor.visit_expr(& * _i . receiver);
David Tolnaycc0f0372017-12-28 19:11:04 -0500955 tokens_helper(_visitor, &(& _i . dot_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500956 _visitor.visit_ident(& _i . method);
David Tolnayd60cfec2017-12-29 00:21:38 -0500957 if let Some(ref it) = _i . turbofish { _visitor.visit_method_turbofish(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500958 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay56080682018-01-06 14:01:52 -0800959 for el in Punctuated::pairs(& _i . args) { let it = el.value(); _visitor.visit_expr(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400960}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800961# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800962pub fn visit_expr_paren<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprParen) {
David Tolnay8c91b882017-12-28 23:04:32 -0500963 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -0500964 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500965 _visitor.visit_expr(& * _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -0400966}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800967# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800968pub fn visit_expr_path<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprPath) {
David Tolnay8c91b882017-12-28 23:04:32 -0500969 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500970 if let Some(ref it) = _i . qself { _visitor.visit_qself(it) };
971 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -0400972}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800973# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800974pub fn visit_expr_range<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprRange) {
David Tolnay8c91b882017-12-28 23:04:32 -0500975 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a918742017-12-28 16:54:41 -0500976 if let Some(ref it) = _i . from { _visitor.visit_expr(& * * it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500977 _visitor.visit_range_limits(& _i . limits);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500978 if let Some(ref it) = _i . to { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -0400979}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800980# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800981pub fn visit_expr_repeat<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprRepeat) {
David Tolnay8c91b882017-12-28 23:04:32 -0500982 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -0500983 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500984 _visitor.visit_expr(& * _i . expr);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500985 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500986 _visitor.visit_expr(& * _i . amt);
Nika Layzell27726662017-10-24 23:16:35 -0400987}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800988# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800989pub fn visit_expr_return<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprReturn) {
David Tolnay8c91b882017-12-28 23:04:32 -0500990 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500991 tokens_helper(_visitor, &(& _i . return_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500992 if let Some(ref it) = _i . expr { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -0400993}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800994# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800995pub fn visit_expr_struct<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprStruct) {
David Tolnay8c91b882017-12-28 23:04:32 -0500996 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500997 _visitor.visit_path(& _i . path);
David Tolnay1e01f9c2017-12-28 20:16:19 -0500998 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay56080682018-01-06 14:01:52 -0800999 for el in Punctuated::pairs(& _i . fields) { let it = el.value(); _visitor.visit_field_value(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001000 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
1001 if let Some(ref it) = _i . rest { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -04001002}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001003# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001004pub fn visit_expr_try<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprTry) {
David Tolnay8c91b882017-12-28 23:04:32 -05001005 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a918742017-12-28 16:54:41 -05001006 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -05001007 tokens_helper(_visitor, &(& _i . question_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001008}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001009# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001010pub fn visit_expr_tuple<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprTuple) {
David Tolnay8c91b882017-12-28 23:04:32 -05001011 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -05001012 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay56080682018-01-06 14:01:52 -08001013 for el in Punctuated::pairs(& _i . elems) { let it = el.value(); _visitor.visit_expr(it) };
David Tolnay05362582017-12-26 01:33:57 -05001014}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001015# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001016pub fn visit_expr_type<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprType) {
David Tolnay8c91b882017-12-28 23:04:32 -05001017 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a918742017-12-28 16:54:41 -05001018 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -05001019 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001020 _visitor.visit_type(& * _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -04001021}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001022# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001023pub fn visit_expr_unary<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprUnary) {
David Tolnay8c91b882017-12-28 23:04:32 -05001024 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001025 _visitor.visit_un_op(& _i . op);
David Tolnay4a918742017-12-28 16:54:41 -05001026 _visitor.visit_expr(& * _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -04001027}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001028# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001029pub fn visit_expr_unsafe<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprUnsafe) {
David Tolnay8c91b882017-12-28 23:04:32 -05001030 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001031 tokens_helper(_visitor, &(& _i . unsafe_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001032 _visitor.visit_block(& _i . block);
Nika Layzell640832a2017-12-04 13:37:09 -05001033}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001034# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001035pub fn visit_expr_verbatim<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprVerbatim) {
David Tolnay2ae520a2017-12-29 11:19:50 -05001036 // Skipped field _i . tts;
1037}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001038# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001039pub fn visit_expr_while<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprWhile) {
David Tolnay8c91b882017-12-28 23:04:32 -05001040 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaybcd498f2017-12-29 12:02:33 -05001041 if let Some(ref it) = _i . label { _visitor.visit_label(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001042 tokens_helper(_visitor, &(& _i . while_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001043 _visitor.visit_expr(& * _i . cond);
1044 _visitor.visit_block(& _i . body);
Nika Layzell27726662017-10-24 23:16:35 -04001045}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001046# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001047pub fn visit_expr_while_let<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprWhileLet) {
David Tolnay8c91b882017-12-28 23:04:32 -05001048 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaybcd498f2017-12-29 12:02:33 -05001049 if let Some(ref it) = _i . label { _visitor.visit_label(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001050 tokens_helper(_visitor, &(& _i . while_token).0);
1051 tokens_helper(_visitor, &(& _i . let_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001052 _visitor.visit_pat(& * _i . pat);
David Tolnaycc0f0372017-12-28 19:11:04 -05001053 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001054 _visitor.visit_expr(& * _i . expr);
1055 _visitor.visit_block(& _i . body);
Nika Layzell27726662017-10-24 23:16:35 -04001056}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001057# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001058pub fn visit_expr_yield<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprYield) {
David Tolnay8c91b882017-12-28 23:04:32 -05001059 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001060 tokens_helper(_visitor, &(& _i . yield_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001061 if let Some(ref it) = _i . expr { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -04001062}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001063# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001064pub fn visit_field<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Field) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001065 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001066 _visitor.visit_visibility(& _i . vis);
1067 if let Some(ref it) = _i . ident { _visitor.visit_ident(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001068 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001069 _visitor.visit_type(& _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -04001070}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001071# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001072pub fn visit_field_pat<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldPat) {
David Tolnay4a3f59a2017-12-28 21:21:12 -05001073 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay85b69a42017-12-27 20:43:10 -05001074 _visitor.visit_member(& _i . member);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001075 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a918742017-12-28 16:54:41 -05001076 _visitor.visit_pat(& * _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001077}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001078# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001079pub fn visit_field_value<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldValue) {
David Tolnay85b69a42017-12-27 20:43:10 -05001080 for it in & _i . attrs { _visitor.visit_attribute(it) };
1081 _visitor.visit_member(& _i . member);
David Tolnaycc0f0372017-12-28 19:11:04 -05001082 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001083 _visitor.visit_expr(& _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -04001084}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001085# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001086pub fn visit_fields<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Fields) {
David Tolnaye3d41b72017-12-31 15:24:00 -05001087 match *_i {
1088 Fields::Named(ref _binding_0, ) => {
1089 _visitor.visit_fields_named(_binding_0);
1090 }
1091 Fields::Unnamed(ref _binding_0, ) => {
1092 _visitor.visit_fields_unnamed(_binding_0);
1093 }
1094 Fields::Unit => { }
1095 }
1096}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001097# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001098pub fn visit_fields_named<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldsNamed) {
David Tolnaye3d41b72017-12-31 15:24:00 -05001099 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay56080682018-01-06 14:01:52 -08001100 for el in Punctuated::pairs(& _i . named) { let it = el.value(); _visitor.visit_field(it) };
David Tolnaye3d41b72017-12-31 15:24:00 -05001101}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001102# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001103pub fn visit_fields_unnamed<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldsUnnamed) {
David Tolnaye3d41b72017-12-31 15:24:00 -05001104 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay56080682018-01-06 14:01:52 -08001105 for el in Punctuated::pairs(& _i . unnamed) { let it = el.value(); _visitor.visit_field(it) };
David Tolnaye3d41b72017-12-31 15:24:00 -05001106}
Nika Layzell27726662017-10-24 23:16:35 -04001107# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001108pub fn visit_file<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast File) {
Nika Layzell27726662017-10-24 23:16:35 -04001109 // Skipped field _i . shebang;
David Tolnayf0d63bf2017-12-26 12:29:47 -05001110 for it in & _i . attrs { _visitor.visit_attribute(it) };
1111 for it in & _i . items { _visitor.visit_item(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001112}
1113# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001114pub fn visit_fn_arg<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FnArg) {
Nika Layzell27726662017-10-24 23:16:35 -04001115 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001116 FnArg::SelfRef(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001117 _visitor.visit_arg_self_ref(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001118 }
David Tolnay6702ade2017-12-30 23:38:15 -05001119 FnArg::SelfValue(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001120 _visitor.visit_arg_self(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001121 }
David Tolnay6702ade2017-12-30 23:38:15 -05001122 FnArg::Captured(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001123 _visitor.visit_arg_captured(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001124 }
David Tolnay6702ade2017-12-30 23:38:15 -05001125 FnArg::Inferred(ref _binding_0, ) => {
David Tolnay80ed55f2017-12-27 22:54:40 -05001126 _visitor.visit_pat(_binding_0);
1127 }
David Tolnay6702ade2017-12-30 23:38:15 -05001128 FnArg::Ignored(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001129 _visitor.visit_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001130 }
1131 }
1132}
1133# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001134pub fn visit_fn_decl<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FnDecl) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001135 tokens_helper(_visitor, &(& _i . fn_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001136 _visitor.visit_generics(& _i . generics);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001137 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay56080682018-01-06 14:01:52 -08001138 for el in Punctuated::pairs(& _i . inputs) { let it = el.value(); _visitor.visit_fn_arg(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001139 if let Some(ref it) = _i . variadic { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001140 _visitor.visit_return_type(& _i . output);
Nika Layzell27726662017-10-24 23:16:35 -04001141}
1142# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001143pub fn visit_foreign_item<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItem) {
Nika Layzell27726662017-10-24 23:16:35 -04001144 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001145 ForeignItem::Fn(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001146 _visitor.visit_foreign_item_fn(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001147 }
David Tolnay6702ade2017-12-30 23:38:15 -05001148 ForeignItem::Static(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001149 _visitor.visit_foreign_item_static(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001150 }
David Tolnay6702ade2017-12-30 23:38:15 -05001151 ForeignItem::Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001152 _visitor.visit_foreign_item_type(_binding_0);
David Tolnay199bcbb2017-11-12 10:33:52 -08001153 }
David Tolnay6702ade2017-12-30 23:38:15 -05001154 ForeignItem::Verbatim(ref _binding_0, ) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05001155 _visitor.visit_foreign_item_verbatim(_binding_0);
1156 }
Nika Layzell27726662017-10-24 23:16:35 -04001157 }
1158}
1159# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001160pub fn visit_foreign_item_fn<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemFn) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001161 for it in & _i . attrs { _visitor.visit_attribute(it) };
1162 _visitor.visit_visibility(& _i . vis);
1163 _visitor.visit_ident(& _i . ident);
David Tolnay4a918742017-12-28 16:54:41 -05001164 _visitor.visit_fn_decl(& * _i . decl);
David Tolnaycc0f0372017-12-28 19:11:04 -05001165 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay8894f602017-11-11 12:11:04 -08001166}
1167# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001168pub fn visit_foreign_item_static<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemStatic) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001169 for it in & _i . attrs { _visitor.visit_attribute(it) };
1170 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001171 tokens_helper(_visitor, &(& _i . static_token).0);
David Tolnay24237fb2017-12-29 02:15:26 -05001172 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001173 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001174 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001175 _visitor.visit_type(& * _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001176 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001177}
David Tolnay199bcbb2017-11-12 10:33:52 -08001178# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001179pub fn visit_foreign_item_type<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001180 for it in & _i . attrs { _visitor.visit_attribute(it) };
1181 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001182 tokens_helper(_visitor, &(& _i . type_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001183 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001184 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay199bcbb2017-11-12 10:33:52 -08001185}
David Tolnay2ae520a2017-12-29 11:19:50 -05001186# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001187pub fn visit_foreign_item_verbatim<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemVerbatim) {
David Tolnay2ae520a2017-12-29 11:19:50 -05001188 // Skipped field _i . tts;
1189}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001190# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001191pub fn visit_generic_argument<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast GenericArgument) {
Nika Layzell357885a2017-12-04 15:47:07 -05001192 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001193 GenericArgument::Lifetime(ref _binding_0, ) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05001194 _visitor.visit_lifetime(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001195 }
David Tolnay6702ade2017-12-30 23:38:15 -05001196 GenericArgument::Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001197 _visitor.visit_type(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001198 }
David Tolnay6702ade2017-12-30 23:38:15 -05001199 GenericArgument::Binding(ref _binding_0, ) => {
David Tolnay506e43a2017-12-29 11:34:36 -05001200 _visitor.visit_binding(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001201 }
David Tolnay6702ade2017-12-30 23:38:15 -05001202 GenericArgument::Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001203 _visitor.visit_expr(_binding_0);
Nika Layzellc680e612017-12-04 19:07:20 -05001204 }
Nika Layzell357885a2017-12-04 15:47:07 -05001205 }
1206}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001207# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001208pub fn visit_generic_method_argument<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast GenericMethodArgument) {
David Tolnayd60cfec2017-12-29 00:21:38 -05001209 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001210 GenericMethodArgument::Type(ref _binding_0, ) => {
David Tolnayd60cfec2017-12-29 00:21:38 -05001211 _visitor.visit_type(_binding_0);
1212 }
David Tolnay6702ade2017-12-30 23:38:15 -05001213 GenericMethodArgument::Const(ref _binding_0, ) => {
David Tolnayd60cfec2017-12-29 00:21:38 -05001214 _visitor.visit_expr(_binding_0);
1215 }
1216 }
1217}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001218# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001219pub fn visit_generic_param<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast GenericParam) {
David Tolnayc2f1aba2017-11-12 20:29:22 -08001220 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001221 GenericParam::Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001222 _visitor.visit_type_param(_binding_0);
David Tolnayc2f1aba2017-11-12 20:29:22 -08001223 }
David Tolnay517f3692018-01-01 20:17:23 -08001224 GenericParam::Lifetime(ref _binding_0, ) => {
1225 _visitor.visit_lifetime_def(_binding_0);
1226 }
David Tolnay6702ade2017-12-30 23:38:15 -05001227 GenericParam::Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001228 _visitor.visit_const_param(_binding_0);
Nika Layzellf1fdc0b2017-12-04 19:58:32 -05001229 }
David Tolnayc2f1aba2017-11-12 20:29:22 -08001230 }
1231}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001232# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001233pub fn visit_generics<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Generics) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001234 if let Some(ref it) = _i . lt_token { tokens_helper(_visitor, &(it).0) };
David Tolnay56080682018-01-06 14:01:52 -08001235 for el in Punctuated::pairs(& _i . params) { let it = el.value(); _visitor.visit_generic_param(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001236 if let Some(ref it) = _i . gt_token { tokens_helper(_visitor, &(it).0) };
David Tolnayac997dd2017-12-27 23:18:22 -05001237 if let Some(ref it) = _i . where_clause { _visitor.visit_where_clause(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001238}
Nika Layzellefb83ba2017-12-19 18:23:55 -05001239
David Tolnay4b4c4b62018-01-06 13:48:05 -08001240pub fn visit_ident<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Ident) {
David Tolnay9a93bfe2017-12-31 17:23:00 -05001241 // Skipped field _i . term;
David Tolnay4ba63a02017-12-28 15:53:05 -05001242 _visitor.visit_span(& _i . span);
Nika Layzellefb83ba2017-12-19 18:23:55 -05001243}
Nika Layzell27726662017-10-24 23:16:35 -04001244# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001245pub fn visit_impl_item<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItem) {
Nika Layzell27726662017-10-24 23:16:35 -04001246 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001247 ImplItem::Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001248 _visitor.visit_impl_item_const(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001249 }
David Tolnay6702ade2017-12-30 23:38:15 -05001250 ImplItem::Method(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001251 _visitor.visit_impl_item_method(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001252 }
David Tolnay6702ade2017-12-30 23:38:15 -05001253 ImplItem::Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001254 _visitor.visit_impl_item_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001255 }
David Tolnay6702ade2017-12-30 23:38:15 -05001256 ImplItem::Macro(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001257 _visitor.visit_impl_item_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001258 }
David Tolnay6702ade2017-12-30 23:38:15 -05001259 ImplItem::Verbatim(ref _binding_0, ) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05001260 _visitor.visit_impl_item_verbatim(_binding_0);
1261 }
Nika Layzell27726662017-10-24 23:16:35 -04001262 }
1263}
1264# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001265pub fn visit_impl_item_const<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemConst) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001266 for it in & _i . attrs { _visitor.visit_attribute(it) };
1267 _visitor.visit_visibility(& _i . vis);
David Tolnay360a6342017-12-29 02:22:11 -05001268 if let Some(ref it) = _i . defaultness { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001269 tokens_helper(_visitor, &(& _i . const_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001270 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001271 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001272 _visitor.visit_type(& _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001273 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001274 _visitor.visit_expr(& _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -05001275 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay857628c2017-11-11 12:25:31 -08001276}
1277# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001278pub fn visit_impl_item_macro<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemMacro) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001279 for it in & _i . attrs { _visitor.visit_attribute(it) };
1280 _visitor.visit_macro(& _i . mac);
David Tolnaycc0f0372017-12-28 19:11:04 -05001281 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
David Tolnay857628c2017-11-11 12:25:31 -08001282}
1283# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001284pub fn visit_impl_item_method<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemMethod) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001285 for it in & _i . attrs { _visitor.visit_attribute(it) };
1286 _visitor.visit_visibility(& _i . vis);
David Tolnay360a6342017-12-29 02:22:11 -05001287 if let Some(ref it) = _i . defaultness { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001288 _visitor.visit_method_sig(& _i . sig);
1289 _visitor.visit_block(& _i . block);
Nika Layzell27726662017-10-24 23:16:35 -04001290}
1291# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001292pub fn visit_impl_item_type<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001293 for it in & _i . attrs { _visitor.visit_attribute(it) };
1294 _visitor.visit_visibility(& _i . vis);
David Tolnay360a6342017-12-29 02:22:11 -05001295 if let Some(ref it) = _i . defaultness { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001296 tokens_helper(_visitor, &(& _i . type_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001297 _visitor.visit_ident(& _i . ident);
1298 _visitor.visit_generics(& _i . generics);
David Tolnaycc0f0372017-12-28 19:11:04 -05001299 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001300 _visitor.visit_type(& _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001301 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001302}
David Tolnay2ae520a2017-12-29 11:19:50 -05001303# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001304pub fn visit_impl_item_verbatim<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemVerbatim) {
David Tolnay2ae520a2017-12-29 11:19:50 -05001305 // Skipped field _i . tts;
1306}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001307# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001308pub fn visit_index<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Index) {
David Tolnay85b69a42017-12-27 20:43:10 -05001309 // Skipped field _i . index;
1310 _visitor.visit_span(& _i . span);
1311}
1312# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001313pub fn visit_item<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Item) {
Nika Layzell27726662017-10-24 23:16:35 -04001314 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001315 Item::ExternCrate(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001316 _visitor.visit_item_extern_crate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001317 }
David Tolnay6702ade2017-12-30 23:38:15 -05001318 Item::Use(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001319 _visitor.visit_item_use(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001320 }
David Tolnay6702ade2017-12-30 23:38:15 -05001321 Item::Static(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001322 _visitor.visit_item_static(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001323 }
David Tolnay6702ade2017-12-30 23:38:15 -05001324 Item::Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001325 _visitor.visit_item_const(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001326 }
David Tolnay6702ade2017-12-30 23:38:15 -05001327 Item::Fn(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001328 _visitor.visit_item_fn(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001329 }
David Tolnay6702ade2017-12-30 23:38:15 -05001330 Item::Mod(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001331 _visitor.visit_item_mod(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001332 }
David Tolnay6702ade2017-12-30 23:38:15 -05001333 Item::ForeignMod(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001334 _visitor.visit_item_foreign_mod(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001335 }
David Tolnay6702ade2017-12-30 23:38:15 -05001336 Item::Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001337 _visitor.visit_item_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001338 }
David Tolnay6702ade2017-12-30 23:38:15 -05001339 Item::Struct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001340 _visitor.visit_item_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001341 }
David Tolnaye3d41b72017-12-31 15:24:00 -05001342 Item::Enum(ref _binding_0, ) => {
1343 _visitor.visit_item_enum(_binding_0);
1344 }
David Tolnay6702ade2017-12-30 23:38:15 -05001345 Item::Union(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001346 _visitor.visit_item_union(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001347 }
David Tolnay6702ade2017-12-30 23:38:15 -05001348 Item::Trait(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001349 _visitor.visit_item_trait(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001350 }
David Tolnay6702ade2017-12-30 23:38:15 -05001351 Item::Impl(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001352 _visitor.visit_item_impl(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001353 }
David Tolnay6702ade2017-12-30 23:38:15 -05001354 Item::Macro(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001355 _visitor.visit_item_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001356 }
David Tolnay6702ade2017-12-30 23:38:15 -05001357 Item::Macro2(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001358 _visitor.visit_item_macro2(_binding_0);
David Tolnay500d8322017-12-18 00:32:51 -08001359 }
David Tolnay6702ade2017-12-30 23:38:15 -05001360 Item::Verbatim(ref _binding_0, ) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05001361 _visitor.visit_item_verbatim(_binding_0);
1362 }
Nika Layzell27726662017-10-24 23:16:35 -04001363 }
1364}
1365# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001366pub fn visit_item_const<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemConst) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001367 for it in & _i . attrs { _visitor.visit_attribute(it) };
1368 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001369 tokens_helper(_visitor, &(& _i . const_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001370 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001371 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001372 _visitor.visit_type(& * _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001373 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001374 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -05001375 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnayc6b55bc2017-11-09 22:48:38 -08001376}
1377# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001378pub fn visit_item_enum<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemEnum) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001379 for it in & _i . attrs { _visitor.visit_attribute(it) };
1380 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001381 tokens_helper(_visitor, &(& _i . enum_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001382 _visitor.visit_ident(& _i . ident);
1383 _visitor.visit_generics(& _i . generics);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001384 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay56080682018-01-06 14:01:52 -08001385 for el in Punctuated::pairs(& _i . variants) { let it = el.value(); _visitor.visit_variant(it) };
David Tolnayc6b55bc2017-11-09 22:48:38 -08001386}
1387# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001388pub fn visit_item_extern_crate<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemExternCrate) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001389 for it in & _i . attrs { _visitor.visit_attribute(it) };
1390 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001391 tokens_helper(_visitor, &(& _i . extern_token).0);
1392 tokens_helper(_visitor, &(& _i . crate_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001393 _visitor.visit_ident(& _i . ident);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001394 if let Some(ref it) = _i . rename {
David Tolnaycc0f0372017-12-28 19:11:04 -05001395 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001396 _visitor.visit_ident(& ( it ) . 1);
1397 };
David Tolnaycc0f0372017-12-28 19:11:04 -05001398 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnayc6b55bc2017-11-09 22:48:38 -08001399}
1400# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001401pub fn visit_item_fn<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemFn) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001402 for it in & _i . attrs { _visitor.visit_attribute(it) };
1403 _visitor.visit_visibility(& _i . vis);
David Tolnay360a6342017-12-29 02:22:11 -05001404 if let Some(ref it) = _i . constness { tokens_helper(_visitor, &(it).0) };
David Tolnay9b258702017-12-29 02:24:41 -05001405 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001406 if let Some(ref it) = _i . abi { _visitor.visit_abi(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001407 _visitor.visit_ident(& _i . ident);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001408 _visitor.visit_fn_decl(& * _i . decl);
David Tolnay4a918742017-12-28 16:54:41 -05001409 _visitor.visit_block(& * _i . block);
David Tolnayc6b55bc2017-11-09 22:48:38 -08001410}
1411# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001412pub fn visit_item_foreign_mod<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemForeignMod) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001413 for it in & _i . attrs { _visitor.visit_attribute(it) };
1414 _visitor.visit_abi(& _i . abi);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001415 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001416 for it in & _i . items { _visitor.visit_foreign_item(it) };
David Tolnayc6b55bc2017-11-09 22:48:38 -08001417}
1418# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001419pub fn visit_item_impl<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemImpl) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001420 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay360a6342017-12-29 02:22:11 -05001421 if let Some(ref it) = _i . defaultness { tokens_helper(_visitor, &(it).0) };
David Tolnay9b258702017-12-29 02:24:41 -05001422 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001423 tokens_helper(_visitor, &(& _i . impl_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001424 _visitor.visit_generics(& _i . generics);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001425 if let Some(ref it) = _i . trait_ {
David Tolnay360a6342017-12-29 02:22:11 -05001426 if let Some(ref it) = ( it ) . 0 { tokens_helper(_visitor, &(it).0) };
David Tolnay5c4c0b52017-12-28 17:58:54 -05001427 _visitor.visit_path(& ( it ) . 1);
David Tolnaycc0f0372017-12-28 19:11:04 -05001428 tokens_helper(_visitor, &(& ( it ) . 2).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001429 };
David Tolnay4a918742017-12-28 16:54:41 -05001430 _visitor.visit_type(& * _i . self_ty);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001431 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001432 for it in & _i . items { _visitor.visit_impl_item(it) };
David Tolnayc6b55bc2017-11-09 22:48:38 -08001433}
1434# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001435pub fn visit_item_macro<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMacro) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001436 for it in & _i . attrs { _visitor.visit_attribute(it) };
1437 if let Some(ref it) = _i . ident { _visitor.visit_ident(it) };
1438 _visitor.visit_macro(& _i . mac);
David Tolnaycc0f0372017-12-28 19:11:04 -05001439 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
David Tolnayc6b55bc2017-11-09 22:48:38 -08001440}
1441# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001442pub fn visit_item_macro2<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMacro2) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001443 for it in & _i . attrs { _visitor.visit_attribute(it) };
1444 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001445 tokens_helper(_visitor, &(& _i . macro_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001446 _visitor.visit_ident(& _i . ident);
David Tolnayab919512017-12-30 23:31:51 -05001447 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay500d8322017-12-18 00:32:51 -08001448 // Skipped field _i . args;
David Tolnayab919512017-12-30 23:31:51 -05001449 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay500d8322017-12-18 00:32:51 -08001450 // Skipped field _i . body;
1451}
1452# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001453pub fn visit_item_mod<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMod) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001454 for it in & _i . attrs { _visitor.visit_attribute(it) };
1455 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001456 tokens_helper(_visitor, &(& _i . mod_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001457 _visitor.visit_ident(& _i . ident);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001458 if let Some(ref it) = _i . content {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001459 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001460 for it in & ( it ) . 1 { _visitor.visit_item(it) };
1461 };
David Tolnaycc0f0372017-12-28 19:11:04 -05001462 if let Some(ref it) = _i . semi { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04001463}
1464# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001465pub fn visit_item_static<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemStatic) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001466 for it in & _i . attrs { _visitor.visit_attribute(it) };
1467 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001468 tokens_helper(_visitor, &(& _i . static_token).0);
David Tolnay24237fb2017-12-29 02:15:26 -05001469 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001470 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001471 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001472 _visitor.visit_type(& * _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001473 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001474 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -05001475 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001476}
1477# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001478pub fn visit_item_struct<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemStruct) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001479 for it in & _i . attrs { _visitor.visit_attribute(it) };
1480 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001481 tokens_helper(_visitor, &(& _i . struct_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001482 _visitor.visit_ident(& _i . ident);
1483 _visitor.visit_generics(& _i . generics);
David Tolnaye3d41b72017-12-31 15:24:00 -05001484 _visitor.visit_fields(& _i . fields);
David Tolnaycc0f0372017-12-28 19:11:04 -05001485 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04001486}
1487# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001488pub fn visit_item_trait<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemTrait) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001489 for it in & _i . attrs { _visitor.visit_attribute(it) };
1490 _visitor.visit_visibility(& _i . vis);
David Tolnay9b258702017-12-29 02:24:41 -05001491 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001492 if let Some(ref it) = _i . auto_token { tokens_helper(_visitor, &(it).0) };
1493 tokens_helper(_visitor, &(& _i . trait_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001494 _visitor.visit_ident(& _i . ident);
1495 _visitor.visit_generics(& _i . generics);
David Tolnaycc0f0372017-12-28 19:11:04 -05001496 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay56080682018-01-06 14:01:52 -08001497 for el in Punctuated::pairs(& _i . supertraits) { let it = el.value(); _visitor.visit_type_param_bound(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -05001498 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001499 for it in & _i . items { _visitor.visit_trait_item(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001500}
1501# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001502pub fn visit_item_type<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001503 for it in & _i . attrs { _visitor.visit_attribute(it) };
1504 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001505 tokens_helper(_visitor, &(& _i . type_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001506 _visitor.visit_ident(& _i . ident);
1507 _visitor.visit_generics(& _i . generics);
David Tolnaycc0f0372017-12-28 19:11:04 -05001508 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001509 _visitor.visit_type(& * _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001510 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001511}
1512# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001513pub fn visit_item_union<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemUnion) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001514 for it in & _i . attrs { _visitor.visit_attribute(it) };
1515 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001516 tokens_helper(_visitor, &(& _i . union_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001517 _visitor.visit_ident(& _i . ident);
1518 _visitor.visit_generics(& _i . generics);
David Tolnaye3d41b72017-12-31 15:24:00 -05001519 _visitor.visit_fields_named(& _i . fields);
Nika Layzell27726662017-10-24 23:16:35 -04001520}
1521# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001522pub fn visit_item_use<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemUse) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001523 for it in & _i . attrs { _visitor.visit_attribute(it) };
1524 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001525 tokens_helper(_visitor, &(& _i . use_token).0);
1526 if let Some(ref it) = _i . leading_colon { tokens_helper(_visitor, &(it).0) };
David Tolnay56080682018-01-06 14:01:52 -08001527 for el in Punctuated::pairs(& _i . prefix) { let it = el.value(); _visitor.visit_ident(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001528 _visitor.visit_use_tree(& _i . tree);
David Tolnaycc0f0372017-12-28 19:11:04 -05001529 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001530}
David Tolnay2ae520a2017-12-29 11:19:50 -05001531# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001532pub fn visit_item_verbatim<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemVerbatim) {
David Tolnay2ae520a2017-12-29 11:19:50 -05001533 // Skipped field _i . tts;
1534}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001535# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001536pub fn visit_label<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Label) {
David Tolnaybcd498f2017-12-29 12:02:33 -05001537 _visitor.visit_lifetime(& _i . name);
1538 tokens_helper(_visitor, &(& _i . colon_token).0);
1539}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001540# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001541pub fn visit_lifetime<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Lifetime) {
David Tolnay9a93bfe2017-12-31 17:23:00 -05001542 // Skipped field _i . term;
David Tolnay4ba63a02017-12-28 15:53:05 -05001543 _visitor.visit_span(& _i . span);
1544}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001545# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001546pub fn visit_lifetime_def<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LifetimeDef) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001547 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4ba63a02017-12-28 15:53:05 -05001548 _visitor.visit_lifetime(& _i . lifetime);
David Tolnaycc0f0372017-12-28 19:11:04 -05001549 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay56080682018-01-06 14:01:52 -08001550 for el in Punctuated::pairs(& _i . bounds) { let it = el.value(); _visitor.visit_lifetime(it) };
David Tolnay4ba63a02017-12-28 15:53:05 -05001551}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001552# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001553pub fn visit_lit<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Lit) {
David Tolnay360efd22018-01-04 23:35:26 -08001554 match *_i {
1555 Lit::Str(ref _binding_0, ) => {
1556 _visitor.visit_lit_str(_binding_0);
1557 }
1558 Lit::ByteStr(ref _binding_0, ) => {
1559 _visitor.visit_lit_byte_str(_binding_0);
1560 }
1561 Lit::Byte(ref _binding_0, ) => {
1562 _visitor.visit_lit_byte(_binding_0);
1563 }
1564 Lit::Char(ref _binding_0, ) => {
1565 _visitor.visit_lit_char(_binding_0);
1566 }
1567 Lit::Int(ref _binding_0, ) => {
1568 _visitor.visit_lit_int(_binding_0);
1569 }
1570 Lit::Float(ref _binding_0, ) => {
1571 _visitor.visit_lit_float(_binding_0);
1572 }
1573 Lit::Bool(ref _binding_0, ) => {
1574 _visitor.visit_lit_bool(_binding_0);
1575 }
1576 Lit::Verbatim(ref _binding_0, ) => {
1577 _visitor.visit_lit_verbatim(_binding_0);
1578 }
1579 }
1580}
1581# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001582pub fn visit_lit_bool<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitBool) {
David Tolnay4ba63a02017-12-28 15:53:05 -05001583 // Skipped field _i . value;
1584 _visitor.visit_span(& _i . span);
Nika Layzell27726662017-10-24 23:16:35 -04001585}
David Tolnay360efd22018-01-04 23:35:26 -08001586# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001587pub fn visit_lit_byte<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitByte) {
David Tolnay360efd22018-01-04 23:35:26 -08001588 // Skipped field _i . token;
1589 _visitor.visit_span(& _i . span);
1590}
1591# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001592pub fn visit_lit_byte_str<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitByteStr) {
David Tolnay360efd22018-01-04 23:35:26 -08001593 // Skipped field _i . token;
1594 _visitor.visit_span(& _i . span);
1595}
1596# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001597pub fn visit_lit_char<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitChar) {
David Tolnay360efd22018-01-04 23:35:26 -08001598 // Skipped field _i . token;
1599 _visitor.visit_span(& _i . span);
1600}
1601# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001602pub fn visit_lit_float<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitFloat) {
David Tolnay360efd22018-01-04 23:35:26 -08001603 // Skipped field _i . token;
1604 _visitor.visit_span(& _i . span);
1605}
1606# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001607pub fn visit_lit_int<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitInt) {
David Tolnay360efd22018-01-04 23:35:26 -08001608 // Skipped field _i . token;
1609 _visitor.visit_span(& _i . span);
1610}
1611# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001612pub fn visit_lit_str<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitStr) {
David Tolnay360efd22018-01-04 23:35:26 -08001613 // Skipped field _i . token;
1614 _visitor.visit_span(& _i . span);
1615}
1616# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001617pub fn visit_lit_verbatim<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitVerbatim) {
David Tolnay360efd22018-01-04 23:35:26 -08001618 // Skipped field _i . token;
1619 _visitor.visit_span(& _i . span);
1620}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001621# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001622pub fn visit_local<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Local) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001623 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001624 tokens_helper(_visitor, &(& _i . let_token).0);
1625 _visitor.visit_pat(& * _i . pat);
David Tolnay8b4d3022017-12-29 12:11:10 -05001626 if let Some(ref it) = _i . ty {
1627 tokens_helper(_visitor, &(& ( it ) . 0).0);
1628 _visitor.visit_type(& * ( it ) . 1);
1629 };
1630 if let Some(ref it) = _i . init {
1631 tokens_helper(_visitor, &(& ( it ) . 0).0);
1632 _visitor.visit_expr(& * ( it ) . 1);
1633 };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001634 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001635}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001636# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001637pub fn visit_macro<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Macro) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001638 _visitor.visit_path(& _i . path);
David Tolnaycc0f0372017-12-28 19:11:04 -05001639 tokens_helper(_visitor, &(& _i . bang_token).0);
David Tolnayab919512017-12-30 23:31:51 -05001640 _visitor.visit_macro_delimiter(& _i . delimiter);
1641 // Skipped field _i . tts;
1642}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001643# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001644pub fn visit_macro_delimiter<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MacroDelimiter) {
David Tolnayab919512017-12-30 23:31:51 -05001645 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001646 MacroDelimiter::Paren(ref _binding_0, ) => {
David Tolnayab919512017-12-30 23:31:51 -05001647 tokens_helper(_visitor, &(_binding_0).0);
1648 }
David Tolnay6702ade2017-12-30 23:38:15 -05001649 MacroDelimiter::Brace(ref _binding_0, ) => {
David Tolnayab919512017-12-30 23:31:51 -05001650 tokens_helper(_visitor, &(_binding_0).0);
1651 }
David Tolnay6702ade2017-12-30 23:38:15 -05001652 MacroDelimiter::Bracket(ref _binding_0, ) => {
David Tolnayab919512017-12-30 23:31:51 -05001653 tokens_helper(_visitor, &(_binding_0).0);
1654 }
1655 }
David Tolnaydecf28d2017-11-11 11:56:45 -08001656}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001657# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001658pub fn visit_member<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Member) {
David Tolnay85b69a42017-12-27 20:43:10 -05001659 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001660 Member::Named(ref _binding_0, ) => {
David Tolnay85b69a42017-12-27 20:43:10 -05001661 _visitor.visit_ident(_binding_0);
1662 }
David Tolnay6702ade2017-12-30 23:38:15 -05001663 Member::Unnamed(ref _binding_0, ) => {
David Tolnay85b69a42017-12-27 20:43:10 -05001664 _visitor.visit_index(_binding_0);
1665 }
1666 }
1667}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001668# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001669pub fn visit_meta_item<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MetaItem) {
Nika Layzell27726662017-10-24 23:16:35 -04001670 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001671 MetaItem::Term(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001672 _visitor.visit_ident(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001673 }
David Tolnay6702ade2017-12-30 23:38:15 -05001674 MetaItem::List(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001675 _visitor.visit_meta_item_list(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001676 }
David Tolnay6702ade2017-12-30 23:38:15 -05001677 MetaItem::NameValue(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001678 _visitor.visit_meta_name_value(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001679 }
1680 }
1681}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001682# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001683pub fn visit_meta_item_list<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MetaItemList) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001684 _visitor.visit_ident(& _i . ident);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001685 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay56080682018-01-06 14:01:52 -08001686 for el in Punctuated::pairs(& _i . nested) { let it = el.value(); _visitor.visit_nested_meta_item(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001687}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001688# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001689pub fn visit_meta_name_value<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MetaNameValue) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001690 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001691 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4ba63a02017-12-28 15:53:05 -05001692 _visitor.visit_lit(& _i . lit);
Nika Layzell27726662017-10-24 23:16:35 -04001693}
1694# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001695pub fn visit_method_sig<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MethodSig) {
David Tolnay360a6342017-12-29 02:22:11 -05001696 if let Some(ref it) = _i . constness { tokens_helper(_visitor, &(it).0) };
David Tolnay9b258702017-12-29 02:24:41 -05001697 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001698 if let Some(ref it) = _i . abi { _visitor.visit_abi(it) };
1699 _visitor.visit_ident(& _i . ident);
1700 _visitor.visit_fn_decl(& _i . decl);
Nika Layzell27726662017-10-24 23:16:35 -04001701}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001702# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001703pub fn visit_method_turbofish<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MethodTurbofish) {
David Tolnayd60cfec2017-12-29 00:21:38 -05001704 tokens_helper(_visitor, &(& _i . colon2_token).0);
1705 tokens_helper(_visitor, &(& _i . lt_token).0);
David Tolnay56080682018-01-06 14:01:52 -08001706 for el in Punctuated::pairs(& _i . args) { let it = el.value(); _visitor.visit_generic_method_argument(it) };
David Tolnayd60cfec2017-12-29 00:21:38 -05001707 tokens_helper(_visitor, &(& _i . gt_token).0);
1708}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001709# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001710pub fn visit_nested_meta_item<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast NestedMetaItem) {
Nika Layzell27726662017-10-24 23:16:35 -04001711 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001712 NestedMetaItem::MetaItem(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001713 _visitor.visit_meta_item(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001714 }
David Tolnay6702ade2017-12-30 23:38:15 -05001715 NestedMetaItem::Literal(ref _binding_0, ) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05001716 _visitor.visit_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001717 }
1718 }
1719}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001720# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001721pub fn visit_parenthesized_generic_arguments<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ParenthesizedGenericArguments) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001722 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay56080682018-01-06 14:01:52 -08001723 for el in Punctuated::pairs(& _i . inputs) { let it = el.value(); _visitor.visit_type(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001724 _visitor.visit_return_type(& _i . output);
Nika Layzell27726662017-10-24 23:16:35 -04001725}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001726# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001727pub fn visit_pat<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Pat) {
Nika Layzell27726662017-10-24 23:16:35 -04001728 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001729 Pat::Wild(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001730 _visitor.visit_pat_wild(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001731 }
David Tolnay6702ade2017-12-30 23:38:15 -05001732 Pat::Ident(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001733 _visitor.visit_pat_ident(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001734 }
David Tolnay6702ade2017-12-30 23:38:15 -05001735 Pat::Struct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001736 _visitor.visit_pat_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001737 }
David Tolnay6702ade2017-12-30 23:38:15 -05001738 Pat::TupleStruct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001739 _visitor.visit_pat_tuple_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001740 }
David Tolnay6702ade2017-12-30 23:38:15 -05001741 Pat::Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001742 _visitor.visit_pat_path(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001743 }
David Tolnay6702ade2017-12-30 23:38:15 -05001744 Pat::Tuple(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001745 _visitor.visit_pat_tuple(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001746 }
David Tolnay6702ade2017-12-30 23:38:15 -05001747 Pat::Box(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001748 _visitor.visit_pat_box(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001749 }
David Tolnay6702ade2017-12-30 23:38:15 -05001750 Pat::Ref(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001751 _visitor.visit_pat_ref(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001752 }
David Tolnay6702ade2017-12-30 23:38:15 -05001753 Pat::Lit(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001754 _visitor.visit_pat_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001755 }
David Tolnay6702ade2017-12-30 23:38:15 -05001756 Pat::Range(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001757 _visitor.visit_pat_range(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001758 }
David Tolnay6702ade2017-12-30 23:38:15 -05001759 Pat::Slice(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001760 _visitor.visit_pat_slice(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001761 }
David Tolnay6702ade2017-12-30 23:38:15 -05001762 Pat::Macro(ref _binding_0, ) => {
David Tolnay323279a2017-12-29 11:26:32 -05001763 _visitor.visit_pat_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001764 }
David Tolnay6702ade2017-12-30 23:38:15 -05001765 Pat::Verbatim(ref _binding_0, ) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05001766 _visitor.visit_pat_verbatim(_binding_0);
1767 }
Nika Layzell27726662017-10-24 23:16:35 -04001768 }
1769}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001770# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001771pub fn visit_pat_box<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatBox) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001772 tokens_helper(_visitor, &(& _i . box_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001773 _visitor.visit_pat(& * _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001774}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001775# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001776pub fn visit_pat_ident<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatIdent) {
David Tolnay24237fb2017-12-29 02:15:26 -05001777 if let Some(ref it) = _i . by_ref { tokens_helper(_visitor, &(it).0) };
1778 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001779 _visitor.visit_ident(& _i . ident);
David Tolnay8b4d3022017-12-29 12:11:10 -05001780 if let Some(ref it) = _i . subpat {
1781 tokens_helper(_visitor, &(& ( it ) . 0).0);
1782 _visitor.visit_pat(& * ( it ) . 1);
1783 };
Nika Layzell27726662017-10-24 23:16:35 -04001784}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001785# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001786pub fn visit_pat_lit<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatLit) {
David Tolnay4a918742017-12-28 16:54:41 -05001787 _visitor.visit_expr(& * _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -04001788}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001789# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001790pub fn visit_pat_macro<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatMacro) {
David Tolnay323279a2017-12-29 11:26:32 -05001791 _visitor.visit_macro(& _i . mac);
1792}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001793# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001794pub fn visit_pat_path<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatPath) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001795 if let Some(ref it) = _i . qself { _visitor.visit_qself(it) };
1796 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -04001797}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001798# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001799pub fn visit_pat_range<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatRange) {
David Tolnay4a918742017-12-28 16:54:41 -05001800 _visitor.visit_expr(& * _i . lo);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001801 _visitor.visit_range_limits(& _i . limits);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001802 _visitor.visit_expr(& * _i . hi);
Nika Layzell27726662017-10-24 23:16:35 -04001803}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001804# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001805pub fn visit_pat_ref<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatRef) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001806 tokens_helper(_visitor, &(& _i . and_token).0);
David Tolnay24237fb2017-12-29 02:15:26 -05001807 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001808 _visitor.visit_pat(& * _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001809}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001810# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001811pub fn visit_pat_slice<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatSlice) {
David Tolnay4a3f59a2017-12-28 21:21:12 -05001812 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnay56080682018-01-06 14:01:52 -08001813 for el in Punctuated::pairs(& _i . front) { let it = el.value(); _visitor.visit_pat(it) };
David Tolnay4a918742017-12-28 16:54:41 -05001814 if let Some(ref it) = _i . middle { _visitor.visit_pat(& * * it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001815 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
David Tolnay41871922017-12-29 01:53:45 -05001816 if let Some(ref it) = _i . comma_token { tokens_helper(_visitor, &(it).0) };
David Tolnay56080682018-01-06 14:01:52 -08001817 for el in Punctuated::pairs(& _i . back) { let it = el.value(); _visitor.visit_pat(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001818}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001819# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001820pub fn visit_pat_struct<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatStruct) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001821 _visitor.visit_path(& _i . path);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001822 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay56080682018-01-06 14:01:52 -08001823 for el in Punctuated::pairs(& _i . fields) { let it = el.value(); _visitor.visit_field_pat(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001824 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04001825}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001826# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001827pub fn visit_pat_tuple<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatTuple) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001828 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay56080682018-01-06 14:01:52 -08001829 for el in Punctuated::pairs(& _i . front) { let it = el.value(); _visitor.visit_pat(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001830 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
David Tolnay41871922017-12-29 01:53:45 -05001831 if let Some(ref it) = _i . comma_token { tokens_helper(_visitor, &(it).0) };
David Tolnay56080682018-01-06 14:01:52 -08001832 for el in Punctuated::pairs(& _i . back) { let it = el.value(); _visitor.visit_pat(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001833}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001834# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001835pub fn visit_pat_tuple_struct<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatTupleStruct) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001836 _visitor.visit_path(& _i . path);
1837 _visitor.visit_pat_tuple(& _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001838}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001839# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001840pub fn visit_pat_verbatim<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatVerbatim) {
David Tolnay2ae520a2017-12-29 11:19:50 -05001841 // Skipped field _i . tts;
1842}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001843# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001844pub fn visit_pat_wild<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatWild) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001845 tokens_helper(_visitor, &(& _i . underscore_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001846}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001847# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001848pub fn visit_path<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Path) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001849 if let Some(ref it) = _i . leading_colon { tokens_helper(_visitor, &(it).0) };
David Tolnay56080682018-01-06 14:01:52 -08001850 for el in Punctuated::pairs(& _i . segments) { let it = el.value(); _visitor.visit_path_segment(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001851}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001852# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001853pub fn visit_path_arguments<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PathArguments) {
Nika Layzellc08227a2017-12-04 16:30:17 -05001854 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001855 PathArguments::None => { }
1856 PathArguments::AngleBracketed(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001857 _visitor.visit_angle_bracketed_generic_arguments(_binding_0);
Nika Layzellc08227a2017-12-04 16:30:17 -05001858 }
David Tolnay6702ade2017-12-30 23:38:15 -05001859 PathArguments::Parenthesized(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001860 _visitor.visit_parenthesized_generic_arguments(_binding_0);
Nika Layzellc08227a2017-12-04 16:30:17 -05001861 }
1862 }
1863}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001864# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001865pub fn visit_path_segment<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PathSegment) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001866 _visitor.visit_ident(& _i . ident);
1867 _visitor.visit_path_arguments(& _i . arguments);
Nika Layzell27726662017-10-24 23:16:35 -04001868}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001869# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001870pub fn visit_predicate_eq<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PredicateEq) {
David Tolnayd4add852018-01-01 20:13:24 -08001871 _visitor.visit_type(& _i . lhs_ty);
1872 tokens_helper(_visitor, &(& _i . eq_token).0);
1873 _visitor.visit_type(& _i . rhs_ty);
1874}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001875# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001876pub fn visit_predicate_lifetime<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PredicateLifetime) {
David Tolnayd4add852018-01-01 20:13:24 -08001877 _visitor.visit_lifetime(& _i . lifetime);
1878 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay56080682018-01-06 14:01:52 -08001879 for el in Punctuated::pairs(& _i . bounds) { let it = el.value(); _visitor.visit_lifetime(it) };
David Tolnayd4add852018-01-01 20:13:24 -08001880}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001881# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001882pub fn visit_predicate_type<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PredicateType) {
David Tolnay40fb8ce2018-01-02 10:53:46 -08001883 if let Some(ref it) = _i . lifetimes { _visitor.visit_bound_lifetimes(it) };
David Tolnayd4add852018-01-01 20:13:24 -08001884 _visitor.visit_type(& _i . bounded_ty);
1885 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay56080682018-01-06 14:01:52 -08001886 for el in Punctuated::pairs(& _i . bounds) { let it = el.value(); _visitor.visit_type_param_bound(it) };
David Tolnayd4add852018-01-01 20:13:24 -08001887}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001888# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001889pub fn visit_qself<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast QSelf) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001890 tokens_helper(_visitor, &(& _i . lt_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001891 _visitor.visit_type(& * _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -04001892 // Skipped field _i . position;
David Tolnaycc0f0372017-12-28 19:11:04 -05001893 if let Some(ref it) = _i . as_token { tokens_helper(_visitor, &(it).0) };
1894 tokens_helper(_visitor, &(& _i . gt_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001895}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001896# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001897pub fn visit_range_limits<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast RangeLimits) {
Nika Layzell27726662017-10-24 23:16:35 -04001898 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001899 RangeLimits::HalfOpen(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05001900 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04001901 }
David Tolnay6702ade2017-12-30 23:38:15 -05001902 RangeLimits::Closed(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05001903 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04001904 }
1905 }
1906}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001907# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001908pub fn visit_return_type<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ReturnType) {
David Tolnayf93b90d2017-11-11 19:21:26 -08001909 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001910 ReturnType::Default => { }
1911 ReturnType::Type(ref _binding_0, ref _binding_1, ) => {
David Tolnay4a3f59a2017-12-28 21:21:12 -05001912 tokens_helper(_visitor, &(_binding_0).0);
1913 _visitor.visit_type(& * * _binding_1);
David Tolnayf93b90d2017-11-11 19:21:26 -08001914 }
1915 }
1916}
Nika Layzellefb83ba2017-12-19 18:23:55 -05001917
David Tolnay4b4c4b62018-01-06 13:48:05 -08001918pub fn visit_span<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Span) {
Nika Layzellefb83ba2017-12-19 18:23:55 -05001919}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001920# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001921pub fn visit_stmt<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Stmt) {
Nika Layzell27726662017-10-24 23:16:35 -04001922 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001923 Stmt::Local(ref _binding_0, ) => {
David Tolnay1f0b7b82018-01-06 16:07:14 -08001924 _visitor.visit_local(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001925 }
David Tolnay6702ade2017-12-30 23:38:15 -05001926 Stmt::Item(ref _binding_0, ) => {
David Tolnay1f0b7b82018-01-06 16:07:14 -08001927 _visitor.visit_item(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001928 }
David Tolnay6702ade2017-12-30 23:38:15 -05001929 Stmt::Expr(ref _binding_0, ) => {
David Tolnay1f0b7b82018-01-06 16:07:14 -08001930 _visitor.visit_expr(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001931 }
David Tolnay6702ade2017-12-30 23:38:15 -05001932 Stmt::Semi(ref _binding_0, ref _binding_1, ) => {
David Tolnay1f0b7b82018-01-06 16:07:14 -08001933 _visitor.visit_expr(_binding_0);
David Tolnaycc0f0372017-12-28 19:11:04 -05001934 tokens_helper(_visitor, &(_binding_1).0);
Nika Layzell27726662017-10-24 23:16:35 -04001935 }
Nika Layzell27726662017-10-24 23:16:35 -04001936 }
1937}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001938# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001939pub fn visit_trait_bound<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitBound) {
David Tolnay40fb8ce2018-01-02 10:53:46 -08001940 _visitor.visit_trait_bound_modifier(& _i . modifier);
1941 if let Some(ref it) = _i . lifetimes { _visitor.visit_bound_lifetimes(it) };
1942 _visitor.visit_path(& _i . path);
1943}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001944# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001945pub fn visit_trait_bound_modifier<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitBoundModifier) {
Nika Layzell27726662017-10-24 23:16:35 -04001946 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001947 TraitBoundModifier::None => { }
1948 TraitBoundModifier::Maybe(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05001949 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04001950 }
1951 }
1952}
1953# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001954pub fn visit_trait_item<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItem) {
Nika Layzell27726662017-10-24 23:16:35 -04001955 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001956 TraitItem::Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001957 _visitor.visit_trait_item_const(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001958 }
David Tolnay6702ade2017-12-30 23:38:15 -05001959 TraitItem::Method(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001960 _visitor.visit_trait_item_method(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001961 }
David Tolnay6702ade2017-12-30 23:38:15 -05001962 TraitItem::Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001963 _visitor.visit_trait_item_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001964 }
David Tolnay6702ade2017-12-30 23:38:15 -05001965 TraitItem::Macro(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001966 _visitor.visit_trait_item_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001967 }
David Tolnay6702ade2017-12-30 23:38:15 -05001968 TraitItem::Verbatim(ref _binding_0, ) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05001969 _visitor.visit_trait_item_verbatim(_binding_0);
1970 }
Nika Layzell27726662017-10-24 23:16:35 -04001971 }
1972}
1973# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001974pub fn visit_trait_item_const<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemConst) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001975 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001976 tokens_helper(_visitor, &(& _i . const_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001977 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001978 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001979 _visitor.visit_type(& _i . ty);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001980 if let Some(ref it) = _i . default {
David Tolnaycc0f0372017-12-28 19:11:04 -05001981 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001982 _visitor.visit_expr(& ( it ) . 1);
1983 };
David Tolnaycc0f0372017-12-28 19:11:04 -05001984 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnayda705bd2017-11-10 21:58:05 -08001985}
1986# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001987pub fn visit_trait_item_macro<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemMacro) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001988 for it in & _i . attrs { _visitor.visit_attribute(it) };
1989 _visitor.visit_macro(& _i . mac);
David Tolnaycc0f0372017-12-28 19:11:04 -05001990 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
David Tolnayda705bd2017-11-10 21:58:05 -08001991}
1992# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001993pub fn visit_trait_item_method<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemMethod) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001994 for it in & _i . attrs { _visitor.visit_attribute(it) };
1995 _visitor.visit_method_sig(& _i . sig);
1996 if let Some(ref it) = _i . default { _visitor.visit_block(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001997 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04001998}
1999# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002000pub fn visit_trait_item_type<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002001 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05002002 tokens_helper(_visitor, &(& _i . type_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05002003 _visitor.visit_ident(& _i . ident);
2004 _visitor.visit_generics(& _i . generics);
David Tolnaycc0f0372017-12-28 19:11:04 -05002005 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay56080682018-01-06 14:01:52 -08002006 for el in Punctuated::pairs(& _i . bounds) { let it = el.value(); _visitor.visit_type_param_bound(it) };
David Tolnay5c4c0b52017-12-28 17:58:54 -05002007 if let Some(ref it) = _i . default {
David Tolnaycc0f0372017-12-28 19:11:04 -05002008 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05002009 _visitor.visit_type(& ( it ) . 1);
2010 };
David Tolnaycc0f0372017-12-28 19:11:04 -05002011 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04002012}
David Tolnay2ae520a2017-12-29 11:19:50 -05002013# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002014pub fn visit_trait_item_verbatim<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemVerbatim) {
David Tolnay2ae520a2017-12-29 11:19:50 -05002015 // Skipped field _i . tts;
2016}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002017# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002018pub fn visit_type<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Type) {
Nika Layzell27726662017-10-24 23:16:35 -04002019 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05002020 Type::Slice(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002021 _visitor.visit_type_slice(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002022 }
David Tolnay6702ade2017-12-30 23:38:15 -05002023 Type::Array(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002024 _visitor.visit_type_array(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002025 }
David Tolnay6702ade2017-12-30 23:38:15 -05002026 Type::Ptr(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002027 _visitor.visit_type_ptr(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002028 }
David Tolnay6702ade2017-12-30 23:38:15 -05002029 Type::Reference(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002030 _visitor.visit_type_reference(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002031 }
David Tolnay6702ade2017-12-30 23:38:15 -05002032 Type::BareFn(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002033 _visitor.visit_type_bare_fn(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002034 }
David Tolnay6702ade2017-12-30 23:38:15 -05002035 Type::Never(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002036 _visitor.visit_type_never(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002037 }
David Tolnay6702ade2017-12-30 23:38:15 -05002038 Type::Tuple(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002039 _visitor.visit_type_tuple(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002040 }
David Tolnay6702ade2017-12-30 23:38:15 -05002041 Type::Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002042 _visitor.visit_type_path(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002043 }
David Tolnay6702ade2017-12-30 23:38:15 -05002044 Type::TraitObject(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002045 _visitor.visit_type_trait_object(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002046 }
David Tolnay6702ade2017-12-30 23:38:15 -05002047 Type::ImplTrait(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002048 _visitor.visit_type_impl_trait(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002049 }
David Tolnay6702ade2017-12-30 23:38:15 -05002050 Type::Paren(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002051 _visitor.visit_type_paren(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002052 }
David Tolnay6702ade2017-12-30 23:38:15 -05002053 Type::Group(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002054 _visitor.visit_type_group(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002055 }
David Tolnay6702ade2017-12-30 23:38:15 -05002056 Type::Infer(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002057 _visitor.visit_type_infer(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002058 }
David Tolnay6702ade2017-12-30 23:38:15 -05002059 Type::Macro(ref _binding_0, ) => {
David Tolnay323279a2017-12-29 11:26:32 -05002060 _visitor.visit_type_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002061 }
David Tolnay6702ade2017-12-30 23:38:15 -05002062 Type::Verbatim(ref _binding_0, ) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05002063 _visitor.visit_type_verbatim(_binding_0);
2064 }
Nika Layzell27726662017-10-24 23:16:35 -04002065 }
2066}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002067# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002068pub fn visit_type_array<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeArray) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002069 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05002070 _visitor.visit_type(& * _i . elem);
David Tolnaycc0f0372017-12-28 19:11:04 -05002071 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05002072 _visitor.visit_expr(& _i . len);
Nika Layzell27726662017-10-24 23:16:35 -04002073}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002074# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002075pub fn visit_type_bare_fn<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeBareFn) {
David Tolnaybe7a9592017-12-29 02:39:53 -05002076 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
2077 if let Some(ref it) = _i . abi { _visitor.visit_abi(it) };
2078 tokens_helper(_visitor, &(& _i . fn_token).0);
2079 if let Some(ref it) = _i . lifetimes { _visitor.visit_bound_lifetimes(it) };
2080 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay56080682018-01-06 14:01:52 -08002081 for el in Punctuated::pairs(& _i . inputs) { let it = el.value(); _visitor.visit_bare_fn_arg(it) };
David Tolnaybe7a9592017-12-29 02:39:53 -05002082 if let Some(ref it) = _i . variadic { tokens_helper(_visitor, &(it).0) };
2083 _visitor.visit_return_type(& _i . output);
Nika Layzell27726662017-10-24 23:16:35 -04002084}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002085# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002086pub fn visit_type_group<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeGroup) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002087 tokens_helper(_visitor, &(& _i . group_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05002088 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04002089}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002090# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002091pub fn visit_type_impl_trait<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeImplTrait) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002092 tokens_helper(_visitor, &(& _i . impl_token).0);
David Tolnay56080682018-01-06 14:01:52 -08002093 for el in Punctuated::pairs(& _i . bounds) { let it = el.value(); _visitor.visit_type_param_bound(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002094}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002095# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002096pub fn visit_type_infer<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeInfer) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002097 tokens_helper(_visitor, &(& _i . underscore_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04002098}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002099# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002100pub fn visit_type_macro<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeMacro) {
David Tolnay323279a2017-12-29 11:26:32 -05002101 _visitor.visit_macro(& _i . mac);
2102}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002103# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002104pub fn visit_type_never<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeNever) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002105 tokens_helper(_visitor, &(& _i . bang_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04002106}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002107# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002108pub fn visit_type_param<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParam) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002109 for it in & _i . attrs { _visitor.visit_attribute(it) };
2110 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05002111 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay56080682018-01-06 14:01:52 -08002112 for el in Punctuated::pairs(& _i . bounds) { let it = el.value(); _visitor.visit_type_param_bound(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05002113 if let Some(ref it) = _i . eq_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05002114 if let Some(ref it) = _i . default { _visitor.visit_type(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002115}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002116# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002117pub fn visit_type_param_bound<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParamBound) {
Nika Layzell27726662017-10-24 23:16:35 -04002118 match *_i {
David Tolnay40fb8ce2018-01-02 10:53:46 -08002119 TypeParamBound::Trait(ref _binding_0, ) => {
2120 _visitor.visit_trait_bound(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002121 }
David Tolnay40fb8ce2018-01-02 10:53:46 -08002122 TypeParamBound::Lifetime(ref _binding_0, ) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05002123 _visitor.visit_lifetime(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002124 }
2125 }
2126}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002127# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002128pub fn visit_type_paren<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParen) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002129 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05002130 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04002131}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002132# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002133pub fn visit_type_path<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypePath) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002134 if let Some(ref it) = _i . qself { _visitor.visit_qself(it) };
2135 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -04002136}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002137# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002138pub fn visit_type_ptr<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypePtr) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002139 tokens_helper(_visitor, &(& _i . star_token).0);
2140 if let Some(ref it) = _i . const_token { tokens_helper(_visitor, &(it).0) };
David Tolnay136aaa32017-12-29 02:37:36 -05002141 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
2142 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04002143}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002144# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002145pub fn visit_type_reference<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeReference) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002146 tokens_helper(_visitor, &(& _i . and_token).0);
David Tolnay4ba63a02017-12-28 15:53:05 -05002147 if let Some(ref it) = _i . lifetime { _visitor.visit_lifetime(it) };
David Tolnay136aaa32017-12-29 02:37:36 -05002148 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
2149 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04002150}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002151# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002152pub fn visit_type_slice<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeSlice) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002153 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05002154 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04002155}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002156# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002157pub fn visit_type_trait_object<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeTraitObject) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002158 if let Some(ref it) = _i . dyn_token { tokens_helper(_visitor, &(it).0) };
David Tolnay56080682018-01-06 14:01:52 -08002159 for el in Punctuated::pairs(& _i . bounds) { let it = el.value(); _visitor.visit_type_param_bound(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002160}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002161# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002162pub fn visit_type_tuple<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeTuple) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002163 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay56080682018-01-06 14:01:52 -08002164 for el in Punctuated::pairs(& _i . elems) { let it = el.value(); _visitor.visit_type(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002165}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002166# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002167pub fn visit_type_verbatim<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeVerbatim) {
David Tolnay2ae520a2017-12-29 11:19:50 -05002168 // Skipped field _i . tts;
2169}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002170# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002171pub fn visit_un_op<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UnOp) {
Nika Layzell27726662017-10-24 23:16:35 -04002172 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05002173 UnOp::Deref(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05002174 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04002175 }
David Tolnay6702ade2017-12-30 23:38:15 -05002176 UnOp::Not(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05002177 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04002178 }
David Tolnay6702ade2017-12-30 23:38:15 -05002179 UnOp::Neg(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05002180 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04002181 }
2182 }
2183}
David Tolnay5f332a92017-12-26 00:42:45 -05002184# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002185pub fn visit_use_glob<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseGlob) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002186 tokens_helper(_visitor, &(& _i . star_token).0);
David Tolnay5f332a92017-12-26 00:42:45 -05002187}
2188# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002189pub fn visit_use_list<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseList) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002190 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay56080682018-01-06 14:01:52 -08002191 for el in Punctuated::pairs(& _i . items) { let it = el.value(); _visitor.visit_use_tree(it) };
David Tolnay5f332a92017-12-26 00:42:45 -05002192}
2193# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002194pub fn visit_use_path<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UsePath) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002195 _visitor.visit_ident(& _i . ident);
David Tolnay5c4c0b52017-12-28 17:58:54 -05002196 if let Some(ref it) = _i . rename {
David Tolnaycc0f0372017-12-28 19:11:04 -05002197 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05002198 _visitor.visit_ident(& ( it ) . 1);
2199 };
David Tolnay5f332a92017-12-26 00:42:45 -05002200}
2201# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002202pub fn visit_use_tree<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseTree) {
David Tolnay5f332a92017-12-26 00:42:45 -05002203 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05002204 UseTree::Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002205 _visitor.visit_use_path(_binding_0);
David Tolnay5f332a92017-12-26 00:42:45 -05002206 }
David Tolnay6702ade2017-12-30 23:38:15 -05002207 UseTree::Glob(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002208 _visitor.visit_use_glob(_binding_0);
David Tolnay5f332a92017-12-26 00:42:45 -05002209 }
David Tolnay6702ade2017-12-30 23:38:15 -05002210 UseTree::List(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002211 _visitor.visit_use_list(_binding_0);
David Tolnay5f332a92017-12-26 00:42:45 -05002212 }
2213 }
2214}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002215# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002216pub fn visit_variant<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Variant) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002217 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05002218 _visitor.visit_ident(& _i . ident);
David Tolnaye3d41b72017-12-31 15:24:00 -05002219 _visitor.visit_fields(& _i . fields);
David Tolnaye67902a2017-12-28 22:12:00 -05002220 if let Some(ref it) = _i . discriminant {
2221 tokens_helper(_visitor, &(& ( it ) . 0).0);
2222 _visitor.visit_expr(& ( it ) . 1);
2223 };
Nika Layzell27726662017-10-24 23:16:35 -04002224}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002225# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002226pub fn visit_vis_crate<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisCrate) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002227 tokens_helper(_visitor, &(& _i . pub_token).0);
David Tolnay1e01f9c2017-12-28 20:16:19 -05002228 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnaycc0f0372017-12-28 19:11:04 -05002229 tokens_helper(_visitor, &(& _i . crate_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04002230}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002231# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002232pub fn visit_vis_public<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisPublic) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002233 tokens_helper(_visitor, &(& _i . pub_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04002234}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002235# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002236pub fn visit_vis_restricted<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisRestricted) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002237 tokens_helper(_visitor, &(& _i . pub_token).0);
David Tolnay1e01f9c2017-12-28 20:16:19 -05002238 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnaycc0f0372017-12-28 19:11:04 -05002239 if let Some(ref it) = _i . in_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a918742017-12-28 16:54:41 -05002240 _visitor.visit_path(& * _i . path);
Nika Layzell27726662017-10-24 23:16:35 -04002241}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002242# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002243pub fn visit_visibility<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Visibility) {
Nika Layzell27726662017-10-24 23:16:35 -04002244 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05002245 Visibility::Public(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002246 _visitor.visit_vis_public(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002247 }
David Tolnay6702ade2017-12-30 23:38:15 -05002248 Visibility::Crate(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002249 _visitor.visit_vis_crate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002250 }
David Tolnay6702ade2017-12-30 23:38:15 -05002251 Visibility::Restricted(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002252 _visitor.visit_vis_restricted(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002253 }
David Tolnay6702ade2017-12-30 23:38:15 -05002254 Visibility::Inherited => { }
Nika Layzell27726662017-10-24 23:16:35 -04002255 }
2256}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002257# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002258pub fn visit_where_clause<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WhereClause) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002259 tokens_helper(_visitor, &(& _i . where_token).0);
David Tolnay56080682018-01-06 14:01:52 -08002260 for el in Punctuated::pairs(& _i . predicates) { let it = el.value(); _visitor.visit_where_predicate(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002261}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002262# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002263pub fn visit_where_predicate<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WherePredicate) {
Nika Layzell27726662017-10-24 23:16:35 -04002264 match *_i {
David Tolnayd4add852018-01-01 20:13:24 -08002265 WherePredicate::Type(ref _binding_0, ) => {
2266 _visitor.visit_predicate_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002267 }
David Tolnayd4add852018-01-01 20:13:24 -08002268 WherePredicate::Lifetime(ref _binding_0, ) => {
2269 _visitor.visit_predicate_lifetime(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002270 }
David Tolnayd4add852018-01-01 20:13:24 -08002271 WherePredicate::Eq(ref _binding_0, ) => {
2272 _visitor.visit_predicate_eq(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002273 }
2274 }
2275}
2276