blob: d5b63ae3cff51492cd1fc262b7889ae49ba21ce7 [file] [log] [blame]
Nika Layzell27726662017-10-24 23:16:35 -04001// THIS FILE IS AUTOMATICALLY GENERATED; DO NOT EDIT
2
3//! AST walker. Each overridden visit method has full control over what
4//! happens with its node, it can do its own traversal of the node's children,
5//! call `visit::walk_*` to apply the default traversal algorithm, or prevent
6//! deeper traversal by doing nothing.
7
David Tolnay0afc9b32017-12-27 13:38:24 -05008#![cfg_attr(rustfmt, rustfmt_skip)]
9
David Tolnayf0d63bf2017-12-26 12:29:47 -050010#![cfg_attr(feature = "cargo-clippy", allow(match_same_arms))]
11
Nika Layzella6f46c42017-10-26 15:26:16 -040012use *;
David Tolnay98942562017-12-26 21:24:35 -050013use proc_macro2::Span;
David Tolnaycc0f0372017-12-28 19:11:04 -050014use gen::helper::visit::*;
Nika Layzell27726662017-10-24 23:16:35 -040015
Nika Layzell4ab8d6e2017-10-26 09:45:49 -040016
17#[cfg(feature = "full")]
18macro_rules! full {
19 ($e:expr) => { $e }
20}
21
22#[cfg(not(feature = "full"))]
23macro_rules! full {
24 ($e:expr) => { unreachable!() }
25}
26
27
Nika Layzell27726662017-10-24 23:16:35 -040028/// Each method of the Visitor trait is a hook to be potentially
29/// overridden. Each method's default implementation recursively visits
30/// the substructure of the input via the corresponding `walk` method;
31/// e.g. the `visit_mod` method by default calls `visit::walk_mod`.
32///
33/// If you want to ensure that your code handles every variant
34/// explicitly, you need to override each method. (And you also need
35/// to monitor future changes to `Visitor` in case a new method with a
36/// new default implementation gets introduced.)
Nika Layzellc86173a2017-11-18 13:55:22 -050037pub trait Visitor<'ast> {
Nika Layzell27726662017-10-24 23:16:35 -040038
Nika Layzellc86173a2017-11-18 13:55:22 -050039fn visit_abi(&mut self, i: &'ast Abi) { visit_abi(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040040
Nika Layzellc08227a2017-12-04 16:30:17 -050041fn visit_angle_bracketed_generic_arguments(&mut self, i: &'ast AngleBracketedGenericArguments) { visit_angle_bracketed_generic_arguments(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040042# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050043fn visit_arg_captured(&mut self, i: &'ast ArgCaptured) { visit_arg_captured(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040044# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050045fn visit_arg_self(&mut self, i: &'ast ArgSelf) { visit_arg_self(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040046# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050047fn visit_arg_self_ref(&mut self, i: &'ast ArgSelfRef) { visit_arg_self_ref(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040048# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050049fn visit_arm(&mut self, i: &'ast Arm) { visit_arm(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040050
Nika Layzellc86173a2017-11-18 13:55:22 -050051fn visit_attr_style(&mut self, i: &'ast AttrStyle) { visit_attr_style(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040052
Nika Layzellc86173a2017-11-18 13:55:22 -050053fn visit_attribute(&mut self, i: &'ast Attribute) { visit_attribute(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040054
Nika Layzellc86173a2017-11-18 13:55:22 -050055fn visit_bare_fn_arg(&mut self, i: &'ast BareFnArg) { visit_bare_fn_arg(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040056
Nika Layzellc86173a2017-11-18 13:55:22 -050057fn visit_bare_fn_arg_name(&mut self, i: &'ast BareFnArgName) { visit_bare_fn_arg_name(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040058
Nika Layzellc86173a2017-11-18 13:55:22 -050059fn visit_bin_op(&mut self, i: &'ast BinOp) { visit_bin_op(self, i) }
David Tolnay506e43a2017-12-29 11:34:36 -050060
61fn visit_binding(&mut self, i: &'ast Binding) { visit_binding(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040062# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050063fn visit_block(&mut self, i: &'ast Block) { visit_block(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040064
Nika Layzellc86173a2017-11-18 13:55:22 -050065fn visit_body(&mut self, i: &'ast Body) { visit_body(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040066
Nika Layzellc86173a2017-11-18 13:55:22 -050067fn visit_body_enum(&mut self, i: &'ast BodyEnum) { visit_body_enum(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040068
Nika Layzellc86173a2017-11-18 13:55:22 -050069fn visit_body_struct(&mut self, i: &'ast BodyStruct) { visit_body_struct(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040070
Nika Layzellc86173a2017-11-18 13:55:22 -050071fn visit_bound_lifetimes(&mut self, i: &'ast BoundLifetimes) { visit_bound_lifetimes(self, i) }
Nika Layzellf1fdc0b2017-12-04 19:58:32 -050072
73fn visit_const_param(&mut self, i: &'ast ConstParam) { visit_const_param(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040074
Nika Layzellc86173a2017-11-18 13:55:22 -050075fn visit_derive_input(&mut self, i: &'ast DeriveInput) { visit_derive_input(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040076
Nika Layzellc86173a2017-11-18 13:55:22 -050077fn visit_expr(&mut self, i: &'ast Expr) { visit_expr(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040078# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050079fn visit_expr_addr_of(&mut self, i: &'ast ExprAddrOf) { visit_expr_addr_of(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040080# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050081fn visit_expr_array(&mut self, i: &'ast ExprArray) { visit_expr_array(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040082# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050083fn visit_expr_assign(&mut self, i: &'ast ExprAssign) { visit_expr_assign(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040084# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050085fn visit_expr_assign_op(&mut self, i: &'ast ExprAssignOp) { visit_expr_assign_op(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040086
Nika Layzellc86173a2017-11-18 13:55:22 -050087fn visit_expr_binary(&mut self, i: &'ast ExprBinary) { visit_expr_binary(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040088# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050089fn visit_expr_block(&mut self, i: &'ast ExprBlock) { visit_expr_block(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040090# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050091fn visit_expr_box(&mut self, i: &'ast ExprBox) { visit_expr_box(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040092# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050093fn visit_expr_break(&mut self, i: &'ast ExprBreak) { visit_expr_break(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040094
Nika Layzellc86173a2017-11-18 13:55:22 -050095fn visit_expr_call(&mut self, i: &'ast ExprCall) { visit_expr_call(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040096
Nika Layzellc86173a2017-11-18 13:55:22 -050097fn visit_expr_cast(&mut self, i: &'ast ExprCast) { visit_expr_cast(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040098# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050099fn visit_expr_catch(&mut self, i: &'ast ExprCatch) { visit_expr_catch(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400100# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500101fn visit_expr_closure(&mut self, i: &'ast ExprClosure) { visit_expr_closure(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400102# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500103fn visit_expr_continue(&mut self, i: &'ast ExprContinue) { visit_expr_continue(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400104# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500105fn visit_expr_field(&mut self, i: &'ast ExprField) { visit_expr_field(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400106# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500107fn visit_expr_for_loop(&mut self, i: &'ast ExprForLoop) { visit_expr_for_loop(self, i) }
David Tolnaye98775f2017-12-28 23:17:00 -0500108# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500109fn visit_expr_group(&mut self, i: &'ast ExprGroup) { visit_expr_group(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400110# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500111fn visit_expr_if(&mut self, i: &'ast ExprIf) { visit_expr_if(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400112# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500113fn visit_expr_if_let(&mut self, i: &'ast ExprIfLet) { visit_expr_if_let(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400114# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500115fn visit_expr_in_place(&mut self, i: &'ast ExprInPlace) { visit_expr_in_place(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400116
Nika Layzellc86173a2017-11-18 13:55:22 -0500117fn visit_expr_index(&mut self, i: &'ast ExprIndex) { visit_expr_index(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400118
David Tolnay8c91b882017-12-28 23:04:32 -0500119fn visit_expr_lit(&mut self, i: &'ast ExprLit) { visit_expr_lit(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400120# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500121fn visit_expr_loop(&mut self, i: &'ast ExprLoop) { visit_expr_loop(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400122# [ cfg ( feature = "full" ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500123fn visit_expr_macro(&mut self, i: &'ast ExprMacro) { visit_expr_macro(self, i) }
124# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500125fn visit_expr_match(&mut self, i: &'ast ExprMatch) { visit_expr_match(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400126# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500127fn visit_expr_method_call(&mut self, i: &'ast ExprMethodCall) { visit_expr_method_call(self, i) }
David Tolnaye98775f2017-12-28 23:17:00 -0500128# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500129fn visit_expr_paren(&mut self, i: &'ast ExprParen) { visit_expr_paren(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400130
Nika Layzellc86173a2017-11-18 13:55:22 -0500131fn visit_expr_path(&mut self, i: &'ast ExprPath) { visit_expr_path(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400132# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500133fn visit_expr_range(&mut self, i: &'ast ExprRange) { visit_expr_range(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400134# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500135fn visit_expr_repeat(&mut self, i: &'ast ExprRepeat) { visit_expr_repeat(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400136# [ cfg ( feature = "full" ) ]
David Tolnayc246cd32017-12-28 23:14:32 -0500137fn visit_expr_return(&mut self, i: &'ast ExprReturn) { visit_expr_return(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400138# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500139fn visit_expr_struct(&mut self, i: &'ast ExprStruct) { visit_expr_struct(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400140# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500141fn visit_expr_try(&mut self, i: &'ast ExprTry) { visit_expr_try(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400142# [ cfg ( feature = "full" ) ]
David Tolnay05362582017-12-26 01:33:57 -0500143fn visit_expr_tuple(&mut self, i: &'ast ExprTuple) { visit_expr_tuple(self, i) }
David Tolnay0cf94f22017-12-28 23:46:26 -0500144# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500145fn visit_expr_type(&mut self, i: &'ast ExprType) { visit_expr_type(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400146
Nika Layzellc86173a2017-11-18 13:55:22 -0500147fn visit_expr_unary(&mut self, i: &'ast ExprUnary) { visit_expr_unary(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400148# [ cfg ( feature = "full" ) ]
Nika Layzell640832a2017-12-04 13:37:09 -0500149fn visit_expr_unsafe(&mut self, i: &'ast ExprUnsafe) { visit_expr_unsafe(self, i) }
David Tolnay2ae520a2017-12-29 11:19:50 -0500150
151fn visit_expr_verbatim(&mut self, i: &'ast ExprVerbatim) { visit_expr_verbatim(self, i) }
Nika Layzell640832a2017-12-04 13:37:09 -0500152# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500153fn visit_expr_while(&mut self, i: &'ast ExprWhile) { visit_expr_while(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400154# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500155fn visit_expr_while_let(&mut self, i: &'ast ExprWhileLet) { visit_expr_while_let(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400156# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500157fn visit_expr_yield(&mut self, i: &'ast ExprYield) { visit_expr_yield(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400158
Nika Layzellc86173a2017-11-18 13:55:22 -0500159fn visit_field(&mut self, i: &'ast Field) { visit_field(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400160# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500161fn visit_field_pat(&mut self, i: &'ast FieldPat) { visit_field_pat(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400162# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500163fn visit_field_value(&mut self, i: &'ast FieldValue) { visit_field_value(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400164# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500165fn visit_file(&mut self, i: &'ast File) { visit_file(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400166# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500167fn visit_fn_arg(&mut self, i: &'ast FnArg) { visit_fn_arg(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400168# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500169fn visit_fn_decl(&mut self, i: &'ast FnDecl) { visit_fn_decl(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400170# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500171fn visit_foreign_item(&mut self, i: &'ast ForeignItem) { visit_foreign_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400172# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500173fn visit_foreign_item_fn(&mut self, i: &'ast ForeignItemFn) { visit_foreign_item_fn(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400174# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500175fn visit_foreign_item_static(&mut self, i: &'ast ForeignItemStatic) { visit_foreign_item_static(self, i) }
David Tolnay199bcbb2017-11-12 10:33:52 -0800176# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500177fn visit_foreign_item_type(&mut self, i: &'ast ForeignItemType) { visit_foreign_item_type(self, i) }
David Tolnay2ae520a2017-12-29 11:19:50 -0500178# [ cfg ( feature = "full" ) ]
179fn visit_foreign_item_verbatim(&mut self, i: &'ast ForeignItemVerbatim) { visit_foreign_item_verbatim(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400180
Nika Layzellc08227a2017-12-04 16:30:17 -0500181fn visit_generic_argument(&mut self, i: &'ast GenericArgument) { visit_generic_argument(self, i) }
David Tolnayd60cfec2017-12-29 00:21:38 -0500182# [ cfg ( feature = "full" ) ]
183fn visit_generic_method_argument(&mut self, i: &'ast GenericMethodArgument) { visit_generic_method_argument(self, i) }
Nika Layzell357885a2017-12-04 15:47:07 -0500184
David Tolnayc2f1aba2017-11-12 20:29:22 -0800185fn visit_generic_param(&mut self, i: &'ast GenericParam) { visit_generic_param(self, i) }
186
Nika Layzellc86173a2017-11-18 13:55:22 -0500187fn visit_generics(&mut self, i: &'ast Generics) { visit_generics(self, i) }
Nika Layzellefb83ba2017-12-19 18:23:55 -0500188
189fn visit_ident(&mut self, i: &'ast Ident) { visit_ident(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400190# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500191fn visit_impl_item(&mut self, i: &'ast ImplItem) { visit_impl_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400192# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500193fn visit_impl_item_const(&mut self, i: &'ast ImplItemConst) { visit_impl_item_const(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400194# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500195fn visit_impl_item_macro(&mut self, i: &'ast ImplItemMacro) { visit_impl_item_macro(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400196# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500197fn visit_impl_item_method(&mut self, i: &'ast ImplItemMethod) { visit_impl_item_method(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400198# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500199fn visit_impl_item_type(&mut self, i: &'ast ImplItemType) { visit_impl_item_type(self, i) }
David Tolnay2ae520a2017-12-29 11:19:50 -0500200# [ cfg ( feature = "full" ) ]
201fn visit_impl_item_verbatim(&mut self, i: &'ast ImplItemVerbatim) { visit_impl_item_verbatim(self, i) }
David Tolnay14982012017-12-29 00:49:51 -0500202
David Tolnay85b69a42017-12-27 20:43:10 -0500203fn visit_index(&mut self, i: &'ast Index) { visit_index(self, i) }
204# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500205fn visit_item(&mut self, i: &'ast Item) { visit_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400206# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500207fn visit_item_const(&mut self, i: &'ast ItemConst) { visit_item_const(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400208# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500209fn visit_item_enum(&mut self, i: &'ast ItemEnum) { visit_item_enum(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400210# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500211fn visit_item_extern_crate(&mut self, i: &'ast ItemExternCrate) { visit_item_extern_crate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400212# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500213fn visit_item_fn(&mut self, i: &'ast ItemFn) { visit_item_fn(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400214# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500215fn visit_item_foreign_mod(&mut self, i: &'ast ItemForeignMod) { visit_item_foreign_mod(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400216# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500217fn visit_item_impl(&mut self, i: &'ast ItemImpl) { visit_item_impl(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400218# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500219fn visit_item_macro(&mut self, i: &'ast ItemMacro) { visit_item_macro(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400220# [ cfg ( feature = "full" ) ]
David Tolnay500d8322017-12-18 00:32:51 -0800221fn visit_item_macro2(&mut self, i: &'ast ItemMacro2) { visit_item_macro2(self, i) }
222# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500223fn visit_item_mod(&mut self, i: &'ast ItemMod) { visit_item_mod(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400224# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500225fn visit_item_static(&mut self, i: &'ast ItemStatic) { visit_item_static(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400226# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500227fn visit_item_struct(&mut self, i: &'ast ItemStruct) { visit_item_struct(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400228# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500229fn visit_item_trait(&mut self, i: &'ast ItemTrait) { visit_item_trait(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400230# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500231fn visit_item_type(&mut self, i: &'ast ItemType) { visit_item_type(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400232# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500233fn visit_item_union(&mut self, i: &'ast ItemUnion) { visit_item_union(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400234# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500235fn visit_item_use(&mut self, i: &'ast ItemUse) { visit_item_use(self, i) }
David Tolnay2ae520a2017-12-29 11:19:50 -0500236# [ cfg ( feature = "full" ) ]
237fn visit_item_verbatim(&mut self, i: &'ast ItemVerbatim) { visit_item_verbatim(self, i) }
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" ) ]
David Tolnay323279a2017-12-29 11:26:32 -0500273fn visit_pat_macro(&mut self, i: &'ast PatMacro) { visit_pat_macro(self, i) }
274# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500275fn visit_pat_path(&mut self, i: &'ast PatPath) { visit_pat_path(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400276# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500277fn visit_pat_range(&mut self, i: &'ast PatRange) { visit_pat_range(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400278# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500279fn visit_pat_ref(&mut self, i: &'ast PatRef) { visit_pat_ref(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400280# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500281fn visit_pat_slice(&mut self, i: &'ast PatSlice) { visit_pat_slice(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400282# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500283fn visit_pat_struct(&mut self, i: &'ast PatStruct) { visit_pat_struct(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400284# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500285fn visit_pat_tuple(&mut self, i: &'ast PatTuple) { visit_pat_tuple(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400286# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500287fn visit_pat_tuple_struct(&mut self, i: &'ast PatTupleStruct) { visit_pat_tuple_struct(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400288# [ cfg ( feature = "full" ) ]
David Tolnay2ae520a2017-12-29 11:19:50 -0500289fn visit_pat_verbatim(&mut self, i: &'ast PatVerbatim) { visit_pat_verbatim(self, i) }
290# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500291fn visit_pat_wild(&mut self, i: &'ast PatWild) { visit_pat_wild(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400292
Nika Layzellc86173a2017-11-18 13:55:22 -0500293fn visit_path(&mut self, i: &'ast Path) { visit_path(self, i) }
Nika Layzellc08227a2017-12-04 16:30:17 -0500294
295fn visit_path_arguments(&mut self, i: &'ast PathArguments) { visit_path_arguments(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400296
Nika Layzellc86173a2017-11-18 13:55:22 -0500297fn visit_path_segment(&mut self, i: &'ast PathSegment) { visit_path_segment(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400298
Nika Layzellc86173a2017-11-18 13:55:22 -0500299fn visit_poly_trait_ref(&mut self, i: &'ast PolyTraitRef) { visit_poly_trait_ref(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400300
Nika Layzellc86173a2017-11-18 13:55:22 -0500301fn visit_qself(&mut self, i: &'ast QSelf) { visit_qself(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400302# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500303fn visit_range_limits(&mut self, i: &'ast RangeLimits) { visit_range_limits(self, i) }
David Tolnayf93b90d2017-11-11 19:21:26 -0800304
Nika Layzellc86173a2017-11-18 13:55:22 -0500305fn visit_return_type(&mut self, i: &'ast ReturnType) { visit_return_type(self, i) }
Nika Layzellefb83ba2017-12-19 18:23:55 -0500306
307fn visit_span(&mut self, i: &'ast Span) { visit_span(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400308# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500309fn visit_stmt(&mut self, i: &'ast Stmt) { visit_stmt(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400310
Nika Layzellc86173a2017-11-18 13:55:22 -0500311fn visit_trait_bound_modifier(&mut self, i: &'ast TraitBoundModifier) { visit_trait_bound_modifier(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400312# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500313fn visit_trait_item(&mut self, i: &'ast TraitItem) { visit_trait_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400314# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500315fn visit_trait_item_const(&mut self, i: &'ast TraitItemConst) { visit_trait_item_const(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400316# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500317fn visit_trait_item_macro(&mut self, i: &'ast TraitItemMacro) { visit_trait_item_macro(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400318# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500319fn visit_trait_item_method(&mut self, i: &'ast TraitItemMethod) { visit_trait_item_method(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400320# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500321fn visit_trait_item_type(&mut self, i: &'ast TraitItemType) { visit_trait_item_type(self, i) }
David Tolnay2ae520a2017-12-29 11:19:50 -0500322# [ cfg ( feature = "full" ) ]
323fn visit_trait_item_verbatim(&mut self, i: &'ast TraitItemVerbatim) { visit_trait_item_verbatim(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400324
Nika Layzellc86173a2017-11-18 13:55:22 -0500325fn visit_type(&mut self, i: &'ast Type) { visit_type(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400326
Nika Layzellc86173a2017-11-18 13:55:22 -0500327fn visit_type_array(&mut self, i: &'ast TypeArray) { visit_type_array(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400328
Nika Layzellc86173a2017-11-18 13:55:22 -0500329fn visit_type_bare_fn(&mut self, i: &'ast TypeBareFn) { visit_type_bare_fn(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400330
Nika Layzellc86173a2017-11-18 13:55:22 -0500331fn visit_type_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
David Tolnay323279a2017-12-29 11:26:32 -0500337fn visit_type_macro(&mut self, i: &'ast TypeMacro) { visit_type_macro(self, i) }
338
Nika Layzellc86173a2017-11-18 13:55:22 -0500339fn visit_type_never(&mut self, i: &'ast TypeNever) { visit_type_never(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800340
Nika Layzellc86173a2017-11-18 13:55:22 -0500341fn visit_type_param(&mut self, i: &'ast TypeParam) { visit_type_param(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800342
Nika Layzellc86173a2017-11-18 13:55:22 -0500343fn visit_type_param_bound(&mut self, i: &'ast TypeParamBound) { visit_type_param_bound(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800344
Nika Layzellc86173a2017-11-18 13:55:22 -0500345fn visit_type_paren(&mut self, i: &'ast TypeParen) { visit_type_paren(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800346
Nika Layzellc86173a2017-11-18 13:55:22 -0500347fn visit_type_path(&mut self, i: &'ast TypePath) { visit_type_path(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800348
Nika Layzellc86173a2017-11-18 13:55:22 -0500349fn visit_type_ptr(&mut self, i: &'ast TypePtr) { visit_type_ptr(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800350
Nika Layzellc86173a2017-11-18 13:55:22 -0500351fn visit_type_reference(&mut self, i: &'ast TypeReference) { visit_type_reference(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800352
Nika Layzellc86173a2017-11-18 13:55:22 -0500353fn visit_type_slice(&mut self, i: &'ast TypeSlice) { visit_type_slice(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800354
Nika Layzellc86173a2017-11-18 13:55:22 -0500355fn visit_type_trait_object(&mut self, i: &'ast TypeTraitObject) { visit_type_trait_object(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800356
David Tolnay05362582017-12-26 01:33:57 -0500357fn visit_type_tuple(&mut self, i: &'ast TypeTuple) { visit_type_tuple(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800358
David Tolnay2ae520a2017-12-29 11:19:50 -0500359fn visit_type_verbatim(&mut self, i: &'ast TypeVerbatim) { visit_type_verbatim(self, i) }
360
Nika Layzellc86173a2017-11-18 13:55:22 -0500361fn visit_un_op(&mut self, i: &'ast UnOp) { visit_un_op(self, i) }
David Tolnay5f332a92017-12-26 00:42:45 -0500362# [ cfg ( feature = "full" ) ]
363fn visit_use_glob(&mut self, i: &'ast UseGlob) { visit_use_glob(self, i) }
364# [ cfg ( feature = "full" ) ]
365fn visit_use_list(&mut self, i: &'ast UseList) { visit_use_list(self, i) }
366# [ cfg ( feature = "full" ) ]
367fn visit_use_path(&mut self, i: &'ast UsePath) { visit_use_path(self, i) }
368# [ cfg ( feature = "full" ) ]
369fn visit_use_tree(&mut self, i: &'ast UseTree) { visit_use_tree(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400370
Nika Layzellc86173a2017-11-18 13:55:22 -0500371fn visit_variant(&mut self, i: &'ast Variant) { visit_variant(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400372
Nika Layzellc86173a2017-11-18 13:55:22 -0500373fn visit_variant_data(&mut self, i: &'ast VariantData) { visit_variant_data(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400374
Nika Layzellc86173a2017-11-18 13:55:22 -0500375fn visit_vis_crate(&mut self, i: &'ast VisCrate) { visit_vis_crate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400376
Nika Layzellc86173a2017-11-18 13:55:22 -0500377fn visit_vis_public(&mut self, i: &'ast VisPublic) { visit_vis_public(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400378
Nika Layzellc86173a2017-11-18 13:55:22 -0500379fn visit_vis_restricted(&mut self, i: &'ast VisRestricted) { visit_vis_restricted(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400380
Nika Layzellc86173a2017-11-18 13:55:22 -0500381fn visit_visibility(&mut self, i: &'ast Visibility) { visit_visibility(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400382
Nika Layzellc86173a2017-11-18 13:55:22 -0500383fn visit_where_bound_predicate(&mut self, i: &'ast WhereBoundPredicate) { visit_where_bound_predicate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400384
Nika Layzellc86173a2017-11-18 13:55:22 -0500385fn visit_where_clause(&mut self, i: &'ast WhereClause) { visit_where_clause(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400386
Nika Layzellc86173a2017-11-18 13:55:22 -0500387fn visit_where_eq_predicate(&mut self, i: &'ast WhereEqPredicate) { visit_where_eq_predicate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400388
Nika Layzellc86173a2017-11-18 13:55:22 -0500389fn visit_where_predicate(&mut self, i: &'ast WherePredicate) { visit_where_predicate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400390
Nika Layzellc86173a2017-11-18 13:55:22 -0500391fn visit_where_region_predicate(&mut self, i: &'ast WhereRegionPredicate) { visit_where_region_predicate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400392
393}
394
395
Nika Layzellc86173a2017-11-18 13:55:22 -0500396pub fn visit_abi<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Abi) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500397 tokens_helper(_visitor, &(& _i . extern_token).0);
David Tolnayd5125762017-12-29 02:42:17 -0500398 if let Some(ref it) = _i . name { _visitor.visit_lit(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400399}
400
Nika Layzellc08227a2017-12-04 16:30:17 -0500401pub fn visit_angle_bracketed_generic_arguments<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast AngleBracketedGenericArguments) {
David Tolnay2d4e08a2017-12-28 23:54:07 -0500402 if let Some(ref it) = _i . colon2_token { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500403 tokens_helper(_visitor, &(& _i . lt_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500404 for el in & _i . args { let it = el.item(); _visitor.visit_generic_argument(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500405 tokens_helper(_visitor, &(& _i . gt_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400406}
407# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500408pub fn visit_arg_captured<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ArgCaptured) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500409 _visitor.visit_pat(& _i . pat);
David Tolnaycc0f0372017-12-28 19:11:04 -0500410 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500411 _visitor.visit_type(& _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -0400412}
413# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500414pub fn visit_arg_self<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ArgSelf) {
David Tolnay24237fb2017-12-29 02:15:26 -0500415 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500416 tokens_helper(_visitor, &(& _i . self_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400417}
418# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500419pub fn visit_arg_self_ref<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ArgSelfRef) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500420 tokens_helper(_visitor, &(& _i . and_token).0);
David Tolnay4ba63a02017-12-28 15:53:05 -0500421 if let Some(ref it) = _i . lifetime { _visitor.visit_lifetime(it) };
David Tolnay24237fb2017-12-29 02:15:26 -0500422 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500423 tokens_helper(_visitor, &(& _i . self_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400424}
425# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500426pub fn visit_arm<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Arm) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500427 for it in & _i . attrs { _visitor.visit_attribute(it) };
428 for el in & _i . pats { let it = el.item(); _visitor.visit_pat(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500429 if let Some(ref it) = _i . if_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a918742017-12-28 16:54:41 -0500430 if let Some(ref it) = _i . guard { _visitor.visit_expr(& * * it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500431 tokens_helper(_visitor, &(& _i . rocket_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500432 _visitor.visit_expr(& * _i . body);
David Tolnaycc0f0372017-12-28 19:11:04 -0500433 if let Some(ref it) = _i . comma { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -0400434}
435
Nika Layzellc86173a2017-11-18 13:55:22 -0500436pub fn visit_attr_style<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast AttrStyle) {
Nika Layzell27726662017-10-24 23:16:35 -0400437 use ::AttrStyle::*;
438 match *_i {
439 Outer => { }
440 Inner(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500441 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400442 }
443 }
444}
445
Nika Layzellc86173a2017-11-18 13:55:22 -0500446pub fn visit_attribute<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Attribute) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500447 tokens_helper(_visitor, &(& _i . pound_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500448 _visitor.visit_attr_style(& _i . style);
David Tolnay1e01f9c2017-12-28 20:16:19 -0500449 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500450 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -0400451 // Skipped field _i . tts;
452 // Skipped field _i . is_sugared_doc;
453}
454
Nika Layzellc86173a2017-11-18 13:55:22 -0500455pub fn visit_bare_fn_arg<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BareFnArg) {
David Tolnay5c4c0b52017-12-28 17:58:54 -0500456 if let Some(ref it) = _i . name {
457 _visitor.visit_bare_fn_arg_name(& ( it ) . 0);
David Tolnaycc0f0372017-12-28 19:11:04 -0500458 tokens_helper(_visitor, &(& ( it ) . 1).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -0500459 };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500460 _visitor.visit_type(& _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -0400461}
462
Nika Layzellc86173a2017-11-18 13:55:22 -0500463pub fn visit_bare_fn_arg_name<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BareFnArgName) {
Nika Layzell27726662017-10-24 23:16:35 -0400464 use ::BareFnArgName::*;
465 match *_i {
466 Named(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500467 _visitor.visit_ident(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400468 }
469 Wild(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500470 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400471 }
472 }
473}
474
Nika Layzellc86173a2017-11-18 13:55:22 -0500475pub fn visit_bin_op<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BinOp) {
Nika Layzell27726662017-10-24 23:16:35 -0400476 use ::BinOp::*;
477 match *_i {
478 Add(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500479 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400480 }
481 Sub(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500482 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400483 }
484 Mul(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500485 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400486 }
487 Div(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500488 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400489 }
490 Rem(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500491 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400492 }
493 And(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500494 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400495 }
496 Or(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500497 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400498 }
499 BitXor(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500500 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400501 }
502 BitAnd(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500503 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400504 }
505 BitOr(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500506 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400507 }
508 Shl(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500509 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400510 }
511 Shr(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500512 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400513 }
514 Eq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500515 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400516 }
517 Lt(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500518 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400519 }
520 Le(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500521 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400522 }
523 Ne(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500524 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400525 }
526 Ge(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500527 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400528 }
529 Gt(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500530 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400531 }
532 AddEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500533 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400534 }
535 SubEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500536 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400537 }
538 MulEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500539 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400540 }
541 DivEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500542 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400543 }
544 RemEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500545 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400546 }
547 BitXorEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500548 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400549 }
550 BitAndEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500551 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400552 }
553 BitOrEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500554 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400555 }
556 ShlEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500557 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400558 }
559 ShrEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500560 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400561 }
562 }
563}
David Tolnay506e43a2017-12-29 11:34:36 -0500564
565pub fn visit_binding<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Binding) {
566 _visitor.visit_ident(& _i . ident);
567 tokens_helper(_visitor, &(& _i . eq_token).0);
568 _visitor.visit_type(& _i . ty);
569}
Nika Layzell27726662017-10-24 23:16:35 -0400570# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500571pub fn visit_block<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Block) {
David Tolnay1e01f9c2017-12-28 20:16:19 -0500572 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500573 for it in & _i . stmts { _visitor.visit_stmt(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400574}
575
Nika Layzellc86173a2017-11-18 13:55:22 -0500576pub fn visit_body<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Body) {
Nika Layzell27726662017-10-24 23:16:35 -0400577 use ::Body::*;
578 match *_i {
579 Enum(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500580 _visitor.visit_body_enum(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400581 }
582 Struct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500583 _visitor.visit_body_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400584 }
585 }
586}
587
Nika Layzellc86173a2017-11-18 13:55:22 -0500588pub fn visit_body_enum<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BodyEnum) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500589 tokens_helper(_visitor, &(& _i . enum_token).0);
David Tolnay1e01f9c2017-12-28 20:16:19 -0500590 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500591 for el in & _i . variants { let it = el.item(); _visitor.visit_variant(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400592}
593
Nika Layzellc86173a2017-11-18 13:55:22 -0500594pub fn visit_body_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BodyStruct) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500595 _visitor.visit_variant_data(& _i . data);
David Tolnaycc0f0372017-12-28 19:11:04 -0500596 tokens_helper(_visitor, &(& _i . struct_token).0);
597 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -0400598}
599
Nika Layzellc86173a2017-11-18 13:55:22 -0500600pub fn visit_bound_lifetimes<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BoundLifetimes) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500601 tokens_helper(_visitor, &(& _i . for_token).0);
602 tokens_helper(_visitor, &(& _i . lt_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500603 for el in & _i . lifetimes { let it = el.item(); _visitor.visit_lifetime_def(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500604 tokens_helper(_visitor, &(& _i . gt_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400605}
Nika Layzellf1fdc0b2017-12-04 19:58:32 -0500606
607pub fn visit_const_param<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ConstParam) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500608 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500609 tokens_helper(_visitor, &(& _i . const_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500610 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -0500611 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500612 _visitor.visit_type(& _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -0500613 if let Some(ref it) = _i . eq_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500614 if let Some(ref it) = _i . default { _visitor.visit_expr(it) };
Nika Layzellf1fdc0b2017-12-04 19:58:32 -0500615}
Nika Layzell27726662017-10-24 23:16:35 -0400616
Nika Layzellc86173a2017-11-18 13:55:22 -0500617pub fn visit_derive_input<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast DeriveInput) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500618 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500619 _visitor.visit_visibility(& _i . vis);
620 _visitor.visit_ident(& _i . ident);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500621 _visitor.visit_generics(& _i . generics);
622 _visitor.visit_body(& _i . body);
Nika Layzell27726662017-10-24 23:16:35 -0400623}
624
Nika Layzellc86173a2017-11-18 13:55:22 -0500625pub fn visit_expr<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Expr) {
David Tolnay8c91b882017-12-28 23:04:32 -0500626 use ::Expr::*;
Nika Layzell27726662017-10-24 23:16:35 -0400627 match *_i {
628 Box(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500629 full!(_visitor.visit_expr_box(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400630 }
631 InPlace(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500632 full!(_visitor.visit_expr_in_place(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400633 }
634 Array(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500635 full!(_visitor.visit_expr_array(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400636 }
637 Call(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500638 _visitor.visit_expr_call(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400639 }
640 MethodCall(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500641 full!(_visitor.visit_expr_method_call(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400642 }
David Tolnay05362582017-12-26 01:33:57 -0500643 Tuple(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500644 full!(_visitor.visit_expr_tuple(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400645 }
646 Binary(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500647 _visitor.visit_expr_binary(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400648 }
649 Unary(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500650 _visitor.visit_expr_unary(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400651 }
652 Lit(ref _binding_0, ) => {
David Tolnay8c91b882017-12-28 23:04:32 -0500653 _visitor.visit_expr_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400654 }
655 Cast(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500656 _visitor.visit_expr_cast(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400657 }
658 Type(ref _binding_0, ) => {
David Tolnay0cf94f22017-12-28 23:46:26 -0500659 full!(_visitor.visit_expr_type(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400660 }
661 If(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500662 full!(_visitor.visit_expr_if(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400663 }
664 IfLet(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500665 full!(_visitor.visit_expr_if_let(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400666 }
667 While(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500668 full!(_visitor.visit_expr_while(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400669 }
670 WhileLet(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500671 full!(_visitor.visit_expr_while_let(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400672 }
673 ForLoop(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500674 full!(_visitor.visit_expr_for_loop(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400675 }
676 Loop(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500677 full!(_visitor.visit_expr_loop(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400678 }
679 Match(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500680 full!(_visitor.visit_expr_match(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400681 }
682 Closure(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500683 full!(_visitor.visit_expr_closure(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400684 }
Nika Layzell640832a2017-12-04 13:37:09 -0500685 Unsafe(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500686 full!(_visitor.visit_expr_unsafe(_binding_0));
Nika Layzell640832a2017-12-04 13:37:09 -0500687 }
Nika Layzell27726662017-10-24 23:16:35 -0400688 Block(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500689 full!(_visitor.visit_expr_block(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400690 }
691 Assign(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500692 full!(_visitor.visit_expr_assign(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400693 }
694 AssignOp(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500695 full!(_visitor.visit_expr_assign_op(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400696 }
697 Field(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500698 full!(_visitor.visit_expr_field(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400699 }
Nika Layzell27726662017-10-24 23:16:35 -0400700 Index(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500701 _visitor.visit_expr_index(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400702 }
703 Range(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500704 full!(_visitor.visit_expr_range(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400705 }
706 Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500707 _visitor.visit_expr_path(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400708 }
709 AddrOf(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500710 full!(_visitor.visit_expr_addr_of(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400711 }
712 Break(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500713 full!(_visitor.visit_expr_break(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400714 }
715 Continue(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500716 full!(_visitor.visit_expr_continue(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400717 }
David Tolnayc246cd32017-12-28 23:14:32 -0500718 Return(ref _binding_0, ) => {
719 full!(_visitor.visit_expr_return(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400720 }
David Tolnaydecf28d2017-11-11 11:56:45 -0800721 Macro(ref _binding_0, ) => {
David Tolnay8c91b882017-12-28 23:04:32 -0500722 full!(_visitor.visit_expr_macro(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400723 }
724 Struct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500725 full!(_visitor.visit_expr_struct(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400726 }
727 Repeat(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500728 full!(_visitor.visit_expr_repeat(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400729 }
730 Paren(ref _binding_0, ) => {
David Tolnaye98775f2017-12-28 23:17:00 -0500731 full!(_visitor.visit_expr_paren(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400732 }
733 Group(ref _binding_0, ) => {
David Tolnaye98775f2017-12-28 23:17:00 -0500734 full!(_visitor.visit_expr_group(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400735 }
736 Try(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500737 full!(_visitor.visit_expr_try(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400738 }
739 Catch(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500740 full!(_visitor.visit_expr_catch(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400741 }
742 Yield(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500743 full!(_visitor.visit_expr_yield(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400744 }
David Tolnay2ae520a2017-12-29 11:19:50 -0500745 Verbatim(ref _binding_0, ) => {
746 _visitor.visit_expr_verbatim(_binding_0);
747 }
Nika Layzell27726662017-10-24 23:16:35 -0400748 }
749}
750# [ cfg ( feature = "full" ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500751pub fn visit_expr_addr_of<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprAddrOf) {
752 for it in & _i . attrs { _visitor.visit_attribute(it) };
753 tokens_helper(_visitor, &(& _i . and_token).0);
David Tolnay24237fb2017-12-29 02:15:26 -0500754 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnay8c91b882017-12-28 23:04:32 -0500755 _visitor.visit_expr(& * _i . expr);
756}
757# [ cfg ( feature = "full" ) ]
758pub fn visit_expr_array<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprArray) {
759 for it in & _i . attrs { _visitor.visit_attribute(it) };
760 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnay2a86fdd2017-12-28 23:34:28 -0500761 for el in & _i . elems { let it = el.item(); _visitor.visit_expr(it) };
David Tolnay8c91b882017-12-28 23:04:32 -0500762}
763# [ cfg ( feature = "full" ) ]
764pub fn visit_expr_assign<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprAssign) {
765 for it in & _i . attrs { _visitor.visit_attribute(it) };
766 _visitor.visit_expr(& * _i . left);
767 tokens_helper(_visitor, &(& _i . eq_token).0);
768 _visitor.visit_expr(& * _i . right);
769}
770# [ cfg ( feature = "full" ) ]
771pub fn visit_expr_assign_op<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprAssignOp) {
772 for it in & _i . attrs { _visitor.visit_attribute(it) };
773 _visitor.visit_expr(& * _i . left);
774 _visitor.visit_bin_op(& _i . op);
775 _visitor.visit_expr(& * _i . right);
776}
777
778pub fn visit_expr_binary<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBinary) {
779 for it in & _i . attrs { _visitor.visit_attribute(it) };
780 _visitor.visit_expr(& * _i . left);
781 _visitor.visit_bin_op(& _i . op);
782 _visitor.visit_expr(& * _i . right);
783}
784# [ cfg ( feature = "full" ) ]
785pub fn visit_expr_block<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBlock) {
786 for it in & _i . attrs { _visitor.visit_attribute(it) };
787 _visitor.visit_block(& _i . block);
788}
789# [ cfg ( feature = "full" ) ]
790pub fn visit_expr_box<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBox) {
791 for it in & _i . attrs { _visitor.visit_attribute(it) };
792 tokens_helper(_visitor, &(& _i . box_token).0);
793 _visitor.visit_expr(& * _i . expr);
794}
795# [ cfg ( feature = "full" ) ]
796pub fn visit_expr_break<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBreak) {
797 for it in & _i . attrs { _visitor.visit_attribute(it) };
798 tokens_helper(_visitor, &(& _i . break_token).0);
799 if let Some(ref it) = _i . label { _visitor.visit_lifetime(it) };
800 if let Some(ref it) = _i . expr { _visitor.visit_expr(& * * it) };
801}
802
803pub fn visit_expr_call<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprCall) {
804 for it in & _i . attrs { _visitor.visit_attribute(it) };
805 _visitor.visit_expr(& * _i . func);
806 tokens_helper(_visitor, &(& _i . paren_token).0);
807 for el in & _i . args { let it = el.item(); _visitor.visit_expr(it) };
808}
809
810pub fn visit_expr_cast<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprCast) {
811 for it in & _i . attrs { _visitor.visit_attribute(it) };
812 _visitor.visit_expr(& * _i . expr);
813 tokens_helper(_visitor, &(& _i . as_token).0);
814 _visitor.visit_type(& * _i . ty);
815}
816# [ cfg ( feature = "full" ) ]
817pub fn visit_expr_catch<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprCatch) {
818 for it in & _i . attrs { _visitor.visit_attribute(it) };
819 tokens_helper(_visitor, &(& _i . do_token).0);
820 tokens_helper(_visitor, &(& _i . catch_token).0);
821 _visitor.visit_block(& _i . block);
822}
823# [ cfg ( feature = "full" ) ]
824pub fn visit_expr_closure<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprClosure) {
825 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnayefc96fb2017-12-29 02:03:15 -0500826 if let Some(ref it) = _i . capture { tokens_helper(_visitor, &(it).0) };
David Tolnay8c91b882017-12-28 23:04:32 -0500827 tokens_helper(_visitor, &(& _i . or1_token).0);
828 for el in & _i . inputs { let it = el.item(); _visitor.visit_fn_arg(it) };
829 tokens_helper(_visitor, &(& _i . or2_token).0);
830 _visitor.visit_return_type(& _i . output);
831 _visitor.visit_expr(& * _i . body);
832}
833# [ cfg ( feature = "full" ) ]
834pub fn visit_expr_continue<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprContinue) {
835 for it in & _i . attrs { _visitor.visit_attribute(it) };
836 tokens_helper(_visitor, &(& _i . continue_token).0);
837 if let Some(ref it) = _i . label { _visitor.visit_lifetime(it) };
838}
839# [ cfg ( feature = "full" ) ]
840pub fn visit_expr_field<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprField) {
841 for it in & _i . attrs { _visitor.visit_attribute(it) };
842 _visitor.visit_expr(& * _i . base);
843 tokens_helper(_visitor, &(& _i . dot_token).0);
844 _visitor.visit_member(& _i . member);
845}
846# [ cfg ( feature = "full" ) ]
847pub fn visit_expr_for_loop<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprForLoop) {
848 for it in & _i . attrs { _visitor.visit_attribute(it) };
849 if let Some(ref it) = _i . label { _visitor.visit_lifetime(it) };
850 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
851 tokens_helper(_visitor, &(& _i . for_token).0);
852 _visitor.visit_pat(& * _i . pat);
853 tokens_helper(_visitor, &(& _i . in_token).0);
854 _visitor.visit_expr(& * _i . expr);
855 _visitor.visit_block(& _i . body);
856}
David Tolnaye98775f2017-12-28 23:17:00 -0500857# [ cfg ( feature = "full" ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500858pub fn visit_expr_group<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprGroup) {
859 for it in & _i . attrs { _visitor.visit_attribute(it) };
860 tokens_helper(_visitor, &(& _i . group_token).0);
861 _visitor.visit_expr(& * _i . expr);
862}
863# [ cfg ( feature = "full" ) ]
864pub fn visit_expr_if<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIf) {
865 for it in & _i . attrs { _visitor.visit_attribute(it) };
866 tokens_helper(_visitor, &(& _i . if_token).0);
867 _visitor.visit_expr(& * _i . cond);
David Tolnay2ccf32a2017-12-29 00:34:26 -0500868 _visitor.visit_block(& _i . then_branch);
869 if let Some(ref it) = _i . else_branch {
870 tokens_helper(_visitor, &(& ( it ) . 0).0);
871 _visitor.visit_expr(& * ( it ) . 1);
872 };
David Tolnay8c91b882017-12-28 23:04:32 -0500873}
874# [ cfg ( feature = "full" ) ]
875pub fn visit_expr_if_let<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIfLet) {
876 for it in & _i . attrs { _visitor.visit_attribute(it) };
877 tokens_helper(_visitor, &(& _i . if_token).0);
878 tokens_helper(_visitor, &(& _i . let_token).0);
879 _visitor.visit_pat(& * _i . pat);
880 tokens_helper(_visitor, &(& _i . eq_token).0);
881 _visitor.visit_expr(& * _i . expr);
David Tolnay2ccf32a2017-12-29 00:34:26 -0500882 _visitor.visit_block(& _i . then_branch);
883 if let Some(ref it) = _i . else_branch {
884 tokens_helper(_visitor, &(& ( it ) . 0).0);
885 _visitor.visit_expr(& * ( it ) . 1);
886 };
David Tolnay8c91b882017-12-28 23:04:32 -0500887}
888# [ cfg ( feature = "full" ) ]
889pub fn visit_expr_in_place<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprInPlace) {
890 for it in & _i . attrs { _visitor.visit_attribute(it) };
891 _visitor.visit_expr(& * _i . place);
David Tolnay8701a5c2017-12-28 23:31:10 -0500892 tokens_helper(_visitor, &(& _i . arrow_token).0);
David Tolnay8c91b882017-12-28 23:04:32 -0500893 _visitor.visit_expr(& * _i . value);
894}
895
896pub fn visit_expr_index<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIndex) {
897 for it in & _i . attrs { _visitor.visit_attribute(it) };
898 _visitor.visit_expr(& * _i . expr);
899 tokens_helper(_visitor, &(& _i . bracket_token).0);
900 _visitor.visit_expr(& * _i . index);
901}
902
903pub fn visit_expr_lit<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprLit) {
904 for it in & _i . attrs { _visitor.visit_attribute(it) };
905 _visitor.visit_lit(& _i . lit);
906}
907# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500908pub fn visit_expr_loop<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprLoop) {
David Tolnay8c91b882017-12-28 23:04:32 -0500909 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4ba63a02017-12-28 15:53:05 -0500910 if let Some(ref it) = _i . label { _visitor.visit_lifetime(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500911 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500912 tokens_helper(_visitor, &(& _i . loop_token).0);
913 _visitor.visit_block(& _i . body);
Nika Layzell27726662017-10-24 23:16:35 -0400914}
915# [ cfg ( feature = "full" ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500916pub fn visit_expr_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprMacro) {
917 for it in & _i . attrs { _visitor.visit_attribute(it) };
918 _visitor.visit_macro(& _i . mac);
919}
920# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500921pub fn visit_expr_match<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprMatch) {
David Tolnay8c91b882017-12-28 23:04:32 -0500922 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500923 tokens_helper(_visitor, &(& _i . match_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500924 _visitor.visit_expr(& * _i . expr);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500925 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500926 for it in & _i . arms { _visitor.visit_arm(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400927}
928# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500929pub fn visit_expr_method_call<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprMethodCall) {
David Tolnay8c91b882017-12-28 23:04:32 -0500930 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay76418512017-12-28 23:47:47 -0500931 _visitor.visit_expr(& * _i . receiver);
David Tolnaycc0f0372017-12-28 19:11:04 -0500932 tokens_helper(_visitor, &(& _i . dot_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500933 _visitor.visit_ident(& _i . method);
David Tolnayd60cfec2017-12-29 00:21:38 -0500934 if let Some(ref it) = _i . turbofish { _visitor.visit_method_turbofish(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500935 tokens_helper(_visitor, &(& _i . paren_token).0);
936 for el in & _i . args { let it = el.item(); _visitor.visit_expr(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400937}
David Tolnaye98775f2017-12-28 23:17:00 -0500938# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500939pub fn visit_expr_paren<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprParen) {
David Tolnay8c91b882017-12-28 23:04:32 -0500940 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -0500941 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500942 _visitor.visit_expr(& * _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -0400943}
944
Nika Layzellc86173a2017-11-18 13:55:22 -0500945pub fn visit_expr_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprPath) {
David Tolnay8c91b882017-12-28 23:04:32 -0500946 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500947 if let Some(ref it) = _i . qself { _visitor.visit_qself(it) };
948 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -0400949}
950# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500951pub fn visit_expr_range<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprRange) {
David Tolnay8c91b882017-12-28 23:04:32 -0500952 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a918742017-12-28 16:54:41 -0500953 if let Some(ref it) = _i . from { _visitor.visit_expr(& * * it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500954 _visitor.visit_range_limits(& _i . limits);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500955 if let Some(ref it) = _i . to { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -0400956}
957# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500958pub fn visit_expr_repeat<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprRepeat) {
David Tolnay8c91b882017-12-28 23:04:32 -0500959 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -0500960 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500961 _visitor.visit_expr(& * _i . expr);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500962 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500963 _visitor.visit_expr(& * _i . amt);
Nika Layzell27726662017-10-24 23:16:35 -0400964}
965# [ cfg ( feature = "full" ) ]
David Tolnayc246cd32017-12-28 23:14:32 -0500966pub fn visit_expr_return<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprReturn) {
David Tolnay8c91b882017-12-28 23:04:32 -0500967 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500968 tokens_helper(_visitor, &(& _i . return_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500969 if let Some(ref it) = _i . expr { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -0400970}
971# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500972pub fn visit_expr_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprStruct) {
David Tolnay8c91b882017-12-28 23:04:32 -0500973 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500974 _visitor.visit_path(& _i . path);
David Tolnay1e01f9c2017-12-28 20:16:19 -0500975 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500976 for el in & _i . fields { let it = el.item(); _visitor.visit_field_value(it) };
977 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
978 if let Some(ref it) = _i . rest { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -0400979}
980# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500981pub fn visit_expr_try<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprTry) {
David Tolnay8c91b882017-12-28 23:04:32 -0500982 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a918742017-12-28 16:54:41 -0500983 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -0500984 tokens_helper(_visitor, &(& _i . question_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400985}
986# [ cfg ( feature = "full" ) ]
David Tolnay05362582017-12-26 01:33:57 -0500987pub fn visit_expr_tuple<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprTuple) {
David Tolnay8c91b882017-12-28 23:04:32 -0500988 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -0500989 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay2a86fdd2017-12-28 23:34:28 -0500990 for el in & _i . elems { let it = el.item(); _visitor.visit_expr(it) };
David Tolnay05362582017-12-26 01:33:57 -0500991}
David Tolnay0cf94f22017-12-28 23:46:26 -0500992# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500993pub fn visit_expr_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprType) {
David Tolnay8c91b882017-12-28 23:04:32 -0500994 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a918742017-12-28 16:54:41 -0500995 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -0500996 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500997 _visitor.visit_type(& * _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -0400998}
999
Nika Layzellc86173a2017-11-18 13:55:22 -05001000pub fn visit_expr_unary<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprUnary) {
David Tolnay8c91b882017-12-28 23:04:32 -05001001 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001002 _visitor.visit_un_op(& _i . op);
David Tolnay4a918742017-12-28 16:54:41 -05001003 _visitor.visit_expr(& * _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -04001004}
1005# [ cfg ( feature = "full" ) ]
Nika Layzell640832a2017-12-04 13:37:09 -05001006pub fn visit_expr_unsafe<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprUnsafe) {
David Tolnay8c91b882017-12-28 23:04:32 -05001007 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001008 tokens_helper(_visitor, &(& _i . unsafe_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001009 _visitor.visit_block(& _i . block);
Nika Layzell640832a2017-12-04 13:37:09 -05001010}
David Tolnay2ae520a2017-12-29 11:19:50 -05001011
1012pub fn visit_expr_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprVerbatim) {
1013 // Skipped field _i . tts;
1014}
Nika Layzell640832a2017-12-04 13:37:09 -05001015# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001016pub fn visit_expr_while<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprWhile) {
David Tolnay8c91b882017-12-28 23:04:32 -05001017 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4ba63a02017-12-28 15:53:05 -05001018 if let Some(ref it) = _i . label { _visitor.visit_lifetime(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001019 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
1020 tokens_helper(_visitor, &(& _i . while_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001021 _visitor.visit_expr(& * _i . cond);
1022 _visitor.visit_block(& _i . body);
Nika Layzell27726662017-10-24 23:16:35 -04001023}
1024# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001025pub fn visit_expr_while_let<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprWhileLet) {
David Tolnay8c91b882017-12-28 23:04:32 -05001026 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4ba63a02017-12-28 15:53:05 -05001027 if let Some(ref it) = _i . label { _visitor.visit_lifetime(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001028 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
1029 tokens_helper(_visitor, &(& _i . while_token).0);
1030 tokens_helper(_visitor, &(& _i . let_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001031 _visitor.visit_pat(& * _i . pat);
David Tolnaycc0f0372017-12-28 19:11:04 -05001032 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001033 _visitor.visit_expr(& * _i . expr);
1034 _visitor.visit_block(& _i . body);
Nika Layzell27726662017-10-24 23:16:35 -04001035}
1036# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001037pub fn visit_expr_yield<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprYield) {
David Tolnay8c91b882017-12-28 23:04:32 -05001038 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001039 tokens_helper(_visitor, &(& _i . yield_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001040 if let Some(ref it) = _i . expr { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -04001041}
1042
Nika Layzellc86173a2017-11-18 13:55:22 -05001043pub fn visit_field<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Field) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001044 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001045 _visitor.visit_visibility(& _i . vis);
1046 if let Some(ref it) = _i . ident { _visitor.visit_ident(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001047 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001048 _visitor.visit_type(& _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -04001049}
1050# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001051pub fn visit_field_pat<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldPat) {
David Tolnay4a3f59a2017-12-28 21:21:12 -05001052 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay85b69a42017-12-27 20:43:10 -05001053 _visitor.visit_member(& _i . member);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001054 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a918742017-12-28 16:54:41 -05001055 _visitor.visit_pat(& * _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001056}
1057# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001058pub fn visit_field_value<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldValue) {
David Tolnay85b69a42017-12-27 20:43:10 -05001059 for it in & _i . attrs { _visitor.visit_attribute(it) };
1060 _visitor.visit_member(& _i . member);
David Tolnaycc0f0372017-12-28 19:11:04 -05001061 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001062 _visitor.visit_expr(& _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -04001063}
1064# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001065pub fn visit_file<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast File) {
Nika Layzell27726662017-10-24 23:16:35 -04001066 // Skipped field _i . shebang;
David Tolnayf0d63bf2017-12-26 12:29:47 -05001067 for it in & _i . attrs { _visitor.visit_attribute(it) };
1068 for it in & _i . items { _visitor.visit_item(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001069}
1070# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001071pub fn visit_fn_arg<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FnArg) {
Nika Layzell27726662017-10-24 23:16:35 -04001072 use ::FnArg::*;
1073 match *_i {
1074 SelfRef(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001075 _visitor.visit_arg_self_ref(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001076 }
1077 SelfValue(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001078 _visitor.visit_arg_self(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001079 }
1080 Captured(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001081 _visitor.visit_arg_captured(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001082 }
David Tolnay80ed55f2017-12-27 22:54:40 -05001083 Inferred(ref _binding_0, ) => {
1084 _visitor.visit_pat(_binding_0);
1085 }
Nika Layzell27726662017-10-24 23:16:35 -04001086 Ignored(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001087 _visitor.visit_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001088 }
1089 }
1090}
1091# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001092pub fn visit_fn_decl<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FnDecl) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001093 tokens_helper(_visitor, &(& _i . fn_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001094 _visitor.visit_generics(& _i . generics);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001095 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001096 for el in & _i . inputs { let it = el.item(); _visitor.visit_fn_arg(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001097 if let Some(ref it) = _i . variadic { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001098 _visitor.visit_return_type(& _i . output);
Nika Layzell27726662017-10-24 23:16:35 -04001099}
1100# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001101pub fn visit_foreign_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItem) {
David Tolnay8894f602017-11-11 12:11:04 -08001102 use ::ForeignItem::*;
Nika Layzell27726662017-10-24 23:16:35 -04001103 match *_i {
1104 Fn(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001105 _visitor.visit_foreign_item_fn(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001106 }
1107 Static(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001108 _visitor.visit_foreign_item_static(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001109 }
David Tolnay199bcbb2017-11-12 10:33:52 -08001110 Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001111 _visitor.visit_foreign_item_type(_binding_0);
David Tolnay199bcbb2017-11-12 10:33:52 -08001112 }
David Tolnay2ae520a2017-12-29 11:19:50 -05001113 Verbatim(ref _binding_0, ) => {
1114 _visitor.visit_foreign_item_verbatim(_binding_0);
1115 }
Nika Layzell27726662017-10-24 23:16:35 -04001116 }
1117}
1118# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001119pub fn visit_foreign_item_fn<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemFn) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001120 for it in & _i . attrs { _visitor.visit_attribute(it) };
1121 _visitor.visit_visibility(& _i . vis);
1122 _visitor.visit_ident(& _i . ident);
David Tolnay4a918742017-12-28 16:54:41 -05001123 _visitor.visit_fn_decl(& * _i . decl);
David Tolnaycc0f0372017-12-28 19:11:04 -05001124 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay8894f602017-11-11 12:11:04 -08001125}
1126# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001127pub fn visit_foreign_item_static<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemStatic) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001128 for it in & _i . attrs { _visitor.visit_attribute(it) };
1129 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001130 tokens_helper(_visitor, &(& _i . static_token).0);
David Tolnay24237fb2017-12-29 02:15:26 -05001131 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001132 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001133 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001134 _visitor.visit_type(& * _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001135 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001136}
David Tolnay199bcbb2017-11-12 10:33:52 -08001137# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001138pub fn visit_foreign_item_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001139 for it in & _i . attrs { _visitor.visit_attribute(it) };
1140 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001141 tokens_helper(_visitor, &(& _i . type_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001142 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001143 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay199bcbb2017-11-12 10:33:52 -08001144}
David Tolnay2ae520a2017-12-29 11:19:50 -05001145# [ cfg ( feature = "full" ) ]
1146pub fn visit_foreign_item_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemVerbatim) {
1147 // Skipped field _i . tts;
1148}
Nika Layzell27726662017-10-24 23:16:35 -04001149
Nika Layzellc08227a2017-12-04 16:30:17 -05001150pub fn visit_generic_argument<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast GenericArgument) {
1151 use ::GenericArgument::*;
Nika Layzell357885a2017-12-04 15:47:07 -05001152 match *_i {
1153 Lifetime(ref _binding_0, ) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05001154 _visitor.visit_lifetime(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001155 }
1156 Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001157 _visitor.visit_type(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001158 }
David Tolnay506e43a2017-12-29 11:34:36 -05001159 Binding(ref _binding_0, ) => {
1160 _visitor.visit_binding(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001161 }
Nika Layzellc680e612017-12-04 19:07:20 -05001162 Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001163 _visitor.visit_expr(_binding_0);
Nika Layzellc680e612017-12-04 19:07:20 -05001164 }
Nika Layzell357885a2017-12-04 15:47:07 -05001165 }
1166}
David Tolnayd60cfec2017-12-29 00:21:38 -05001167# [ cfg ( feature = "full" ) ]
1168pub fn visit_generic_method_argument<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast GenericMethodArgument) {
1169 use ::GenericMethodArgument::*;
1170 match *_i {
1171 Type(ref _binding_0, ) => {
1172 _visitor.visit_type(_binding_0);
1173 }
1174 Const(ref _binding_0, ) => {
1175 _visitor.visit_expr(_binding_0);
1176 }
1177 }
1178}
Nika Layzell357885a2017-12-04 15:47:07 -05001179
David Tolnayc2f1aba2017-11-12 20:29:22 -08001180pub fn visit_generic_param<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast GenericParam) {
1181 use ::GenericParam::*;
1182 match *_i {
1183 Lifetime(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001184 _visitor.visit_lifetime_def(_binding_0);
David Tolnayc2f1aba2017-11-12 20:29:22 -08001185 }
1186 Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001187 _visitor.visit_type_param(_binding_0);
David Tolnayc2f1aba2017-11-12 20:29:22 -08001188 }
Nika Layzellf1fdc0b2017-12-04 19:58:32 -05001189 Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001190 _visitor.visit_const_param(_binding_0);
Nika Layzellf1fdc0b2017-12-04 19:58:32 -05001191 }
David Tolnayc2f1aba2017-11-12 20:29:22 -08001192 }
1193}
1194
Nika Layzellc86173a2017-11-18 13:55:22 -05001195pub fn visit_generics<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Generics) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001196 if let Some(ref it) = _i . lt_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001197 for el in & _i . params { let it = el.item(); _visitor.visit_generic_param(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001198 if let Some(ref it) = _i . gt_token { tokens_helper(_visitor, &(it).0) };
David Tolnayac997dd2017-12-27 23:18:22 -05001199 if let Some(ref it) = _i . where_clause { _visitor.visit_where_clause(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001200}
Nika Layzellefb83ba2017-12-19 18:23:55 -05001201
1202pub fn visit_ident<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Ident) {
David Tolnay4ba63a02017-12-28 15:53:05 -05001203 // Skipped field _i . sym;
1204 _visitor.visit_span(& _i . span);
Nika Layzellefb83ba2017-12-19 18:23:55 -05001205}
Nika Layzell27726662017-10-24 23:16:35 -04001206# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001207pub fn visit_impl_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItem) {
David Tolnay857628c2017-11-11 12:25:31 -08001208 use ::ImplItem::*;
Nika Layzell27726662017-10-24 23:16:35 -04001209 match *_i {
1210 Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001211 _visitor.visit_impl_item_const(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001212 }
1213 Method(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001214 _visitor.visit_impl_item_method(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001215 }
1216 Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001217 _visitor.visit_impl_item_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001218 }
1219 Macro(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001220 _visitor.visit_impl_item_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001221 }
David Tolnay2ae520a2017-12-29 11:19:50 -05001222 Verbatim(ref _binding_0, ) => {
1223 _visitor.visit_impl_item_verbatim(_binding_0);
1224 }
Nika Layzell27726662017-10-24 23:16:35 -04001225 }
1226}
1227# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001228pub fn visit_impl_item_const<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemConst) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001229 for it in & _i . attrs { _visitor.visit_attribute(it) };
1230 _visitor.visit_visibility(& _i . vis);
David Tolnay360a6342017-12-29 02:22:11 -05001231 if let Some(ref it) = _i . defaultness { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001232 tokens_helper(_visitor, &(& _i . const_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001233 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001234 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001235 _visitor.visit_type(& _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001236 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001237 _visitor.visit_expr(& _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -05001238 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay857628c2017-11-11 12:25:31 -08001239}
1240# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001241pub fn visit_impl_item_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemMacro) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001242 for it in & _i . attrs { _visitor.visit_attribute(it) };
1243 _visitor.visit_macro(& _i . mac);
David Tolnaycc0f0372017-12-28 19:11:04 -05001244 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
David Tolnay857628c2017-11-11 12:25:31 -08001245}
1246# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001247pub fn visit_impl_item_method<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemMethod) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001248 for it in & _i . attrs { _visitor.visit_attribute(it) };
1249 _visitor.visit_visibility(& _i . vis);
David Tolnay360a6342017-12-29 02:22:11 -05001250 if let Some(ref it) = _i . defaultness { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001251 _visitor.visit_method_sig(& _i . sig);
1252 _visitor.visit_block(& _i . block);
Nika Layzell27726662017-10-24 23:16:35 -04001253}
1254# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001255pub fn visit_impl_item_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001256 for it in & _i . attrs { _visitor.visit_attribute(it) };
1257 _visitor.visit_visibility(& _i . vis);
David Tolnay360a6342017-12-29 02:22:11 -05001258 if let Some(ref it) = _i . defaultness { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001259 tokens_helper(_visitor, &(& _i . type_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001260 _visitor.visit_ident(& _i . ident);
1261 _visitor.visit_generics(& _i . generics);
David Tolnaycc0f0372017-12-28 19:11:04 -05001262 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001263 _visitor.visit_type(& _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001264 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001265}
David Tolnay2ae520a2017-12-29 11:19:50 -05001266# [ cfg ( feature = "full" ) ]
1267pub fn visit_impl_item_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemVerbatim) {
1268 // Skipped field _i . tts;
1269}
David Tolnay14982012017-12-29 00:49:51 -05001270
David Tolnay85b69a42017-12-27 20:43:10 -05001271pub fn visit_index<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Index) {
1272 // Skipped field _i . index;
1273 _visitor.visit_span(& _i . span);
1274}
1275# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001276pub fn visit_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Item) {
David Tolnayc6b55bc2017-11-09 22:48:38 -08001277 use ::Item::*;
Nika Layzell27726662017-10-24 23:16:35 -04001278 match *_i {
1279 ExternCrate(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001280 _visitor.visit_item_extern_crate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001281 }
1282 Use(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001283 _visitor.visit_item_use(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001284 }
1285 Static(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001286 _visitor.visit_item_static(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001287 }
1288 Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001289 _visitor.visit_item_const(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001290 }
1291 Fn(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001292 _visitor.visit_item_fn(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001293 }
1294 Mod(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001295 _visitor.visit_item_mod(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001296 }
1297 ForeignMod(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001298 _visitor.visit_item_foreign_mod(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001299 }
David Tolnayfd6bf5c2017-11-12 09:41:14 -08001300 Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001301 _visitor.visit_item_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001302 }
1303 Enum(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001304 _visitor.visit_item_enum(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001305 }
1306 Struct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001307 _visitor.visit_item_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001308 }
1309 Union(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001310 _visitor.visit_item_union(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001311 }
1312 Trait(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001313 _visitor.visit_item_trait(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001314 }
Nika Layzell27726662017-10-24 23:16:35 -04001315 Impl(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001316 _visitor.visit_item_impl(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001317 }
David Tolnaydecf28d2017-11-11 11:56:45 -08001318 Macro(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001319 _visitor.visit_item_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001320 }
David Tolnay500d8322017-12-18 00:32:51 -08001321 Macro2(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001322 _visitor.visit_item_macro2(_binding_0);
David Tolnay500d8322017-12-18 00:32:51 -08001323 }
David Tolnay2ae520a2017-12-29 11:19:50 -05001324 Verbatim(ref _binding_0, ) => {
1325 _visitor.visit_item_verbatim(_binding_0);
1326 }
Nika Layzell27726662017-10-24 23:16:35 -04001327 }
1328}
1329# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001330pub fn visit_item_const<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemConst) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001331 for it in & _i . attrs { _visitor.visit_attribute(it) };
1332 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001333 tokens_helper(_visitor, &(& _i . const_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001334 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001335 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001336 _visitor.visit_type(& * _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001337 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001338 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -05001339 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnayc6b55bc2017-11-09 22:48:38 -08001340}
1341# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001342pub fn visit_item_enum<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemEnum) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001343 for it in & _i . attrs { _visitor.visit_attribute(it) };
1344 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001345 tokens_helper(_visitor, &(& _i . enum_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001346 _visitor.visit_ident(& _i . ident);
1347 _visitor.visit_generics(& _i . generics);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001348 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001349 for el in & _i . variants { let it = el.item(); _visitor.visit_variant(it) };
David Tolnayc6b55bc2017-11-09 22:48:38 -08001350}
1351# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001352pub fn visit_item_extern_crate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemExternCrate) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001353 for it in & _i . attrs { _visitor.visit_attribute(it) };
1354 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001355 tokens_helper(_visitor, &(& _i . extern_token).0);
1356 tokens_helper(_visitor, &(& _i . crate_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001357 _visitor.visit_ident(& _i . ident);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001358 if let Some(ref it) = _i . rename {
David Tolnaycc0f0372017-12-28 19:11:04 -05001359 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001360 _visitor.visit_ident(& ( it ) . 1);
1361 };
David Tolnaycc0f0372017-12-28 19:11:04 -05001362 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnayc6b55bc2017-11-09 22:48:38 -08001363}
1364# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001365pub fn visit_item_fn<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemFn) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001366 for it in & _i . attrs { _visitor.visit_attribute(it) };
1367 _visitor.visit_visibility(& _i . vis);
David Tolnay360a6342017-12-29 02:22:11 -05001368 if let Some(ref it) = _i . constness { tokens_helper(_visitor, &(it).0) };
David Tolnay9b258702017-12-29 02:24:41 -05001369 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001370 if let Some(ref it) = _i . abi { _visitor.visit_abi(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001371 _visitor.visit_ident(& _i . ident);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001372 _visitor.visit_fn_decl(& * _i . decl);
David Tolnay4a918742017-12-28 16:54:41 -05001373 _visitor.visit_block(& * _i . block);
David Tolnayc6b55bc2017-11-09 22:48:38 -08001374}
1375# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001376pub fn visit_item_foreign_mod<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemForeignMod) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001377 for it in & _i . attrs { _visitor.visit_attribute(it) };
1378 _visitor.visit_abi(& _i . abi);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001379 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001380 for it in & _i . items { _visitor.visit_foreign_item(it) };
David Tolnayc6b55bc2017-11-09 22:48:38 -08001381}
1382# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001383pub fn visit_item_impl<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemImpl) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001384 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay360a6342017-12-29 02:22:11 -05001385 if let Some(ref it) = _i . defaultness { tokens_helper(_visitor, &(it).0) };
David Tolnay9b258702017-12-29 02:24:41 -05001386 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001387 tokens_helper(_visitor, &(& _i . impl_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001388 _visitor.visit_generics(& _i . generics);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001389 if let Some(ref it) = _i . trait_ {
David Tolnay360a6342017-12-29 02:22:11 -05001390 if let Some(ref it) = ( it ) . 0 { tokens_helper(_visitor, &(it).0) };
David Tolnay5c4c0b52017-12-28 17:58:54 -05001391 _visitor.visit_path(& ( it ) . 1);
David Tolnaycc0f0372017-12-28 19:11:04 -05001392 tokens_helper(_visitor, &(& ( it ) . 2).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001393 };
David Tolnay4a918742017-12-28 16:54:41 -05001394 _visitor.visit_type(& * _i . self_ty);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001395 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001396 for it in & _i . items { _visitor.visit_impl_item(it) };
David Tolnayc6b55bc2017-11-09 22:48:38 -08001397}
1398# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001399pub fn visit_item_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMacro) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001400 for it in & _i . attrs { _visitor.visit_attribute(it) };
1401 if let Some(ref it) = _i . ident { _visitor.visit_ident(it) };
1402 _visitor.visit_macro(& _i . mac);
David Tolnaycc0f0372017-12-28 19:11:04 -05001403 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
David Tolnayc6b55bc2017-11-09 22:48:38 -08001404}
1405# [ cfg ( feature = "full" ) ]
David Tolnay500d8322017-12-18 00:32:51 -08001406pub fn visit_item_macro2<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMacro2) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001407 for it in & _i . attrs { _visitor.visit_attribute(it) };
1408 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001409 tokens_helper(_visitor, &(& _i . macro_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001410 _visitor.visit_ident(& _i . ident);
David Tolnay500d8322017-12-18 00:32:51 -08001411 // Skipped field _i . args;
1412 // Skipped field _i . body;
1413}
1414# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001415pub fn visit_item_mod<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMod) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001416 for it in & _i . attrs { _visitor.visit_attribute(it) };
1417 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001418 tokens_helper(_visitor, &(& _i . mod_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001419 _visitor.visit_ident(& _i . ident);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001420 if let Some(ref it) = _i . content {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001421 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001422 for it in & ( it ) . 1 { _visitor.visit_item(it) };
1423 };
David Tolnaycc0f0372017-12-28 19:11:04 -05001424 if let Some(ref it) = _i . semi { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04001425}
1426# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001427pub fn visit_item_static<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemStatic) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001428 for it in & _i . attrs { _visitor.visit_attribute(it) };
1429 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001430 tokens_helper(_visitor, &(& _i . static_token).0);
David Tolnay24237fb2017-12-29 02:15:26 -05001431 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001432 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001433 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001434 _visitor.visit_type(& * _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001435 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001436 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -05001437 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001438}
1439# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001440pub fn visit_item_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemStruct) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001441 for it in & _i . attrs { _visitor.visit_attribute(it) };
1442 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001443 tokens_helper(_visitor, &(& _i . struct_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001444 _visitor.visit_ident(& _i . ident);
1445 _visitor.visit_generics(& _i . generics);
1446 _visitor.visit_variant_data(& _i . data);
David Tolnaycc0f0372017-12-28 19:11:04 -05001447 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04001448}
1449# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001450pub fn visit_item_trait<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemTrait) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001451 for it in & _i . attrs { _visitor.visit_attribute(it) };
1452 _visitor.visit_visibility(& _i . vis);
David Tolnay9b258702017-12-29 02:24:41 -05001453 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001454 if let Some(ref it) = _i . auto_token { tokens_helper(_visitor, &(it).0) };
1455 tokens_helper(_visitor, &(& _i . trait_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001456 _visitor.visit_ident(& _i . ident);
1457 _visitor.visit_generics(& _i . generics);
David Tolnaycc0f0372017-12-28 19:11:04 -05001458 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001459 for el in & _i . supertraits { let it = el.item(); _visitor.visit_type_param_bound(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -05001460 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001461 for it in & _i . items { _visitor.visit_trait_item(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001462}
1463# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001464pub fn visit_item_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001465 for it in & _i . attrs { _visitor.visit_attribute(it) };
1466 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001467 tokens_helper(_visitor, &(& _i . type_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001468 _visitor.visit_ident(& _i . ident);
1469 _visitor.visit_generics(& _i . generics);
David Tolnaycc0f0372017-12-28 19:11:04 -05001470 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001471 _visitor.visit_type(& * _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001472 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001473}
1474# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001475pub fn visit_item_union<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemUnion) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001476 for it in & _i . attrs { _visitor.visit_attribute(it) };
1477 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001478 tokens_helper(_visitor, &(& _i . union_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001479 _visitor.visit_ident(& _i . ident);
1480 _visitor.visit_generics(& _i . generics);
1481 _visitor.visit_variant_data(& _i . data);
Nika Layzell27726662017-10-24 23:16:35 -04001482}
1483# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001484pub fn visit_item_use<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemUse) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001485 for it in & _i . attrs { _visitor.visit_attribute(it) };
1486 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001487 tokens_helper(_visitor, &(& _i . use_token).0);
1488 if let Some(ref it) = _i . leading_colon { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001489 for el in & _i . prefix { let it = el.item(); _visitor.visit_ident(it) };
1490 _visitor.visit_use_tree(& _i . tree);
David Tolnaycc0f0372017-12-28 19:11:04 -05001491 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001492}
David Tolnay2ae520a2017-12-29 11:19:50 -05001493# [ cfg ( feature = "full" ) ]
1494pub fn visit_item_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemVerbatim) {
1495 // Skipped field _i . tts;
1496}
Nika Layzell27726662017-10-24 23:16:35 -04001497
David Tolnay4ba63a02017-12-28 15:53:05 -05001498pub fn visit_lifetime<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Lifetime) {
1499 // Skipped field _i . sym;
1500 _visitor.visit_span(& _i . span);
1501}
1502
Nika Layzellc86173a2017-11-18 13:55:22 -05001503pub fn visit_lifetime_def<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LifetimeDef) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001504 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4ba63a02017-12-28 15:53:05 -05001505 _visitor.visit_lifetime(& _i . lifetime);
David Tolnaycc0f0372017-12-28 19:11:04 -05001506 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4ba63a02017-12-28 15:53:05 -05001507 for el in & _i . bounds { let it = el.item(); _visitor.visit_lifetime(it) };
1508}
1509
1510pub fn visit_lit<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Lit) {
1511 // Skipped field _i . value;
1512 _visitor.visit_span(& _i . span);
Nika Layzell27726662017-10-24 23:16:35 -04001513}
1514# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001515pub fn visit_local<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Local) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001516 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001517 tokens_helper(_visitor, &(& _i . let_token).0);
1518 _visitor.visit_pat(& * _i . pat);
1519 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
1520 if let Some(ref it) = _i . ty { _visitor.visit_type(& * * it) };
1521 if let Some(ref it) = _i . eq_token { tokens_helper(_visitor, &(it).0) };
1522 if let Some(ref it) = _i . init { _visitor.visit_expr(& * * it) };
1523 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001524}
Nika Layzell27726662017-10-24 23:16:35 -04001525
Nika Layzellc86173a2017-11-18 13:55:22 -05001526pub fn visit_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Macro) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001527 _visitor.visit_path(& _i . path);
David Tolnaycc0f0372017-12-28 19:11:04 -05001528 tokens_helper(_visitor, &(& _i . bang_token).0);
David Tolnayfe9d2782017-12-29 11:32:42 -05001529 // Skipped field _i . tt;
David Tolnaydecf28d2017-11-11 11:56:45 -08001530}
David Tolnay14982012017-12-29 00:49:51 -05001531
David Tolnay85b69a42017-12-27 20:43:10 -05001532pub fn visit_member<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Member) {
1533 use ::Member::*;
1534 match *_i {
1535 Named(ref _binding_0, ) => {
1536 _visitor.visit_ident(_binding_0);
1537 }
1538 Unnamed(ref _binding_0, ) => {
1539 _visitor.visit_index(_binding_0);
1540 }
1541 }
1542}
David Tolnaydecf28d2017-11-11 11:56:45 -08001543
Nika Layzellc86173a2017-11-18 13:55:22 -05001544pub fn visit_meta_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MetaItem) {
Nika Layzell27726662017-10-24 23:16:35 -04001545 use ::MetaItem::*;
1546 match *_i {
1547 Term(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001548 _visitor.visit_ident(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001549 }
1550 List(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001551 _visitor.visit_meta_item_list(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001552 }
1553 NameValue(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001554 _visitor.visit_meta_name_value(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001555 }
1556 }
1557}
1558
Nika Layzellc86173a2017-11-18 13:55:22 -05001559pub fn visit_meta_item_list<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MetaItemList) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001560 _visitor.visit_ident(& _i . ident);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001561 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001562 for el in & _i . nested { let it = el.item(); _visitor.visit_nested_meta_item(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001563}
1564
Nika Layzellc86173a2017-11-18 13:55:22 -05001565pub fn visit_meta_name_value<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MetaNameValue) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001566 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001567 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4ba63a02017-12-28 15:53:05 -05001568 _visitor.visit_lit(& _i . lit);
Nika Layzell27726662017-10-24 23:16:35 -04001569}
1570# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001571pub fn visit_method_sig<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MethodSig) {
David Tolnay360a6342017-12-29 02:22:11 -05001572 if let Some(ref it) = _i . constness { tokens_helper(_visitor, &(it).0) };
David Tolnay9b258702017-12-29 02:24:41 -05001573 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001574 if let Some(ref it) = _i . abi { _visitor.visit_abi(it) };
1575 _visitor.visit_ident(& _i . ident);
1576 _visitor.visit_fn_decl(& _i . decl);
Nika Layzell27726662017-10-24 23:16:35 -04001577}
David Tolnayd60cfec2017-12-29 00:21:38 -05001578# [ cfg ( feature = "full" ) ]
1579pub fn visit_method_turbofish<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MethodTurbofish) {
1580 tokens_helper(_visitor, &(& _i . colon2_token).0);
1581 tokens_helper(_visitor, &(& _i . lt_token).0);
1582 for el in & _i . args { let it = el.item(); _visitor.visit_generic_method_argument(it) };
1583 tokens_helper(_visitor, &(& _i . gt_token).0);
1584}
Nika Layzell27726662017-10-24 23:16:35 -04001585
Nika Layzellc86173a2017-11-18 13:55:22 -05001586pub fn visit_nested_meta_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast NestedMetaItem) {
Nika Layzell27726662017-10-24 23:16:35 -04001587 use ::NestedMetaItem::*;
1588 match *_i {
1589 MetaItem(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001590 _visitor.visit_meta_item(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001591 }
1592 Literal(ref _binding_0, ) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05001593 _visitor.visit_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001594 }
1595 }
1596}
1597
Nika Layzellc08227a2017-12-04 16:30:17 -05001598pub fn visit_parenthesized_generic_arguments<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ParenthesizedGenericArguments) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001599 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001600 for el in & _i . inputs { let it = el.item(); _visitor.visit_type(it) };
1601 _visitor.visit_return_type(& _i . output);
Nika Layzell27726662017-10-24 23:16:35 -04001602}
1603# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001604pub fn visit_pat<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Pat) {
Nika Layzell27726662017-10-24 23:16:35 -04001605 use ::Pat::*;
1606 match *_i {
1607 Wild(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001608 _visitor.visit_pat_wild(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001609 }
1610 Ident(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001611 _visitor.visit_pat_ident(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001612 }
1613 Struct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001614 _visitor.visit_pat_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001615 }
1616 TupleStruct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001617 _visitor.visit_pat_tuple_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001618 }
1619 Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001620 _visitor.visit_pat_path(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001621 }
1622 Tuple(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001623 _visitor.visit_pat_tuple(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001624 }
1625 Box(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001626 _visitor.visit_pat_box(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001627 }
1628 Ref(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001629 _visitor.visit_pat_ref(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001630 }
1631 Lit(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001632 _visitor.visit_pat_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001633 }
1634 Range(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001635 _visitor.visit_pat_range(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001636 }
1637 Slice(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001638 _visitor.visit_pat_slice(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001639 }
David Tolnaydecf28d2017-11-11 11:56:45 -08001640 Macro(ref _binding_0, ) => {
David Tolnay323279a2017-12-29 11:26:32 -05001641 _visitor.visit_pat_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001642 }
David Tolnay2ae520a2017-12-29 11:19:50 -05001643 Verbatim(ref _binding_0, ) => {
1644 _visitor.visit_pat_verbatim(_binding_0);
1645 }
Nika Layzell27726662017-10-24 23:16:35 -04001646 }
1647}
1648# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001649pub fn visit_pat_box<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatBox) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001650 tokens_helper(_visitor, &(& _i . box_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001651 _visitor.visit_pat(& * _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001652}
1653# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001654pub fn visit_pat_ident<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatIdent) {
David Tolnay24237fb2017-12-29 02:15:26 -05001655 if let Some(ref it) = _i . by_ref { tokens_helper(_visitor, &(it).0) };
1656 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001657 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001658 if let Some(ref it) = _i . at_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001659 if let Some(ref it) = _i . subpat { _visitor.visit_pat(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -04001660}
1661# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001662pub fn visit_pat_lit<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatLit) {
David Tolnay4a918742017-12-28 16:54:41 -05001663 _visitor.visit_expr(& * _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -04001664}
1665# [ cfg ( feature = "full" ) ]
David Tolnay323279a2017-12-29 11:26:32 -05001666pub fn visit_pat_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatMacro) {
1667 _visitor.visit_macro(& _i . mac);
1668}
1669# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001670pub fn visit_pat_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatPath) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001671 if let Some(ref it) = _i . qself { _visitor.visit_qself(it) };
1672 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -04001673}
1674# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001675pub fn visit_pat_range<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatRange) {
David Tolnay4a918742017-12-28 16:54:41 -05001676 _visitor.visit_expr(& * _i . lo);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001677 _visitor.visit_range_limits(& _i . limits);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001678 _visitor.visit_expr(& * _i . hi);
Nika Layzell27726662017-10-24 23:16:35 -04001679}
1680# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001681pub fn visit_pat_ref<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatRef) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001682 tokens_helper(_visitor, &(& _i . and_token).0);
David Tolnay24237fb2017-12-29 02:15:26 -05001683 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001684 _visitor.visit_pat(& * _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001685}
1686# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001687pub fn visit_pat_slice<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatSlice) {
David Tolnay4a3f59a2017-12-28 21:21:12 -05001688 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001689 for el in & _i . front { let it = el.item(); _visitor.visit_pat(it) };
David Tolnay4a918742017-12-28 16:54:41 -05001690 if let Some(ref it) = _i . middle { _visitor.visit_pat(& * * it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001691 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
David Tolnay41871922017-12-29 01:53:45 -05001692 if let Some(ref it) = _i . comma_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001693 for el in & _i . back { let it = el.item(); _visitor.visit_pat(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001694}
1695# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001696pub fn visit_pat_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatStruct) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001697 _visitor.visit_path(& _i . path);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001698 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001699 for el in & _i . fields { let it = el.item(); _visitor.visit_field_pat(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001700 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04001701}
1702# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001703pub fn visit_pat_tuple<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatTuple) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001704 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay41871922017-12-29 01:53:45 -05001705 for el in & _i . front { let it = el.item(); _visitor.visit_pat(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001706 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
David Tolnay41871922017-12-29 01:53:45 -05001707 if let Some(ref it) = _i . comma_token { tokens_helper(_visitor, &(it).0) };
1708 for el in & _i . back { let it = el.item(); _visitor.visit_pat(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001709}
1710# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001711pub fn visit_pat_tuple_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatTupleStruct) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001712 _visitor.visit_path(& _i . path);
1713 _visitor.visit_pat_tuple(& _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001714}
1715# [ cfg ( feature = "full" ) ]
David Tolnay2ae520a2017-12-29 11:19:50 -05001716pub fn visit_pat_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatVerbatim) {
1717 // Skipped field _i . tts;
1718}
1719# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001720pub fn visit_pat_wild<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatWild) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001721 tokens_helper(_visitor, &(& _i . underscore_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001722}
1723
Nika Layzellc86173a2017-11-18 13:55:22 -05001724pub fn visit_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Path) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001725 if let Some(ref it) = _i . leading_colon { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001726 for el in & _i . segments { let it = el.item(); _visitor.visit_path_segment(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001727}
Nika Layzellc08227a2017-12-04 16:30:17 -05001728
1729pub fn visit_path_arguments<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PathArguments) {
1730 use ::PathArguments::*;
1731 match *_i {
1732 None => { }
1733 AngleBracketed(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001734 _visitor.visit_angle_bracketed_generic_arguments(_binding_0);
Nika Layzellc08227a2017-12-04 16:30:17 -05001735 }
1736 Parenthesized(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001737 _visitor.visit_parenthesized_generic_arguments(_binding_0);
Nika Layzellc08227a2017-12-04 16:30:17 -05001738 }
1739 }
1740}
Nika Layzell27726662017-10-24 23:16:35 -04001741
Nika Layzellc86173a2017-11-18 13:55:22 -05001742pub fn visit_path_segment<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PathSegment) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001743 _visitor.visit_ident(& _i . ident);
1744 _visitor.visit_path_arguments(& _i . arguments);
Nika Layzell27726662017-10-24 23:16:35 -04001745}
Nika Layzell27726662017-10-24 23:16:35 -04001746
Nika Layzellc86173a2017-11-18 13:55:22 -05001747pub fn visit_poly_trait_ref<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PolyTraitRef) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001748 if let Some(ref it) = _i . bound_lifetimes { _visitor.visit_bound_lifetimes(it) };
1749 _visitor.visit_path(& _i . trait_ref);
Nika Layzell27726662017-10-24 23:16:35 -04001750}
1751
Nika Layzellc86173a2017-11-18 13:55:22 -05001752pub fn visit_qself<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast QSelf) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001753 tokens_helper(_visitor, &(& _i . lt_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001754 _visitor.visit_type(& * _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -04001755 // Skipped field _i . position;
David Tolnaycc0f0372017-12-28 19:11:04 -05001756 if let Some(ref it) = _i . as_token { tokens_helper(_visitor, &(it).0) };
1757 tokens_helper(_visitor, &(& _i . gt_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001758}
1759# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001760pub fn visit_range_limits<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast RangeLimits) {
Nika Layzell27726662017-10-24 23:16:35 -04001761 use ::RangeLimits::*;
1762 match *_i {
1763 HalfOpen(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05001764 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04001765 }
1766 Closed(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05001767 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04001768 }
1769 }
1770}
David Tolnayf93b90d2017-11-11 19:21:26 -08001771
Nika Layzellc86173a2017-11-18 13:55:22 -05001772pub fn visit_return_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ReturnType) {
David Tolnayf93b90d2017-11-11 19:21:26 -08001773 use ::ReturnType::*;
1774 match *_i {
1775 Default => { }
David Tolnayfd6bf5c2017-11-12 09:41:14 -08001776 Type(ref _binding_0, ref _binding_1, ) => {
David Tolnay4a3f59a2017-12-28 21:21:12 -05001777 tokens_helper(_visitor, &(_binding_0).0);
1778 _visitor.visit_type(& * * _binding_1);
David Tolnayf93b90d2017-11-11 19:21:26 -08001779 }
1780 }
1781}
Nika Layzellefb83ba2017-12-19 18:23:55 -05001782
1783pub fn visit_span<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Span) {
1784}
Nika Layzell27726662017-10-24 23:16:35 -04001785# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001786pub fn visit_stmt<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Stmt) {
Nika Layzell27726662017-10-24 23:16:35 -04001787 use ::Stmt::*;
1788 match *_i {
1789 Local(ref _binding_0, ) => {
David Tolnay4a918742017-12-28 16:54:41 -05001790 _visitor.visit_local(& * * _binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001791 }
1792 Item(ref _binding_0, ) => {
David Tolnay4a918742017-12-28 16:54:41 -05001793 _visitor.visit_item(& * * _binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001794 }
1795 Expr(ref _binding_0, ) => {
David Tolnay4a918742017-12-28 16:54:41 -05001796 _visitor.visit_expr(& * * _binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001797 }
1798 Semi(ref _binding_0, ref _binding_1, ) => {
David Tolnay4a918742017-12-28 16:54:41 -05001799 _visitor.visit_expr(& * * _binding_0);
David Tolnaycc0f0372017-12-28 19:11:04 -05001800 tokens_helper(_visitor, &(_binding_1).0);
Nika Layzell27726662017-10-24 23:16:35 -04001801 }
Nika Layzell27726662017-10-24 23:16:35 -04001802 }
1803}
1804
Nika Layzellc86173a2017-11-18 13:55:22 -05001805pub fn visit_trait_bound_modifier<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitBoundModifier) {
Nika Layzell27726662017-10-24 23:16:35 -04001806 use ::TraitBoundModifier::*;
1807 match *_i {
1808 None => { }
1809 Maybe(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05001810 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04001811 }
1812 }
1813}
1814# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001815pub fn visit_trait_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItem) {
David Tolnayda705bd2017-11-10 21:58:05 -08001816 use ::TraitItem::*;
Nika Layzell27726662017-10-24 23:16:35 -04001817 match *_i {
1818 Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001819 _visitor.visit_trait_item_const(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001820 }
1821 Method(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001822 _visitor.visit_trait_item_method(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001823 }
1824 Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001825 _visitor.visit_trait_item_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001826 }
1827 Macro(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001828 _visitor.visit_trait_item_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001829 }
David Tolnay2ae520a2017-12-29 11:19:50 -05001830 Verbatim(ref _binding_0, ) => {
1831 _visitor.visit_trait_item_verbatim(_binding_0);
1832 }
Nika Layzell27726662017-10-24 23:16:35 -04001833 }
1834}
1835# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001836pub fn visit_trait_item_const<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemConst) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001837 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001838 tokens_helper(_visitor, &(& _i . const_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001839 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001840 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001841 _visitor.visit_type(& _i . ty);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001842 if let Some(ref it) = _i . default {
David Tolnaycc0f0372017-12-28 19:11:04 -05001843 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001844 _visitor.visit_expr(& ( it ) . 1);
1845 };
David Tolnaycc0f0372017-12-28 19:11:04 -05001846 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnayda705bd2017-11-10 21:58:05 -08001847}
1848# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001849pub fn visit_trait_item_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemMacro) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001850 for it in & _i . attrs { _visitor.visit_attribute(it) };
1851 _visitor.visit_macro(& _i . mac);
David Tolnaycc0f0372017-12-28 19:11:04 -05001852 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
David Tolnayda705bd2017-11-10 21:58:05 -08001853}
1854# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001855pub fn visit_trait_item_method<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemMethod) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001856 for it in & _i . attrs { _visitor.visit_attribute(it) };
1857 _visitor.visit_method_sig(& _i . sig);
1858 if let Some(ref it) = _i . default { _visitor.visit_block(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001859 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04001860}
1861# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001862pub fn visit_trait_item_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001863 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001864 tokens_helper(_visitor, &(& _i . type_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001865 _visitor.visit_ident(& _i . ident);
1866 _visitor.visit_generics(& _i . generics);
David Tolnaycc0f0372017-12-28 19:11:04 -05001867 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001868 for el in & _i . bounds { let it = el.item(); _visitor.visit_type_param_bound(it) };
David Tolnay5c4c0b52017-12-28 17:58:54 -05001869 if let Some(ref it) = _i . default {
David Tolnaycc0f0372017-12-28 19:11:04 -05001870 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001871 _visitor.visit_type(& ( it ) . 1);
1872 };
David Tolnaycc0f0372017-12-28 19:11:04 -05001873 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001874}
David Tolnay2ae520a2017-12-29 11:19:50 -05001875# [ cfg ( feature = "full" ) ]
1876pub fn visit_trait_item_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemVerbatim) {
1877 // Skipped field _i . tts;
1878}
Nika Layzell27726662017-10-24 23:16:35 -04001879
Nika Layzellc86173a2017-11-18 13:55:22 -05001880pub fn visit_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Type) {
David Tolnayfd6bf5c2017-11-12 09:41:14 -08001881 use ::Type::*;
Nika Layzell27726662017-10-24 23:16:35 -04001882 match *_i {
1883 Slice(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001884 _visitor.visit_type_slice(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001885 }
1886 Array(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001887 _visitor.visit_type_array(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001888 }
1889 Ptr(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001890 _visitor.visit_type_ptr(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001891 }
David Tolnay0a89b4d2017-11-13 00:55:45 -08001892 Reference(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001893 _visitor.visit_type_reference(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001894 }
1895 BareFn(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001896 _visitor.visit_type_bare_fn(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001897 }
1898 Never(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001899 _visitor.visit_type_never(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001900 }
David Tolnay05362582017-12-26 01:33:57 -05001901 Tuple(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001902 _visitor.visit_type_tuple(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001903 }
1904 Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001905 _visitor.visit_type_path(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001906 }
1907 TraitObject(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001908 _visitor.visit_type_trait_object(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001909 }
1910 ImplTrait(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001911 _visitor.visit_type_impl_trait(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001912 }
1913 Paren(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001914 _visitor.visit_type_paren(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001915 }
1916 Group(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001917 _visitor.visit_type_group(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001918 }
1919 Infer(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001920 _visitor.visit_type_infer(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001921 }
David Tolnaydecf28d2017-11-11 11:56:45 -08001922 Macro(ref _binding_0, ) => {
David Tolnay323279a2017-12-29 11:26:32 -05001923 _visitor.visit_type_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001924 }
David Tolnay2ae520a2017-12-29 11:19:50 -05001925 Verbatim(ref _binding_0, ) => {
1926 _visitor.visit_type_verbatim(_binding_0);
1927 }
Nika Layzell27726662017-10-24 23:16:35 -04001928 }
1929}
1930
Nika Layzellc86173a2017-11-18 13:55:22 -05001931pub fn visit_type_array<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeArray) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001932 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05001933 _visitor.visit_type(& * _i . elem);
David Tolnaycc0f0372017-12-28 19:11:04 -05001934 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05001935 _visitor.visit_expr(& _i . len);
Nika Layzell27726662017-10-24 23:16:35 -04001936}
1937
Nika Layzellc86173a2017-11-18 13:55:22 -05001938pub fn visit_type_bare_fn<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeBareFn) {
David Tolnaybe7a9592017-12-29 02:39:53 -05001939 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
1940 if let Some(ref it) = _i . abi { _visitor.visit_abi(it) };
1941 tokens_helper(_visitor, &(& _i . fn_token).0);
1942 if let Some(ref it) = _i . lifetimes { _visitor.visit_bound_lifetimes(it) };
1943 tokens_helper(_visitor, &(& _i . paren_token).0);
1944 for el in & _i . inputs { let it = el.item(); _visitor.visit_bare_fn_arg(it) };
1945 if let Some(ref it) = _i . variadic { tokens_helper(_visitor, &(it).0) };
1946 _visitor.visit_return_type(& _i . output);
Nika Layzell27726662017-10-24 23:16:35 -04001947}
1948
Nika Layzellc86173a2017-11-18 13:55:22 -05001949pub fn visit_type_group<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeGroup) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001950 tokens_helper(_visitor, &(& _i . group_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05001951 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04001952}
1953
Nika Layzellc86173a2017-11-18 13:55:22 -05001954pub fn visit_type_impl_trait<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeImplTrait) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001955 tokens_helper(_visitor, &(& _i . impl_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001956 for el in & _i . bounds { let it = el.item(); _visitor.visit_type_param_bound(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001957}
1958
Nika Layzellc86173a2017-11-18 13:55:22 -05001959pub fn visit_type_infer<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeInfer) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001960 tokens_helper(_visitor, &(& _i . underscore_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001961}
1962
David Tolnay323279a2017-12-29 11:26:32 -05001963pub fn visit_type_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeMacro) {
1964 _visitor.visit_macro(& _i . mac);
1965}
1966
Nika Layzellc86173a2017-11-18 13:55:22 -05001967pub fn visit_type_never<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeNever) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001968 tokens_helper(_visitor, &(& _i . bang_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001969}
1970
Nika Layzellc86173a2017-11-18 13:55:22 -05001971pub fn visit_type_param<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParam) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001972 for it in & _i . attrs { _visitor.visit_attribute(it) };
1973 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001974 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001975 for el in & _i . bounds { let it = el.item(); _visitor.visit_type_param_bound(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001976 if let Some(ref it) = _i . eq_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001977 if let Some(ref it) = _i . default { _visitor.visit_type(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001978}
1979
Nika Layzellc86173a2017-11-18 13:55:22 -05001980pub fn visit_type_param_bound<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParamBound) {
David Tolnayfd6bf5c2017-11-12 09:41:14 -08001981 use ::TypeParamBound::*;
Nika Layzell27726662017-10-24 23:16:35 -04001982 match *_i {
1983 Trait(ref _binding_0, ref _binding_1, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001984 _visitor.visit_poly_trait_ref(_binding_0);
1985 _visitor.visit_trait_bound_modifier(_binding_1);
Nika Layzell27726662017-10-24 23:16:35 -04001986 }
1987 Region(ref _binding_0, ) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05001988 _visitor.visit_lifetime(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001989 }
1990 }
1991}
1992
Nika Layzellc86173a2017-11-18 13:55:22 -05001993pub fn visit_type_paren<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParen) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001994 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05001995 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04001996}
1997
Nika Layzellc86173a2017-11-18 13:55:22 -05001998pub fn visit_type_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypePath) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001999 if let Some(ref it) = _i . qself { _visitor.visit_qself(it) };
2000 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -04002001}
2002
Nika Layzellc86173a2017-11-18 13:55:22 -05002003pub fn visit_type_ptr<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypePtr) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002004 tokens_helper(_visitor, &(& _i . star_token).0);
2005 if let Some(ref it) = _i . const_token { tokens_helper(_visitor, &(it).0) };
David Tolnay136aaa32017-12-29 02:37:36 -05002006 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
2007 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04002008}
2009
Nika Layzellc86173a2017-11-18 13:55:22 -05002010pub fn visit_type_reference<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeReference) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002011 tokens_helper(_visitor, &(& _i . and_token).0);
David Tolnay4ba63a02017-12-28 15:53:05 -05002012 if let Some(ref it) = _i . lifetime { _visitor.visit_lifetime(it) };
David Tolnay136aaa32017-12-29 02:37:36 -05002013 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
2014 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04002015}
2016
Nika Layzellc86173a2017-11-18 13:55:22 -05002017pub fn visit_type_slice<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeSlice) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002018 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05002019 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04002020}
2021
Nika Layzellc86173a2017-11-18 13:55:22 -05002022pub fn visit_type_trait_object<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeTraitObject) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002023 if let Some(ref it) = _i . dyn_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05002024 for el in & _i . bounds { let it = el.item(); _visitor.visit_type_param_bound(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002025}
2026
David Tolnay05362582017-12-26 01:33:57 -05002027pub fn visit_type_tuple<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeTuple) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002028 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05002029 for el in & _i . elems { let it = el.item(); _visitor.visit_type(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002030}
2031
David Tolnay2ae520a2017-12-29 11:19:50 -05002032pub fn visit_type_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeVerbatim) {
2033 // Skipped field _i . tts;
2034}
2035
Nika Layzellc86173a2017-11-18 13:55:22 -05002036pub fn visit_un_op<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UnOp) {
Nika Layzell27726662017-10-24 23:16:35 -04002037 use ::UnOp::*;
2038 match *_i {
2039 Deref(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05002040 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04002041 }
2042 Not(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 Neg(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 }
2049}
David Tolnay5f332a92017-12-26 00:42:45 -05002050# [ cfg ( feature = "full" ) ]
2051pub fn visit_use_glob<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseGlob) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002052 tokens_helper(_visitor, &(& _i . star_token).0);
David Tolnay5f332a92017-12-26 00:42:45 -05002053}
2054# [ cfg ( feature = "full" ) ]
2055pub fn visit_use_list<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseList) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002056 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05002057 for el in & _i . items { let it = el.item(); _visitor.visit_use_tree(it) };
David Tolnay5f332a92017-12-26 00:42:45 -05002058}
2059# [ cfg ( feature = "full" ) ]
2060pub fn visit_use_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UsePath) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002061 _visitor.visit_ident(& _i . ident);
David Tolnay5c4c0b52017-12-28 17:58:54 -05002062 if let Some(ref it) = _i . rename {
David Tolnaycc0f0372017-12-28 19:11:04 -05002063 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05002064 _visitor.visit_ident(& ( it ) . 1);
2065 };
David Tolnay5f332a92017-12-26 00:42:45 -05002066}
2067# [ cfg ( feature = "full" ) ]
2068pub fn visit_use_tree<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseTree) {
2069 use ::UseTree::*;
2070 match *_i {
2071 Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002072 _visitor.visit_use_path(_binding_0);
David Tolnay5f332a92017-12-26 00:42:45 -05002073 }
2074 Glob(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002075 _visitor.visit_use_glob(_binding_0);
David Tolnay5f332a92017-12-26 00:42:45 -05002076 }
2077 List(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002078 _visitor.visit_use_list(_binding_0);
David Tolnay5f332a92017-12-26 00:42:45 -05002079 }
2080 }
2081}
Nika Layzell27726662017-10-24 23:16:35 -04002082
Nika Layzellc86173a2017-11-18 13:55:22 -05002083pub fn visit_variant<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Variant) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002084 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05002085 _visitor.visit_ident(& _i . ident);
David Tolnayf0d63bf2017-12-26 12:29:47 -05002086 _visitor.visit_variant_data(& _i . data);
David Tolnaye67902a2017-12-28 22:12:00 -05002087 if let Some(ref it) = _i . discriminant {
2088 tokens_helper(_visitor, &(& ( it ) . 0).0);
2089 _visitor.visit_expr(& ( it ) . 1);
2090 };
Nika Layzell27726662017-10-24 23:16:35 -04002091}
2092
Nika Layzellc86173a2017-11-18 13:55:22 -05002093pub fn visit_variant_data<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VariantData) {
Nika Layzell27726662017-10-24 23:16:35 -04002094 use ::VariantData::*;
2095 match *_i {
2096 Struct(ref _binding_0, ref _binding_1, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002097 for el in _binding_0 { let it = el.item(); _visitor.visit_field(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -05002098 tokens_helper(_visitor, &(_binding_1).0);
Nika Layzell27726662017-10-24 23:16:35 -04002099 }
2100 Tuple(ref _binding_0, ref _binding_1, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002101 for el in _binding_0 { let it = el.item(); _visitor.visit_field(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -05002102 tokens_helper(_visitor, &(_binding_1).0);
Nika Layzell27726662017-10-24 23:16:35 -04002103 }
2104 Unit => { }
2105 }
2106}
Nika Layzell27726662017-10-24 23:16:35 -04002107
Nika Layzellc86173a2017-11-18 13:55:22 -05002108pub fn visit_vis_crate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisCrate) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002109 tokens_helper(_visitor, &(& _i . pub_token).0);
David Tolnay1e01f9c2017-12-28 20:16:19 -05002110 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnaycc0f0372017-12-28 19:11:04 -05002111 tokens_helper(_visitor, &(& _i . crate_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04002112}
2113
Nika Layzellc86173a2017-11-18 13:55:22 -05002114pub fn visit_vis_public<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisPublic) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002115 tokens_helper(_visitor, &(& _i . pub_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04002116}
2117
Nika Layzellc86173a2017-11-18 13:55:22 -05002118pub fn visit_vis_restricted<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisRestricted) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002119 tokens_helper(_visitor, &(& _i . pub_token).0);
David Tolnay1e01f9c2017-12-28 20:16:19 -05002120 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnaycc0f0372017-12-28 19:11:04 -05002121 if let Some(ref it) = _i . in_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a918742017-12-28 16:54:41 -05002122 _visitor.visit_path(& * _i . path);
Nika Layzell27726662017-10-24 23:16:35 -04002123}
2124
Nika Layzellc86173a2017-11-18 13:55:22 -05002125pub fn visit_visibility<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Visibility) {
Nika Layzell27726662017-10-24 23:16:35 -04002126 use ::Visibility::*;
2127 match *_i {
2128 Public(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002129 _visitor.visit_vis_public(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002130 }
2131 Crate(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002132 _visitor.visit_vis_crate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002133 }
2134 Restricted(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002135 _visitor.visit_vis_restricted(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002136 }
David Tolnayfcfb9002017-12-28 22:04:29 -05002137 Inherited => { }
Nika Layzell27726662017-10-24 23:16:35 -04002138 }
2139}
2140
Nika Layzellc86173a2017-11-18 13:55:22 -05002141pub fn visit_where_bound_predicate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WhereBoundPredicate) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002142 if let Some(ref it) = _i . bound_lifetimes { _visitor.visit_bound_lifetimes(it) };
2143 _visitor.visit_type(& _i . bounded_ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05002144 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05002145 for el in & _i . bounds { let it = el.item(); _visitor.visit_type_param_bound(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002146}
2147
Nika Layzellc86173a2017-11-18 13:55:22 -05002148pub fn visit_where_clause<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WhereClause) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002149 tokens_helper(_visitor, &(& _i . where_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05002150 for el in & _i . predicates { let it = el.item(); _visitor.visit_where_predicate(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002151}
2152
Nika Layzellc86173a2017-11-18 13:55:22 -05002153pub fn visit_where_eq_predicate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WhereEqPredicate) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002154 _visitor.visit_type(& _i . lhs_ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05002155 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05002156 _visitor.visit_type(& _i . rhs_ty);
Nika Layzell27726662017-10-24 23:16:35 -04002157}
2158
Nika Layzellc86173a2017-11-18 13:55:22 -05002159pub fn visit_where_predicate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WherePredicate) {
Nika Layzell27726662017-10-24 23:16:35 -04002160 use ::WherePredicate::*;
2161 match *_i {
2162 BoundPredicate(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002163 _visitor.visit_where_bound_predicate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002164 }
2165 RegionPredicate(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002166 _visitor.visit_where_region_predicate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002167 }
2168 EqPredicate(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002169 _visitor.visit_where_eq_predicate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002170 }
2171 }
2172}
2173
Nika Layzellc86173a2017-11-18 13:55:22 -05002174pub fn visit_where_region_predicate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WhereRegionPredicate) {
David Tolnay4ba63a02017-12-28 15:53:05 -05002175 _visitor.visit_lifetime(& _i . lifetime);
David Tolnaycc0f0372017-12-28 19:11:04 -05002176 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4ba63a02017-12-28 15:53:05 -05002177 for el in & _i . bounds { let it = el.item(); _visitor.visit_lifetime(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002178}
2179