blob: 120d1fd34587c63e992a690f6cfb32054715894f [file] [log] [blame]
Nika Layzell27726662017-10-24 23:16:35 -04001// THIS FILE IS AUTOMATICALLY GENERATED; DO NOT EDIT
2
3//! AST walker. Each overridden visit method has full control over what
4//! happens with its node, it can do its own traversal of the node's children,
5//! call `visit::walk_*` to apply the default traversal algorithm, or prevent
6//! deeper traversal by doing nothing.
7
David Tolnay0afc9b32017-12-27 13:38:24 -05008#![cfg_attr(rustfmt, rustfmt_skip)]
9
David Tolnayf0d63bf2017-12-26 12:29:47 -050010#![cfg_attr(feature = "cargo-clippy", allow(match_same_arms))]
11
Nika Layzella6f46c42017-10-26 15:26:16 -040012use *;
David Tolnay98942562017-12-26 21:24:35 -050013use proc_macro2::Span;
David Tolnaycc0f0372017-12-28 19:11:04 -050014use gen::helper::visit::*;
Nika Layzell27726662017-10-24 23:16:35 -040015
Nika Layzell4ab8d6e2017-10-26 09:45:49 -040016
17#[cfg(feature = "full")]
18macro_rules! full {
19 ($e:expr) => { $e }
20}
21
22#[cfg(not(feature = "full"))]
23macro_rules! full {
24 ($e:expr) => { unreachable!() }
25}
26
27
Nika Layzell27726662017-10-24 23:16:35 -040028/// Each method of the Visitor trait is a hook to be potentially
29/// overridden. Each method's default implementation recursively visits
30/// the substructure of the input via the corresponding `walk` method;
31/// e.g. the `visit_mod` method by default calls `visit::walk_mod`.
32///
33/// If you want to ensure that your code handles every variant
34/// explicitly, you need to override each method. (And you also need
35/// to monitor future changes to `Visitor` in case a new method with a
36/// new default implementation gets introduced.)
Nika Layzellc86173a2017-11-18 13:55:22 -050037pub trait Visitor<'ast> {
Nika Layzell27726662017-10-24 23:16:35 -040038
Nika Layzellc86173a2017-11-18 13:55:22 -050039fn visit_abi(&mut self, i: &'ast Abi) { visit_abi(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040040
Nika Layzellc08227a2017-12-04 16:30:17 -050041fn visit_angle_bracketed_generic_arguments(&mut self, i: &'ast AngleBracketedGenericArguments) { visit_angle_bracketed_generic_arguments(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040042# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050043fn visit_arg_captured(&mut self, i: &'ast ArgCaptured) { visit_arg_captured(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040044# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050045fn visit_arg_self(&mut self, i: &'ast ArgSelf) { visit_arg_self(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040046# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050047fn visit_arg_self_ref(&mut self, i: &'ast ArgSelfRef) { visit_arg_self_ref(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040048# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050049fn visit_arm(&mut self, i: &'ast Arm) { visit_arm(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040050
Nika Layzellc86173a2017-11-18 13:55:22 -050051fn visit_attr_style(&mut self, i: &'ast AttrStyle) { visit_attr_style(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040052
Nika Layzellc86173a2017-11-18 13:55:22 -050053fn visit_attribute(&mut self, i: &'ast Attribute) { visit_attribute(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040054
Nika Layzellc86173a2017-11-18 13:55:22 -050055fn visit_bare_fn_arg(&mut self, i: &'ast BareFnArg) { visit_bare_fn_arg(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040056
Nika Layzellc86173a2017-11-18 13:55:22 -050057fn visit_bare_fn_arg_name(&mut self, i: &'ast BareFnArgName) { visit_bare_fn_arg_name(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040058
Nika Layzellc86173a2017-11-18 13:55:22 -050059fn visit_bin_op(&mut self, i: &'ast BinOp) { visit_bin_op(self, i) }
David Tolnay506e43a2017-12-29 11:34:36 -050060
61fn visit_binding(&mut self, i: &'ast Binding) { visit_binding(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040062# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050063fn visit_block(&mut self, i: &'ast Block) { visit_block(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040064
Nika Layzellc86173a2017-11-18 13:55:22 -050065fn visit_body(&mut self, i: &'ast Body) { visit_body(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040066
Nika Layzellc86173a2017-11-18 13:55:22 -050067fn visit_body_enum(&mut self, i: &'ast BodyEnum) { visit_body_enum(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040068
Nika Layzellc86173a2017-11-18 13:55:22 -050069fn visit_body_struct(&mut self, i: &'ast BodyStruct) { visit_body_struct(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040070
Nika Layzellc86173a2017-11-18 13:55:22 -050071fn visit_bound_lifetimes(&mut self, i: &'ast BoundLifetimes) { visit_bound_lifetimes(self, i) }
Nika Layzellf1fdc0b2017-12-04 19:58:32 -050072
73fn visit_const_param(&mut self, i: &'ast ConstParam) { visit_const_param(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040074
Nika Layzellc86173a2017-11-18 13:55:22 -050075fn visit_derive_input(&mut self, i: &'ast DeriveInput) { visit_derive_input(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040076
Nika Layzellc86173a2017-11-18 13:55:22 -050077fn visit_expr(&mut self, i: &'ast Expr) { visit_expr(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040078# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050079fn visit_expr_addr_of(&mut self, i: &'ast ExprAddrOf) { visit_expr_addr_of(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040080# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050081fn visit_expr_array(&mut self, i: &'ast ExprArray) { visit_expr_array(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040082# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050083fn visit_expr_assign(&mut self, i: &'ast ExprAssign) { visit_expr_assign(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040084# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050085fn visit_expr_assign_op(&mut self, i: &'ast ExprAssignOp) { visit_expr_assign_op(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040086
Nika Layzellc86173a2017-11-18 13:55:22 -050087fn visit_expr_binary(&mut self, i: &'ast ExprBinary) { visit_expr_binary(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040088# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050089fn visit_expr_block(&mut self, i: &'ast ExprBlock) { visit_expr_block(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040090# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050091fn visit_expr_box(&mut self, i: &'ast ExprBox) { visit_expr_box(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040092# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050093fn visit_expr_break(&mut self, i: &'ast ExprBreak) { visit_expr_break(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040094
Nika Layzellc86173a2017-11-18 13:55:22 -050095fn visit_expr_call(&mut self, i: &'ast ExprCall) { visit_expr_call(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040096
Nika Layzellc86173a2017-11-18 13:55:22 -050097fn visit_expr_cast(&mut self, i: &'ast ExprCast) { visit_expr_cast(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040098# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050099fn visit_expr_catch(&mut self, i: &'ast ExprCatch) { visit_expr_catch(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400100# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500101fn visit_expr_closure(&mut self, i: &'ast ExprClosure) { visit_expr_closure(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400102# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500103fn visit_expr_continue(&mut self, i: &'ast ExprContinue) { visit_expr_continue(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400104# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500105fn visit_expr_field(&mut self, i: &'ast ExprField) { visit_expr_field(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400106# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500107fn visit_expr_for_loop(&mut self, i: &'ast ExprForLoop) { visit_expr_for_loop(self, i) }
David Tolnaye98775f2017-12-28 23:17:00 -0500108# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500109fn visit_expr_group(&mut self, i: &'ast ExprGroup) { visit_expr_group(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400110# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500111fn visit_expr_if(&mut self, i: &'ast ExprIf) { visit_expr_if(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400112# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500113fn visit_expr_if_let(&mut self, i: &'ast ExprIfLet) { visit_expr_if_let(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400114# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500115fn visit_expr_in_place(&mut self, i: &'ast ExprInPlace) { visit_expr_in_place(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400116
Nika Layzellc86173a2017-11-18 13:55:22 -0500117fn visit_expr_index(&mut self, i: &'ast ExprIndex) { visit_expr_index(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400118
David Tolnay8c91b882017-12-28 23:04:32 -0500119fn visit_expr_lit(&mut self, i: &'ast ExprLit) { visit_expr_lit(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400120# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500121fn visit_expr_loop(&mut self, i: &'ast ExprLoop) { visit_expr_loop(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400122# [ cfg ( feature = "full" ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500123fn visit_expr_macro(&mut self, i: &'ast ExprMacro) { visit_expr_macro(self, i) }
124# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500125fn visit_expr_match(&mut self, i: &'ast ExprMatch) { visit_expr_match(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400126# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500127fn visit_expr_method_call(&mut self, i: &'ast ExprMethodCall) { visit_expr_method_call(self, i) }
David Tolnaye98775f2017-12-28 23:17:00 -0500128# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500129fn visit_expr_paren(&mut self, i: &'ast ExprParen) { visit_expr_paren(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400130
Nika Layzellc86173a2017-11-18 13:55:22 -0500131fn visit_expr_path(&mut self, i: &'ast ExprPath) { visit_expr_path(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400132# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500133fn visit_expr_range(&mut self, i: &'ast ExprRange) { visit_expr_range(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400134# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500135fn visit_expr_repeat(&mut self, i: &'ast ExprRepeat) { visit_expr_repeat(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400136# [ cfg ( feature = "full" ) ]
David Tolnayc246cd32017-12-28 23:14:32 -0500137fn visit_expr_return(&mut self, i: &'ast ExprReturn) { visit_expr_return(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400138# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500139fn visit_expr_struct(&mut self, i: &'ast ExprStruct) { visit_expr_struct(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400140# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500141fn visit_expr_try(&mut self, i: &'ast ExprTry) { visit_expr_try(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400142# [ cfg ( feature = "full" ) ]
David Tolnay05362582017-12-26 01:33:57 -0500143fn visit_expr_tuple(&mut self, i: &'ast ExprTuple) { visit_expr_tuple(self, i) }
David Tolnay0cf94f22017-12-28 23:46:26 -0500144# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500145fn visit_expr_type(&mut self, i: &'ast ExprType) { visit_expr_type(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400146
Nika Layzellc86173a2017-11-18 13:55:22 -0500147fn visit_expr_unary(&mut self, i: &'ast ExprUnary) { visit_expr_unary(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400148# [ cfg ( feature = "full" ) ]
Nika Layzell640832a2017-12-04 13:37:09 -0500149fn visit_expr_unsafe(&mut self, i: &'ast ExprUnsafe) { visit_expr_unsafe(self, i) }
David Tolnay2ae520a2017-12-29 11:19:50 -0500150
151fn visit_expr_verbatim(&mut self, i: &'ast ExprVerbatim) { visit_expr_verbatim(self, i) }
Nika Layzell640832a2017-12-04 13:37:09 -0500152# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500153fn visit_expr_while(&mut self, i: &'ast ExprWhile) { visit_expr_while(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400154# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500155fn visit_expr_while_let(&mut self, i: &'ast ExprWhileLet) { visit_expr_while_let(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400156# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500157fn visit_expr_yield(&mut self, i: &'ast ExprYield) { visit_expr_yield(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400158
Nika Layzellc86173a2017-11-18 13:55:22 -0500159fn visit_field(&mut self, i: &'ast Field) { visit_field(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400160# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500161fn visit_field_pat(&mut self, i: &'ast FieldPat) { visit_field_pat(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400162# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500163fn visit_field_value(&mut self, i: &'ast FieldValue) { visit_field_value(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400164# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500165fn visit_file(&mut self, i: &'ast File) { visit_file(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400166# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500167fn visit_fn_arg(&mut self, i: &'ast FnArg) { visit_fn_arg(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400168# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500169fn visit_fn_decl(&mut self, i: &'ast FnDecl) { visit_fn_decl(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400170# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500171fn visit_foreign_item(&mut self, i: &'ast ForeignItem) { visit_foreign_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400172# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500173fn visit_foreign_item_fn(&mut self, i: &'ast ForeignItemFn) { visit_foreign_item_fn(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400174# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500175fn visit_foreign_item_static(&mut self, i: &'ast ForeignItemStatic) { visit_foreign_item_static(self, i) }
David Tolnay199bcbb2017-11-12 10:33:52 -0800176# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500177fn visit_foreign_item_type(&mut self, i: &'ast ForeignItemType) { visit_foreign_item_type(self, i) }
David Tolnay2ae520a2017-12-29 11:19:50 -0500178# [ cfg ( feature = "full" ) ]
179fn visit_foreign_item_verbatim(&mut self, i: &'ast ForeignItemVerbatim) { visit_foreign_item_verbatim(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400180
Nika Layzellc08227a2017-12-04 16:30:17 -0500181fn visit_generic_argument(&mut self, i: &'ast GenericArgument) { visit_generic_argument(self, i) }
David Tolnayd60cfec2017-12-29 00:21:38 -0500182# [ cfg ( feature = "full" ) ]
183fn visit_generic_method_argument(&mut self, i: &'ast GenericMethodArgument) { visit_generic_method_argument(self, i) }
Nika Layzell357885a2017-12-04 15:47:07 -0500184
David Tolnayc2f1aba2017-11-12 20:29:22 -0800185fn visit_generic_param(&mut self, i: &'ast GenericParam) { visit_generic_param(self, i) }
186
Nika Layzellc86173a2017-11-18 13:55:22 -0500187fn visit_generics(&mut self, i: &'ast Generics) { visit_generics(self, i) }
Nika Layzellefb83ba2017-12-19 18:23:55 -0500188
189fn visit_ident(&mut self, i: &'ast Ident) { visit_ident(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400190# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500191fn visit_impl_item(&mut self, i: &'ast ImplItem) { visit_impl_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400192# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500193fn visit_impl_item_const(&mut self, i: &'ast ImplItemConst) { visit_impl_item_const(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400194# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500195fn visit_impl_item_macro(&mut self, i: &'ast ImplItemMacro) { visit_impl_item_macro(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400196# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500197fn visit_impl_item_method(&mut self, i: &'ast ImplItemMethod) { visit_impl_item_method(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400198# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500199fn visit_impl_item_type(&mut self, i: &'ast ImplItemType) { visit_impl_item_type(self, i) }
David Tolnay2ae520a2017-12-29 11:19:50 -0500200# [ cfg ( feature = "full" ) ]
201fn visit_impl_item_verbatim(&mut self, i: &'ast ImplItemVerbatim) { visit_impl_item_verbatim(self, i) }
David Tolnay14982012017-12-29 00:49:51 -0500202
David Tolnay85b69a42017-12-27 20:43:10 -0500203fn visit_index(&mut self, i: &'ast Index) { visit_index(self, i) }
204# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500205fn visit_item(&mut self, i: &'ast Item) { visit_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400206# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500207fn visit_item_const(&mut self, i: &'ast ItemConst) { visit_item_const(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400208# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500209fn visit_item_enum(&mut self, i: &'ast ItemEnum) { visit_item_enum(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400210# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500211fn visit_item_extern_crate(&mut self, i: &'ast ItemExternCrate) { visit_item_extern_crate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400212# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500213fn visit_item_fn(&mut self, i: &'ast ItemFn) { visit_item_fn(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400214# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500215fn visit_item_foreign_mod(&mut self, i: &'ast ItemForeignMod) { visit_item_foreign_mod(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400216# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500217fn visit_item_impl(&mut self, i: &'ast ItemImpl) { visit_item_impl(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400218# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500219fn visit_item_macro(&mut self, i: &'ast ItemMacro) { visit_item_macro(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400220# [ cfg ( feature = "full" ) ]
David Tolnay500d8322017-12-18 00:32:51 -0800221fn visit_item_macro2(&mut self, i: &'ast ItemMacro2) { visit_item_macro2(self, i) }
222# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500223fn visit_item_mod(&mut self, i: &'ast ItemMod) { visit_item_mod(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400224# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500225fn visit_item_static(&mut self, i: &'ast ItemStatic) { visit_item_static(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400226# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500227fn visit_item_struct(&mut self, i: &'ast ItemStruct) { visit_item_struct(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400228# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500229fn visit_item_trait(&mut self, i: &'ast ItemTrait) { visit_item_trait(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400230# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500231fn visit_item_type(&mut self, i: &'ast ItemType) { visit_item_type(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400232# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500233fn visit_item_union(&mut self, i: &'ast ItemUnion) { visit_item_union(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400234# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500235fn visit_item_use(&mut self, i: &'ast ItemUse) { visit_item_use(self, i) }
David Tolnay2ae520a2017-12-29 11:19:50 -0500236# [ cfg ( feature = "full" ) ]
237fn visit_item_verbatim(&mut self, i: &'ast ItemVerbatim) { visit_item_verbatim(self, i) }
David Tolnaybcd498f2017-12-29 12:02:33 -0500238# [ cfg ( feature = "full" ) ]
239fn visit_label(&mut self, i: &'ast Label) { visit_label(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400240
David Tolnay4ba63a02017-12-28 15:53:05 -0500241fn visit_lifetime(&mut self, i: &'ast Lifetime) { visit_lifetime(self, i) }
242
Nika Layzellc86173a2017-11-18 13:55:22 -0500243fn visit_lifetime_def(&mut self, i: &'ast LifetimeDef) { visit_lifetime_def(self, i) }
David Tolnay4ba63a02017-12-28 15:53:05 -0500244
245fn visit_lit(&mut self, i: &'ast Lit) { visit_lit(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400246# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500247fn visit_local(&mut self, i: &'ast Local) { visit_local(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400248
Nika Layzellc86173a2017-11-18 13:55:22 -0500249fn visit_macro(&mut self, i: &'ast Macro) { visit_macro(self, i) }
David Tolnay14982012017-12-29 00:49:51 -0500250
David Tolnay85b69a42017-12-27 20:43:10 -0500251fn visit_member(&mut self, i: &'ast Member) { visit_member(self, i) }
David Tolnaydecf28d2017-11-11 11:56:45 -0800252
Nika Layzellc86173a2017-11-18 13:55:22 -0500253fn visit_meta_item(&mut self, i: &'ast MetaItem) { visit_meta_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400254
Nika Layzellc86173a2017-11-18 13:55:22 -0500255fn visit_meta_item_list(&mut self, i: &'ast MetaItemList) { visit_meta_item_list(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400256
Nika Layzellc86173a2017-11-18 13:55:22 -0500257fn visit_meta_name_value(&mut self, i: &'ast MetaNameValue) { visit_meta_name_value(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400258# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500259fn visit_method_sig(&mut self, i: &'ast MethodSig) { visit_method_sig(self, i) }
David Tolnayd60cfec2017-12-29 00:21:38 -0500260# [ cfg ( feature = "full" ) ]
261fn visit_method_turbofish(&mut self, i: &'ast MethodTurbofish) { visit_method_turbofish(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400262
Nika Layzellc86173a2017-11-18 13:55:22 -0500263fn visit_nested_meta_item(&mut self, i: &'ast NestedMetaItem) { visit_nested_meta_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400264
Nika Layzellc08227a2017-12-04 16:30:17 -0500265fn visit_parenthesized_generic_arguments(&mut self, i: &'ast ParenthesizedGenericArguments) { visit_parenthesized_generic_arguments(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400266# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500267fn visit_pat(&mut self, i: &'ast Pat) { visit_pat(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400268# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500269fn visit_pat_box(&mut self, i: &'ast PatBox) { visit_pat_box(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400270# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500271fn visit_pat_ident(&mut self, i: &'ast PatIdent) { visit_pat_ident(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400272# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500273fn visit_pat_lit(&mut self, i: &'ast PatLit) { visit_pat_lit(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400274# [ cfg ( feature = "full" ) ]
David Tolnay323279a2017-12-29 11:26:32 -0500275fn visit_pat_macro(&mut self, i: &'ast PatMacro) { visit_pat_macro(self, i) }
276# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500277fn visit_pat_path(&mut self, i: &'ast PatPath) { visit_pat_path(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400278# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500279fn visit_pat_range(&mut self, i: &'ast PatRange) { visit_pat_range(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400280# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500281fn visit_pat_ref(&mut self, i: &'ast PatRef) { visit_pat_ref(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400282# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500283fn visit_pat_slice(&mut self, i: &'ast PatSlice) { visit_pat_slice(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400284# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500285fn visit_pat_struct(&mut self, i: &'ast PatStruct) { visit_pat_struct(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400286# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500287fn visit_pat_tuple(&mut self, i: &'ast PatTuple) { visit_pat_tuple(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400288# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500289fn visit_pat_tuple_struct(&mut self, i: &'ast PatTupleStruct) { visit_pat_tuple_struct(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400290# [ cfg ( feature = "full" ) ]
David Tolnay2ae520a2017-12-29 11:19:50 -0500291fn visit_pat_verbatim(&mut self, i: &'ast PatVerbatim) { visit_pat_verbatim(self, i) }
292# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500293fn visit_pat_wild(&mut self, i: &'ast PatWild) { visit_pat_wild(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400294
Nika Layzellc86173a2017-11-18 13:55:22 -0500295fn visit_path(&mut self, i: &'ast Path) { visit_path(self, i) }
Nika Layzellc08227a2017-12-04 16:30:17 -0500296
297fn visit_path_arguments(&mut self, i: &'ast PathArguments) { visit_path_arguments(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400298
Nika Layzellc86173a2017-11-18 13:55:22 -0500299fn visit_path_segment(&mut self, i: &'ast PathSegment) { visit_path_segment(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400300
Nika Layzellc86173a2017-11-18 13:55:22 -0500301fn visit_poly_trait_ref(&mut self, i: &'ast PolyTraitRef) { visit_poly_trait_ref(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400302
Nika Layzellc86173a2017-11-18 13:55:22 -0500303fn visit_qself(&mut self, i: &'ast QSelf) { visit_qself(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400304# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500305fn visit_range_limits(&mut self, i: &'ast RangeLimits) { visit_range_limits(self, i) }
David Tolnayf93b90d2017-11-11 19:21:26 -0800306
Nika Layzellc86173a2017-11-18 13:55:22 -0500307fn visit_return_type(&mut self, i: &'ast ReturnType) { visit_return_type(self, i) }
Nika Layzellefb83ba2017-12-19 18:23:55 -0500308
309fn visit_span(&mut self, i: &'ast Span) { visit_span(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400310# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500311fn visit_stmt(&mut self, i: &'ast Stmt) { visit_stmt(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400312
Nika Layzellc86173a2017-11-18 13:55:22 -0500313fn visit_trait_bound_modifier(&mut self, i: &'ast TraitBoundModifier) { visit_trait_bound_modifier(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400314# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500315fn visit_trait_item(&mut self, i: &'ast TraitItem) { visit_trait_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400316# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500317fn visit_trait_item_const(&mut self, i: &'ast TraitItemConst) { visit_trait_item_const(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400318# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500319fn visit_trait_item_macro(&mut self, i: &'ast TraitItemMacro) { visit_trait_item_macro(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400320# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500321fn visit_trait_item_method(&mut self, i: &'ast TraitItemMethod) { visit_trait_item_method(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400322# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500323fn visit_trait_item_type(&mut self, i: &'ast TraitItemType) { visit_trait_item_type(self, i) }
David Tolnay2ae520a2017-12-29 11:19:50 -0500324# [ cfg ( feature = "full" ) ]
325fn visit_trait_item_verbatim(&mut self, i: &'ast TraitItemVerbatim) { visit_trait_item_verbatim(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400326
Nika Layzellc86173a2017-11-18 13:55:22 -0500327fn visit_type(&mut self, i: &'ast Type) { visit_type(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400328
Nika Layzellc86173a2017-11-18 13:55:22 -0500329fn visit_type_array(&mut self, i: &'ast TypeArray) { visit_type_array(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400330
Nika Layzellc86173a2017-11-18 13:55:22 -0500331fn visit_type_bare_fn(&mut self, i: &'ast TypeBareFn) { visit_type_bare_fn(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400332
Nika Layzellc86173a2017-11-18 13:55:22 -0500333fn visit_type_group(&mut self, i: &'ast TypeGroup) { visit_type_group(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800334
Nika Layzellc86173a2017-11-18 13:55:22 -0500335fn visit_type_impl_trait(&mut self, i: &'ast TypeImplTrait) { visit_type_impl_trait(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800336
Nika Layzellc86173a2017-11-18 13:55:22 -0500337fn visit_type_infer(&mut self, i: &'ast TypeInfer) { visit_type_infer(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800338
David Tolnay323279a2017-12-29 11:26:32 -0500339fn visit_type_macro(&mut self, i: &'ast TypeMacro) { visit_type_macro(self, i) }
340
Nika Layzellc86173a2017-11-18 13:55:22 -0500341fn visit_type_never(&mut self, i: &'ast TypeNever) { visit_type_never(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800342
Nika Layzellc86173a2017-11-18 13:55:22 -0500343fn visit_type_param(&mut self, i: &'ast TypeParam) { visit_type_param(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800344
Nika Layzellc86173a2017-11-18 13:55:22 -0500345fn visit_type_param_bound(&mut self, i: &'ast TypeParamBound) { visit_type_param_bound(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800346
Nika Layzellc86173a2017-11-18 13:55:22 -0500347fn visit_type_paren(&mut self, i: &'ast TypeParen) { visit_type_paren(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800348
Nika Layzellc86173a2017-11-18 13:55:22 -0500349fn visit_type_path(&mut self, i: &'ast TypePath) { visit_type_path(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800350
Nika Layzellc86173a2017-11-18 13:55:22 -0500351fn visit_type_ptr(&mut self, i: &'ast TypePtr) { visit_type_ptr(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800352
Nika Layzellc86173a2017-11-18 13:55:22 -0500353fn visit_type_reference(&mut self, i: &'ast TypeReference) { visit_type_reference(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800354
Nika Layzellc86173a2017-11-18 13:55:22 -0500355fn visit_type_slice(&mut self, i: &'ast TypeSlice) { visit_type_slice(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800356
Nika Layzellc86173a2017-11-18 13:55:22 -0500357fn visit_type_trait_object(&mut self, i: &'ast TypeTraitObject) { visit_type_trait_object(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800358
David Tolnay05362582017-12-26 01:33:57 -0500359fn visit_type_tuple(&mut self, i: &'ast TypeTuple) { visit_type_tuple(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800360
David Tolnay2ae520a2017-12-29 11:19:50 -0500361fn visit_type_verbatim(&mut self, i: &'ast TypeVerbatim) { visit_type_verbatim(self, i) }
362
Nika Layzellc86173a2017-11-18 13:55:22 -0500363fn visit_un_op(&mut self, i: &'ast UnOp) { visit_un_op(self, i) }
David Tolnay5f332a92017-12-26 00:42:45 -0500364# [ cfg ( feature = "full" ) ]
365fn visit_use_glob(&mut self, i: &'ast UseGlob) { visit_use_glob(self, i) }
366# [ cfg ( feature = "full" ) ]
367fn visit_use_list(&mut self, i: &'ast UseList) { visit_use_list(self, i) }
368# [ cfg ( feature = "full" ) ]
369fn visit_use_path(&mut self, i: &'ast UsePath) { visit_use_path(self, i) }
370# [ cfg ( feature = "full" ) ]
371fn visit_use_tree(&mut self, i: &'ast UseTree) { visit_use_tree(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400372
Nika Layzellc86173a2017-11-18 13:55:22 -0500373fn visit_variant(&mut self, i: &'ast Variant) { visit_variant(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400374
Nika Layzellc86173a2017-11-18 13:55:22 -0500375fn visit_variant_data(&mut self, i: &'ast VariantData) { visit_variant_data(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400376
Nika Layzellc86173a2017-11-18 13:55:22 -0500377fn visit_vis_crate(&mut self, i: &'ast VisCrate) { visit_vis_crate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400378
Nika Layzellc86173a2017-11-18 13:55:22 -0500379fn visit_vis_public(&mut self, i: &'ast VisPublic) { visit_vis_public(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400380
Nika Layzellc86173a2017-11-18 13:55:22 -0500381fn visit_vis_restricted(&mut self, i: &'ast VisRestricted) { visit_vis_restricted(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400382
Nika Layzellc86173a2017-11-18 13:55:22 -0500383fn visit_visibility(&mut self, i: &'ast Visibility) { visit_visibility(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400384
Nika Layzellc86173a2017-11-18 13:55:22 -0500385fn visit_where_bound_predicate(&mut self, i: &'ast WhereBoundPredicate) { visit_where_bound_predicate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400386
Nika Layzellc86173a2017-11-18 13:55:22 -0500387fn visit_where_clause(&mut self, i: &'ast WhereClause) { visit_where_clause(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400388
Nika Layzellc86173a2017-11-18 13:55:22 -0500389fn visit_where_eq_predicate(&mut self, i: &'ast WhereEqPredicate) { visit_where_eq_predicate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400390
Nika Layzellc86173a2017-11-18 13:55:22 -0500391fn visit_where_predicate(&mut self, i: &'ast WherePredicate) { visit_where_predicate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400392
Nika Layzellc86173a2017-11-18 13:55:22 -0500393fn visit_where_region_predicate(&mut self, i: &'ast WhereRegionPredicate) { visit_where_region_predicate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400394
395}
396
397
Nika Layzellc86173a2017-11-18 13:55:22 -0500398pub fn visit_abi<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Abi) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500399 tokens_helper(_visitor, &(& _i . extern_token).0);
David Tolnayd5125762017-12-29 02:42:17 -0500400 if let Some(ref it) = _i . name { _visitor.visit_lit(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400401}
402
Nika Layzellc08227a2017-12-04 16:30:17 -0500403pub fn visit_angle_bracketed_generic_arguments<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast AngleBracketedGenericArguments) {
David Tolnay2d4e08a2017-12-28 23:54:07 -0500404 if let Some(ref it) = _i . colon2_token { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500405 tokens_helper(_visitor, &(& _i . lt_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500406 for el in & _i . args { let it = el.item(); _visitor.visit_generic_argument(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500407 tokens_helper(_visitor, &(& _i . gt_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400408}
409# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500410pub fn visit_arg_captured<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ArgCaptured) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500411 _visitor.visit_pat(& _i . pat);
David Tolnaycc0f0372017-12-28 19:11:04 -0500412 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500413 _visitor.visit_type(& _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -0400414}
415# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500416pub fn visit_arg_self<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ArgSelf) {
David Tolnay24237fb2017-12-29 02:15:26 -0500417 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500418 tokens_helper(_visitor, &(& _i . self_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400419}
420# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500421pub fn visit_arg_self_ref<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ArgSelfRef) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500422 tokens_helper(_visitor, &(& _i . and_token).0);
David Tolnay4ba63a02017-12-28 15:53:05 -0500423 if let Some(ref it) = _i . lifetime { _visitor.visit_lifetime(it) };
David Tolnay24237fb2017-12-29 02:15:26 -0500424 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500425 tokens_helper(_visitor, &(& _i . self_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400426}
427# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500428pub fn visit_arm<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Arm) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500429 for it in & _i . attrs { _visitor.visit_attribute(it) };
430 for el in & _i . pats { let it = el.item(); _visitor.visit_pat(it) };
David Tolnay8b4d3022017-12-29 12:11:10 -0500431 if let Some(ref it) = _i . guard {
432 tokens_helper(_visitor, &(& ( it ) . 0).0);
433 _visitor.visit_expr(& * ( it ) . 1);
434 };
David Tolnaycc0f0372017-12-28 19:11:04 -0500435 tokens_helper(_visitor, &(& _i . rocket_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500436 _visitor.visit_expr(& * _i . body);
David Tolnaycc0f0372017-12-28 19:11:04 -0500437 if let Some(ref it) = _i . comma { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -0400438}
439
Nika Layzellc86173a2017-11-18 13:55:22 -0500440pub fn visit_attr_style<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast AttrStyle) {
Nika Layzell27726662017-10-24 23:16:35 -0400441 use ::AttrStyle::*;
442 match *_i {
443 Outer => { }
444 Inner(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500445 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400446 }
447 }
448}
449
Nika Layzellc86173a2017-11-18 13:55:22 -0500450pub fn visit_attribute<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Attribute) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500451 tokens_helper(_visitor, &(& _i . pound_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500452 _visitor.visit_attr_style(& _i . style);
David Tolnay1e01f9c2017-12-28 20:16:19 -0500453 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500454 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -0400455 // Skipped field _i . tts;
456 // Skipped field _i . is_sugared_doc;
457}
458
Nika Layzellc86173a2017-11-18 13:55:22 -0500459pub fn visit_bare_fn_arg<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BareFnArg) {
David Tolnay5c4c0b52017-12-28 17:58:54 -0500460 if let Some(ref it) = _i . name {
461 _visitor.visit_bare_fn_arg_name(& ( it ) . 0);
David Tolnaycc0f0372017-12-28 19:11:04 -0500462 tokens_helper(_visitor, &(& ( it ) . 1).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -0500463 };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500464 _visitor.visit_type(& _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -0400465}
466
Nika Layzellc86173a2017-11-18 13:55:22 -0500467pub fn visit_bare_fn_arg_name<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BareFnArgName) {
Nika Layzell27726662017-10-24 23:16:35 -0400468 use ::BareFnArgName::*;
469 match *_i {
470 Named(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500471 _visitor.visit_ident(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400472 }
473 Wild(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500474 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400475 }
476 }
477}
478
Nika Layzellc86173a2017-11-18 13:55:22 -0500479pub fn visit_bin_op<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BinOp) {
Nika Layzell27726662017-10-24 23:16:35 -0400480 use ::BinOp::*;
481 match *_i {
482 Add(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500483 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400484 }
485 Sub(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500486 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400487 }
488 Mul(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500489 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400490 }
491 Div(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500492 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400493 }
494 Rem(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500495 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400496 }
497 And(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 }
500 Or(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 }
503 BitXor(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 }
506 BitAnd(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 }
509 BitOr(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 }
512 Shl(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 }
515 Shr(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 }
518 Eq(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 }
521 Lt(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 }
524 Le(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 }
527 Ne(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 }
530 Ge(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 }
533 Gt(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 }
536 AddEq(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 }
539 SubEq(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 }
542 MulEq(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 }
545 DivEq(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 }
548 RemEq(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 }
551 BitXorEq(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 }
554 BitAndEq(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 }
557 BitOrEq(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 }
560 ShlEq(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 }
563 ShrEq(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 }
566 }
567}
David Tolnay506e43a2017-12-29 11:34:36 -0500568
569pub fn visit_binding<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Binding) {
570 _visitor.visit_ident(& _i . ident);
571 tokens_helper(_visitor, &(& _i . eq_token).0);
572 _visitor.visit_type(& _i . ty);
573}
Nika Layzell27726662017-10-24 23:16:35 -0400574# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500575pub fn visit_block<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Block) {
David Tolnay1e01f9c2017-12-28 20:16:19 -0500576 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500577 for it in & _i . stmts { _visitor.visit_stmt(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400578}
579
Nika Layzellc86173a2017-11-18 13:55:22 -0500580pub fn visit_body<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Body) {
Nika Layzell27726662017-10-24 23:16:35 -0400581 use ::Body::*;
582 match *_i {
583 Enum(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500584 _visitor.visit_body_enum(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400585 }
586 Struct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500587 _visitor.visit_body_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400588 }
589 }
590}
591
Nika Layzellc86173a2017-11-18 13:55:22 -0500592pub fn visit_body_enum<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BodyEnum) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500593 tokens_helper(_visitor, &(& _i . enum_token).0);
David Tolnay1e01f9c2017-12-28 20:16:19 -0500594 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500595 for el in & _i . variants { let it = el.item(); _visitor.visit_variant(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400596}
597
Nika Layzellc86173a2017-11-18 13:55:22 -0500598pub fn visit_body_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BodyStruct) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500599 _visitor.visit_variant_data(& _i . data);
David Tolnaycc0f0372017-12-28 19:11:04 -0500600 tokens_helper(_visitor, &(& _i . struct_token).0);
601 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -0400602}
603
Nika Layzellc86173a2017-11-18 13:55:22 -0500604pub fn visit_bound_lifetimes<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BoundLifetimes) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500605 tokens_helper(_visitor, &(& _i . for_token).0);
606 tokens_helper(_visitor, &(& _i . lt_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500607 for el in & _i . lifetimes { let it = el.item(); _visitor.visit_lifetime_def(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500608 tokens_helper(_visitor, &(& _i . gt_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400609}
Nika Layzellf1fdc0b2017-12-04 19:58:32 -0500610
611pub fn visit_const_param<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ConstParam) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500612 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500613 tokens_helper(_visitor, &(& _i . const_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500614 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -0500615 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500616 _visitor.visit_type(& _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -0500617 if let Some(ref it) = _i . eq_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500618 if let Some(ref it) = _i . default { _visitor.visit_expr(it) };
Nika Layzellf1fdc0b2017-12-04 19:58:32 -0500619}
Nika Layzell27726662017-10-24 23:16:35 -0400620
Nika Layzellc86173a2017-11-18 13:55:22 -0500621pub fn visit_derive_input<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast DeriveInput) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500622 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500623 _visitor.visit_visibility(& _i . vis);
624 _visitor.visit_ident(& _i . ident);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500625 _visitor.visit_generics(& _i . generics);
626 _visitor.visit_body(& _i . body);
Nika Layzell27726662017-10-24 23:16:35 -0400627}
628
Nika Layzellc86173a2017-11-18 13:55:22 -0500629pub fn visit_expr<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Expr) {
David Tolnay8c91b882017-12-28 23:04:32 -0500630 use ::Expr::*;
Nika Layzell27726662017-10-24 23:16:35 -0400631 match *_i {
632 Box(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500633 full!(_visitor.visit_expr_box(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400634 }
635 InPlace(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500636 full!(_visitor.visit_expr_in_place(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400637 }
638 Array(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500639 full!(_visitor.visit_expr_array(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400640 }
641 Call(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500642 _visitor.visit_expr_call(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400643 }
644 MethodCall(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500645 full!(_visitor.visit_expr_method_call(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400646 }
David Tolnay05362582017-12-26 01:33:57 -0500647 Tuple(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500648 full!(_visitor.visit_expr_tuple(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400649 }
650 Binary(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500651 _visitor.visit_expr_binary(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400652 }
653 Unary(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500654 _visitor.visit_expr_unary(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400655 }
656 Lit(ref _binding_0, ) => {
David Tolnay8c91b882017-12-28 23:04:32 -0500657 _visitor.visit_expr_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400658 }
659 Cast(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500660 _visitor.visit_expr_cast(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400661 }
662 Type(ref _binding_0, ) => {
David Tolnay0cf94f22017-12-28 23:46:26 -0500663 full!(_visitor.visit_expr_type(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400664 }
665 If(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500666 full!(_visitor.visit_expr_if(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400667 }
668 IfLet(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500669 full!(_visitor.visit_expr_if_let(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400670 }
671 While(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500672 full!(_visitor.visit_expr_while(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400673 }
674 WhileLet(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500675 full!(_visitor.visit_expr_while_let(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400676 }
677 ForLoop(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500678 full!(_visitor.visit_expr_for_loop(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400679 }
680 Loop(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500681 full!(_visitor.visit_expr_loop(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400682 }
683 Match(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500684 full!(_visitor.visit_expr_match(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400685 }
686 Closure(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500687 full!(_visitor.visit_expr_closure(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400688 }
Nika Layzell640832a2017-12-04 13:37:09 -0500689 Unsafe(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500690 full!(_visitor.visit_expr_unsafe(_binding_0));
Nika Layzell640832a2017-12-04 13:37:09 -0500691 }
Nika Layzell27726662017-10-24 23:16:35 -0400692 Block(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500693 full!(_visitor.visit_expr_block(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400694 }
695 Assign(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500696 full!(_visitor.visit_expr_assign(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400697 }
698 AssignOp(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500699 full!(_visitor.visit_expr_assign_op(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400700 }
701 Field(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500702 full!(_visitor.visit_expr_field(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400703 }
Nika Layzell27726662017-10-24 23:16:35 -0400704 Index(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500705 _visitor.visit_expr_index(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400706 }
707 Range(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500708 full!(_visitor.visit_expr_range(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400709 }
710 Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500711 _visitor.visit_expr_path(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400712 }
713 AddrOf(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500714 full!(_visitor.visit_expr_addr_of(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400715 }
716 Break(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500717 full!(_visitor.visit_expr_break(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400718 }
719 Continue(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500720 full!(_visitor.visit_expr_continue(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400721 }
David Tolnayc246cd32017-12-28 23:14:32 -0500722 Return(ref _binding_0, ) => {
723 full!(_visitor.visit_expr_return(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400724 }
David Tolnaydecf28d2017-11-11 11:56:45 -0800725 Macro(ref _binding_0, ) => {
David Tolnay8c91b882017-12-28 23:04:32 -0500726 full!(_visitor.visit_expr_macro(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400727 }
728 Struct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500729 full!(_visitor.visit_expr_struct(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400730 }
731 Repeat(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500732 full!(_visitor.visit_expr_repeat(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400733 }
734 Paren(ref _binding_0, ) => {
David Tolnaye98775f2017-12-28 23:17:00 -0500735 full!(_visitor.visit_expr_paren(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400736 }
737 Group(ref _binding_0, ) => {
David Tolnaye98775f2017-12-28 23:17:00 -0500738 full!(_visitor.visit_expr_group(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400739 }
740 Try(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500741 full!(_visitor.visit_expr_try(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400742 }
743 Catch(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500744 full!(_visitor.visit_expr_catch(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400745 }
746 Yield(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500747 full!(_visitor.visit_expr_yield(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400748 }
David Tolnay2ae520a2017-12-29 11:19:50 -0500749 Verbatim(ref _binding_0, ) => {
750 _visitor.visit_expr_verbatim(_binding_0);
751 }
Nika Layzell27726662017-10-24 23:16:35 -0400752 }
753}
754# [ cfg ( feature = "full" ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500755pub fn visit_expr_addr_of<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprAddrOf) {
756 for it in & _i . attrs { _visitor.visit_attribute(it) };
757 tokens_helper(_visitor, &(& _i . and_token).0);
David Tolnay24237fb2017-12-29 02:15:26 -0500758 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnay8c91b882017-12-28 23:04:32 -0500759 _visitor.visit_expr(& * _i . expr);
760}
761# [ cfg ( feature = "full" ) ]
762pub fn visit_expr_array<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprArray) {
763 for it in & _i . attrs { _visitor.visit_attribute(it) };
764 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnay2a86fdd2017-12-28 23:34:28 -0500765 for el in & _i . elems { let it = el.item(); _visitor.visit_expr(it) };
David Tolnay8c91b882017-12-28 23:04:32 -0500766}
767# [ cfg ( feature = "full" ) ]
768pub fn visit_expr_assign<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprAssign) {
769 for it in & _i . attrs { _visitor.visit_attribute(it) };
770 _visitor.visit_expr(& * _i . left);
771 tokens_helper(_visitor, &(& _i . eq_token).0);
772 _visitor.visit_expr(& * _i . right);
773}
774# [ cfg ( feature = "full" ) ]
775pub fn visit_expr_assign_op<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprAssignOp) {
776 for it in & _i . attrs { _visitor.visit_attribute(it) };
777 _visitor.visit_expr(& * _i . left);
778 _visitor.visit_bin_op(& _i . op);
779 _visitor.visit_expr(& * _i . right);
780}
781
782pub fn visit_expr_binary<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBinary) {
783 for it in & _i . attrs { _visitor.visit_attribute(it) };
784 _visitor.visit_expr(& * _i . left);
785 _visitor.visit_bin_op(& _i . op);
786 _visitor.visit_expr(& * _i . right);
787}
788# [ cfg ( feature = "full" ) ]
789pub fn visit_expr_block<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBlock) {
790 for it in & _i . attrs { _visitor.visit_attribute(it) };
791 _visitor.visit_block(& _i . block);
792}
793# [ cfg ( feature = "full" ) ]
794pub fn visit_expr_box<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBox) {
795 for it in & _i . attrs { _visitor.visit_attribute(it) };
796 tokens_helper(_visitor, &(& _i . box_token).0);
797 _visitor.visit_expr(& * _i . expr);
798}
799# [ cfg ( feature = "full" ) ]
800pub fn visit_expr_break<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBreak) {
801 for it in & _i . attrs { _visitor.visit_attribute(it) };
802 tokens_helper(_visitor, &(& _i . break_token).0);
803 if let Some(ref it) = _i . label { _visitor.visit_lifetime(it) };
804 if let Some(ref it) = _i . expr { _visitor.visit_expr(& * * it) };
805}
806
807pub fn visit_expr_call<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprCall) {
808 for it in & _i . attrs { _visitor.visit_attribute(it) };
809 _visitor.visit_expr(& * _i . func);
810 tokens_helper(_visitor, &(& _i . paren_token).0);
811 for el in & _i . args { let it = el.item(); _visitor.visit_expr(it) };
812}
813
814pub fn visit_expr_cast<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprCast) {
815 for it in & _i . attrs { _visitor.visit_attribute(it) };
816 _visitor.visit_expr(& * _i . expr);
817 tokens_helper(_visitor, &(& _i . as_token).0);
818 _visitor.visit_type(& * _i . ty);
819}
820# [ cfg ( feature = "full" ) ]
821pub fn visit_expr_catch<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprCatch) {
822 for it in & _i . attrs { _visitor.visit_attribute(it) };
823 tokens_helper(_visitor, &(& _i . do_token).0);
824 tokens_helper(_visitor, &(& _i . catch_token).0);
825 _visitor.visit_block(& _i . block);
826}
827# [ cfg ( feature = "full" ) ]
828pub fn visit_expr_closure<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprClosure) {
829 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnayefc96fb2017-12-29 02:03:15 -0500830 if let Some(ref it) = _i . capture { tokens_helper(_visitor, &(it).0) };
David Tolnay8c91b882017-12-28 23:04:32 -0500831 tokens_helper(_visitor, &(& _i . or1_token).0);
832 for el in & _i . inputs { let it = el.item(); _visitor.visit_fn_arg(it) };
833 tokens_helper(_visitor, &(& _i . or2_token).0);
834 _visitor.visit_return_type(& _i . output);
835 _visitor.visit_expr(& * _i . body);
836}
837# [ cfg ( feature = "full" ) ]
838pub fn visit_expr_continue<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprContinue) {
839 for it in & _i . attrs { _visitor.visit_attribute(it) };
840 tokens_helper(_visitor, &(& _i . continue_token).0);
841 if let Some(ref it) = _i . label { _visitor.visit_lifetime(it) };
842}
843# [ cfg ( feature = "full" ) ]
844pub fn visit_expr_field<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprField) {
845 for it in & _i . attrs { _visitor.visit_attribute(it) };
846 _visitor.visit_expr(& * _i . base);
847 tokens_helper(_visitor, &(& _i . dot_token).0);
848 _visitor.visit_member(& _i . member);
849}
850# [ cfg ( feature = "full" ) ]
851pub fn visit_expr_for_loop<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprForLoop) {
852 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaybcd498f2017-12-29 12:02:33 -0500853 if let Some(ref it) = _i . label { _visitor.visit_label(it) };
David Tolnay8c91b882017-12-28 23:04:32 -0500854 tokens_helper(_visitor, &(& _i . for_token).0);
855 _visitor.visit_pat(& * _i . pat);
856 tokens_helper(_visitor, &(& _i . in_token).0);
857 _visitor.visit_expr(& * _i . expr);
858 _visitor.visit_block(& _i . body);
859}
David Tolnaye98775f2017-12-28 23:17:00 -0500860# [ cfg ( feature = "full" ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500861pub fn visit_expr_group<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprGroup) {
862 for it in & _i . attrs { _visitor.visit_attribute(it) };
863 tokens_helper(_visitor, &(& _i . group_token).0);
864 _visitor.visit_expr(& * _i . expr);
865}
866# [ cfg ( feature = "full" ) ]
867pub fn visit_expr_if<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIf) {
868 for it in & _i . attrs { _visitor.visit_attribute(it) };
869 tokens_helper(_visitor, &(& _i . if_token).0);
870 _visitor.visit_expr(& * _i . cond);
David Tolnay2ccf32a2017-12-29 00:34:26 -0500871 _visitor.visit_block(& _i . then_branch);
872 if let Some(ref it) = _i . else_branch {
873 tokens_helper(_visitor, &(& ( it ) . 0).0);
874 _visitor.visit_expr(& * ( it ) . 1);
875 };
David Tolnay8c91b882017-12-28 23:04:32 -0500876}
877# [ cfg ( feature = "full" ) ]
878pub fn visit_expr_if_let<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIfLet) {
879 for it in & _i . attrs { _visitor.visit_attribute(it) };
880 tokens_helper(_visitor, &(& _i . if_token).0);
881 tokens_helper(_visitor, &(& _i . let_token).0);
882 _visitor.visit_pat(& * _i . pat);
883 tokens_helper(_visitor, &(& _i . eq_token).0);
884 _visitor.visit_expr(& * _i . expr);
David Tolnay2ccf32a2017-12-29 00:34:26 -0500885 _visitor.visit_block(& _i . then_branch);
886 if let Some(ref it) = _i . else_branch {
887 tokens_helper(_visitor, &(& ( it ) . 0).0);
888 _visitor.visit_expr(& * ( it ) . 1);
889 };
David Tolnay8c91b882017-12-28 23:04:32 -0500890}
891# [ cfg ( feature = "full" ) ]
892pub fn visit_expr_in_place<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprInPlace) {
893 for it in & _i . attrs { _visitor.visit_attribute(it) };
894 _visitor.visit_expr(& * _i . place);
David Tolnay8701a5c2017-12-28 23:31:10 -0500895 tokens_helper(_visitor, &(& _i . arrow_token).0);
David Tolnay8c91b882017-12-28 23:04:32 -0500896 _visitor.visit_expr(& * _i . value);
897}
898
899pub fn visit_expr_index<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIndex) {
900 for it in & _i . attrs { _visitor.visit_attribute(it) };
901 _visitor.visit_expr(& * _i . expr);
902 tokens_helper(_visitor, &(& _i . bracket_token).0);
903 _visitor.visit_expr(& * _i . index);
904}
905
906pub fn visit_expr_lit<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprLit) {
907 for it in & _i . attrs { _visitor.visit_attribute(it) };
908 _visitor.visit_lit(& _i . lit);
909}
910# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500911pub fn visit_expr_loop<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprLoop) {
David Tolnay8c91b882017-12-28 23:04:32 -0500912 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaybcd498f2017-12-29 12:02:33 -0500913 if let Some(ref it) = _i . label { _visitor.visit_label(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500914 tokens_helper(_visitor, &(& _i . loop_token).0);
915 _visitor.visit_block(& _i . body);
Nika Layzell27726662017-10-24 23:16:35 -0400916}
917# [ cfg ( feature = "full" ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500918pub fn visit_expr_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprMacro) {
919 for it in & _i . attrs { _visitor.visit_attribute(it) };
920 _visitor.visit_macro(& _i . mac);
921}
922# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500923pub fn visit_expr_match<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprMatch) {
David Tolnay8c91b882017-12-28 23:04:32 -0500924 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500925 tokens_helper(_visitor, &(& _i . match_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500926 _visitor.visit_expr(& * _i . expr);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500927 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500928 for it in & _i . arms { _visitor.visit_arm(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400929}
930# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500931pub fn visit_expr_method_call<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprMethodCall) {
David Tolnay8c91b882017-12-28 23:04:32 -0500932 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay76418512017-12-28 23:47:47 -0500933 _visitor.visit_expr(& * _i . receiver);
David Tolnaycc0f0372017-12-28 19:11:04 -0500934 tokens_helper(_visitor, &(& _i . dot_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500935 _visitor.visit_ident(& _i . method);
David Tolnayd60cfec2017-12-29 00:21:38 -0500936 if let Some(ref it) = _i . turbofish { _visitor.visit_method_turbofish(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500937 tokens_helper(_visitor, &(& _i . paren_token).0);
938 for el in & _i . args { let it = el.item(); _visitor.visit_expr(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400939}
David Tolnaye98775f2017-12-28 23:17:00 -0500940# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500941pub fn visit_expr_paren<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprParen) {
David Tolnay8c91b882017-12-28 23:04:32 -0500942 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -0500943 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500944 _visitor.visit_expr(& * _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -0400945}
946
Nika Layzellc86173a2017-11-18 13:55:22 -0500947pub fn visit_expr_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprPath) {
David Tolnay8c91b882017-12-28 23:04:32 -0500948 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500949 if let Some(ref it) = _i . qself { _visitor.visit_qself(it) };
950 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -0400951}
952# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500953pub fn visit_expr_range<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprRange) {
David Tolnay8c91b882017-12-28 23:04:32 -0500954 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a918742017-12-28 16:54:41 -0500955 if let Some(ref it) = _i . from { _visitor.visit_expr(& * * it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500956 _visitor.visit_range_limits(& _i . limits);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500957 if let Some(ref it) = _i . to { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -0400958}
959# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500960pub fn visit_expr_repeat<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprRepeat) {
David Tolnay8c91b882017-12-28 23:04:32 -0500961 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -0500962 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500963 _visitor.visit_expr(& * _i . expr);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500964 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500965 _visitor.visit_expr(& * _i . amt);
Nika Layzell27726662017-10-24 23:16:35 -0400966}
967# [ cfg ( feature = "full" ) ]
David Tolnayc246cd32017-12-28 23:14:32 -0500968pub fn visit_expr_return<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprReturn) {
David Tolnay8c91b882017-12-28 23:04:32 -0500969 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500970 tokens_helper(_visitor, &(& _i . return_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500971 if let Some(ref it) = _i . expr { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -0400972}
973# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500974pub fn visit_expr_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprStruct) {
David Tolnay8c91b882017-12-28 23:04:32 -0500975 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500976 _visitor.visit_path(& _i . path);
David Tolnay1e01f9c2017-12-28 20:16:19 -0500977 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500978 for el in & _i . fields { let it = el.item(); _visitor.visit_field_value(it) };
979 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
980 if let Some(ref it) = _i . rest { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -0400981}
982# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500983pub fn visit_expr_try<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprTry) {
David Tolnay8c91b882017-12-28 23:04:32 -0500984 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a918742017-12-28 16:54:41 -0500985 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -0500986 tokens_helper(_visitor, &(& _i . question_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400987}
988# [ cfg ( feature = "full" ) ]
David Tolnay05362582017-12-26 01:33:57 -0500989pub fn visit_expr_tuple<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprTuple) {
David Tolnay8c91b882017-12-28 23:04:32 -0500990 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -0500991 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay2a86fdd2017-12-28 23:34:28 -0500992 for el in & _i . elems { let it = el.item(); _visitor.visit_expr(it) };
David Tolnay05362582017-12-26 01:33:57 -0500993}
David Tolnay0cf94f22017-12-28 23:46:26 -0500994# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500995pub fn visit_expr_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprType) {
David Tolnay8c91b882017-12-28 23:04:32 -0500996 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a918742017-12-28 16:54:41 -0500997 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -0500998 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500999 _visitor.visit_type(& * _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -04001000}
1001
Nika Layzellc86173a2017-11-18 13:55:22 -05001002pub fn visit_expr_unary<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprUnary) {
David Tolnay8c91b882017-12-28 23:04:32 -05001003 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001004 _visitor.visit_un_op(& _i . op);
David Tolnay4a918742017-12-28 16:54:41 -05001005 _visitor.visit_expr(& * _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -04001006}
1007# [ cfg ( feature = "full" ) ]
Nika Layzell640832a2017-12-04 13:37:09 -05001008pub fn visit_expr_unsafe<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprUnsafe) {
David Tolnay8c91b882017-12-28 23:04:32 -05001009 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001010 tokens_helper(_visitor, &(& _i . unsafe_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001011 _visitor.visit_block(& _i . block);
Nika Layzell640832a2017-12-04 13:37:09 -05001012}
David Tolnay2ae520a2017-12-29 11:19:50 -05001013
1014pub fn visit_expr_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprVerbatim) {
1015 // Skipped field _i . tts;
1016}
Nika Layzell640832a2017-12-04 13:37:09 -05001017# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001018pub fn visit_expr_while<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprWhile) {
David Tolnay8c91b882017-12-28 23:04:32 -05001019 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaybcd498f2017-12-29 12:02:33 -05001020 if let Some(ref it) = _i . label { _visitor.visit_label(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001021 tokens_helper(_visitor, &(& _i . while_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001022 _visitor.visit_expr(& * _i . cond);
1023 _visitor.visit_block(& _i . body);
Nika Layzell27726662017-10-24 23:16:35 -04001024}
1025# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001026pub fn visit_expr_while_let<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprWhileLet) {
David Tolnay8c91b882017-12-28 23:04:32 -05001027 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaybcd498f2017-12-29 12:02:33 -05001028 if let Some(ref it) = _i . label { _visitor.visit_label(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001029 tokens_helper(_visitor, &(& _i . while_token).0);
1030 tokens_helper(_visitor, &(& _i . let_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001031 _visitor.visit_pat(& * _i . pat);
David Tolnaycc0f0372017-12-28 19:11:04 -05001032 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001033 _visitor.visit_expr(& * _i . expr);
1034 _visitor.visit_block(& _i . body);
Nika Layzell27726662017-10-24 23:16:35 -04001035}
1036# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001037pub fn visit_expr_yield<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprYield) {
David Tolnay8c91b882017-12-28 23:04:32 -05001038 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001039 tokens_helper(_visitor, &(& _i . yield_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001040 if let Some(ref it) = _i . expr { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -04001041}
1042
Nika Layzellc86173a2017-11-18 13:55:22 -05001043pub fn visit_field<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Field) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001044 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001045 _visitor.visit_visibility(& _i . vis);
1046 if let Some(ref it) = _i . ident { _visitor.visit_ident(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001047 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001048 _visitor.visit_type(& _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -04001049}
1050# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001051pub fn visit_field_pat<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldPat) {
David Tolnay4a3f59a2017-12-28 21:21:12 -05001052 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay85b69a42017-12-27 20:43:10 -05001053 _visitor.visit_member(& _i . member);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001054 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a918742017-12-28 16:54:41 -05001055 _visitor.visit_pat(& * _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001056}
1057# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001058pub fn visit_field_value<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldValue) {
David Tolnay85b69a42017-12-27 20:43:10 -05001059 for it in & _i . attrs { _visitor.visit_attribute(it) };
1060 _visitor.visit_member(& _i . member);
David Tolnaycc0f0372017-12-28 19:11:04 -05001061 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001062 _visitor.visit_expr(& _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -04001063}
1064# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001065pub fn visit_file<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast File) {
Nika Layzell27726662017-10-24 23:16:35 -04001066 // Skipped field _i . shebang;
David Tolnayf0d63bf2017-12-26 12:29:47 -05001067 for it in & _i . attrs { _visitor.visit_attribute(it) };
1068 for it in & _i . items { _visitor.visit_item(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001069}
1070# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001071pub fn visit_fn_arg<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FnArg) {
Nika Layzell27726662017-10-24 23:16:35 -04001072 use ::FnArg::*;
1073 match *_i {
1074 SelfRef(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001075 _visitor.visit_arg_self_ref(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001076 }
1077 SelfValue(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001078 _visitor.visit_arg_self(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001079 }
1080 Captured(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001081 _visitor.visit_arg_captured(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001082 }
David Tolnay80ed55f2017-12-27 22:54:40 -05001083 Inferred(ref _binding_0, ) => {
1084 _visitor.visit_pat(_binding_0);
1085 }
Nika Layzell27726662017-10-24 23:16:35 -04001086 Ignored(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001087 _visitor.visit_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001088 }
1089 }
1090}
1091# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001092pub fn visit_fn_decl<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FnDecl) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001093 tokens_helper(_visitor, &(& _i . fn_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001094 _visitor.visit_generics(& _i . generics);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001095 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001096 for el in & _i . inputs { let it = el.item(); _visitor.visit_fn_arg(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001097 if let Some(ref it) = _i . variadic { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001098 _visitor.visit_return_type(& _i . output);
Nika Layzell27726662017-10-24 23:16:35 -04001099}
1100# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001101pub fn visit_foreign_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItem) {
David Tolnay8894f602017-11-11 12:11:04 -08001102 use ::ForeignItem::*;
Nika Layzell27726662017-10-24 23:16:35 -04001103 match *_i {
1104 Fn(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001105 _visitor.visit_foreign_item_fn(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001106 }
1107 Static(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001108 _visitor.visit_foreign_item_static(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001109 }
David Tolnay199bcbb2017-11-12 10:33:52 -08001110 Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001111 _visitor.visit_foreign_item_type(_binding_0);
David Tolnay199bcbb2017-11-12 10:33:52 -08001112 }
David Tolnay2ae520a2017-12-29 11:19:50 -05001113 Verbatim(ref _binding_0, ) => {
1114 _visitor.visit_foreign_item_verbatim(_binding_0);
1115 }
Nika Layzell27726662017-10-24 23:16:35 -04001116 }
1117}
1118# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001119pub fn visit_foreign_item_fn<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemFn) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001120 for it in & _i . attrs { _visitor.visit_attribute(it) };
1121 _visitor.visit_visibility(& _i . vis);
1122 _visitor.visit_ident(& _i . ident);
David Tolnay4a918742017-12-28 16:54:41 -05001123 _visitor.visit_fn_decl(& * _i . decl);
David Tolnaycc0f0372017-12-28 19:11:04 -05001124 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay8894f602017-11-11 12:11:04 -08001125}
1126# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001127pub fn visit_foreign_item_static<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemStatic) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001128 for it in & _i . attrs { _visitor.visit_attribute(it) };
1129 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001130 tokens_helper(_visitor, &(& _i . static_token).0);
David Tolnay24237fb2017-12-29 02:15:26 -05001131 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001132 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001133 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001134 _visitor.visit_type(& * _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001135 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001136}
David Tolnay199bcbb2017-11-12 10:33:52 -08001137# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001138pub fn visit_foreign_item_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001139 for it in & _i . attrs { _visitor.visit_attribute(it) };
1140 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001141 tokens_helper(_visitor, &(& _i . type_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001142 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001143 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay199bcbb2017-11-12 10:33:52 -08001144}
David Tolnay2ae520a2017-12-29 11:19:50 -05001145# [ cfg ( feature = "full" ) ]
1146pub fn visit_foreign_item_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemVerbatim) {
1147 // Skipped field _i . tts;
1148}
Nika Layzell27726662017-10-24 23:16:35 -04001149
Nika Layzellc08227a2017-12-04 16:30:17 -05001150pub fn visit_generic_argument<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast GenericArgument) {
1151 use ::GenericArgument::*;
Nika Layzell357885a2017-12-04 15:47:07 -05001152 match *_i {
1153 Lifetime(ref _binding_0, ) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05001154 _visitor.visit_lifetime(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001155 }
1156 Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001157 _visitor.visit_type(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001158 }
David Tolnay506e43a2017-12-29 11:34:36 -05001159 Binding(ref _binding_0, ) => {
1160 _visitor.visit_binding(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001161 }
Nika Layzellc680e612017-12-04 19:07:20 -05001162 Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001163 _visitor.visit_expr(_binding_0);
Nika Layzellc680e612017-12-04 19:07:20 -05001164 }
Nika Layzell357885a2017-12-04 15:47:07 -05001165 }
1166}
David Tolnayd60cfec2017-12-29 00:21:38 -05001167# [ cfg ( feature = "full" ) ]
1168pub fn visit_generic_method_argument<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast GenericMethodArgument) {
1169 use ::GenericMethodArgument::*;
1170 match *_i {
1171 Type(ref _binding_0, ) => {
1172 _visitor.visit_type(_binding_0);
1173 }
1174 Const(ref _binding_0, ) => {
1175 _visitor.visit_expr(_binding_0);
1176 }
1177 }
1178}
Nika Layzell357885a2017-12-04 15:47:07 -05001179
David Tolnayc2f1aba2017-11-12 20:29:22 -08001180pub fn visit_generic_param<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast GenericParam) {
1181 use ::GenericParam::*;
1182 match *_i {
1183 Lifetime(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001184 _visitor.visit_lifetime_def(_binding_0);
David Tolnayc2f1aba2017-11-12 20:29:22 -08001185 }
1186 Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001187 _visitor.visit_type_param(_binding_0);
David Tolnayc2f1aba2017-11-12 20:29:22 -08001188 }
Nika Layzellf1fdc0b2017-12-04 19:58:32 -05001189 Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001190 _visitor.visit_const_param(_binding_0);
Nika Layzellf1fdc0b2017-12-04 19:58:32 -05001191 }
David Tolnayc2f1aba2017-11-12 20:29:22 -08001192 }
1193}
1194
Nika Layzellc86173a2017-11-18 13:55:22 -05001195pub fn visit_generics<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Generics) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001196 if let Some(ref it) = _i . lt_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001197 for el in & _i . params { let it = el.item(); _visitor.visit_generic_param(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001198 if let Some(ref it) = _i . gt_token { tokens_helper(_visitor, &(it).0) };
David Tolnayac997dd2017-12-27 23:18:22 -05001199 if let Some(ref it) = _i . where_clause { _visitor.visit_where_clause(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001200}
Nika Layzellefb83ba2017-12-19 18:23:55 -05001201
1202pub fn visit_ident<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Ident) {
David Tolnay4ba63a02017-12-28 15:53:05 -05001203 // Skipped field _i . sym;
1204 _visitor.visit_span(& _i . span);
Nika Layzellefb83ba2017-12-19 18:23:55 -05001205}
Nika Layzell27726662017-10-24 23:16:35 -04001206# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001207pub fn visit_impl_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItem) {
David Tolnay857628c2017-11-11 12:25:31 -08001208 use ::ImplItem::*;
Nika Layzell27726662017-10-24 23:16:35 -04001209 match *_i {
1210 Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001211 _visitor.visit_impl_item_const(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001212 }
1213 Method(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001214 _visitor.visit_impl_item_method(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001215 }
1216 Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001217 _visitor.visit_impl_item_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001218 }
1219 Macro(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001220 _visitor.visit_impl_item_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001221 }
David Tolnay2ae520a2017-12-29 11:19:50 -05001222 Verbatim(ref _binding_0, ) => {
1223 _visitor.visit_impl_item_verbatim(_binding_0);
1224 }
Nika Layzell27726662017-10-24 23:16:35 -04001225 }
1226}
1227# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001228pub fn visit_impl_item_const<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemConst) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001229 for it in & _i . attrs { _visitor.visit_attribute(it) };
1230 _visitor.visit_visibility(& _i . vis);
David Tolnay360a6342017-12-29 02:22:11 -05001231 if let Some(ref it) = _i . defaultness { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001232 tokens_helper(_visitor, &(& _i . const_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001233 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001234 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001235 _visitor.visit_type(& _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001236 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001237 _visitor.visit_expr(& _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -05001238 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay857628c2017-11-11 12:25:31 -08001239}
1240# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001241pub fn visit_impl_item_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemMacro) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001242 for it in & _i . attrs { _visitor.visit_attribute(it) };
1243 _visitor.visit_macro(& _i . mac);
David Tolnaycc0f0372017-12-28 19:11:04 -05001244 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
David Tolnay857628c2017-11-11 12:25:31 -08001245}
1246# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001247pub fn visit_impl_item_method<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemMethod) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001248 for it in & _i . attrs { _visitor.visit_attribute(it) };
1249 _visitor.visit_visibility(& _i . vis);
David Tolnay360a6342017-12-29 02:22:11 -05001250 if let Some(ref it) = _i . defaultness { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001251 _visitor.visit_method_sig(& _i . sig);
1252 _visitor.visit_block(& _i . block);
Nika Layzell27726662017-10-24 23:16:35 -04001253}
1254# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001255pub fn visit_impl_item_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001256 for it in & _i . attrs { _visitor.visit_attribute(it) };
1257 _visitor.visit_visibility(& _i . vis);
David Tolnay360a6342017-12-29 02:22:11 -05001258 if let Some(ref it) = _i . defaultness { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001259 tokens_helper(_visitor, &(& _i . type_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001260 _visitor.visit_ident(& _i . ident);
1261 _visitor.visit_generics(& _i . generics);
David Tolnaycc0f0372017-12-28 19:11:04 -05001262 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001263 _visitor.visit_type(& _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001264 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001265}
David Tolnay2ae520a2017-12-29 11:19:50 -05001266# [ cfg ( feature = "full" ) ]
1267pub fn visit_impl_item_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemVerbatim) {
1268 // Skipped field _i . tts;
1269}
David Tolnay14982012017-12-29 00:49:51 -05001270
David Tolnay85b69a42017-12-27 20:43:10 -05001271pub fn visit_index<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Index) {
1272 // Skipped field _i . index;
1273 _visitor.visit_span(& _i . span);
1274}
1275# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001276pub fn visit_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Item) {
David Tolnayc6b55bc2017-11-09 22:48:38 -08001277 use ::Item::*;
Nika Layzell27726662017-10-24 23:16:35 -04001278 match *_i {
1279 ExternCrate(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001280 _visitor.visit_item_extern_crate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001281 }
1282 Use(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001283 _visitor.visit_item_use(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001284 }
1285 Static(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001286 _visitor.visit_item_static(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001287 }
1288 Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001289 _visitor.visit_item_const(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001290 }
1291 Fn(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001292 _visitor.visit_item_fn(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001293 }
1294 Mod(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001295 _visitor.visit_item_mod(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001296 }
1297 ForeignMod(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001298 _visitor.visit_item_foreign_mod(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001299 }
David Tolnayfd6bf5c2017-11-12 09:41:14 -08001300 Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001301 _visitor.visit_item_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001302 }
1303 Enum(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001304 _visitor.visit_item_enum(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001305 }
1306 Struct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001307 _visitor.visit_item_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001308 }
1309 Union(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001310 _visitor.visit_item_union(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001311 }
1312 Trait(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001313 _visitor.visit_item_trait(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001314 }
Nika Layzell27726662017-10-24 23:16:35 -04001315 Impl(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001316 _visitor.visit_item_impl(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001317 }
David Tolnaydecf28d2017-11-11 11:56:45 -08001318 Macro(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001319 _visitor.visit_item_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001320 }
David Tolnay500d8322017-12-18 00:32:51 -08001321 Macro2(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001322 _visitor.visit_item_macro2(_binding_0);
David Tolnay500d8322017-12-18 00:32:51 -08001323 }
David Tolnay2ae520a2017-12-29 11:19:50 -05001324 Verbatim(ref _binding_0, ) => {
1325 _visitor.visit_item_verbatim(_binding_0);
1326 }
Nika Layzell27726662017-10-24 23:16:35 -04001327 }
1328}
1329# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001330pub fn visit_item_const<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemConst) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001331 for it in & _i . attrs { _visitor.visit_attribute(it) };
1332 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001333 tokens_helper(_visitor, &(& _i . const_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001334 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001335 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001336 _visitor.visit_type(& * _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001337 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001338 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -05001339 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnayc6b55bc2017-11-09 22:48:38 -08001340}
1341# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001342pub fn visit_item_enum<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemEnum) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001343 for it in & _i . attrs { _visitor.visit_attribute(it) };
1344 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001345 tokens_helper(_visitor, &(& _i . enum_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001346 _visitor.visit_ident(& _i . ident);
1347 _visitor.visit_generics(& _i . generics);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001348 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001349 for el in & _i . variants { let it = el.item(); _visitor.visit_variant(it) };
David Tolnayc6b55bc2017-11-09 22:48:38 -08001350}
1351# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001352pub fn visit_item_extern_crate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemExternCrate) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001353 for it in & _i . attrs { _visitor.visit_attribute(it) };
1354 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001355 tokens_helper(_visitor, &(& _i . extern_token).0);
1356 tokens_helper(_visitor, &(& _i . crate_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001357 _visitor.visit_ident(& _i . ident);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001358 if let Some(ref it) = _i . rename {
David Tolnaycc0f0372017-12-28 19:11:04 -05001359 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001360 _visitor.visit_ident(& ( it ) . 1);
1361 };
David Tolnaycc0f0372017-12-28 19:11:04 -05001362 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnayc6b55bc2017-11-09 22:48:38 -08001363}
1364# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001365pub fn visit_item_fn<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemFn) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001366 for it in & _i . attrs { _visitor.visit_attribute(it) };
1367 _visitor.visit_visibility(& _i . vis);
David Tolnay360a6342017-12-29 02:22:11 -05001368 if let Some(ref it) = _i . constness { tokens_helper(_visitor, &(it).0) };
David Tolnay9b258702017-12-29 02:24:41 -05001369 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001370 if let Some(ref it) = _i . abi { _visitor.visit_abi(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001371 _visitor.visit_ident(& _i . ident);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001372 _visitor.visit_fn_decl(& * _i . decl);
David Tolnay4a918742017-12-28 16:54:41 -05001373 _visitor.visit_block(& * _i . block);
David Tolnayc6b55bc2017-11-09 22:48:38 -08001374}
1375# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001376pub fn visit_item_foreign_mod<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemForeignMod) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001377 for it in & _i . attrs { _visitor.visit_attribute(it) };
1378 _visitor.visit_abi(& _i . abi);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001379 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001380 for it in & _i . items { _visitor.visit_foreign_item(it) };
David Tolnayc6b55bc2017-11-09 22:48:38 -08001381}
1382# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001383pub fn visit_item_impl<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemImpl) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001384 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay360a6342017-12-29 02:22:11 -05001385 if let Some(ref it) = _i . defaultness { tokens_helper(_visitor, &(it).0) };
David Tolnay9b258702017-12-29 02:24:41 -05001386 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001387 tokens_helper(_visitor, &(& _i . impl_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001388 _visitor.visit_generics(& _i . generics);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001389 if let Some(ref it) = _i . trait_ {
David Tolnay360a6342017-12-29 02:22:11 -05001390 if let Some(ref it) = ( it ) . 0 { tokens_helper(_visitor, &(it).0) };
David Tolnay5c4c0b52017-12-28 17:58:54 -05001391 _visitor.visit_path(& ( it ) . 1);
David Tolnaycc0f0372017-12-28 19:11:04 -05001392 tokens_helper(_visitor, &(& ( it ) . 2).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001393 };
David Tolnay4a918742017-12-28 16:54:41 -05001394 _visitor.visit_type(& * _i . self_ty);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001395 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001396 for it in & _i . items { _visitor.visit_impl_item(it) };
David Tolnayc6b55bc2017-11-09 22:48:38 -08001397}
1398# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001399pub fn visit_item_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMacro) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001400 for it in & _i . attrs { _visitor.visit_attribute(it) };
1401 if let Some(ref it) = _i . ident { _visitor.visit_ident(it) };
1402 _visitor.visit_macro(& _i . mac);
David Tolnaycc0f0372017-12-28 19:11:04 -05001403 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
David Tolnayc6b55bc2017-11-09 22:48:38 -08001404}
1405# [ cfg ( feature = "full" ) ]
David Tolnay500d8322017-12-18 00:32:51 -08001406pub fn visit_item_macro2<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMacro2) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001407 for it in & _i . attrs { _visitor.visit_attribute(it) };
1408 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001409 tokens_helper(_visitor, &(& _i . macro_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001410 _visitor.visit_ident(& _i . ident);
David Tolnay500d8322017-12-18 00:32:51 -08001411 // Skipped field _i . args;
1412 // Skipped field _i . body;
1413}
1414# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001415pub fn visit_item_mod<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMod) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001416 for it in & _i . attrs { _visitor.visit_attribute(it) };
1417 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001418 tokens_helper(_visitor, &(& _i . mod_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001419 _visitor.visit_ident(& _i . ident);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001420 if let Some(ref it) = _i . content {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001421 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001422 for it in & ( it ) . 1 { _visitor.visit_item(it) };
1423 };
David Tolnaycc0f0372017-12-28 19:11:04 -05001424 if let Some(ref it) = _i . semi { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04001425}
1426# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001427pub fn visit_item_static<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemStatic) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001428 for it in & _i . attrs { _visitor.visit_attribute(it) };
1429 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001430 tokens_helper(_visitor, &(& _i . static_token).0);
David Tolnay24237fb2017-12-29 02:15:26 -05001431 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001432 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001433 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001434 _visitor.visit_type(& * _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001435 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001436 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -05001437 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001438}
1439# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001440pub fn visit_item_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemStruct) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001441 for it in & _i . attrs { _visitor.visit_attribute(it) };
1442 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001443 tokens_helper(_visitor, &(& _i . struct_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001444 _visitor.visit_ident(& _i . ident);
1445 _visitor.visit_generics(& _i . generics);
1446 _visitor.visit_variant_data(& _i . data);
David Tolnaycc0f0372017-12-28 19:11:04 -05001447 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04001448}
1449# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001450pub fn visit_item_trait<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemTrait) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001451 for it in & _i . attrs { _visitor.visit_attribute(it) };
1452 _visitor.visit_visibility(& _i . vis);
David Tolnay9b258702017-12-29 02:24:41 -05001453 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001454 if let Some(ref it) = _i . auto_token { tokens_helper(_visitor, &(it).0) };
1455 tokens_helper(_visitor, &(& _i . trait_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001456 _visitor.visit_ident(& _i . ident);
1457 _visitor.visit_generics(& _i . generics);
David Tolnaycc0f0372017-12-28 19:11:04 -05001458 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001459 for el in & _i . supertraits { let it = el.item(); _visitor.visit_type_param_bound(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -05001460 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001461 for it in & _i . items { _visitor.visit_trait_item(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001462}
1463# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001464pub fn visit_item_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001465 for it in & _i . attrs { _visitor.visit_attribute(it) };
1466 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001467 tokens_helper(_visitor, &(& _i . type_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001468 _visitor.visit_ident(& _i . ident);
1469 _visitor.visit_generics(& _i . generics);
David Tolnaycc0f0372017-12-28 19:11:04 -05001470 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001471 _visitor.visit_type(& * _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001472 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001473}
1474# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001475pub fn visit_item_union<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemUnion) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001476 for it in & _i . attrs { _visitor.visit_attribute(it) };
1477 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001478 tokens_helper(_visitor, &(& _i . union_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001479 _visitor.visit_ident(& _i . ident);
1480 _visitor.visit_generics(& _i . generics);
1481 _visitor.visit_variant_data(& _i . data);
Nika Layzell27726662017-10-24 23:16:35 -04001482}
1483# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001484pub fn visit_item_use<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemUse) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001485 for it in & _i . attrs { _visitor.visit_attribute(it) };
1486 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001487 tokens_helper(_visitor, &(& _i . use_token).0);
1488 if let Some(ref it) = _i . leading_colon { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001489 for el in & _i . prefix { let it = el.item(); _visitor.visit_ident(it) };
1490 _visitor.visit_use_tree(& _i . tree);
David Tolnaycc0f0372017-12-28 19:11:04 -05001491 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001492}
David Tolnay2ae520a2017-12-29 11:19:50 -05001493# [ cfg ( feature = "full" ) ]
1494pub fn visit_item_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemVerbatim) {
1495 // Skipped field _i . tts;
1496}
David Tolnaybcd498f2017-12-29 12:02:33 -05001497# [ cfg ( feature = "full" ) ]
1498pub fn visit_label<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Label) {
1499 _visitor.visit_lifetime(& _i . name);
1500 tokens_helper(_visitor, &(& _i . colon_token).0);
1501}
Nika Layzell27726662017-10-24 23:16:35 -04001502
David Tolnay4ba63a02017-12-28 15:53:05 -05001503pub fn visit_lifetime<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Lifetime) {
1504 // Skipped field _i . sym;
1505 _visitor.visit_span(& _i . span);
1506}
1507
Nika Layzellc86173a2017-11-18 13:55:22 -05001508pub fn visit_lifetime_def<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LifetimeDef) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001509 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4ba63a02017-12-28 15:53:05 -05001510 _visitor.visit_lifetime(& _i . lifetime);
David Tolnaycc0f0372017-12-28 19:11:04 -05001511 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4ba63a02017-12-28 15:53:05 -05001512 for el in & _i . bounds { let it = el.item(); _visitor.visit_lifetime(it) };
1513}
1514
1515pub fn visit_lit<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Lit) {
1516 // Skipped field _i . value;
1517 _visitor.visit_span(& _i . span);
Nika Layzell27726662017-10-24 23:16:35 -04001518}
1519# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001520pub fn visit_local<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Local) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001521 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001522 tokens_helper(_visitor, &(& _i . let_token).0);
1523 _visitor.visit_pat(& * _i . pat);
David Tolnay8b4d3022017-12-29 12:11:10 -05001524 if let Some(ref it) = _i . ty {
1525 tokens_helper(_visitor, &(& ( it ) . 0).0);
1526 _visitor.visit_type(& * ( it ) . 1);
1527 };
1528 if let Some(ref it) = _i . init {
1529 tokens_helper(_visitor, &(& ( it ) . 0).0);
1530 _visitor.visit_expr(& * ( it ) . 1);
1531 };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001532 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001533}
Nika Layzell27726662017-10-24 23:16:35 -04001534
Nika Layzellc86173a2017-11-18 13:55:22 -05001535pub fn visit_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Macro) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001536 _visitor.visit_path(& _i . path);
David Tolnaycc0f0372017-12-28 19:11:04 -05001537 tokens_helper(_visitor, &(& _i . bang_token).0);
David Tolnayfe9d2782017-12-29 11:32:42 -05001538 // Skipped field _i . tt;
David Tolnaydecf28d2017-11-11 11:56:45 -08001539}
David Tolnay14982012017-12-29 00:49:51 -05001540
David Tolnay85b69a42017-12-27 20:43:10 -05001541pub fn visit_member<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Member) {
1542 use ::Member::*;
1543 match *_i {
1544 Named(ref _binding_0, ) => {
1545 _visitor.visit_ident(_binding_0);
1546 }
1547 Unnamed(ref _binding_0, ) => {
1548 _visitor.visit_index(_binding_0);
1549 }
1550 }
1551}
David Tolnaydecf28d2017-11-11 11:56:45 -08001552
Nika Layzellc86173a2017-11-18 13:55:22 -05001553pub fn visit_meta_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MetaItem) {
Nika Layzell27726662017-10-24 23:16:35 -04001554 use ::MetaItem::*;
1555 match *_i {
1556 Term(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001557 _visitor.visit_ident(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001558 }
1559 List(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001560 _visitor.visit_meta_item_list(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001561 }
1562 NameValue(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001563 _visitor.visit_meta_name_value(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001564 }
1565 }
1566}
1567
Nika Layzellc86173a2017-11-18 13:55:22 -05001568pub fn visit_meta_item_list<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MetaItemList) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001569 _visitor.visit_ident(& _i . ident);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001570 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001571 for el in & _i . nested { let it = el.item(); _visitor.visit_nested_meta_item(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001572}
1573
Nika Layzellc86173a2017-11-18 13:55:22 -05001574pub fn visit_meta_name_value<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MetaNameValue) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001575 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001576 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4ba63a02017-12-28 15:53:05 -05001577 _visitor.visit_lit(& _i . lit);
Nika Layzell27726662017-10-24 23:16:35 -04001578}
1579# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001580pub fn visit_method_sig<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MethodSig) {
David Tolnay360a6342017-12-29 02:22:11 -05001581 if let Some(ref it) = _i . constness { tokens_helper(_visitor, &(it).0) };
David Tolnay9b258702017-12-29 02:24:41 -05001582 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001583 if let Some(ref it) = _i . abi { _visitor.visit_abi(it) };
1584 _visitor.visit_ident(& _i . ident);
1585 _visitor.visit_fn_decl(& _i . decl);
Nika Layzell27726662017-10-24 23:16:35 -04001586}
David Tolnayd60cfec2017-12-29 00:21:38 -05001587# [ cfg ( feature = "full" ) ]
1588pub fn visit_method_turbofish<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MethodTurbofish) {
1589 tokens_helper(_visitor, &(& _i . colon2_token).0);
1590 tokens_helper(_visitor, &(& _i . lt_token).0);
1591 for el in & _i . args { let it = el.item(); _visitor.visit_generic_method_argument(it) };
1592 tokens_helper(_visitor, &(& _i . gt_token).0);
1593}
Nika Layzell27726662017-10-24 23:16:35 -04001594
Nika Layzellc86173a2017-11-18 13:55:22 -05001595pub fn visit_nested_meta_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast NestedMetaItem) {
Nika Layzell27726662017-10-24 23:16:35 -04001596 use ::NestedMetaItem::*;
1597 match *_i {
1598 MetaItem(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001599 _visitor.visit_meta_item(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001600 }
1601 Literal(ref _binding_0, ) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05001602 _visitor.visit_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001603 }
1604 }
1605}
1606
Nika Layzellc08227a2017-12-04 16:30:17 -05001607pub fn visit_parenthesized_generic_arguments<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ParenthesizedGenericArguments) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001608 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001609 for el in & _i . inputs { let it = el.item(); _visitor.visit_type(it) };
1610 _visitor.visit_return_type(& _i . output);
Nika Layzell27726662017-10-24 23:16:35 -04001611}
1612# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001613pub fn visit_pat<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Pat) {
Nika Layzell27726662017-10-24 23:16:35 -04001614 use ::Pat::*;
1615 match *_i {
1616 Wild(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001617 _visitor.visit_pat_wild(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001618 }
1619 Ident(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001620 _visitor.visit_pat_ident(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001621 }
1622 Struct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001623 _visitor.visit_pat_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001624 }
1625 TupleStruct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001626 _visitor.visit_pat_tuple_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001627 }
1628 Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001629 _visitor.visit_pat_path(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001630 }
1631 Tuple(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001632 _visitor.visit_pat_tuple(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001633 }
1634 Box(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001635 _visitor.visit_pat_box(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001636 }
1637 Ref(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001638 _visitor.visit_pat_ref(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001639 }
1640 Lit(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001641 _visitor.visit_pat_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001642 }
1643 Range(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001644 _visitor.visit_pat_range(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001645 }
1646 Slice(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001647 _visitor.visit_pat_slice(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001648 }
David Tolnaydecf28d2017-11-11 11:56:45 -08001649 Macro(ref _binding_0, ) => {
David Tolnay323279a2017-12-29 11:26:32 -05001650 _visitor.visit_pat_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001651 }
David Tolnay2ae520a2017-12-29 11:19:50 -05001652 Verbatim(ref _binding_0, ) => {
1653 _visitor.visit_pat_verbatim(_binding_0);
1654 }
Nika Layzell27726662017-10-24 23:16:35 -04001655 }
1656}
1657# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001658pub fn visit_pat_box<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatBox) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001659 tokens_helper(_visitor, &(& _i . box_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001660 _visitor.visit_pat(& * _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001661}
1662# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001663pub fn visit_pat_ident<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatIdent) {
David Tolnay24237fb2017-12-29 02:15:26 -05001664 if let Some(ref it) = _i . by_ref { tokens_helper(_visitor, &(it).0) };
1665 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001666 _visitor.visit_ident(& _i . ident);
David Tolnay8b4d3022017-12-29 12:11:10 -05001667 if let Some(ref it) = _i . subpat {
1668 tokens_helper(_visitor, &(& ( it ) . 0).0);
1669 _visitor.visit_pat(& * ( it ) . 1);
1670 };
Nika Layzell27726662017-10-24 23:16:35 -04001671}
1672# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001673pub fn visit_pat_lit<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatLit) {
David Tolnay4a918742017-12-28 16:54:41 -05001674 _visitor.visit_expr(& * _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -04001675}
1676# [ cfg ( feature = "full" ) ]
David Tolnay323279a2017-12-29 11:26:32 -05001677pub fn visit_pat_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatMacro) {
1678 _visitor.visit_macro(& _i . mac);
1679}
1680# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001681pub fn visit_pat_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatPath) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001682 if let Some(ref it) = _i . qself { _visitor.visit_qself(it) };
1683 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -04001684}
1685# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001686pub fn visit_pat_range<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatRange) {
David Tolnay4a918742017-12-28 16:54:41 -05001687 _visitor.visit_expr(& * _i . lo);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001688 _visitor.visit_range_limits(& _i . limits);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001689 _visitor.visit_expr(& * _i . hi);
Nika Layzell27726662017-10-24 23:16:35 -04001690}
1691# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001692pub fn visit_pat_ref<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatRef) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001693 tokens_helper(_visitor, &(& _i . and_token).0);
David Tolnay24237fb2017-12-29 02:15:26 -05001694 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001695 _visitor.visit_pat(& * _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001696}
1697# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001698pub fn visit_pat_slice<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatSlice) {
David Tolnay4a3f59a2017-12-28 21:21:12 -05001699 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001700 for el in & _i . front { let it = el.item(); _visitor.visit_pat(it) };
David Tolnay4a918742017-12-28 16:54:41 -05001701 if let Some(ref it) = _i . middle { _visitor.visit_pat(& * * it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001702 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
David Tolnay41871922017-12-29 01:53:45 -05001703 if let Some(ref it) = _i . comma_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001704 for el in & _i . back { let it = el.item(); _visitor.visit_pat(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001705}
1706# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001707pub fn visit_pat_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatStruct) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001708 _visitor.visit_path(& _i . path);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001709 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001710 for el in & _i . fields { let it = el.item(); _visitor.visit_field_pat(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001711 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04001712}
1713# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001714pub fn visit_pat_tuple<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatTuple) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001715 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay41871922017-12-29 01:53:45 -05001716 for el in & _i . front { let it = el.item(); _visitor.visit_pat(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001717 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
David Tolnay41871922017-12-29 01:53:45 -05001718 if let Some(ref it) = _i . comma_token { tokens_helper(_visitor, &(it).0) };
1719 for el in & _i . back { let it = el.item(); _visitor.visit_pat(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001720}
1721# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001722pub fn visit_pat_tuple_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatTupleStruct) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001723 _visitor.visit_path(& _i . path);
1724 _visitor.visit_pat_tuple(& _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001725}
1726# [ cfg ( feature = "full" ) ]
David Tolnay2ae520a2017-12-29 11:19:50 -05001727pub fn visit_pat_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatVerbatim) {
1728 // Skipped field _i . tts;
1729}
1730# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001731pub fn visit_pat_wild<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatWild) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001732 tokens_helper(_visitor, &(& _i . underscore_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001733}
1734
Nika Layzellc86173a2017-11-18 13:55:22 -05001735pub fn visit_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Path) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001736 if let Some(ref it) = _i . leading_colon { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001737 for el in & _i . segments { let it = el.item(); _visitor.visit_path_segment(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001738}
Nika Layzellc08227a2017-12-04 16:30:17 -05001739
1740pub fn visit_path_arguments<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PathArguments) {
1741 use ::PathArguments::*;
1742 match *_i {
1743 None => { }
1744 AngleBracketed(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001745 _visitor.visit_angle_bracketed_generic_arguments(_binding_0);
Nika Layzellc08227a2017-12-04 16:30:17 -05001746 }
1747 Parenthesized(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001748 _visitor.visit_parenthesized_generic_arguments(_binding_0);
Nika Layzellc08227a2017-12-04 16:30:17 -05001749 }
1750 }
1751}
Nika Layzell27726662017-10-24 23:16:35 -04001752
Nika Layzellc86173a2017-11-18 13:55:22 -05001753pub fn visit_path_segment<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PathSegment) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001754 _visitor.visit_ident(& _i . ident);
1755 _visitor.visit_path_arguments(& _i . arguments);
Nika Layzell27726662017-10-24 23:16:35 -04001756}
Nika Layzell27726662017-10-24 23:16:35 -04001757
Nika Layzellc86173a2017-11-18 13:55:22 -05001758pub fn visit_poly_trait_ref<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PolyTraitRef) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001759 if let Some(ref it) = _i . bound_lifetimes { _visitor.visit_bound_lifetimes(it) };
1760 _visitor.visit_path(& _i . trait_ref);
Nika Layzell27726662017-10-24 23:16:35 -04001761}
1762
Nika Layzellc86173a2017-11-18 13:55:22 -05001763pub fn visit_qself<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast QSelf) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001764 tokens_helper(_visitor, &(& _i . lt_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001765 _visitor.visit_type(& * _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -04001766 // Skipped field _i . position;
David Tolnaycc0f0372017-12-28 19:11:04 -05001767 if let Some(ref it) = _i . as_token { tokens_helper(_visitor, &(it).0) };
1768 tokens_helper(_visitor, &(& _i . gt_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001769}
1770# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001771pub fn visit_range_limits<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast RangeLimits) {
Nika Layzell27726662017-10-24 23:16:35 -04001772 use ::RangeLimits::*;
1773 match *_i {
1774 HalfOpen(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05001775 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04001776 }
1777 Closed(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05001778 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04001779 }
1780 }
1781}
David Tolnayf93b90d2017-11-11 19:21:26 -08001782
Nika Layzellc86173a2017-11-18 13:55:22 -05001783pub fn visit_return_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ReturnType) {
David Tolnayf93b90d2017-11-11 19:21:26 -08001784 use ::ReturnType::*;
1785 match *_i {
1786 Default => { }
David Tolnayfd6bf5c2017-11-12 09:41:14 -08001787 Type(ref _binding_0, ref _binding_1, ) => {
David Tolnay4a3f59a2017-12-28 21:21:12 -05001788 tokens_helper(_visitor, &(_binding_0).0);
1789 _visitor.visit_type(& * * _binding_1);
David Tolnayf93b90d2017-11-11 19:21:26 -08001790 }
1791 }
1792}
Nika Layzellefb83ba2017-12-19 18:23:55 -05001793
1794pub fn visit_span<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Span) {
1795}
Nika Layzell27726662017-10-24 23:16:35 -04001796# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001797pub fn visit_stmt<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Stmt) {
Nika Layzell27726662017-10-24 23:16:35 -04001798 use ::Stmt::*;
1799 match *_i {
1800 Local(ref _binding_0, ) => {
David Tolnay4a918742017-12-28 16:54:41 -05001801 _visitor.visit_local(& * * _binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001802 }
1803 Item(ref _binding_0, ) => {
David Tolnay4a918742017-12-28 16:54:41 -05001804 _visitor.visit_item(& * * _binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001805 }
1806 Expr(ref _binding_0, ) => {
David Tolnay4a918742017-12-28 16:54:41 -05001807 _visitor.visit_expr(& * * _binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001808 }
1809 Semi(ref _binding_0, ref _binding_1, ) => {
David Tolnay4a918742017-12-28 16:54:41 -05001810 _visitor.visit_expr(& * * _binding_0);
David Tolnaycc0f0372017-12-28 19:11:04 -05001811 tokens_helper(_visitor, &(_binding_1).0);
Nika Layzell27726662017-10-24 23:16:35 -04001812 }
Nika Layzell27726662017-10-24 23:16:35 -04001813 }
1814}
1815
Nika Layzellc86173a2017-11-18 13:55:22 -05001816pub fn visit_trait_bound_modifier<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitBoundModifier) {
Nika Layzell27726662017-10-24 23:16:35 -04001817 use ::TraitBoundModifier::*;
1818 match *_i {
1819 None => { }
1820 Maybe(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05001821 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04001822 }
1823 }
1824}
1825# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001826pub fn visit_trait_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItem) {
David Tolnayda705bd2017-11-10 21:58:05 -08001827 use ::TraitItem::*;
Nika Layzell27726662017-10-24 23:16:35 -04001828 match *_i {
1829 Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001830 _visitor.visit_trait_item_const(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001831 }
1832 Method(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001833 _visitor.visit_trait_item_method(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001834 }
1835 Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001836 _visitor.visit_trait_item_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001837 }
1838 Macro(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001839 _visitor.visit_trait_item_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001840 }
David Tolnay2ae520a2017-12-29 11:19:50 -05001841 Verbatim(ref _binding_0, ) => {
1842 _visitor.visit_trait_item_verbatim(_binding_0);
1843 }
Nika Layzell27726662017-10-24 23:16:35 -04001844 }
1845}
1846# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001847pub fn visit_trait_item_const<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemConst) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001848 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001849 tokens_helper(_visitor, &(& _i . const_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001850 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001851 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001852 _visitor.visit_type(& _i . ty);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001853 if let Some(ref it) = _i . default {
David Tolnaycc0f0372017-12-28 19:11:04 -05001854 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001855 _visitor.visit_expr(& ( it ) . 1);
1856 };
David Tolnaycc0f0372017-12-28 19:11:04 -05001857 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnayda705bd2017-11-10 21:58:05 -08001858}
1859# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001860pub fn visit_trait_item_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemMacro) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001861 for it in & _i . attrs { _visitor.visit_attribute(it) };
1862 _visitor.visit_macro(& _i . mac);
David Tolnaycc0f0372017-12-28 19:11:04 -05001863 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
David Tolnayda705bd2017-11-10 21:58:05 -08001864}
1865# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001866pub fn visit_trait_item_method<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemMethod) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001867 for it in & _i . attrs { _visitor.visit_attribute(it) };
1868 _visitor.visit_method_sig(& _i . sig);
1869 if let Some(ref it) = _i . default { _visitor.visit_block(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001870 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04001871}
1872# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001873pub fn visit_trait_item_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001874 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001875 tokens_helper(_visitor, &(& _i . type_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001876 _visitor.visit_ident(& _i . ident);
1877 _visitor.visit_generics(& _i . generics);
David Tolnaycc0f0372017-12-28 19:11:04 -05001878 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001879 for el in & _i . bounds { let it = el.item(); _visitor.visit_type_param_bound(it) };
David Tolnay5c4c0b52017-12-28 17:58:54 -05001880 if let Some(ref it) = _i . default {
David Tolnaycc0f0372017-12-28 19:11:04 -05001881 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001882 _visitor.visit_type(& ( it ) . 1);
1883 };
David Tolnaycc0f0372017-12-28 19:11:04 -05001884 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001885}
David Tolnay2ae520a2017-12-29 11:19:50 -05001886# [ cfg ( feature = "full" ) ]
1887pub fn visit_trait_item_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemVerbatim) {
1888 // Skipped field _i . tts;
1889}
Nika Layzell27726662017-10-24 23:16:35 -04001890
Nika Layzellc86173a2017-11-18 13:55:22 -05001891pub fn visit_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Type) {
David Tolnayfd6bf5c2017-11-12 09:41:14 -08001892 use ::Type::*;
Nika Layzell27726662017-10-24 23:16:35 -04001893 match *_i {
1894 Slice(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001895 _visitor.visit_type_slice(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001896 }
1897 Array(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001898 _visitor.visit_type_array(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001899 }
1900 Ptr(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001901 _visitor.visit_type_ptr(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001902 }
David Tolnay0a89b4d2017-11-13 00:55:45 -08001903 Reference(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001904 _visitor.visit_type_reference(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001905 }
1906 BareFn(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001907 _visitor.visit_type_bare_fn(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001908 }
1909 Never(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001910 _visitor.visit_type_never(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001911 }
David Tolnay05362582017-12-26 01:33:57 -05001912 Tuple(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001913 _visitor.visit_type_tuple(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001914 }
1915 Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001916 _visitor.visit_type_path(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001917 }
1918 TraitObject(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001919 _visitor.visit_type_trait_object(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001920 }
1921 ImplTrait(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001922 _visitor.visit_type_impl_trait(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001923 }
1924 Paren(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001925 _visitor.visit_type_paren(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001926 }
1927 Group(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001928 _visitor.visit_type_group(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001929 }
1930 Infer(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001931 _visitor.visit_type_infer(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001932 }
David Tolnaydecf28d2017-11-11 11:56:45 -08001933 Macro(ref _binding_0, ) => {
David Tolnay323279a2017-12-29 11:26:32 -05001934 _visitor.visit_type_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001935 }
David Tolnay2ae520a2017-12-29 11:19:50 -05001936 Verbatim(ref _binding_0, ) => {
1937 _visitor.visit_type_verbatim(_binding_0);
1938 }
Nika Layzell27726662017-10-24 23:16:35 -04001939 }
1940}
1941
Nika Layzellc86173a2017-11-18 13:55:22 -05001942pub fn visit_type_array<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeArray) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001943 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05001944 _visitor.visit_type(& * _i . elem);
David Tolnaycc0f0372017-12-28 19:11:04 -05001945 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05001946 _visitor.visit_expr(& _i . len);
Nika Layzell27726662017-10-24 23:16:35 -04001947}
1948
Nika Layzellc86173a2017-11-18 13:55:22 -05001949pub fn visit_type_bare_fn<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeBareFn) {
David Tolnaybe7a9592017-12-29 02:39:53 -05001950 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
1951 if let Some(ref it) = _i . abi { _visitor.visit_abi(it) };
1952 tokens_helper(_visitor, &(& _i . fn_token).0);
1953 if let Some(ref it) = _i . lifetimes { _visitor.visit_bound_lifetimes(it) };
1954 tokens_helper(_visitor, &(& _i . paren_token).0);
1955 for el in & _i . inputs { let it = el.item(); _visitor.visit_bare_fn_arg(it) };
1956 if let Some(ref it) = _i . variadic { tokens_helper(_visitor, &(it).0) };
1957 _visitor.visit_return_type(& _i . output);
Nika Layzell27726662017-10-24 23:16:35 -04001958}
1959
Nika Layzellc86173a2017-11-18 13:55:22 -05001960pub fn visit_type_group<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeGroup) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001961 tokens_helper(_visitor, &(& _i . group_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05001962 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04001963}
1964
Nika Layzellc86173a2017-11-18 13:55:22 -05001965pub fn visit_type_impl_trait<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeImplTrait) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001966 tokens_helper(_visitor, &(& _i . impl_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001967 for el in & _i . bounds { let it = el.item(); _visitor.visit_type_param_bound(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001968}
1969
Nika Layzellc86173a2017-11-18 13:55:22 -05001970pub fn visit_type_infer<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeInfer) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001971 tokens_helper(_visitor, &(& _i . underscore_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001972}
1973
David Tolnay323279a2017-12-29 11:26:32 -05001974pub fn visit_type_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeMacro) {
1975 _visitor.visit_macro(& _i . mac);
1976}
1977
Nika Layzellc86173a2017-11-18 13:55:22 -05001978pub fn visit_type_never<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeNever) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001979 tokens_helper(_visitor, &(& _i . bang_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001980}
1981
Nika Layzellc86173a2017-11-18 13:55:22 -05001982pub fn visit_type_param<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParam) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001983 for it in & _i . attrs { _visitor.visit_attribute(it) };
1984 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001985 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001986 for el in & _i . bounds { let it = el.item(); _visitor.visit_type_param_bound(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001987 if let Some(ref it) = _i . eq_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001988 if let Some(ref it) = _i . default { _visitor.visit_type(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001989}
1990
Nika Layzellc86173a2017-11-18 13:55:22 -05001991pub fn visit_type_param_bound<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParamBound) {
David Tolnayfd6bf5c2017-11-12 09:41:14 -08001992 use ::TypeParamBound::*;
Nika Layzell27726662017-10-24 23:16:35 -04001993 match *_i {
1994 Trait(ref _binding_0, ref _binding_1, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001995 _visitor.visit_poly_trait_ref(_binding_0);
1996 _visitor.visit_trait_bound_modifier(_binding_1);
Nika Layzell27726662017-10-24 23:16:35 -04001997 }
1998 Region(ref _binding_0, ) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05001999 _visitor.visit_lifetime(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002000 }
2001 }
2002}
2003
Nika Layzellc86173a2017-11-18 13:55:22 -05002004pub fn visit_type_paren<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParen) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002005 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05002006 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04002007}
2008
Nika Layzellc86173a2017-11-18 13:55:22 -05002009pub fn visit_type_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypePath) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002010 if let Some(ref it) = _i . qself { _visitor.visit_qself(it) };
2011 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -04002012}
2013
Nika Layzellc86173a2017-11-18 13:55:22 -05002014pub fn visit_type_ptr<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypePtr) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002015 tokens_helper(_visitor, &(& _i . star_token).0);
2016 if let Some(ref it) = _i . const_token { tokens_helper(_visitor, &(it).0) };
David Tolnay136aaa32017-12-29 02:37:36 -05002017 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
2018 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04002019}
2020
Nika Layzellc86173a2017-11-18 13:55:22 -05002021pub fn visit_type_reference<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeReference) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002022 tokens_helper(_visitor, &(& _i . and_token).0);
David Tolnay4ba63a02017-12-28 15:53:05 -05002023 if let Some(ref it) = _i . lifetime { _visitor.visit_lifetime(it) };
David Tolnay136aaa32017-12-29 02:37:36 -05002024 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
2025 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04002026}
2027
Nika Layzellc86173a2017-11-18 13:55:22 -05002028pub fn visit_type_slice<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeSlice) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002029 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05002030 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04002031}
2032
Nika Layzellc86173a2017-11-18 13:55:22 -05002033pub fn visit_type_trait_object<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeTraitObject) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002034 if let Some(ref it) = _i . dyn_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05002035 for el in & _i . bounds { let it = el.item(); _visitor.visit_type_param_bound(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002036}
2037
David Tolnay05362582017-12-26 01:33:57 -05002038pub fn visit_type_tuple<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeTuple) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002039 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05002040 for el in & _i . elems { let it = el.item(); _visitor.visit_type(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002041}
2042
David Tolnay2ae520a2017-12-29 11:19:50 -05002043pub fn visit_type_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeVerbatim) {
2044 // Skipped field _i . tts;
2045}
2046
Nika Layzellc86173a2017-11-18 13:55:22 -05002047pub fn visit_un_op<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UnOp) {
Nika Layzell27726662017-10-24 23:16:35 -04002048 use ::UnOp::*;
2049 match *_i {
2050 Deref(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05002051 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04002052 }
2053 Not(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05002054 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04002055 }
2056 Neg(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05002057 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04002058 }
2059 }
2060}
David Tolnay5f332a92017-12-26 00:42:45 -05002061# [ cfg ( feature = "full" ) ]
2062pub fn visit_use_glob<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseGlob) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002063 tokens_helper(_visitor, &(& _i . star_token).0);
David Tolnay5f332a92017-12-26 00:42:45 -05002064}
2065# [ cfg ( feature = "full" ) ]
2066pub fn visit_use_list<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseList) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002067 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05002068 for el in & _i . items { let it = el.item(); _visitor.visit_use_tree(it) };
David Tolnay5f332a92017-12-26 00:42:45 -05002069}
2070# [ cfg ( feature = "full" ) ]
2071pub fn visit_use_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UsePath) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002072 _visitor.visit_ident(& _i . ident);
David Tolnay5c4c0b52017-12-28 17:58:54 -05002073 if let Some(ref it) = _i . rename {
David Tolnaycc0f0372017-12-28 19:11:04 -05002074 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05002075 _visitor.visit_ident(& ( it ) . 1);
2076 };
David Tolnay5f332a92017-12-26 00:42:45 -05002077}
2078# [ cfg ( feature = "full" ) ]
2079pub fn visit_use_tree<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseTree) {
2080 use ::UseTree::*;
2081 match *_i {
2082 Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002083 _visitor.visit_use_path(_binding_0);
David Tolnay5f332a92017-12-26 00:42:45 -05002084 }
2085 Glob(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002086 _visitor.visit_use_glob(_binding_0);
David Tolnay5f332a92017-12-26 00:42:45 -05002087 }
2088 List(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002089 _visitor.visit_use_list(_binding_0);
David Tolnay5f332a92017-12-26 00:42:45 -05002090 }
2091 }
2092}
Nika Layzell27726662017-10-24 23:16:35 -04002093
Nika Layzellc86173a2017-11-18 13:55:22 -05002094pub fn visit_variant<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Variant) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002095 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05002096 _visitor.visit_ident(& _i . ident);
David Tolnayf0d63bf2017-12-26 12:29:47 -05002097 _visitor.visit_variant_data(& _i . data);
David Tolnaye67902a2017-12-28 22:12:00 -05002098 if let Some(ref it) = _i . discriminant {
2099 tokens_helper(_visitor, &(& ( it ) . 0).0);
2100 _visitor.visit_expr(& ( it ) . 1);
2101 };
Nika Layzell27726662017-10-24 23:16:35 -04002102}
2103
Nika Layzellc86173a2017-11-18 13:55:22 -05002104pub fn visit_variant_data<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VariantData) {
Nika Layzell27726662017-10-24 23:16:35 -04002105 use ::VariantData::*;
2106 match *_i {
2107 Struct(ref _binding_0, ref _binding_1, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002108 for el in _binding_0 { let it = el.item(); _visitor.visit_field(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -05002109 tokens_helper(_visitor, &(_binding_1).0);
Nika Layzell27726662017-10-24 23:16:35 -04002110 }
2111 Tuple(ref _binding_0, ref _binding_1, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002112 for el in _binding_0 { let it = el.item(); _visitor.visit_field(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -05002113 tokens_helper(_visitor, &(_binding_1).0);
Nika Layzell27726662017-10-24 23:16:35 -04002114 }
2115 Unit => { }
2116 }
2117}
Nika Layzell27726662017-10-24 23:16:35 -04002118
Nika Layzellc86173a2017-11-18 13:55:22 -05002119pub fn visit_vis_crate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisCrate) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002120 tokens_helper(_visitor, &(& _i . pub_token).0);
David Tolnay1e01f9c2017-12-28 20:16:19 -05002121 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnaycc0f0372017-12-28 19:11:04 -05002122 tokens_helper(_visitor, &(& _i . crate_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04002123}
2124
Nika Layzellc86173a2017-11-18 13:55:22 -05002125pub fn visit_vis_public<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisPublic) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002126 tokens_helper(_visitor, &(& _i . pub_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04002127}
2128
Nika Layzellc86173a2017-11-18 13:55:22 -05002129pub fn visit_vis_restricted<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisRestricted) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002130 tokens_helper(_visitor, &(& _i . pub_token).0);
David Tolnay1e01f9c2017-12-28 20:16:19 -05002131 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnaycc0f0372017-12-28 19:11:04 -05002132 if let Some(ref it) = _i . in_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a918742017-12-28 16:54:41 -05002133 _visitor.visit_path(& * _i . path);
Nika Layzell27726662017-10-24 23:16:35 -04002134}
2135
Nika Layzellc86173a2017-11-18 13:55:22 -05002136pub fn visit_visibility<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Visibility) {
Nika Layzell27726662017-10-24 23:16:35 -04002137 use ::Visibility::*;
2138 match *_i {
2139 Public(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002140 _visitor.visit_vis_public(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002141 }
2142 Crate(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002143 _visitor.visit_vis_crate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002144 }
2145 Restricted(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002146 _visitor.visit_vis_restricted(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002147 }
David Tolnayfcfb9002017-12-28 22:04:29 -05002148 Inherited => { }
Nika Layzell27726662017-10-24 23:16:35 -04002149 }
2150}
2151
Nika Layzellc86173a2017-11-18 13:55:22 -05002152pub fn visit_where_bound_predicate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WhereBoundPredicate) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002153 if let Some(ref it) = _i . bound_lifetimes { _visitor.visit_bound_lifetimes(it) };
2154 _visitor.visit_type(& _i . bounded_ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05002155 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05002156 for el in & _i . bounds { let it = el.item(); _visitor.visit_type_param_bound(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002157}
2158
Nika Layzellc86173a2017-11-18 13:55:22 -05002159pub fn visit_where_clause<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WhereClause) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002160 tokens_helper(_visitor, &(& _i . where_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05002161 for el in & _i . predicates { let it = el.item(); _visitor.visit_where_predicate(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002162}
2163
Nika Layzellc86173a2017-11-18 13:55:22 -05002164pub fn visit_where_eq_predicate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WhereEqPredicate) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002165 _visitor.visit_type(& _i . lhs_ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05002166 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05002167 _visitor.visit_type(& _i . rhs_ty);
Nika Layzell27726662017-10-24 23:16:35 -04002168}
2169
Nika Layzellc86173a2017-11-18 13:55:22 -05002170pub fn visit_where_predicate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WherePredicate) {
Nika Layzell27726662017-10-24 23:16:35 -04002171 use ::WherePredicate::*;
2172 match *_i {
2173 BoundPredicate(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002174 _visitor.visit_where_bound_predicate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002175 }
2176 RegionPredicate(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002177 _visitor.visit_where_region_predicate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002178 }
2179 EqPredicate(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002180 _visitor.visit_where_eq_predicate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002181 }
2182 }
2183}
2184
Nika Layzellc86173a2017-11-18 13:55:22 -05002185pub fn visit_where_region_predicate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WhereRegionPredicate) {
David Tolnay4ba63a02017-12-28 15:53:05 -05002186 _visitor.visit_lifetime(& _i . lifetime);
David Tolnaycc0f0372017-12-28 19:11:04 -05002187 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4ba63a02017-12-28 15:53:05 -05002188 for el in & _i . bounds { let it = el.item(); _visitor.visit_lifetime(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002189}
2190