blob: 411651d86ebf5b910233a82f275045b23da10237 [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) }
Nika Layzell27726662017-10-24 23:16:35 -040060# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050061fn visit_block(&mut self, i: &'ast Block) { visit_block(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040062
Nika Layzellc86173a2017-11-18 13:55:22 -050063fn visit_body(&mut self, i: &'ast Body) { visit_body(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040064
Nika Layzellc86173a2017-11-18 13:55:22 -050065fn visit_body_enum(&mut self, i: &'ast BodyEnum) { visit_body_enum(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040066
Nika Layzellc86173a2017-11-18 13:55:22 -050067fn visit_body_struct(&mut self, i: &'ast BodyStruct) { visit_body_struct(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040068
Nika Layzellc86173a2017-11-18 13:55:22 -050069fn visit_bound_lifetimes(&mut self, i: &'ast BoundLifetimes) { visit_bound_lifetimes(self, i) }
Nika Layzellf1fdc0b2017-12-04 19:58:32 -050070
71fn visit_const_param(&mut self, i: &'ast ConstParam) { visit_const_param(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040072
Nika Layzellc86173a2017-11-18 13:55:22 -050073fn visit_derive_input(&mut self, i: &'ast DeriveInput) { visit_derive_input(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040074
Nika Layzellc86173a2017-11-18 13:55:22 -050075fn visit_expr(&mut self, i: &'ast Expr) { visit_expr(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040076# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050077fn visit_expr_addr_of(&mut self, i: &'ast ExprAddrOf) { visit_expr_addr_of(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040078# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050079fn visit_expr_array(&mut self, i: &'ast ExprArray) { visit_expr_array(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040080# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050081fn visit_expr_assign(&mut self, i: &'ast ExprAssign) { visit_expr_assign(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040082# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050083fn visit_expr_assign_op(&mut self, i: &'ast ExprAssignOp) { visit_expr_assign_op(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040084
Nika Layzellc86173a2017-11-18 13:55:22 -050085fn visit_expr_binary(&mut self, i: &'ast ExprBinary) { visit_expr_binary(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040086# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050087fn visit_expr_block(&mut self, i: &'ast ExprBlock) { visit_expr_block(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040088# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050089fn visit_expr_box(&mut self, i: &'ast ExprBox) { visit_expr_box(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040090# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050091fn visit_expr_break(&mut self, i: &'ast ExprBreak) { visit_expr_break(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040092
Nika Layzellc86173a2017-11-18 13:55:22 -050093fn visit_expr_call(&mut self, i: &'ast ExprCall) { visit_expr_call(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040094
Nika Layzellc86173a2017-11-18 13:55:22 -050095fn visit_expr_cast(&mut self, i: &'ast ExprCast) { visit_expr_cast(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040096# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050097fn visit_expr_catch(&mut self, i: &'ast ExprCatch) { visit_expr_catch(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040098# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050099fn visit_expr_closure(&mut self, i: &'ast ExprClosure) { visit_expr_closure(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400100# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500101fn visit_expr_continue(&mut self, i: &'ast ExprContinue) { visit_expr_continue(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400102# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500103fn visit_expr_field(&mut self, i: &'ast ExprField) { visit_expr_field(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400104# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500105fn visit_expr_for_loop(&mut self, i: &'ast ExprForLoop) { visit_expr_for_loop(self, i) }
David Tolnaye98775f2017-12-28 23:17:00 -0500106# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500107fn visit_expr_group(&mut self, i: &'ast ExprGroup) { visit_expr_group(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400108# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500109fn visit_expr_if(&mut self, i: &'ast ExprIf) { visit_expr_if(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400110# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500111fn visit_expr_if_let(&mut self, i: &'ast ExprIfLet) { visit_expr_if_let(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400112# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500113fn visit_expr_in_place(&mut self, i: &'ast ExprInPlace) { visit_expr_in_place(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400114
Nika Layzellc86173a2017-11-18 13:55:22 -0500115fn visit_expr_index(&mut self, i: &'ast ExprIndex) { visit_expr_index(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400116
David Tolnay8c91b882017-12-28 23:04:32 -0500117fn visit_expr_lit(&mut self, i: &'ast ExprLit) { visit_expr_lit(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400118# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500119fn visit_expr_loop(&mut self, i: &'ast ExprLoop) { visit_expr_loop(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400120# [ cfg ( feature = "full" ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500121fn visit_expr_macro(&mut self, i: &'ast ExprMacro) { visit_expr_macro(self, i) }
122# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500123fn visit_expr_match(&mut self, i: &'ast ExprMatch) { visit_expr_match(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400124# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500125fn visit_expr_method_call(&mut self, i: &'ast ExprMethodCall) { visit_expr_method_call(self, i) }
David Tolnaye98775f2017-12-28 23:17:00 -0500126# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500127fn visit_expr_paren(&mut self, i: &'ast ExprParen) { visit_expr_paren(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400128
Nika Layzellc86173a2017-11-18 13:55:22 -0500129fn visit_expr_path(&mut self, i: &'ast ExprPath) { visit_expr_path(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400130# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500131fn visit_expr_range(&mut self, i: &'ast ExprRange) { visit_expr_range(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400132# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500133fn visit_expr_repeat(&mut self, i: &'ast ExprRepeat) { visit_expr_repeat(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400134# [ cfg ( feature = "full" ) ]
David Tolnayc246cd32017-12-28 23:14:32 -0500135fn visit_expr_return(&mut self, i: &'ast ExprReturn) { visit_expr_return(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400136# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500137fn visit_expr_struct(&mut self, i: &'ast ExprStruct) { visit_expr_struct(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400138# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500139fn visit_expr_try(&mut self, i: &'ast ExprTry) { visit_expr_try(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400140# [ cfg ( feature = "full" ) ]
David Tolnay05362582017-12-26 01:33:57 -0500141fn visit_expr_tuple(&mut self, i: &'ast ExprTuple) { visit_expr_tuple(self, i) }
David Tolnay0cf94f22017-12-28 23:46:26 -0500142# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500143fn visit_expr_type(&mut self, i: &'ast ExprType) { visit_expr_type(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400144
Nika Layzellc86173a2017-11-18 13:55:22 -0500145fn visit_expr_unary(&mut self, i: &'ast ExprUnary) { visit_expr_unary(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400146# [ cfg ( feature = "full" ) ]
Nika Layzell640832a2017-12-04 13:37:09 -0500147fn visit_expr_unsafe(&mut self, i: &'ast ExprUnsafe) { visit_expr_unsafe(self, i) }
David Tolnay2ae520a2017-12-29 11:19:50 -0500148
149fn visit_expr_verbatim(&mut self, i: &'ast ExprVerbatim) { visit_expr_verbatim(self, i) }
Nika Layzell640832a2017-12-04 13:37:09 -0500150# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500151fn visit_expr_while(&mut self, i: &'ast ExprWhile) { visit_expr_while(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400152# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500153fn visit_expr_while_let(&mut self, i: &'ast ExprWhileLet) { visit_expr_while_let(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400154# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500155fn visit_expr_yield(&mut self, i: &'ast ExprYield) { visit_expr_yield(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400156
Nika Layzellc86173a2017-11-18 13:55:22 -0500157fn visit_field(&mut self, i: &'ast Field) { visit_field(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400158# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500159fn visit_field_pat(&mut self, i: &'ast FieldPat) { visit_field_pat(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400160# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500161fn visit_field_value(&mut self, i: &'ast FieldValue) { visit_field_value(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400162# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500163fn visit_file(&mut self, i: &'ast File) { visit_file(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400164# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500165fn visit_fn_arg(&mut self, i: &'ast FnArg) { visit_fn_arg(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400166# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500167fn visit_fn_decl(&mut self, i: &'ast FnDecl) { visit_fn_decl(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400168# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500169fn visit_foreign_item(&mut self, i: &'ast ForeignItem) { visit_foreign_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400170# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500171fn visit_foreign_item_fn(&mut self, i: &'ast ForeignItemFn) { visit_foreign_item_fn(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400172# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500173fn visit_foreign_item_static(&mut self, i: &'ast ForeignItemStatic) { visit_foreign_item_static(self, i) }
David Tolnay199bcbb2017-11-12 10:33:52 -0800174# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500175fn visit_foreign_item_type(&mut self, i: &'ast ForeignItemType) { visit_foreign_item_type(self, i) }
David Tolnay2ae520a2017-12-29 11:19:50 -0500176# [ cfg ( feature = "full" ) ]
177fn visit_foreign_item_verbatim(&mut self, i: &'ast ForeignItemVerbatim) { visit_foreign_item_verbatim(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400178
Nika Layzellc08227a2017-12-04 16:30:17 -0500179fn visit_generic_argument(&mut self, i: &'ast GenericArgument) { visit_generic_argument(self, i) }
David Tolnayd60cfec2017-12-29 00:21:38 -0500180# [ cfg ( feature = "full" ) ]
181fn visit_generic_method_argument(&mut self, i: &'ast GenericMethodArgument) { visit_generic_method_argument(self, i) }
Nika Layzell357885a2017-12-04 15:47:07 -0500182
David Tolnayc2f1aba2017-11-12 20:29:22 -0800183fn visit_generic_param(&mut self, i: &'ast GenericParam) { visit_generic_param(self, i) }
184
Nika Layzellc86173a2017-11-18 13:55:22 -0500185fn visit_generics(&mut self, i: &'ast Generics) { visit_generics(self, i) }
Nika Layzellefb83ba2017-12-19 18:23:55 -0500186
187fn visit_ident(&mut self, i: &'ast Ident) { visit_ident(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400188# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500189fn visit_impl_item(&mut self, i: &'ast ImplItem) { visit_impl_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400190# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500191fn visit_impl_item_const(&mut self, i: &'ast ImplItemConst) { visit_impl_item_const(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400192# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500193fn visit_impl_item_macro(&mut self, i: &'ast ImplItemMacro) { visit_impl_item_macro(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400194# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500195fn visit_impl_item_method(&mut self, i: &'ast ImplItemMethod) { visit_impl_item_method(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400196# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500197fn visit_impl_item_type(&mut self, i: &'ast ImplItemType) { visit_impl_item_type(self, i) }
David Tolnay2ae520a2017-12-29 11:19:50 -0500198# [ cfg ( feature = "full" ) ]
199fn visit_impl_item_verbatim(&mut self, i: &'ast ImplItemVerbatim) { visit_impl_item_verbatim(self, i) }
David Tolnay14982012017-12-29 00:49:51 -0500200
David Tolnay85b69a42017-12-27 20:43:10 -0500201fn visit_index(&mut self, i: &'ast Index) { visit_index(self, i) }
202# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500203fn visit_item(&mut self, i: &'ast Item) { visit_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400204# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500205fn visit_item_const(&mut self, i: &'ast ItemConst) { visit_item_const(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400206# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500207fn visit_item_default_impl(&mut self, i: &'ast ItemDefaultImpl) { visit_item_default_impl(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) }
Nika Layzell27726662017-10-24 23:16:35 -0400238
David Tolnay4ba63a02017-12-28 15:53:05 -0500239fn visit_lifetime(&mut self, i: &'ast Lifetime) { visit_lifetime(self, i) }
240
Nika Layzellc86173a2017-11-18 13:55:22 -0500241fn visit_lifetime_def(&mut self, i: &'ast LifetimeDef) { visit_lifetime_def(self, i) }
David Tolnay4ba63a02017-12-28 15:53:05 -0500242
243fn visit_lit(&mut self, i: &'ast Lit) { visit_lit(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400244# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500245fn visit_local(&mut self, i: &'ast Local) { visit_local(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400246
Nika Layzellc86173a2017-11-18 13:55:22 -0500247fn visit_macro(&mut self, i: &'ast Macro) { visit_macro(self, i) }
David Tolnay14982012017-12-29 00:49:51 -0500248
David Tolnay85b69a42017-12-27 20:43:10 -0500249fn visit_member(&mut self, i: &'ast Member) { visit_member(self, i) }
David Tolnaydecf28d2017-11-11 11:56:45 -0800250
Nika Layzellc86173a2017-11-18 13:55:22 -0500251fn visit_meta_item(&mut self, i: &'ast MetaItem) { visit_meta_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400252
Nika Layzellc86173a2017-11-18 13:55:22 -0500253fn visit_meta_item_list(&mut self, i: &'ast MetaItemList) { visit_meta_item_list(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400254
Nika Layzellc86173a2017-11-18 13:55:22 -0500255fn visit_meta_name_value(&mut self, i: &'ast MetaNameValue) { visit_meta_name_value(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400256# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500257fn visit_method_sig(&mut self, i: &'ast MethodSig) { visit_method_sig(self, i) }
David Tolnayd60cfec2017-12-29 00:21:38 -0500258# [ cfg ( feature = "full" ) ]
259fn visit_method_turbofish(&mut self, i: &'ast MethodTurbofish) { visit_method_turbofish(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400260
Nika Layzellc86173a2017-11-18 13:55:22 -0500261fn visit_nested_meta_item(&mut self, i: &'ast NestedMetaItem) { visit_nested_meta_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400262
Nika Layzellc08227a2017-12-04 16:30:17 -0500263fn visit_parenthesized_generic_arguments(&mut self, i: &'ast ParenthesizedGenericArguments) { visit_parenthesized_generic_arguments(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400264# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500265fn visit_pat(&mut self, i: &'ast Pat) { visit_pat(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400266# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500267fn visit_pat_box(&mut self, i: &'ast PatBox) { visit_pat_box(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400268# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500269fn visit_pat_ident(&mut self, i: &'ast PatIdent) { visit_pat_ident(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400270# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500271fn visit_pat_lit(&mut self, i: &'ast PatLit) { visit_pat_lit(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400272# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500273fn visit_pat_path(&mut self, i: &'ast PatPath) { visit_pat_path(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400274# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500275fn visit_pat_range(&mut self, i: &'ast PatRange) { visit_pat_range(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400276# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500277fn visit_pat_ref(&mut self, i: &'ast PatRef) { visit_pat_ref(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400278# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500279fn visit_pat_slice(&mut self, i: &'ast PatSlice) { visit_pat_slice(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400280# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500281fn visit_pat_struct(&mut self, i: &'ast PatStruct) { visit_pat_struct(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400282# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500283fn visit_pat_tuple(&mut self, i: &'ast PatTuple) { visit_pat_tuple(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400284# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500285fn visit_pat_tuple_struct(&mut self, i: &'ast PatTupleStruct) { visit_pat_tuple_struct(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400286# [ cfg ( feature = "full" ) ]
David Tolnay2ae520a2017-12-29 11:19:50 -0500287fn visit_pat_verbatim(&mut self, i: &'ast PatVerbatim) { visit_pat_verbatim(self, i) }
288# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500289fn visit_pat_wild(&mut self, i: &'ast PatWild) { visit_pat_wild(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400290
Nika Layzellc86173a2017-11-18 13:55:22 -0500291fn visit_path(&mut self, i: &'ast Path) { visit_path(self, i) }
Nika Layzellc08227a2017-12-04 16:30:17 -0500292
293fn visit_path_arguments(&mut self, i: &'ast PathArguments) { visit_path_arguments(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400294
Nika Layzellc86173a2017-11-18 13:55:22 -0500295fn visit_path_segment(&mut self, i: &'ast PathSegment) { visit_path_segment(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400296
Nika Layzellc86173a2017-11-18 13:55:22 -0500297fn visit_poly_trait_ref(&mut self, i: &'ast PolyTraitRef) { visit_poly_trait_ref(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400298
Nika Layzellc86173a2017-11-18 13:55:22 -0500299fn visit_qself(&mut self, i: &'ast QSelf) { visit_qself(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400300# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500301fn visit_range_limits(&mut self, i: &'ast RangeLimits) { visit_range_limits(self, i) }
David Tolnayf93b90d2017-11-11 19:21:26 -0800302
Nika Layzellc86173a2017-11-18 13:55:22 -0500303fn visit_return_type(&mut self, i: &'ast ReturnType) { visit_return_type(self, i) }
Nika Layzellefb83ba2017-12-19 18:23:55 -0500304
305fn visit_span(&mut self, i: &'ast Span) { visit_span(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400306# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500307fn visit_stmt(&mut self, i: &'ast Stmt) { visit_stmt(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400308
Nika Layzellc86173a2017-11-18 13:55:22 -0500309fn visit_trait_bound_modifier(&mut self, i: &'ast TraitBoundModifier) { visit_trait_bound_modifier(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400310# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500311fn visit_trait_item(&mut self, i: &'ast TraitItem) { visit_trait_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400312# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500313fn visit_trait_item_const(&mut self, i: &'ast TraitItemConst) { visit_trait_item_const(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400314# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500315fn visit_trait_item_macro(&mut self, i: &'ast TraitItemMacro) { visit_trait_item_macro(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400316# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500317fn visit_trait_item_method(&mut self, i: &'ast TraitItemMethod) { visit_trait_item_method(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400318# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500319fn visit_trait_item_type(&mut self, i: &'ast TraitItemType) { visit_trait_item_type(self, i) }
David Tolnay2ae520a2017-12-29 11:19:50 -0500320# [ cfg ( feature = "full" ) ]
321fn visit_trait_item_verbatim(&mut self, i: &'ast TraitItemVerbatim) { visit_trait_item_verbatim(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400322
Nika Layzellc86173a2017-11-18 13:55:22 -0500323fn visit_type(&mut self, i: &'ast Type) { visit_type(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400324
Nika Layzellc86173a2017-11-18 13:55:22 -0500325fn visit_type_array(&mut self, i: &'ast TypeArray) { visit_type_array(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400326
Nika Layzellc86173a2017-11-18 13:55:22 -0500327fn visit_type_bare_fn(&mut self, i: &'ast TypeBareFn) { visit_type_bare_fn(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400328
Nika Layzellc86173a2017-11-18 13:55:22 -0500329fn visit_type_binding(&mut self, i: &'ast TypeBinding) { visit_type_binding(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400330
Nika Layzellc86173a2017-11-18 13:55:22 -0500331fn visit_type_group(&mut self, i: &'ast TypeGroup) { visit_type_group(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800332
Nika Layzellc86173a2017-11-18 13:55:22 -0500333fn visit_type_impl_trait(&mut self, i: &'ast TypeImplTrait) { visit_type_impl_trait(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800334
Nika Layzellc86173a2017-11-18 13:55:22 -0500335fn visit_type_infer(&mut self, i: &'ast TypeInfer) { visit_type_infer(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800336
Nika Layzellc86173a2017-11-18 13:55:22 -0500337fn visit_type_never(&mut self, i: &'ast TypeNever) { visit_type_never(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800338
Nika Layzellc86173a2017-11-18 13:55:22 -0500339fn visit_type_param(&mut self, i: &'ast TypeParam) { visit_type_param(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800340
Nika Layzellc86173a2017-11-18 13:55:22 -0500341fn visit_type_param_bound(&mut self, i: &'ast TypeParamBound) { visit_type_param_bound(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800342
Nika Layzellc86173a2017-11-18 13:55:22 -0500343fn visit_type_paren(&mut self, i: &'ast TypeParen) { visit_type_paren(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800344
Nika Layzellc86173a2017-11-18 13:55:22 -0500345fn visit_type_path(&mut self, i: &'ast TypePath) { visit_type_path(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800346
Nika Layzellc86173a2017-11-18 13:55:22 -0500347fn visit_type_ptr(&mut self, i: &'ast TypePtr) { visit_type_ptr(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800348
Nika Layzellc86173a2017-11-18 13:55:22 -0500349fn visit_type_reference(&mut self, i: &'ast TypeReference) { visit_type_reference(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800350
Nika Layzellc86173a2017-11-18 13:55:22 -0500351fn visit_type_slice(&mut self, i: &'ast TypeSlice) { visit_type_slice(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800352
Nika Layzellc86173a2017-11-18 13:55:22 -0500353fn visit_type_trait_object(&mut self, i: &'ast TypeTraitObject) { visit_type_trait_object(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800354
David Tolnay05362582017-12-26 01:33:57 -0500355fn visit_type_tuple(&mut self, i: &'ast TypeTuple) { visit_type_tuple(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800356
David Tolnay2ae520a2017-12-29 11:19:50 -0500357fn visit_type_verbatim(&mut self, i: &'ast TypeVerbatim) { visit_type_verbatim(self, i) }
358
Nika Layzellc86173a2017-11-18 13:55:22 -0500359fn visit_un_op(&mut self, i: &'ast UnOp) { visit_un_op(self, i) }
David Tolnay5f332a92017-12-26 00:42:45 -0500360# [ cfg ( feature = "full" ) ]
361fn visit_use_glob(&mut self, i: &'ast UseGlob) { visit_use_glob(self, i) }
362# [ cfg ( feature = "full" ) ]
363fn visit_use_list(&mut self, i: &'ast UseList) { visit_use_list(self, i) }
364# [ cfg ( feature = "full" ) ]
365fn visit_use_path(&mut self, i: &'ast UsePath) { visit_use_path(self, i) }
366# [ cfg ( feature = "full" ) ]
367fn visit_use_tree(&mut self, i: &'ast UseTree) { visit_use_tree(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400368
Nika Layzellc86173a2017-11-18 13:55:22 -0500369fn visit_variant(&mut self, i: &'ast Variant) { visit_variant(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400370
Nika Layzellc86173a2017-11-18 13:55:22 -0500371fn visit_variant_data(&mut self, i: &'ast VariantData) { visit_variant_data(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400372
Nika Layzellc86173a2017-11-18 13:55:22 -0500373fn visit_vis_crate(&mut self, i: &'ast VisCrate) { visit_vis_crate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400374
Nika Layzellc86173a2017-11-18 13:55:22 -0500375fn visit_vis_public(&mut self, i: &'ast VisPublic) { visit_vis_public(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400376
Nika Layzellc86173a2017-11-18 13:55:22 -0500377fn visit_vis_restricted(&mut self, i: &'ast VisRestricted) { visit_vis_restricted(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400378
Nika Layzellc86173a2017-11-18 13:55:22 -0500379fn visit_visibility(&mut self, i: &'ast Visibility) { visit_visibility(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400380
Nika Layzellc86173a2017-11-18 13:55:22 -0500381fn visit_where_bound_predicate(&mut self, i: &'ast WhereBoundPredicate) { visit_where_bound_predicate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400382
Nika Layzellc86173a2017-11-18 13:55:22 -0500383fn visit_where_clause(&mut self, i: &'ast WhereClause) { visit_where_clause(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400384
Nika Layzellc86173a2017-11-18 13:55:22 -0500385fn visit_where_eq_predicate(&mut self, i: &'ast WhereEqPredicate) { visit_where_eq_predicate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400386
Nika Layzellc86173a2017-11-18 13:55:22 -0500387fn visit_where_predicate(&mut self, i: &'ast WherePredicate) { visit_where_predicate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400388
Nika Layzellc86173a2017-11-18 13:55:22 -0500389fn visit_where_region_predicate(&mut self, i: &'ast WhereRegionPredicate) { visit_where_region_predicate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400390
391}
392
393
Nika Layzellc86173a2017-11-18 13:55:22 -0500394pub fn visit_abi<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Abi) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500395 tokens_helper(_visitor, &(& _i . extern_token).0);
David Tolnayd5125762017-12-29 02:42:17 -0500396 if let Some(ref it) = _i . name { _visitor.visit_lit(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400397}
398
Nika Layzellc08227a2017-12-04 16:30:17 -0500399pub fn visit_angle_bracketed_generic_arguments<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast AngleBracketedGenericArguments) {
David Tolnay2d4e08a2017-12-28 23:54:07 -0500400 if let Some(ref it) = _i . colon2_token { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500401 tokens_helper(_visitor, &(& _i . lt_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500402 for el in & _i . args { let it = el.item(); _visitor.visit_generic_argument(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500403 tokens_helper(_visitor, &(& _i . gt_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400404}
405# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500406pub fn visit_arg_captured<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ArgCaptured) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500407 _visitor.visit_pat(& _i . pat);
David Tolnaycc0f0372017-12-28 19:11:04 -0500408 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500409 _visitor.visit_type(& _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -0400410}
411# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500412pub fn visit_arg_self<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ArgSelf) {
David Tolnay24237fb2017-12-29 02:15:26 -0500413 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500414 tokens_helper(_visitor, &(& _i . self_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400415}
416# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500417pub fn visit_arg_self_ref<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ArgSelfRef) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500418 tokens_helper(_visitor, &(& _i . and_token).0);
David Tolnay4ba63a02017-12-28 15:53:05 -0500419 if let Some(ref it) = _i . lifetime { _visitor.visit_lifetime(it) };
David Tolnay24237fb2017-12-29 02:15:26 -0500420 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500421 tokens_helper(_visitor, &(& _i . self_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400422}
423# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500424pub fn visit_arm<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Arm) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500425 for it in & _i . attrs { _visitor.visit_attribute(it) };
426 for el in & _i . pats { let it = el.item(); _visitor.visit_pat(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500427 if let Some(ref it) = _i . if_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a918742017-12-28 16:54:41 -0500428 if let Some(ref it) = _i . guard { _visitor.visit_expr(& * * it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500429 tokens_helper(_visitor, &(& _i . rocket_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500430 _visitor.visit_expr(& * _i . body);
David Tolnaycc0f0372017-12-28 19:11:04 -0500431 if let Some(ref it) = _i . comma { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -0400432}
433
Nika Layzellc86173a2017-11-18 13:55:22 -0500434pub fn visit_attr_style<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast AttrStyle) {
Nika Layzell27726662017-10-24 23:16:35 -0400435 use ::AttrStyle::*;
436 match *_i {
437 Outer => { }
438 Inner(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500439 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400440 }
441 }
442}
443
Nika Layzellc86173a2017-11-18 13:55:22 -0500444pub fn visit_attribute<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Attribute) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500445 tokens_helper(_visitor, &(& _i . pound_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500446 _visitor.visit_attr_style(& _i . style);
David Tolnay1e01f9c2017-12-28 20:16:19 -0500447 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500448 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -0400449 // Skipped field _i . tts;
450 // Skipped field _i . is_sugared_doc;
451}
452
Nika Layzellc86173a2017-11-18 13:55:22 -0500453pub fn visit_bare_fn_arg<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BareFnArg) {
David Tolnay5c4c0b52017-12-28 17:58:54 -0500454 if let Some(ref it) = _i . name {
455 _visitor.visit_bare_fn_arg_name(& ( it ) . 0);
David Tolnaycc0f0372017-12-28 19:11:04 -0500456 tokens_helper(_visitor, &(& ( it ) . 1).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -0500457 };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500458 _visitor.visit_type(& _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -0400459}
460
Nika Layzellc86173a2017-11-18 13:55:22 -0500461pub fn visit_bare_fn_arg_name<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BareFnArgName) {
Nika Layzell27726662017-10-24 23:16:35 -0400462 use ::BareFnArgName::*;
463 match *_i {
464 Named(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500465 _visitor.visit_ident(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400466 }
467 Wild(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500468 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400469 }
470 }
471}
472
Nika Layzellc86173a2017-11-18 13:55:22 -0500473pub fn visit_bin_op<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BinOp) {
Nika Layzell27726662017-10-24 23:16:35 -0400474 use ::BinOp::*;
475 match *_i {
476 Add(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500477 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400478 }
479 Sub(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500480 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400481 }
482 Mul(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 Div(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 Rem(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 And(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 Or(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 BitXor(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 BitAnd(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 BitOr(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 Shl(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 Shr(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 Eq(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 Lt(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 Le(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 Ne(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 Ge(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 Gt(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 AddEq(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 SubEq(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 MulEq(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 DivEq(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 RemEq(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 BitXorEq(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 BitAndEq(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 BitOrEq(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 ShlEq(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 ShrEq(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 }
561}
562# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500563pub fn visit_block<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Block) {
David Tolnay1e01f9c2017-12-28 20:16:19 -0500564 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500565 for it in & _i . stmts { _visitor.visit_stmt(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400566}
567
Nika Layzellc86173a2017-11-18 13:55:22 -0500568pub fn visit_body<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Body) {
Nika Layzell27726662017-10-24 23:16:35 -0400569 use ::Body::*;
570 match *_i {
571 Enum(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500572 _visitor.visit_body_enum(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400573 }
574 Struct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500575 _visitor.visit_body_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400576 }
577 }
578}
579
Nika Layzellc86173a2017-11-18 13:55:22 -0500580pub fn visit_body_enum<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BodyEnum) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500581 tokens_helper(_visitor, &(& _i . enum_token).0);
David Tolnay1e01f9c2017-12-28 20:16:19 -0500582 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500583 for el in & _i . variants { let it = el.item(); _visitor.visit_variant(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400584}
585
Nika Layzellc86173a2017-11-18 13:55:22 -0500586pub fn visit_body_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BodyStruct) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500587 _visitor.visit_variant_data(& _i . data);
David Tolnaycc0f0372017-12-28 19:11:04 -0500588 tokens_helper(_visitor, &(& _i . struct_token).0);
589 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -0400590}
591
Nika Layzellc86173a2017-11-18 13:55:22 -0500592pub fn visit_bound_lifetimes<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BoundLifetimes) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500593 tokens_helper(_visitor, &(& _i . for_token).0);
594 tokens_helper(_visitor, &(& _i . lt_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500595 for el in & _i . lifetimes { let it = el.item(); _visitor.visit_lifetime_def(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500596 tokens_helper(_visitor, &(& _i . gt_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400597}
Nika Layzellf1fdc0b2017-12-04 19:58:32 -0500598
599pub fn visit_const_param<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ConstParam) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500600 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500601 tokens_helper(_visitor, &(& _i . const_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500602 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -0500603 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500604 _visitor.visit_type(& _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -0500605 if let Some(ref it) = _i . eq_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500606 if let Some(ref it) = _i . default { _visitor.visit_expr(it) };
Nika Layzellf1fdc0b2017-12-04 19:58:32 -0500607}
Nika Layzell27726662017-10-24 23:16:35 -0400608
Nika Layzellc86173a2017-11-18 13:55:22 -0500609pub fn visit_derive_input<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast DeriveInput) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500610 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500611 _visitor.visit_visibility(& _i . vis);
612 _visitor.visit_ident(& _i . ident);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500613 _visitor.visit_generics(& _i . generics);
614 _visitor.visit_body(& _i . body);
Nika Layzell27726662017-10-24 23:16:35 -0400615}
616
Nika Layzellc86173a2017-11-18 13:55:22 -0500617pub fn visit_expr<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Expr) {
David Tolnay8c91b882017-12-28 23:04:32 -0500618 use ::Expr::*;
Nika Layzell27726662017-10-24 23:16:35 -0400619 match *_i {
620 Box(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500621 full!(_visitor.visit_expr_box(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400622 }
623 InPlace(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500624 full!(_visitor.visit_expr_in_place(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400625 }
626 Array(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500627 full!(_visitor.visit_expr_array(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400628 }
629 Call(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500630 _visitor.visit_expr_call(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400631 }
632 MethodCall(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500633 full!(_visitor.visit_expr_method_call(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400634 }
David Tolnay05362582017-12-26 01:33:57 -0500635 Tuple(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500636 full!(_visitor.visit_expr_tuple(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400637 }
638 Binary(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500639 _visitor.visit_expr_binary(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400640 }
641 Unary(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500642 _visitor.visit_expr_unary(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400643 }
644 Lit(ref _binding_0, ) => {
David Tolnay8c91b882017-12-28 23:04:32 -0500645 _visitor.visit_expr_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400646 }
647 Cast(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500648 _visitor.visit_expr_cast(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400649 }
650 Type(ref _binding_0, ) => {
David Tolnay0cf94f22017-12-28 23:46:26 -0500651 full!(_visitor.visit_expr_type(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400652 }
653 If(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500654 full!(_visitor.visit_expr_if(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400655 }
656 IfLet(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500657 full!(_visitor.visit_expr_if_let(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400658 }
659 While(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500660 full!(_visitor.visit_expr_while(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400661 }
662 WhileLet(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500663 full!(_visitor.visit_expr_while_let(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400664 }
665 ForLoop(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500666 full!(_visitor.visit_expr_for_loop(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400667 }
668 Loop(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500669 full!(_visitor.visit_expr_loop(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400670 }
671 Match(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500672 full!(_visitor.visit_expr_match(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400673 }
674 Closure(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500675 full!(_visitor.visit_expr_closure(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400676 }
Nika Layzell640832a2017-12-04 13:37:09 -0500677 Unsafe(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500678 full!(_visitor.visit_expr_unsafe(_binding_0));
Nika Layzell640832a2017-12-04 13:37:09 -0500679 }
Nika Layzell27726662017-10-24 23:16:35 -0400680 Block(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500681 full!(_visitor.visit_expr_block(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400682 }
683 Assign(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500684 full!(_visitor.visit_expr_assign(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400685 }
686 AssignOp(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500687 full!(_visitor.visit_expr_assign_op(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400688 }
689 Field(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500690 full!(_visitor.visit_expr_field(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400691 }
Nika Layzell27726662017-10-24 23:16:35 -0400692 Index(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500693 _visitor.visit_expr_index(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400694 }
695 Range(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500696 full!(_visitor.visit_expr_range(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400697 }
698 Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500699 _visitor.visit_expr_path(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400700 }
701 AddrOf(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500702 full!(_visitor.visit_expr_addr_of(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400703 }
704 Break(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500705 full!(_visitor.visit_expr_break(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400706 }
707 Continue(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500708 full!(_visitor.visit_expr_continue(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400709 }
David Tolnayc246cd32017-12-28 23:14:32 -0500710 Return(ref _binding_0, ) => {
711 full!(_visitor.visit_expr_return(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400712 }
David Tolnaydecf28d2017-11-11 11:56:45 -0800713 Macro(ref _binding_0, ) => {
David Tolnay8c91b882017-12-28 23:04:32 -0500714 full!(_visitor.visit_expr_macro(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400715 }
716 Struct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500717 full!(_visitor.visit_expr_struct(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400718 }
719 Repeat(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500720 full!(_visitor.visit_expr_repeat(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400721 }
722 Paren(ref _binding_0, ) => {
David Tolnaye98775f2017-12-28 23:17:00 -0500723 full!(_visitor.visit_expr_paren(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400724 }
725 Group(ref _binding_0, ) => {
David Tolnaye98775f2017-12-28 23:17:00 -0500726 full!(_visitor.visit_expr_group(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400727 }
728 Try(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500729 full!(_visitor.visit_expr_try(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400730 }
731 Catch(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500732 full!(_visitor.visit_expr_catch(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400733 }
734 Yield(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500735 full!(_visitor.visit_expr_yield(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400736 }
David Tolnay2ae520a2017-12-29 11:19:50 -0500737 Verbatim(ref _binding_0, ) => {
738 _visitor.visit_expr_verbatim(_binding_0);
739 }
Nika Layzell27726662017-10-24 23:16:35 -0400740 }
741}
742# [ cfg ( feature = "full" ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500743pub fn visit_expr_addr_of<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprAddrOf) {
744 for it in & _i . attrs { _visitor.visit_attribute(it) };
745 tokens_helper(_visitor, &(& _i . and_token).0);
David Tolnay24237fb2017-12-29 02:15:26 -0500746 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnay8c91b882017-12-28 23:04:32 -0500747 _visitor.visit_expr(& * _i . expr);
748}
749# [ cfg ( feature = "full" ) ]
750pub fn visit_expr_array<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprArray) {
751 for it in & _i . attrs { _visitor.visit_attribute(it) };
752 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnay2a86fdd2017-12-28 23:34:28 -0500753 for el in & _i . elems { let it = el.item(); _visitor.visit_expr(it) };
David Tolnay8c91b882017-12-28 23:04:32 -0500754}
755# [ cfg ( feature = "full" ) ]
756pub fn visit_expr_assign<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprAssign) {
757 for it in & _i . attrs { _visitor.visit_attribute(it) };
758 _visitor.visit_expr(& * _i . left);
759 tokens_helper(_visitor, &(& _i . eq_token).0);
760 _visitor.visit_expr(& * _i . right);
761}
762# [ cfg ( feature = "full" ) ]
763pub fn visit_expr_assign_op<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprAssignOp) {
764 for it in & _i . attrs { _visitor.visit_attribute(it) };
765 _visitor.visit_expr(& * _i . left);
766 _visitor.visit_bin_op(& _i . op);
767 _visitor.visit_expr(& * _i . right);
768}
769
770pub fn visit_expr_binary<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBinary) {
771 for it in & _i . attrs { _visitor.visit_attribute(it) };
772 _visitor.visit_expr(& * _i . left);
773 _visitor.visit_bin_op(& _i . op);
774 _visitor.visit_expr(& * _i . right);
775}
776# [ cfg ( feature = "full" ) ]
777pub fn visit_expr_block<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBlock) {
778 for it in & _i . attrs { _visitor.visit_attribute(it) };
779 _visitor.visit_block(& _i . block);
780}
781# [ cfg ( feature = "full" ) ]
782pub fn visit_expr_box<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBox) {
783 for it in & _i . attrs { _visitor.visit_attribute(it) };
784 tokens_helper(_visitor, &(& _i . box_token).0);
785 _visitor.visit_expr(& * _i . expr);
786}
787# [ cfg ( feature = "full" ) ]
788pub fn visit_expr_break<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBreak) {
789 for it in & _i . attrs { _visitor.visit_attribute(it) };
790 tokens_helper(_visitor, &(& _i . break_token).0);
791 if let Some(ref it) = _i . label { _visitor.visit_lifetime(it) };
792 if let Some(ref it) = _i . expr { _visitor.visit_expr(& * * it) };
793}
794
795pub fn visit_expr_call<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprCall) {
796 for it in & _i . attrs { _visitor.visit_attribute(it) };
797 _visitor.visit_expr(& * _i . func);
798 tokens_helper(_visitor, &(& _i . paren_token).0);
799 for el in & _i . args { let it = el.item(); _visitor.visit_expr(it) };
800}
801
802pub fn visit_expr_cast<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprCast) {
803 for it in & _i . attrs { _visitor.visit_attribute(it) };
804 _visitor.visit_expr(& * _i . expr);
805 tokens_helper(_visitor, &(& _i . as_token).0);
806 _visitor.visit_type(& * _i . ty);
807}
808# [ cfg ( feature = "full" ) ]
809pub fn visit_expr_catch<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprCatch) {
810 for it in & _i . attrs { _visitor.visit_attribute(it) };
811 tokens_helper(_visitor, &(& _i . do_token).0);
812 tokens_helper(_visitor, &(& _i . catch_token).0);
813 _visitor.visit_block(& _i . block);
814}
815# [ cfg ( feature = "full" ) ]
816pub fn visit_expr_closure<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprClosure) {
817 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnayefc96fb2017-12-29 02:03:15 -0500818 if let Some(ref it) = _i . capture { tokens_helper(_visitor, &(it).0) };
David Tolnay8c91b882017-12-28 23:04:32 -0500819 tokens_helper(_visitor, &(& _i . or1_token).0);
820 for el in & _i . inputs { let it = el.item(); _visitor.visit_fn_arg(it) };
821 tokens_helper(_visitor, &(& _i . or2_token).0);
822 _visitor.visit_return_type(& _i . output);
823 _visitor.visit_expr(& * _i . body);
824}
825# [ cfg ( feature = "full" ) ]
826pub fn visit_expr_continue<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprContinue) {
827 for it in & _i . attrs { _visitor.visit_attribute(it) };
828 tokens_helper(_visitor, &(& _i . continue_token).0);
829 if let Some(ref it) = _i . label { _visitor.visit_lifetime(it) };
830}
831# [ cfg ( feature = "full" ) ]
832pub fn visit_expr_field<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprField) {
833 for it in & _i . attrs { _visitor.visit_attribute(it) };
834 _visitor.visit_expr(& * _i . base);
835 tokens_helper(_visitor, &(& _i . dot_token).0);
836 _visitor.visit_member(& _i . member);
837}
838# [ cfg ( feature = "full" ) ]
839pub fn visit_expr_for_loop<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprForLoop) {
840 for it in & _i . attrs { _visitor.visit_attribute(it) };
841 if let Some(ref it) = _i . label { _visitor.visit_lifetime(it) };
842 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
843 tokens_helper(_visitor, &(& _i . for_token).0);
844 _visitor.visit_pat(& * _i . pat);
845 tokens_helper(_visitor, &(& _i . in_token).0);
846 _visitor.visit_expr(& * _i . expr);
847 _visitor.visit_block(& _i . body);
848}
David Tolnaye98775f2017-12-28 23:17:00 -0500849# [ cfg ( feature = "full" ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500850pub fn visit_expr_group<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprGroup) {
851 for it in & _i . attrs { _visitor.visit_attribute(it) };
852 tokens_helper(_visitor, &(& _i . group_token).0);
853 _visitor.visit_expr(& * _i . expr);
854}
855# [ cfg ( feature = "full" ) ]
856pub fn visit_expr_if<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIf) {
857 for it in & _i . attrs { _visitor.visit_attribute(it) };
858 tokens_helper(_visitor, &(& _i . if_token).0);
859 _visitor.visit_expr(& * _i . cond);
David Tolnay2ccf32a2017-12-29 00:34:26 -0500860 _visitor.visit_block(& _i . then_branch);
861 if let Some(ref it) = _i . else_branch {
862 tokens_helper(_visitor, &(& ( it ) . 0).0);
863 _visitor.visit_expr(& * ( it ) . 1);
864 };
David Tolnay8c91b882017-12-28 23:04:32 -0500865}
866# [ cfg ( feature = "full" ) ]
867pub fn visit_expr_if_let<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIfLet) {
868 for it in & _i . attrs { _visitor.visit_attribute(it) };
869 tokens_helper(_visitor, &(& _i . if_token).0);
870 tokens_helper(_visitor, &(& _i . let_token).0);
871 _visitor.visit_pat(& * _i . pat);
872 tokens_helper(_visitor, &(& _i . eq_token).0);
873 _visitor.visit_expr(& * _i . expr);
David Tolnay2ccf32a2017-12-29 00:34:26 -0500874 _visitor.visit_block(& _i . then_branch);
875 if let Some(ref it) = _i . else_branch {
876 tokens_helper(_visitor, &(& ( it ) . 0).0);
877 _visitor.visit_expr(& * ( it ) . 1);
878 };
David Tolnay8c91b882017-12-28 23:04:32 -0500879}
880# [ cfg ( feature = "full" ) ]
881pub fn visit_expr_in_place<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprInPlace) {
882 for it in & _i . attrs { _visitor.visit_attribute(it) };
883 _visitor.visit_expr(& * _i . place);
David Tolnay8701a5c2017-12-28 23:31:10 -0500884 tokens_helper(_visitor, &(& _i . arrow_token).0);
David Tolnay8c91b882017-12-28 23:04:32 -0500885 _visitor.visit_expr(& * _i . value);
886}
887
888pub fn visit_expr_index<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIndex) {
889 for it in & _i . attrs { _visitor.visit_attribute(it) };
890 _visitor.visit_expr(& * _i . expr);
891 tokens_helper(_visitor, &(& _i . bracket_token).0);
892 _visitor.visit_expr(& * _i . index);
893}
894
895pub fn visit_expr_lit<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprLit) {
896 for it in & _i . attrs { _visitor.visit_attribute(it) };
897 _visitor.visit_lit(& _i . lit);
898}
899# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500900pub fn visit_expr_loop<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprLoop) {
David Tolnay8c91b882017-12-28 23:04:32 -0500901 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4ba63a02017-12-28 15:53:05 -0500902 if let Some(ref it) = _i . label { _visitor.visit_lifetime(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500903 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500904 tokens_helper(_visitor, &(& _i . loop_token).0);
905 _visitor.visit_block(& _i . body);
Nika Layzell27726662017-10-24 23:16:35 -0400906}
907# [ cfg ( feature = "full" ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500908pub fn visit_expr_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprMacro) {
909 for it in & _i . attrs { _visitor.visit_attribute(it) };
910 _visitor.visit_macro(& _i . mac);
911}
912# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500913pub fn visit_expr_match<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprMatch) {
David Tolnay8c91b882017-12-28 23:04:32 -0500914 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500915 tokens_helper(_visitor, &(& _i . match_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500916 _visitor.visit_expr(& * _i . expr);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500917 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500918 for it in & _i . arms { _visitor.visit_arm(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400919}
920# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500921pub fn visit_expr_method_call<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprMethodCall) {
David Tolnay8c91b882017-12-28 23:04:32 -0500922 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay76418512017-12-28 23:47:47 -0500923 _visitor.visit_expr(& * _i . receiver);
David Tolnaycc0f0372017-12-28 19:11:04 -0500924 tokens_helper(_visitor, &(& _i . dot_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500925 _visitor.visit_ident(& _i . method);
David Tolnayd60cfec2017-12-29 00:21:38 -0500926 if let Some(ref it) = _i . turbofish { _visitor.visit_method_turbofish(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500927 tokens_helper(_visitor, &(& _i . paren_token).0);
928 for el in & _i . args { let it = el.item(); _visitor.visit_expr(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400929}
David Tolnaye98775f2017-12-28 23:17:00 -0500930# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500931pub fn visit_expr_paren<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprParen) {
David Tolnay8c91b882017-12-28 23:04:32 -0500932 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -0500933 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500934 _visitor.visit_expr(& * _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -0400935}
936
Nika Layzellc86173a2017-11-18 13:55:22 -0500937pub fn visit_expr_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprPath) {
David Tolnay8c91b882017-12-28 23:04:32 -0500938 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500939 if let Some(ref it) = _i . qself { _visitor.visit_qself(it) };
940 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -0400941}
942# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500943pub fn visit_expr_range<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprRange) {
David Tolnay8c91b882017-12-28 23:04:32 -0500944 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a918742017-12-28 16:54:41 -0500945 if let Some(ref it) = _i . from { _visitor.visit_expr(& * * it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500946 _visitor.visit_range_limits(& _i . limits);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500947 if let Some(ref it) = _i . to { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -0400948}
949# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500950pub fn visit_expr_repeat<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprRepeat) {
David Tolnay8c91b882017-12-28 23:04:32 -0500951 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -0500952 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500953 _visitor.visit_expr(& * _i . expr);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500954 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500955 _visitor.visit_expr(& * _i . amt);
Nika Layzell27726662017-10-24 23:16:35 -0400956}
957# [ cfg ( feature = "full" ) ]
David Tolnayc246cd32017-12-28 23:14:32 -0500958pub fn visit_expr_return<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprReturn) {
David Tolnay8c91b882017-12-28 23:04:32 -0500959 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500960 tokens_helper(_visitor, &(& _i . return_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500961 if let Some(ref it) = _i . expr { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -0400962}
963# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500964pub fn visit_expr_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprStruct) {
David Tolnay8c91b882017-12-28 23:04:32 -0500965 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500966 _visitor.visit_path(& _i . path);
David Tolnay1e01f9c2017-12-28 20:16:19 -0500967 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500968 for el in & _i . fields { let it = el.item(); _visitor.visit_field_value(it) };
969 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
970 if let Some(ref it) = _i . rest { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -0400971}
972# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500973pub fn visit_expr_try<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprTry) {
David Tolnay8c91b882017-12-28 23:04:32 -0500974 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a918742017-12-28 16:54:41 -0500975 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -0500976 tokens_helper(_visitor, &(& _i . question_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400977}
978# [ cfg ( feature = "full" ) ]
David Tolnay05362582017-12-26 01:33:57 -0500979pub fn visit_expr_tuple<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprTuple) {
David Tolnay8c91b882017-12-28 23:04:32 -0500980 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -0500981 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay2a86fdd2017-12-28 23:34:28 -0500982 for el in & _i . elems { let it = el.item(); _visitor.visit_expr(it) };
David Tolnay05362582017-12-26 01:33:57 -0500983}
David Tolnay0cf94f22017-12-28 23:46:26 -0500984# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500985pub fn visit_expr_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprType) {
David Tolnay8c91b882017-12-28 23:04:32 -0500986 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a918742017-12-28 16:54:41 -0500987 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -0500988 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500989 _visitor.visit_type(& * _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -0400990}
991
Nika Layzellc86173a2017-11-18 13:55:22 -0500992pub fn visit_expr_unary<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprUnary) {
David Tolnay8c91b882017-12-28 23:04:32 -0500993 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500994 _visitor.visit_un_op(& _i . op);
David Tolnay4a918742017-12-28 16:54:41 -0500995 _visitor.visit_expr(& * _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -0400996}
997# [ cfg ( feature = "full" ) ]
Nika Layzell640832a2017-12-04 13:37:09 -0500998pub fn visit_expr_unsafe<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprUnsafe) {
David Tolnay8c91b882017-12-28 23:04:32 -0500999 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001000 tokens_helper(_visitor, &(& _i . unsafe_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001001 _visitor.visit_block(& _i . block);
Nika Layzell640832a2017-12-04 13:37:09 -05001002}
David Tolnay2ae520a2017-12-29 11:19:50 -05001003
1004pub fn visit_expr_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprVerbatim) {
1005 // Skipped field _i . tts;
1006}
Nika Layzell640832a2017-12-04 13:37:09 -05001007# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001008pub fn visit_expr_while<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprWhile) {
David Tolnay8c91b882017-12-28 23:04:32 -05001009 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4ba63a02017-12-28 15:53:05 -05001010 if let Some(ref it) = _i . label { _visitor.visit_lifetime(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001011 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
1012 tokens_helper(_visitor, &(& _i . while_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001013 _visitor.visit_expr(& * _i . cond);
1014 _visitor.visit_block(& _i . body);
Nika Layzell27726662017-10-24 23:16:35 -04001015}
1016# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001017pub fn visit_expr_while_let<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprWhileLet) {
David Tolnay8c91b882017-12-28 23:04:32 -05001018 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4ba63a02017-12-28 15:53:05 -05001019 if let Some(ref it) = _i . label { _visitor.visit_lifetime(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001020 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
1021 tokens_helper(_visitor, &(& _i . while_token).0);
1022 tokens_helper(_visitor, &(& _i . let_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001023 _visitor.visit_pat(& * _i . pat);
David Tolnaycc0f0372017-12-28 19:11:04 -05001024 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001025 _visitor.visit_expr(& * _i . expr);
1026 _visitor.visit_block(& _i . body);
Nika Layzell27726662017-10-24 23:16:35 -04001027}
1028# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001029pub fn visit_expr_yield<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprYield) {
David Tolnay8c91b882017-12-28 23:04:32 -05001030 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001031 tokens_helper(_visitor, &(& _i . yield_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001032 if let Some(ref it) = _i . expr { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -04001033}
1034
Nika Layzellc86173a2017-11-18 13:55:22 -05001035pub fn visit_field<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Field) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001036 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001037 _visitor.visit_visibility(& _i . vis);
1038 if let Some(ref it) = _i . ident { _visitor.visit_ident(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001039 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001040 _visitor.visit_type(& _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -04001041}
1042# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001043pub fn visit_field_pat<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldPat) {
David Tolnay4a3f59a2017-12-28 21:21:12 -05001044 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay85b69a42017-12-27 20:43:10 -05001045 _visitor.visit_member(& _i . member);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001046 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a918742017-12-28 16:54:41 -05001047 _visitor.visit_pat(& * _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001048}
1049# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001050pub fn visit_field_value<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldValue) {
David Tolnay85b69a42017-12-27 20:43:10 -05001051 for it in & _i . attrs { _visitor.visit_attribute(it) };
1052 _visitor.visit_member(& _i . member);
David Tolnaycc0f0372017-12-28 19:11:04 -05001053 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001054 _visitor.visit_expr(& _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -04001055}
1056# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001057pub fn visit_file<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast File) {
Nika Layzell27726662017-10-24 23:16:35 -04001058 // Skipped field _i . shebang;
David Tolnayf0d63bf2017-12-26 12:29:47 -05001059 for it in & _i . attrs { _visitor.visit_attribute(it) };
1060 for it in & _i . items { _visitor.visit_item(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001061}
1062# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001063pub fn visit_fn_arg<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FnArg) {
Nika Layzell27726662017-10-24 23:16:35 -04001064 use ::FnArg::*;
1065 match *_i {
1066 SelfRef(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001067 _visitor.visit_arg_self_ref(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001068 }
1069 SelfValue(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001070 _visitor.visit_arg_self(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001071 }
1072 Captured(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001073 _visitor.visit_arg_captured(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001074 }
David Tolnay80ed55f2017-12-27 22:54:40 -05001075 Inferred(ref _binding_0, ) => {
1076 _visitor.visit_pat(_binding_0);
1077 }
Nika Layzell27726662017-10-24 23:16:35 -04001078 Ignored(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001079 _visitor.visit_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001080 }
1081 }
1082}
1083# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001084pub fn visit_fn_decl<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FnDecl) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001085 tokens_helper(_visitor, &(& _i . fn_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001086 _visitor.visit_generics(& _i . generics);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001087 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001088 for el in & _i . inputs { let it = el.item(); _visitor.visit_fn_arg(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001089 if let Some(ref it) = _i . variadic { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001090 _visitor.visit_return_type(& _i . output);
Nika Layzell27726662017-10-24 23:16:35 -04001091}
1092# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001093pub fn visit_foreign_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItem) {
David Tolnay8894f602017-11-11 12:11:04 -08001094 use ::ForeignItem::*;
Nika Layzell27726662017-10-24 23:16:35 -04001095 match *_i {
1096 Fn(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001097 _visitor.visit_foreign_item_fn(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001098 }
1099 Static(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001100 _visitor.visit_foreign_item_static(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001101 }
David Tolnay199bcbb2017-11-12 10:33:52 -08001102 Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001103 _visitor.visit_foreign_item_type(_binding_0);
David Tolnay199bcbb2017-11-12 10:33:52 -08001104 }
David Tolnay2ae520a2017-12-29 11:19:50 -05001105 Verbatim(ref _binding_0, ) => {
1106 _visitor.visit_foreign_item_verbatim(_binding_0);
1107 }
Nika Layzell27726662017-10-24 23:16:35 -04001108 }
1109}
1110# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001111pub fn visit_foreign_item_fn<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemFn) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001112 for it in & _i . attrs { _visitor.visit_attribute(it) };
1113 _visitor.visit_visibility(& _i . vis);
1114 _visitor.visit_ident(& _i . ident);
David Tolnay4a918742017-12-28 16:54:41 -05001115 _visitor.visit_fn_decl(& * _i . decl);
David Tolnaycc0f0372017-12-28 19:11:04 -05001116 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay8894f602017-11-11 12:11:04 -08001117}
1118# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001119pub fn visit_foreign_item_static<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemStatic) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001120 for it in & _i . attrs { _visitor.visit_attribute(it) };
1121 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001122 tokens_helper(_visitor, &(& _i . static_token).0);
David Tolnay24237fb2017-12-29 02:15:26 -05001123 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001124 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001125 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001126 _visitor.visit_type(& * _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001127 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001128}
David Tolnay199bcbb2017-11-12 10:33:52 -08001129# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001130pub fn visit_foreign_item_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001131 for it in & _i . attrs { _visitor.visit_attribute(it) };
1132 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001133 tokens_helper(_visitor, &(& _i . type_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001134 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001135 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay199bcbb2017-11-12 10:33:52 -08001136}
David Tolnay2ae520a2017-12-29 11:19:50 -05001137# [ cfg ( feature = "full" ) ]
1138pub fn visit_foreign_item_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemVerbatim) {
1139 // Skipped field _i . tts;
1140}
Nika Layzell27726662017-10-24 23:16:35 -04001141
Nika Layzellc08227a2017-12-04 16:30:17 -05001142pub fn visit_generic_argument<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast GenericArgument) {
1143 use ::GenericArgument::*;
Nika Layzell357885a2017-12-04 15:47:07 -05001144 match *_i {
1145 Lifetime(ref _binding_0, ) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05001146 _visitor.visit_lifetime(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001147 }
1148 Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001149 _visitor.visit_type(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001150 }
1151 TypeBinding(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001152 _visitor.visit_type_binding(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001153 }
Nika Layzellc680e612017-12-04 19:07:20 -05001154 Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001155 _visitor.visit_expr(_binding_0);
Nika Layzellc680e612017-12-04 19:07:20 -05001156 }
Nika Layzell357885a2017-12-04 15:47:07 -05001157 }
1158}
David Tolnayd60cfec2017-12-29 00:21:38 -05001159# [ cfg ( feature = "full" ) ]
1160pub fn visit_generic_method_argument<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast GenericMethodArgument) {
1161 use ::GenericMethodArgument::*;
1162 match *_i {
1163 Type(ref _binding_0, ) => {
1164 _visitor.visit_type(_binding_0);
1165 }
1166 Const(ref _binding_0, ) => {
1167 _visitor.visit_expr(_binding_0);
1168 }
1169 }
1170}
Nika Layzell357885a2017-12-04 15:47:07 -05001171
David Tolnayc2f1aba2017-11-12 20:29:22 -08001172pub fn visit_generic_param<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast GenericParam) {
1173 use ::GenericParam::*;
1174 match *_i {
1175 Lifetime(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001176 _visitor.visit_lifetime_def(_binding_0);
David Tolnayc2f1aba2017-11-12 20:29:22 -08001177 }
1178 Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001179 _visitor.visit_type_param(_binding_0);
David Tolnayc2f1aba2017-11-12 20:29:22 -08001180 }
Nika Layzellf1fdc0b2017-12-04 19:58:32 -05001181 Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001182 _visitor.visit_const_param(_binding_0);
Nika Layzellf1fdc0b2017-12-04 19:58:32 -05001183 }
David Tolnayc2f1aba2017-11-12 20:29:22 -08001184 }
1185}
1186
Nika Layzellc86173a2017-11-18 13:55:22 -05001187pub fn visit_generics<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Generics) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001188 if let Some(ref it) = _i . lt_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001189 for el in & _i . params { let it = el.item(); _visitor.visit_generic_param(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001190 if let Some(ref it) = _i . gt_token { tokens_helper(_visitor, &(it).0) };
David Tolnayac997dd2017-12-27 23:18:22 -05001191 if let Some(ref it) = _i . where_clause { _visitor.visit_where_clause(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001192}
Nika Layzellefb83ba2017-12-19 18:23:55 -05001193
1194pub fn visit_ident<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Ident) {
David Tolnay4ba63a02017-12-28 15:53:05 -05001195 // Skipped field _i . sym;
1196 _visitor.visit_span(& _i . span);
Nika Layzellefb83ba2017-12-19 18:23:55 -05001197}
Nika Layzell27726662017-10-24 23:16:35 -04001198# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001199pub fn visit_impl_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItem) {
David Tolnay857628c2017-11-11 12:25:31 -08001200 use ::ImplItem::*;
Nika Layzell27726662017-10-24 23:16:35 -04001201 match *_i {
1202 Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001203 _visitor.visit_impl_item_const(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001204 }
1205 Method(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001206 _visitor.visit_impl_item_method(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001207 }
1208 Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001209 _visitor.visit_impl_item_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001210 }
1211 Macro(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001212 _visitor.visit_impl_item_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001213 }
David Tolnay2ae520a2017-12-29 11:19:50 -05001214 Verbatim(ref _binding_0, ) => {
1215 _visitor.visit_impl_item_verbatim(_binding_0);
1216 }
Nika Layzell27726662017-10-24 23:16:35 -04001217 }
1218}
1219# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001220pub fn visit_impl_item_const<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemConst) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001221 for it in & _i . attrs { _visitor.visit_attribute(it) };
1222 _visitor.visit_visibility(& _i . vis);
David Tolnay360a6342017-12-29 02:22:11 -05001223 if let Some(ref it) = _i . defaultness { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001224 tokens_helper(_visitor, &(& _i . const_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001225 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001226 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001227 _visitor.visit_type(& _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001228 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001229 _visitor.visit_expr(& _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -05001230 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay857628c2017-11-11 12:25:31 -08001231}
1232# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001233pub fn visit_impl_item_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemMacro) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001234 for it in & _i . attrs { _visitor.visit_attribute(it) };
1235 _visitor.visit_macro(& _i . mac);
David Tolnaycc0f0372017-12-28 19:11:04 -05001236 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
David Tolnay857628c2017-11-11 12:25:31 -08001237}
1238# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001239pub fn visit_impl_item_method<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemMethod) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001240 for it in & _i . attrs { _visitor.visit_attribute(it) };
1241 _visitor.visit_visibility(& _i . vis);
David Tolnay360a6342017-12-29 02:22:11 -05001242 if let Some(ref it) = _i . defaultness { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001243 _visitor.visit_method_sig(& _i . sig);
1244 _visitor.visit_block(& _i . block);
Nika Layzell27726662017-10-24 23:16:35 -04001245}
1246# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001247pub fn visit_impl_item_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemType) {
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 Tolnaycc0f0372017-12-28 19:11:04 -05001251 tokens_helper(_visitor, &(& _i . type_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001252 _visitor.visit_ident(& _i . ident);
1253 _visitor.visit_generics(& _i . generics);
David Tolnaycc0f0372017-12-28 19:11:04 -05001254 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001255 _visitor.visit_type(& _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001256 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001257}
David Tolnay2ae520a2017-12-29 11:19:50 -05001258# [ cfg ( feature = "full" ) ]
1259pub fn visit_impl_item_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemVerbatim) {
1260 // Skipped field _i . tts;
1261}
David Tolnay14982012017-12-29 00:49:51 -05001262
David Tolnay85b69a42017-12-27 20:43:10 -05001263pub fn visit_index<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Index) {
1264 // Skipped field _i . index;
1265 _visitor.visit_span(& _i . span);
1266}
1267# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001268pub fn visit_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Item) {
David Tolnayc6b55bc2017-11-09 22:48:38 -08001269 use ::Item::*;
Nika Layzell27726662017-10-24 23:16:35 -04001270 match *_i {
1271 ExternCrate(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001272 _visitor.visit_item_extern_crate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001273 }
1274 Use(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001275 _visitor.visit_item_use(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001276 }
1277 Static(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001278 _visitor.visit_item_static(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001279 }
1280 Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001281 _visitor.visit_item_const(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001282 }
1283 Fn(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001284 _visitor.visit_item_fn(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001285 }
1286 Mod(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001287 _visitor.visit_item_mod(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001288 }
1289 ForeignMod(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001290 _visitor.visit_item_foreign_mod(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001291 }
David Tolnayfd6bf5c2017-11-12 09:41:14 -08001292 Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001293 _visitor.visit_item_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001294 }
1295 Enum(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001296 _visitor.visit_item_enum(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001297 }
1298 Struct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001299 _visitor.visit_item_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001300 }
1301 Union(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001302 _visitor.visit_item_union(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001303 }
1304 Trait(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001305 _visitor.visit_item_trait(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001306 }
1307 DefaultImpl(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001308 _visitor.visit_item_default_impl(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001309 }
1310 Impl(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001311 _visitor.visit_item_impl(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001312 }
David Tolnaydecf28d2017-11-11 11:56:45 -08001313 Macro(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001314 _visitor.visit_item_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001315 }
David Tolnay500d8322017-12-18 00:32:51 -08001316 Macro2(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001317 _visitor.visit_item_macro2(_binding_0);
David Tolnay500d8322017-12-18 00:32:51 -08001318 }
David Tolnay2ae520a2017-12-29 11:19:50 -05001319 Verbatim(ref _binding_0, ) => {
1320 _visitor.visit_item_verbatim(_binding_0);
1321 }
Nika Layzell27726662017-10-24 23:16:35 -04001322 }
1323}
1324# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001325pub fn visit_item_const<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemConst) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001326 for it in & _i . attrs { _visitor.visit_attribute(it) };
1327 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001328 tokens_helper(_visitor, &(& _i . const_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001329 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001330 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001331 _visitor.visit_type(& * _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001332 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001333 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -05001334 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnayc6b55bc2017-11-09 22:48:38 -08001335}
1336# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001337pub fn visit_item_default_impl<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemDefaultImpl) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001338 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay9b258702017-12-29 02:24:41 -05001339 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001340 tokens_helper(_visitor, &(& _i . impl_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001341 _visitor.visit_path(& _i . path);
David Tolnaycc0f0372017-12-28 19:11:04 -05001342 tokens_helper(_visitor, &(& _i . for_token).0);
1343 tokens_helper(_visitor, &(& _i . dot2_token).0);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001344 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayc6b55bc2017-11-09 22:48:38 -08001345}
1346# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001347pub fn visit_item_enum<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemEnum) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001348 for it in & _i . attrs { _visitor.visit_attribute(it) };
1349 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001350 tokens_helper(_visitor, &(& _i . enum_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001351 _visitor.visit_ident(& _i . ident);
1352 _visitor.visit_generics(& _i . generics);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001353 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001354 for el in & _i . variants { let it = el.item(); _visitor.visit_variant(it) };
David Tolnayc6b55bc2017-11-09 22:48:38 -08001355}
1356# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001357pub fn visit_item_extern_crate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemExternCrate) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001358 for it in & _i . attrs { _visitor.visit_attribute(it) };
1359 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001360 tokens_helper(_visitor, &(& _i . extern_token).0);
1361 tokens_helper(_visitor, &(& _i . crate_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001362 _visitor.visit_ident(& _i . ident);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001363 if let Some(ref it) = _i . rename {
David Tolnaycc0f0372017-12-28 19:11:04 -05001364 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001365 _visitor.visit_ident(& ( it ) . 1);
1366 };
David Tolnaycc0f0372017-12-28 19:11:04 -05001367 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnayc6b55bc2017-11-09 22:48:38 -08001368}
1369# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001370pub fn visit_item_fn<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemFn) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001371 for it in & _i . attrs { _visitor.visit_attribute(it) };
1372 _visitor.visit_visibility(& _i . vis);
David Tolnay360a6342017-12-29 02:22:11 -05001373 if let Some(ref it) = _i . constness { tokens_helper(_visitor, &(it).0) };
David Tolnay9b258702017-12-29 02:24:41 -05001374 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001375 if let Some(ref it) = _i . abi { _visitor.visit_abi(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001376 _visitor.visit_ident(& _i . ident);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001377 _visitor.visit_fn_decl(& * _i . decl);
David Tolnay4a918742017-12-28 16:54:41 -05001378 _visitor.visit_block(& * _i . block);
David Tolnayc6b55bc2017-11-09 22:48:38 -08001379}
1380# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001381pub fn visit_item_foreign_mod<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemForeignMod) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001382 for it in & _i . attrs { _visitor.visit_attribute(it) };
1383 _visitor.visit_abi(& _i . abi);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001384 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001385 for it in & _i . items { _visitor.visit_foreign_item(it) };
David Tolnayc6b55bc2017-11-09 22:48:38 -08001386}
1387# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001388pub fn visit_item_impl<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemImpl) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001389 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay360a6342017-12-29 02:22:11 -05001390 if let Some(ref it) = _i . defaultness { tokens_helper(_visitor, &(it).0) };
David Tolnay9b258702017-12-29 02:24:41 -05001391 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001392 tokens_helper(_visitor, &(& _i . impl_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001393 _visitor.visit_generics(& _i . generics);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001394 if let Some(ref it) = _i . trait_ {
David Tolnay360a6342017-12-29 02:22:11 -05001395 if let Some(ref it) = ( it ) . 0 { tokens_helper(_visitor, &(it).0) };
David Tolnay5c4c0b52017-12-28 17:58:54 -05001396 _visitor.visit_path(& ( it ) . 1);
David Tolnaycc0f0372017-12-28 19:11:04 -05001397 tokens_helper(_visitor, &(& ( it ) . 2).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001398 };
David Tolnay4a918742017-12-28 16:54:41 -05001399 _visitor.visit_type(& * _i . self_ty);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001400 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001401 for it in & _i . items { _visitor.visit_impl_item(it) };
David Tolnayc6b55bc2017-11-09 22:48:38 -08001402}
1403# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001404pub fn visit_item_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMacro) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001405 for it in & _i . attrs { _visitor.visit_attribute(it) };
1406 if let Some(ref it) = _i . ident { _visitor.visit_ident(it) };
1407 _visitor.visit_macro(& _i . mac);
David Tolnaycc0f0372017-12-28 19:11:04 -05001408 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
David Tolnayc6b55bc2017-11-09 22:48:38 -08001409}
1410# [ cfg ( feature = "full" ) ]
David Tolnay500d8322017-12-18 00:32:51 -08001411pub fn visit_item_macro2<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMacro2) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001412 for it in & _i . attrs { _visitor.visit_attribute(it) };
1413 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001414 tokens_helper(_visitor, &(& _i . macro_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001415 _visitor.visit_ident(& _i . ident);
David Tolnay500d8322017-12-18 00:32:51 -08001416 // Skipped field _i . args;
1417 // Skipped field _i . body;
1418}
1419# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001420pub fn visit_item_mod<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMod) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001421 for it in & _i . attrs { _visitor.visit_attribute(it) };
1422 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001423 tokens_helper(_visitor, &(& _i . mod_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001424 _visitor.visit_ident(& _i . ident);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001425 if let Some(ref it) = _i . content {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001426 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001427 for it in & ( it ) . 1 { _visitor.visit_item(it) };
1428 };
David Tolnaycc0f0372017-12-28 19:11:04 -05001429 if let Some(ref it) = _i . semi { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04001430}
1431# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001432pub fn visit_item_static<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemStatic) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001433 for it in & _i . attrs { _visitor.visit_attribute(it) };
1434 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001435 tokens_helper(_visitor, &(& _i . static_token).0);
David Tolnay24237fb2017-12-29 02:15:26 -05001436 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001437 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001438 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001439 _visitor.visit_type(& * _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001440 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001441 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -05001442 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001443}
1444# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001445pub fn visit_item_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemStruct) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001446 for it in & _i . attrs { _visitor.visit_attribute(it) };
1447 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001448 tokens_helper(_visitor, &(& _i . struct_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001449 _visitor.visit_ident(& _i . ident);
1450 _visitor.visit_generics(& _i . generics);
1451 _visitor.visit_variant_data(& _i . data);
David Tolnaycc0f0372017-12-28 19:11:04 -05001452 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04001453}
1454# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001455pub fn visit_item_trait<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemTrait) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001456 for it in & _i . attrs { _visitor.visit_attribute(it) };
1457 _visitor.visit_visibility(& _i . vis);
David Tolnay9b258702017-12-29 02:24:41 -05001458 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001459 if let Some(ref it) = _i . auto_token { tokens_helper(_visitor, &(it).0) };
1460 tokens_helper(_visitor, &(& _i . trait_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001461 _visitor.visit_ident(& _i . ident);
1462 _visitor.visit_generics(& _i . generics);
David Tolnaycc0f0372017-12-28 19:11:04 -05001463 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001464 for el in & _i . supertraits { let it = el.item(); _visitor.visit_type_param_bound(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -05001465 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001466 for it in & _i . items { _visitor.visit_trait_item(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001467}
1468# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001469pub fn visit_item_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001470 for it in & _i . attrs { _visitor.visit_attribute(it) };
1471 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001472 tokens_helper(_visitor, &(& _i . type_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001473 _visitor.visit_ident(& _i . ident);
1474 _visitor.visit_generics(& _i . generics);
David Tolnaycc0f0372017-12-28 19:11:04 -05001475 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001476 _visitor.visit_type(& * _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001477 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001478}
1479# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001480pub fn visit_item_union<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemUnion) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001481 for it in & _i . attrs { _visitor.visit_attribute(it) };
1482 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001483 tokens_helper(_visitor, &(& _i . union_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001484 _visitor.visit_ident(& _i . ident);
1485 _visitor.visit_generics(& _i . generics);
1486 _visitor.visit_variant_data(& _i . data);
Nika Layzell27726662017-10-24 23:16:35 -04001487}
1488# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001489pub fn visit_item_use<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemUse) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001490 for it in & _i . attrs { _visitor.visit_attribute(it) };
1491 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001492 tokens_helper(_visitor, &(& _i . use_token).0);
1493 if let Some(ref it) = _i . leading_colon { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001494 for el in & _i . prefix { let it = el.item(); _visitor.visit_ident(it) };
1495 _visitor.visit_use_tree(& _i . tree);
David Tolnaycc0f0372017-12-28 19:11:04 -05001496 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001497}
David Tolnay2ae520a2017-12-29 11:19:50 -05001498# [ cfg ( feature = "full" ) ]
1499pub fn visit_item_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemVerbatim) {
1500 // Skipped field _i . tts;
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);
1524 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
1525 if let Some(ref it) = _i . ty { _visitor.visit_type(& * * it) };
1526 if let Some(ref it) = _i . eq_token { tokens_helper(_visitor, &(it).0) };
1527 if let Some(ref it) = _i . init { _visitor.visit_expr(& * * it) };
1528 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001529}
Nika Layzell27726662017-10-24 23:16:35 -04001530
Nika Layzellc86173a2017-11-18 13:55:22 -05001531pub fn visit_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Macro) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001532 _visitor.visit_path(& _i . path);
David Tolnaycc0f0372017-12-28 19:11:04 -05001533 tokens_helper(_visitor, &(& _i . bang_token).0);
David Tolnaydecf28d2017-11-11 11:56:45 -08001534 // Skipped field _i . tokens;
1535}
David Tolnay14982012017-12-29 00:49:51 -05001536
David Tolnay85b69a42017-12-27 20:43:10 -05001537pub fn visit_member<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Member) {
1538 use ::Member::*;
1539 match *_i {
1540 Named(ref _binding_0, ) => {
1541 _visitor.visit_ident(_binding_0);
1542 }
1543 Unnamed(ref _binding_0, ) => {
1544 _visitor.visit_index(_binding_0);
1545 }
1546 }
1547}
David Tolnaydecf28d2017-11-11 11:56:45 -08001548
Nika Layzellc86173a2017-11-18 13:55:22 -05001549pub fn visit_meta_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MetaItem) {
Nika Layzell27726662017-10-24 23:16:35 -04001550 use ::MetaItem::*;
1551 match *_i {
1552 Term(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001553 _visitor.visit_ident(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001554 }
1555 List(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001556 _visitor.visit_meta_item_list(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001557 }
1558 NameValue(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001559 _visitor.visit_meta_name_value(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001560 }
1561 }
1562}
1563
Nika Layzellc86173a2017-11-18 13:55:22 -05001564pub fn visit_meta_item_list<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MetaItemList) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001565 _visitor.visit_ident(& _i . ident);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001566 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001567 for el in & _i . nested { let it = el.item(); _visitor.visit_nested_meta_item(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001568}
1569
Nika Layzellc86173a2017-11-18 13:55:22 -05001570pub fn visit_meta_name_value<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MetaNameValue) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001571 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001572 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4ba63a02017-12-28 15:53:05 -05001573 _visitor.visit_lit(& _i . lit);
Nika Layzell27726662017-10-24 23:16:35 -04001574}
1575# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001576pub fn visit_method_sig<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MethodSig) {
David Tolnay360a6342017-12-29 02:22:11 -05001577 if let Some(ref it) = _i . constness { tokens_helper(_visitor, &(it).0) };
David Tolnay9b258702017-12-29 02:24:41 -05001578 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001579 if let Some(ref it) = _i . abi { _visitor.visit_abi(it) };
1580 _visitor.visit_ident(& _i . ident);
1581 _visitor.visit_fn_decl(& _i . decl);
Nika Layzell27726662017-10-24 23:16:35 -04001582}
David Tolnayd60cfec2017-12-29 00:21:38 -05001583# [ cfg ( feature = "full" ) ]
1584pub fn visit_method_turbofish<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MethodTurbofish) {
1585 tokens_helper(_visitor, &(& _i . colon2_token).0);
1586 tokens_helper(_visitor, &(& _i . lt_token).0);
1587 for el in & _i . args { let it = el.item(); _visitor.visit_generic_method_argument(it) };
1588 tokens_helper(_visitor, &(& _i . gt_token).0);
1589}
Nika Layzell27726662017-10-24 23:16:35 -04001590
Nika Layzellc86173a2017-11-18 13:55:22 -05001591pub fn visit_nested_meta_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast NestedMetaItem) {
Nika Layzell27726662017-10-24 23:16:35 -04001592 use ::NestedMetaItem::*;
1593 match *_i {
1594 MetaItem(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001595 _visitor.visit_meta_item(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001596 }
1597 Literal(ref _binding_0, ) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05001598 _visitor.visit_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001599 }
1600 }
1601}
1602
Nika Layzellc08227a2017-12-04 16:30:17 -05001603pub fn visit_parenthesized_generic_arguments<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ParenthesizedGenericArguments) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001604 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001605 for el in & _i . inputs { let it = el.item(); _visitor.visit_type(it) };
1606 _visitor.visit_return_type(& _i . output);
Nika Layzell27726662017-10-24 23:16:35 -04001607}
1608# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001609pub fn visit_pat<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Pat) {
Nika Layzell27726662017-10-24 23:16:35 -04001610 use ::Pat::*;
1611 match *_i {
1612 Wild(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001613 _visitor.visit_pat_wild(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001614 }
1615 Ident(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001616 _visitor.visit_pat_ident(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001617 }
1618 Struct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001619 _visitor.visit_pat_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001620 }
1621 TupleStruct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001622 _visitor.visit_pat_tuple_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001623 }
1624 Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001625 _visitor.visit_pat_path(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001626 }
1627 Tuple(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001628 _visitor.visit_pat_tuple(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001629 }
1630 Box(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001631 _visitor.visit_pat_box(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001632 }
1633 Ref(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001634 _visitor.visit_pat_ref(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001635 }
1636 Lit(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001637 _visitor.visit_pat_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001638 }
1639 Range(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001640 _visitor.visit_pat_range(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001641 }
1642 Slice(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001643 _visitor.visit_pat_slice(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001644 }
David Tolnaydecf28d2017-11-11 11:56:45 -08001645 Macro(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001646 _visitor.visit_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001647 }
David Tolnay2ae520a2017-12-29 11:19:50 -05001648 Verbatim(ref _binding_0, ) => {
1649 _visitor.visit_pat_verbatim(_binding_0);
1650 }
Nika Layzell27726662017-10-24 23:16:35 -04001651 }
1652}
1653# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001654pub fn visit_pat_box<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatBox) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001655 tokens_helper(_visitor, &(& _i . box_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001656 _visitor.visit_pat(& * _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001657}
1658# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001659pub fn visit_pat_ident<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatIdent) {
David Tolnay24237fb2017-12-29 02:15:26 -05001660 if let Some(ref it) = _i . by_ref { tokens_helper(_visitor, &(it).0) };
1661 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001662 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001663 if let Some(ref it) = _i . at_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001664 if let Some(ref it) = _i . subpat { _visitor.visit_pat(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -04001665}
1666# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001667pub fn visit_pat_lit<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatLit) {
David Tolnay4a918742017-12-28 16:54:41 -05001668 _visitor.visit_expr(& * _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -04001669}
1670# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001671pub fn visit_pat_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatPath) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001672 if let Some(ref it) = _i . qself { _visitor.visit_qself(it) };
1673 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -04001674}
1675# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001676pub fn visit_pat_range<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatRange) {
David Tolnay4a918742017-12-28 16:54:41 -05001677 _visitor.visit_expr(& * _i . lo);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001678 _visitor.visit_range_limits(& _i . limits);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001679 _visitor.visit_expr(& * _i . hi);
Nika Layzell27726662017-10-24 23:16:35 -04001680}
1681# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001682pub fn visit_pat_ref<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatRef) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001683 tokens_helper(_visitor, &(& _i . and_token).0);
David Tolnay24237fb2017-12-29 02:15:26 -05001684 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001685 _visitor.visit_pat(& * _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001686}
1687# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001688pub fn visit_pat_slice<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatSlice) {
David Tolnay4a3f59a2017-12-28 21:21:12 -05001689 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001690 for el in & _i . front { let it = el.item(); _visitor.visit_pat(it) };
David Tolnay4a918742017-12-28 16:54:41 -05001691 if let Some(ref it) = _i . middle { _visitor.visit_pat(& * * it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001692 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
David Tolnay41871922017-12-29 01:53:45 -05001693 if let Some(ref it) = _i . comma_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001694 for el in & _i . back { let it = el.item(); _visitor.visit_pat(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001695}
1696# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001697pub fn visit_pat_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatStruct) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001698 _visitor.visit_path(& _i . path);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001699 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001700 for el in & _i . fields { let it = el.item(); _visitor.visit_field_pat(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001701 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04001702}
1703# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001704pub fn visit_pat_tuple<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatTuple) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001705 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay41871922017-12-29 01:53:45 -05001706 for el in & _i . front { let it = el.item(); _visitor.visit_pat(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001707 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
David Tolnay41871922017-12-29 01:53:45 -05001708 if let Some(ref it) = _i . comma_token { tokens_helper(_visitor, &(it).0) };
1709 for el in & _i . back { let it = el.item(); _visitor.visit_pat(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001710}
1711# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001712pub fn visit_pat_tuple_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatTupleStruct) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001713 _visitor.visit_path(& _i . path);
1714 _visitor.visit_pat_tuple(& _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001715}
1716# [ cfg ( feature = "full" ) ]
David Tolnay2ae520a2017-12-29 11:19:50 -05001717pub fn visit_pat_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatVerbatim) {
1718 // Skipped field _i . tts;
1719}
1720# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001721pub fn visit_pat_wild<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatWild) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001722 tokens_helper(_visitor, &(& _i . underscore_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001723}
1724
Nika Layzellc86173a2017-11-18 13:55:22 -05001725pub fn visit_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Path) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001726 if let Some(ref it) = _i . leading_colon { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001727 for el in & _i . segments { let it = el.item(); _visitor.visit_path_segment(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001728}
Nika Layzellc08227a2017-12-04 16:30:17 -05001729
1730pub fn visit_path_arguments<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PathArguments) {
1731 use ::PathArguments::*;
1732 match *_i {
1733 None => { }
1734 AngleBracketed(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001735 _visitor.visit_angle_bracketed_generic_arguments(_binding_0);
Nika Layzellc08227a2017-12-04 16:30:17 -05001736 }
1737 Parenthesized(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001738 _visitor.visit_parenthesized_generic_arguments(_binding_0);
Nika Layzellc08227a2017-12-04 16:30:17 -05001739 }
1740 }
1741}
Nika Layzell27726662017-10-24 23:16:35 -04001742
Nika Layzellc86173a2017-11-18 13:55:22 -05001743pub fn visit_path_segment<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PathSegment) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001744 _visitor.visit_ident(& _i . ident);
1745 _visitor.visit_path_arguments(& _i . arguments);
Nika Layzell27726662017-10-24 23:16:35 -04001746}
Nika Layzell27726662017-10-24 23:16:35 -04001747
Nika Layzellc86173a2017-11-18 13:55:22 -05001748pub fn visit_poly_trait_ref<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PolyTraitRef) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001749 if let Some(ref it) = _i . bound_lifetimes { _visitor.visit_bound_lifetimes(it) };
1750 _visitor.visit_path(& _i . trait_ref);
Nika Layzell27726662017-10-24 23:16:35 -04001751}
1752
Nika Layzellc86173a2017-11-18 13:55:22 -05001753pub fn visit_qself<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast QSelf) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001754 tokens_helper(_visitor, &(& _i . lt_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001755 _visitor.visit_type(& * _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -04001756 // Skipped field _i . position;
David Tolnaycc0f0372017-12-28 19:11:04 -05001757 if let Some(ref it) = _i . as_token { tokens_helper(_visitor, &(it).0) };
1758 tokens_helper(_visitor, &(& _i . gt_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001759}
1760# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001761pub fn visit_range_limits<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast RangeLimits) {
Nika Layzell27726662017-10-24 23:16:35 -04001762 use ::RangeLimits::*;
1763 match *_i {
1764 HalfOpen(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05001765 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04001766 }
1767 Closed(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05001768 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04001769 }
1770 }
1771}
David Tolnayf93b90d2017-11-11 19:21:26 -08001772
Nika Layzellc86173a2017-11-18 13:55:22 -05001773pub fn visit_return_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ReturnType) {
David Tolnayf93b90d2017-11-11 19:21:26 -08001774 use ::ReturnType::*;
1775 match *_i {
1776 Default => { }
David Tolnayfd6bf5c2017-11-12 09:41:14 -08001777 Type(ref _binding_0, ref _binding_1, ) => {
David Tolnay4a3f59a2017-12-28 21:21:12 -05001778 tokens_helper(_visitor, &(_binding_0).0);
1779 _visitor.visit_type(& * * _binding_1);
David Tolnayf93b90d2017-11-11 19:21:26 -08001780 }
1781 }
1782}
Nika Layzellefb83ba2017-12-19 18:23:55 -05001783
1784pub fn visit_span<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Span) {
1785}
Nika Layzell27726662017-10-24 23:16:35 -04001786# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001787pub fn visit_stmt<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Stmt) {
Nika Layzell27726662017-10-24 23:16:35 -04001788 use ::Stmt::*;
1789 match *_i {
1790 Local(ref _binding_0, ) => {
David Tolnay4a918742017-12-28 16:54:41 -05001791 _visitor.visit_local(& * * _binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001792 }
1793 Item(ref _binding_0, ) => {
David Tolnay4a918742017-12-28 16:54:41 -05001794 _visitor.visit_item(& * * _binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001795 }
1796 Expr(ref _binding_0, ) => {
David Tolnay4a918742017-12-28 16:54:41 -05001797 _visitor.visit_expr(& * * _binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001798 }
1799 Semi(ref _binding_0, ref _binding_1, ) => {
David Tolnay4a918742017-12-28 16:54:41 -05001800 _visitor.visit_expr(& * * _binding_0);
David Tolnaycc0f0372017-12-28 19:11:04 -05001801 tokens_helper(_visitor, &(_binding_1).0);
Nika Layzell27726662017-10-24 23:16:35 -04001802 }
Nika Layzell27726662017-10-24 23:16:35 -04001803 }
1804}
1805
Nika Layzellc86173a2017-11-18 13:55:22 -05001806pub fn visit_trait_bound_modifier<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitBoundModifier) {
Nika Layzell27726662017-10-24 23:16:35 -04001807 use ::TraitBoundModifier::*;
1808 match *_i {
1809 None => { }
1810 Maybe(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05001811 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04001812 }
1813 }
1814}
1815# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001816pub fn visit_trait_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItem) {
David Tolnayda705bd2017-11-10 21:58:05 -08001817 use ::TraitItem::*;
Nika Layzell27726662017-10-24 23:16:35 -04001818 match *_i {
1819 Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001820 _visitor.visit_trait_item_const(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001821 }
1822 Method(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001823 _visitor.visit_trait_item_method(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001824 }
1825 Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001826 _visitor.visit_trait_item_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001827 }
1828 Macro(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001829 _visitor.visit_trait_item_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001830 }
David Tolnay2ae520a2017-12-29 11:19:50 -05001831 Verbatim(ref _binding_0, ) => {
1832 _visitor.visit_trait_item_verbatim(_binding_0);
1833 }
Nika Layzell27726662017-10-24 23:16:35 -04001834 }
1835}
1836# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001837pub fn visit_trait_item_const<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemConst) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001838 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001839 tokens_helper(_visitor, &(& _i . const_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001840 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001841 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001842 _visitor.visit_type(& _i . ty);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001843 if let Some(ref it) = _i . default {
David Tolnaycc0f0372017-12-28 19:11:04 -05001844 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001845 _visitor.visit_expr(& ( it ) . 1);
1846 };
David Tolnaycc0f0372017-12-28 19:11:04 -05001847 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnayda705bd2017-11-10 21:58:05 -08001848}
1849# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001850pub fn visit_trait_item_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemMacro) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001851 for it in & _i . attrs { _visitor.visit_attribute(it) };
1852 _visitor.visit_macro(& _i . mac);
David Tolnaycc0f0372017-12-28 19:11:04 -05001853 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
David Tolnayda705bd2017-11-10 21:58:05 -08001854}
1855# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001856pub fn visit_trait_item_method<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemMethod) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001857 for it in & _i . attrs { _visitor.visit_attribute(it) };
1858 _visitor.visit_method_sig(& _i . sig);
1859 if let Some(ref it) = _i . default { _visitor.visit_block(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001860 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04001861}
1862# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001863pub fn visit_trait_item_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001864 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001865 tokens_helper(_visitor, &(& _i . type_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001866 _visitor.visit_ident(& _i . ident);
1867 _visitor.visit_generics(& _i . generics);
David Tolnaycc0f0372017-12-28 19:11:04 -05001868 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001869 for el in & _i . bounds { let it = el.item(); _visitor.visit_type_param_bound(it) };
David Tolnay5c4c0b52017-12-28 17:58:54 -05001870 if let Some(ref it) = _i . default {
David Tolnaycc0f0372017-12-28 19:11:04 -05001871 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001872 _visitor.visit_type(& ( it ) . 1);
1873 };
David Tolnaycc0f0372017-12-28 19:11:04 -05001874 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001875}
David Tolnay2ae520a2017-12-29 11:19:50 -05001876# [ cfg ( feature = "full" ) ]
1877pub fn visit_trait_item_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemVerbatim) {
1878 // Skipped field _i . tts;
1879}
Nika Layzell27726662017-10-24 23:16:35 -04001880
Nika Layzellc86173a2017-11-18 13:55:22 -05001881pub fn visit_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Type) {
David Tolnayfd6bf5c2017-11-12 09:41:14 -08001882 use ::Type::*;
Nika Layzell27726662017-10-24 23:16:35 -04001883 match *_i {
1884 Slice(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001885 _visitor.visit_type_slice(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001886 }
1887 Array(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001888 _visitor.visit_type_array(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001889 }
1890 Ptr(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001891 _visitor.visit_type_ptr(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001892 }
David Tolnay0a89b4d2017-11-13 00:55:45 -08001893 Reference(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001894 _visitor.visit_type_reference(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001895 }
1896 BareFn(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001897 _visitor.visit_type_bare_fn(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001898 }
1899 Never(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001900 _visitor.visit_type_never(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001901 }
David Tolnay05362582017-12-26 01:33:57 -05001902 Tuple(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001903 _visitor.visit_type_tuple(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001904 }
1905 Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001906 _visitor.visit_type_path(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001907 }
1908 TraitObject(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001909 _visitor.visit_type_trait_object(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001910 }
1911 ImplTrait(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001912 _visitor.visit_type_impl_trait(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001913 }
1914 Paren(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001915 _visitor.visit_type_paren(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001916 }
1917 Group(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001918 _visitor.visit_type_group(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001919 }
1920 Infer(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001921 _visitor.visit_type_infer(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001922 }
David Tolnaydecf28d2017-11-11 11:56:45 -08001923 Macro(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001924 _visitor.visit_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001925 }
David Tolnay2ae520a2017-12-29 11:19:50 -05001926 Verbatim(ref _binding_0, ) => {
1927 _visitor.visit_type_verbatim(_binding_0);
1928 }
Nika Layzell27726662017-10-24 23:16:35 -04001929 }
1930}
1931
Nika Layzellc86173a2017-11-18 13:55:22 -05001932pub fn visit_type_array<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeArray) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001933 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05001934 _visitor.visit_type(& * _i . elem);
David Tolnaycc0f0372017-12-28 19:11:04 -05001935 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05001936 _visitor.visit_expr(& _i . len);
Nika Layzell27726662017-10-24 23:16:35 -04001937}
1938
Nika Layzellc86173a2017-11-18 13:55:22 -05001939pub fn visit_type_bare_fn<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeBareFn) {
David Tolnaybe7a9592017-12-29 02:39:53 -05001940 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
1941 if let Some(ref it) = _i . abi { _visitor.visit_abi(it) };
1942 tokens_helper(_visitor, &(& _i . fn_token).0);
1943 if let Some(ref it) = _i . lifetimes { _visitor.visit_bound_lifetimes(it) };
1944 tokens_helper(_visitor, &(& _i . paren_token).0);
1945 for el in & _i . inputs { let it = el.item(); _visitor.visit_bare_fn_arg(it) };
1946 if let Some(ref it) = _i . variadic { tokens_helper(_visitor, &(it).0) };
1947 _visitor.visit_return_type(& _i . output);
Nika Layzell27726662017-10-24 23:16:35 -04001948}
1949
Nika Layzellc86173a2017-11-18 13:55:22 -05001950pub fn visit_type_binding<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeBinding) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001951 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001952 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001953 _visitor.visit_type(& _i . ty);
David Tolnayfd6bf5c2017-11-12 09:41:14 -08001954}
1955
Nika Layzellc86173a2017-11-18 13:55:22 -05001956pub fn visit_type_group<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeGroup) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001957 tokens_helper(_visitor, &(& _i . group_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05001958 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04001959}
1960
Nika Layzellc86173a2017-11-18 13:55:22 -05001961pub fn visit_type_impl_trait<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeImplTrait) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001962 tokens_helper(_visitor, &(& _i . impl_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001963 for el in & _i . bounds { let it = el.item(); _visitor.visit_type_param_bound(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001964}
1965
Nika Layzellc86173a2017-11-18 13:55:22 -05001966pub fn visit_type_infer<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeInfer) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001967 tokens_helper(_visitor, &(& _i . underscore_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001968}
1969
Nika Layzellc86173a2017-11-18 13:55:22 -05001970pub fn visit_type_never<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeNever) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001971 tokens_helper(_visitor, &(& _i . bang_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001972}
1973
Nika Layzellc86173a2017-11-18 13:55:22 -05001974pub fn visit_type_param<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParam) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001975 for it in & _i . attrs { _visitor.visit_attribute(it) };
1976 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001977 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001978 for el in & _i . bounds { let it = el.item(); _visitor.visit_type_param_bound(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001979 if let Some(ref it) = _i . eq_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001980 if let Some(ref it) = _i . default { _visitor.visit_type(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001981}
1982
Nika Layzellc86173a2017-11-18 13:55:22 -05001983pub fn visit_type_param_bound<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParamBound) {
David Tolnayfd6bf5c2017-11-12 09:41:14 -08001984 use ::TypeParamBound::*;
Nika Layzell27726662017-10-24 23:16:35 -04001985 match *_i {
1986 Trait(ref _binding_0, ref _binding_1, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001987 _visitor.visit_poly_trait_ref(_binding_0);
1988 _visitor.visit_trait_bound_modifier(_binding_1);
Nika Layzell27726662017-10-24 23:16:35 -04001989 }
1990 Region(ref _binding_0, ) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05001991 _visitor.visit_lifetime(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001992 }
1993 }
1994}
1995
Nika Layzellc86173a2017-11-18 13:55:22 -05001996pub fn visit_type_paren<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParen) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001997 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05001998 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04001999}
2000
Nika Layzellc86173a2017-11-18 13:55:22 -05002001pub fn visit_type_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypePath) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002002 if let Some(ref it) = _i . qself { _visitor.visit_qself(it) };
2003 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -04002004}
2005
Nika Layzellc86173a2017-11-18 13:55:22 -05002006pub fn visit_type_ptr<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypePtr) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002007 tokens_helper(_visitor, &(& _i . star_token).0);
2008 if let Some(ref it) = _i . const_token { tokens_helper(_visitor, &(it).0) };
David Tolnay136aaa32017-12-29 02:37:36 -05002009 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
2010 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04002011}
2012
Nika Layzellc86173a2017-11-18 13:55:22 -05002013pub fn visit_type_reference<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeReference) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002014 tokens_helper(_visitor, &(& _i . and_token).0);
David Tolnay4ba63a02017-12-28 15:53:05 -05002015 if let Some(ref it) = _i . lifetime { _visitor.visit_lifetime(it) };
David Tolnay136aaa32017-12-29 02:37:36 -05002016 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
2017 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04002018}
2019
Nika Layzellc86173a2017-11-18 13:55:22 -05002020pub fn visit_type_slice<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeSlice) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002021 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05002022 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04002023}
2024
Nika Layzellc86173a2017-11-18 13:55:22 -05002025pub fn visit_type_trait_object<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeTraitObject) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002026 if let Some(ref it) = _i . dyn_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05002027 for el in & _i . bounds { let it = el.item(); _visitor.visit_type_param_bound(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002028}
2029
David Tolnay05362582017-12-26 01:33:57 -05002030pub fn visit_type_tuple<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeTuple) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002031 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05002032 for el in & _i . elems { let it = el.item(); _visitor.visit_type(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002033}
2034
David Tolnay2ae520a2017-12-29 11:19:50 -05002035pub fn visit_type_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeVerbatim) {
2036 // Skipped field _i . tts;
2037}
2038
Nika Layzellc86173a2017-11-18 13:55:22 -05002039pub fn visit_un_op<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UnOp) {
Nika Layzell27726662017-10-24 23:16:35 -04002040 use ::UnOp::*;
2041 match *_i {
2042 Deref(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05002043 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04002044 }
2045 Not(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05002046 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04002047 }
2048 Neg(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05002049 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04002050 }
2051 }
2052}
David Tolnay5f332a92017-12-26 00:42:45 -05002053# [ cfg ( feature = "full" ) ]
2054pub fn visit_use_glob<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseGlob) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002055 tokens_helper(_visitor, &(& _i . star_token).0);
David Tolnay5f332a92017-12-26 00:42:45 -05002056}
2057# [ cfg ( feature = "full" ) ]
2058pub fn visit_use_list<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseList) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002059 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05002060 for el in & _i . items { let it = el.item(); _visitor.visit_use_tree(it) };
David Tolnay5f332a92017-12-26 00:42:45 -05002061}
2062# [ cfg ( feature = "full" ) ]
2063pub fn visit_use_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UsePath) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002064 _visitor.visit_ident(& _i . ident);
David Tolnay5c4c0b52017-12-28 17:58:54 -05002065 if let Some(ref it) = _i . rename {
David Tolnaycc0f0372017-12-28 19:11:04 -05002066 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05002067 _visitor.visit_ident(& ( it ) . 1);
2068 };
David Tolnay5f332a92017-12-26 00:42:45 -05002069}
2070# [ cfg ( feature = "full" ) ]
2071pub fn visit_use_tree<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseTree) {
2072 use ::UseTree::*;
2073 match *_i {
2074 Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002075 _visitor.visit_use_path(_binding_0);
David Tolnay5f332a92017-12-26 00:42:45 -05002076 }
2077 Glob(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002078 _visitor.visit_use_glob(_binding_0);
David Tolnay5f332a92017-12-26 00:42:45 -05002079 }
2080 List(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002081 _visitor.visit_use_list(_binding_0);
David Tolnay5f332a92017-12-26 00:42:45 -05002082 }
2083 }
2084}
Nika Layzell27726662017-10-24 23:16:35 -04002085
Nika Layzellc86173a2017-11-18 13:55:22 -05002086pub fn visit_variant<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Variant) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002087 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05002088 _visitor.visit_ident(& _i . ident);
David Tolnayf0d63bf2017-12-26 12:29:47 -05002089 _visitor.visit_variant_data(& _i . data);
David Tolnaye67902a2017-12-28 22:12:00 -05002090 if let Some(ref it) = _i . discriminant {
2091 tokens_helper(_visitor, &(& ( it ) . 0).0);
2092 _visitor.visit_expr(& ( it ) . 1);
2093 };
Nika Layzell27726662017-10-24 23:16:35 -04002094}
2095
Nika Layzellc86173a2017-11-18 13:55:22 -05002096pub fn visit_variant_data<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VariantData) {
Nika Layzell27726662017-10-24 23:16:35 -04002097 use ::VariantData::*;
2098 match *_i {
2099 Struct(ref _binding_0, ref _binding_1, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002100 for el in _binding_0 { let it = el.item(); _visitor.visit_field(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -05002101 tokens_helper(_visitor, &(_binding_1).0);
Nika Layzell27726662017-10-24 23:16:35 -04002102 }
2103 Tuple(ref _binding_0, ref _binding_1, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002104 for el in _binding_0 { let it = el.item(); _visitor.visit_field(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -05002105 tokens_helper(_visitor, &(_binding_1).0);
Nika Layzell27726662017-10-24 23:16:35 -04002106 }
2107 Unit => { }
2108 }
2109}
Nika Layzell27726662017-10-24 23:16:35 -04002110
Nika Layzellc86173a2017-11-18 13:55:22 -05002111pub fn visit_vis_crate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisCrate) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002112 tokens_helper(_visitor, &(& _i . pub_token).0);
David Tolnay1e01f9c2017-12-28 20:16:19 -05002113 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnaycc0f0372017-12-28 19:11:04 -05002114 tokens_helper(_visitor, &(& _i . crate_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04002115}
2116
Nika Layzellc86173a2017-11-18 13:55:22 -05002117pub fn visit_vis_public<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisPublic) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002118 tokens_helper(_visitor, &(& _i . pub_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04002119}
2120
Nika Layzellc86173a2017-11-18 13:55:22 -05002121pub fn visit_vis_restricted<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisRestricted) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002122 tokens_helper(_visitor, &(& _i . pub_token).0);
David Tolnay1e01f9c2017-12-28 20:16:19 -05002123 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnaycc0f0372017-12-28 19:11:04 -05002124 if let Some(ref it) = _i . in_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a918742017-12-28 16:54:41 -05002125 _visitor.visit_path(& * _i . path);
Nika Layzell27726662017-10-24 23:16:35 -04002126}
2127
Nika Layzellc86173a2017-11-18 13:55:22 -05002128pub fn visit_visibility<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Visibility) {
Nika Layzell27726662017-10-24 23:16:35 -04002129 use ::Visibility::*;
2130 match *_i {
2131 Public(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002132 _visitor.visit_vis_public(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002133 }
2134 Crate(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002135 _visitor.visit_vis_crate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002136 }
2137 Restricted(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002138 _visitor.visit_vis_restricted(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002139 }
David Tolnayfcfb9002017-12-28 22:04:29 -05002140 Inherited => { }
Nika Layzell27726662017-10-24 23:16:35 -04002141 }
2142}
2143
Nika Layzellc86173a2017-11-18 13:55:22 -05002144pub fn visit_where_bound_predicate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WhereBoundPredicate) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002145 if let Some(ref it) = _i . bound_lifetimes { _visitor.visit_bound_lifetimes(it) };
2146 _visitor.visit_type(& _i . bounded_ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05002147 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05002148 for el in & _i . bounds { let it = el.item(); _visitor.visit_type_param_bound(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002149}
2150
Nika Layzellc86173a2017-11-18 13:55:22 -05002151pub fn visit_where_clause<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WhereClause) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002152 tokens_helper(_visitor, &(& _i . where_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05002153 for el in & _i . predicates { let it = el.item(); _visitor.visit_where_predicate(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002154}
2155
Nika Layzellc86173a2017-11-18 13:55:22 -05002156pub fn visit_where_eq_predicate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WhereEqPredicate) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002157 _visitor.visit_type(& _i . lhs_ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05002158 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05002159 _visitor.visit_type(& _i . rhs_ty);
Nika Layzell27726662017-10-24 23:16:35 -04002160}
2161
Nika Layzellc86173a2017-11-18 13:55:22 -05002162pub fn visit_where_predicate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WherePredicate) {
Nika Layzell27726662017-10-24 23:16:35 -04002163 use ::WherePredicate::*;
2164 match *_i {
2165 BoundPredicate(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002166 _visitor.visit_where_bound_predicate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002167 }
2168 RegionPredicate(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002169 _visitor.visit_where_region_predicate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002170 }
2171 EqPredicate(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002172 _visitor.visit_where_eq_predicate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002173 }
2174 }
2175}
2176
Nika Layzellc86173a2017-11-18 13:55:22 -05002177pub fn visit_where_region_predicate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WhereRegionPredicate) {
David Tolnay4ba63a02017-12-28 15:53:05 -05002178 _visitor.visit_lifetime(& _i . lifetime);
David Tolnaycc0f0372017-12-28 19:11:04 -05002179 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4ba63a02017-12-28 15:53:05 -05002180 for el in & _i . bounds { let it = el.item(); _visitor.visit_lifetime(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002181}
2182