blob: ca97b329d597a9491c05688e1b405ce214c8614d [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_bound_lifetimes(&mut self, i: &'ast BoundLifetimes) { visit_bound_lifetimes(self, i) }
Nika Layzellf1fdc0b2017-12-04 19:58:32 -050066
67fn visit_const_param(&mut self, i: &'ast ConstParam) { visit_const_param(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040068
David Tolnaye3d41b72017-12-31 15:24:00 -050069fn visit_data(&mut self, i: &'ast Data) { visit_data(self, i) }
70
71fn visit_data_enum(&mut self, i: &'ast DataEnum) { visit_data_enum(self, i) }
72
73fn visit_data_struct(&mut self, i: &'ast DataStruct) { visit_data_struct(self, i) }
74
75fn visit_data_union(&mut self, i: &'ast DataUnion) { visit_data_union(self, i) }
76
Nika Layzellc86173a2017-11-18 13:55:22 -050077fn visit_derive_input(&mut self, i: &'ast DeriveInput) { visit_derive_input(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040078
Nika Layzellc86173a2017-11-18 13:55:22 -050079fn visit_expr(&mut self, i: &'ast Expr) { visit_expr(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040080# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050081fn visit_expr_addr_of(&mut self, i: &'ast ExprAddrOf) { visit_expr_addr_of(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040082# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050083fn visit_expr_array(&mut self, i: &'ast ExprArray) { visit_expr_array(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040084# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050085fn visit_expr_assign(&mut self, i: &'ast ExprAssign) { visit_expr_assign(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040086# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050087fn visit_expr_assign_op(&mut self, i: &'ast ExprAssignOp) { visit_expr_assign_op(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040088
Nika Layzellc86173a2017-11-18 13:55:22 -050089fn visit_expr_binary(&mut self, i: &'ast ExprBinary) { visit_expr_binary(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040090# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050091fn visit_expr_block(&mut self, i: &'ast ExprBlock) { visit_expr_block(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040092# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050093fn visit_expr_box(&mut self, i: &'ast ExprBox) { visit_expr_box(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040094# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050095fn visit_expr_break(&mut self, i: &'ast ExprBreak) { visit_expr_break(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040096
Nika Layzellc86173a2017-11-18 13:55:22 -050097fn visit_expr_call(&mut self, i: &'ast ExprCall) { visit_expr_call(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040098
Nika Layzellc86173a2017-11-18 13:55:22 -050099fn visit_expr_cast(&mut self, i: &'ast ExprCast) { visit_expr_cast(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400100# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500101fn visit_expr_catch(&mut self, i: &'ast ExprCatch) { visit_expr_catch(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400102# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500103fn visit_expr_closure(&mut self, i: &'ast ExprClosure) { visit_expr_closure(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400104# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500105fn visit_expr_continue(&mut self, i: &'ast ExprContinue) { visit_expr_continue(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400106# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500107fn visit_expr_field(&mut self, i: &'ast ExprField) { visit_expr_field(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400108# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500109fn visit_expr_for_loop(&mut self, i: &'ast ExprForLoop) { visit_expr_for_loop(self, i) }
David Tolnaye98775f2017-12-28 23:17:00 -0500110# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500111fn visit_expr_group(&mut self, i: &'ast ExprGroup) { visit_expr_group(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400112# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500113fn visit_expr_if(&mut self, i: &'ast ExprIf) { visit_expr_if(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400114# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500115fn visit_expr_if_let(&mut self, i: &'ast ExprIfLet) { visit_expr_if_let(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400116# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500117fn visit_expr_in_place(&mut self, i: &'ast ExprInPlace) { visit_expr_in_place(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400118
Nika Layzellc86173a2017-11-18 13:55:22 -0500119fn visit_expr_index(&mut self, i: &'ast ExprIndex) { visit_expr_index(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400120
David Tolnay8c91b882017-12-28 23:04:32 -0500121fn visit_expr_lit(&mut self, i: &'ast ExprLit) { visit_expr_lit(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400122# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500123fn visit_expr_loop(&mut self, i: &'ast ExprLoop) { visit_expr_loop(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400124# [ cfg ( feature = "full" ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500125fn visit_expr_macro(&mut self, i: &'ast ExprMacro) { visit_expr_macro(self, i) }
126# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500127fn visit_expr_match(&mut self, i: &'ast ExprMatch) { visit_expr_match(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400128# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500129fn visit_expr_method_call(&mut self, i: &'ast ExprMethodCall) { visit_expr_method_call(self, i) }
David Tolnaye98775f2017-12-28 23:17:00 -0500130# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500131fn visit_expr_paren(&mut self, i: &'ast ExprParen) { visit_expr_paren(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400132
Nika Layzellc86173a2017-11-18 13:55:22 -0500133fn visit_expr_path(&mut self, i: &'ast ExprPath) { visit_expr_path(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400134# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500135fn visit_expr_range(&mut self, i: &'ast ExprRange) { visit_expr_range(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400136# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500137fn visit_expr_repeat(&mut self, i: &'ast ExprRepeat) { visit_expr_repeat(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400138# [ cfg ( feature = "full" ) ]
David Tolnayc246cd32017-12-28 23:14:32 -0500139fn visit_expr_return(&mut self, i: &'ast ExprReturn) { visit_expr_return(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400140# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500141fn visit_expr_struct(&mut self, i: &'ast ExprStruct) { visit_expr_struct(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400142# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500143fn visit_expr_try(&mut self, i: &'ast ExprTry) { visit_expr_try(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400144# [ cfg ( feature = "full" ) ]
David Tolnay05362582017-12-26 01:33:57 -0500145fn visit_expr_tuple(&mut self, i: &'ast ExprTuple) { visit_expr_tuple(self, i) }
David Tolnay0cf94f22017-12-28 23:46:26 -0500146# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500147fn visit_expr_type(&mut self, i: &'ast ExprType) { visit_expr_type(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400148
Nika Layzellc86173a2017-11-18 13:55:22 -0500149fn visit_expr_unary(&mut self, i: &'ast ExprUnary) { visit_expr_unary(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400150# [ cfg ( feature = "full" ) ]
Nika Layzell640832a2017-12-04 13:37:09 -0500151fn visit_expr_unsafe(&mut self, i: &'ast ExprUnsafe) { visit_expr_unsafe(self, i) }
David Tolnay2ae520a2017-12-29 11:19:50 -0500152
153fn visit_expr_verbatim(&mut self, i: &'ast ExprVerbatim) { visit_expr_verbatim(self, i) }
Nika Layzell640832a2017-12-04 13:37:09 -0500154# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500155fn visit_expr_while(&mut self, i: &'ast ExprWhile) { visit_expr_while(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400156# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500157fn visit_expr_while_let(&mut self, i: &'ast ExprWhileLet) { visit_expr_while_let(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400158# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500159fn visit_expr_yield(&mut self, i: &'ast ExprYield) { visit_expr_yield(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400160
Nika Layzellc86173a2017-11-18 13:55:22 -0500161fn visit_field(&mut self, i: &'ast Field) { visit_field(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400162# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500163fn visit_field_pat(&mut self, i: &'ast FieldPat) { visit_field_pat(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400164# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500165fn visit_field_value(&mut self, i: &'ast FieldValue) { visit_field_value(self, i) }
David Tolnaye3d41b72017-12-31 15:24:00 -0500166
167fn visit_fields(&mut self, i: &'ast Fields) { visit_fields(self, i) }
168
169fn visit_fields_named(&mut self, i: &'ast FieldsNamed) { visit_fields_named(self, i) }
170
171fn visit_fields_unnamed(&mut self, i: &'ast FieldsUnnamed) { visit_fields_unnamed(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400172# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500173fn visit_file(&mut self, i: &'ast File) { visit_file(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400174# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500175fn visit_fn_arg(&mut self, i: &'ast FnArg) { visit_fn_arg(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400176# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500177fn visit_fn_decl(&mut self, i: &'ast FnDecl) { visit_fn_decl(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400178# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500179fn visit_foreign_item(&mut self, i: &'ast ForeignItem) { visit_foreign_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400180# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500181fn visit_foreign_item_fn(&mut self, i: &'ast ForeignItemFn) { visit_foreign_item_fn(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400182# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500183fn visit_foreign_item_static(&mut self, i: &'ast ForeignItemStatic) { visit_foreign_item_static(self, i) }
David Tolnay199bcbb2017-11-12 10:33:52 -0800184# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500185fn visit_foreign_item_type(&mut self, i: &'ast ForeignItemType) { visit_foreign_item_type(self, i) }
David Tolnay2ae520a2017-12-29 11:19:50 -0500186# [ cfg ( feature = "full" ) ]
187fn visit_foreign_item_verbatim(&mut self, i: &'ast ForeignItemVerbatim) { visit_foreign_item_verbatim(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400188
Nika Layzellc08227a2017-12-04 16:30:17 -0500189fn visit_generic_argument(&mut self, i: &'ast GenericArgument) { visit_generic_argument(self, i) }
David Tolnayd60cfec2017-12-29 00:21:38 -0500190# [ cfg ( feature = "full" ) ]
191fn visit_generic_method_argument(&mut self, i: &'ast GenericMethodArgument) { visit_generic_method_argument(self, i) }
Nika Layzell357885a2017-12-04 15:47:07 -0500192
David Tolnayc2f1aba2017-11-12 20:29:22 -0800193fn visit_generic_param(&mut self, i: &'ast GenericParam) { visit_generic_param(self, i) }
194
Nika Layzellc86173a2017-11-18 13:55:22 -0500195fn visit_generics(&mut self, i: &'ast Generics) { visit_generics(self, i) }
Nika Layzellefb83ba2017-12-19 18:23:55 -0500196
197fn visit_ident(&mut self, i: &'ast Ident) { visit_ident(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400198# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500199fn visit_impl_item(&mut self, i: &'ast ImplItem) { visit_impl_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400200# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500201fn visit_impl_item_const(&mut self, i: &'ast ImplItemConst) { visit_impl_item_const(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400202# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500203fn visit_impl_item_macro(&mut self, i: &'ast ImplItemMacro) { visit_impl_item_macro(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400204# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500205fn visit_impl_item_method(&mut self, i: &'ast ImplItemMethod) { visit_impl_item_method(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400206# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500207fn visit_impl_item_type(&mut self, i: &'ast ImplItemType) { visit_impl_item_type(self, i) }
David Tolnay2ae520a2017-12-29 11:19:50 -0500208# [ cfg ( feature = "full" ) ]
209fn visit_impl_item_verbatim(&mut self, i: &'ast ImplItemVerbatim) { visit_impl_item_verbatim(self, i) }
David Tolnay14982012017-12-29 00:49:51 -0500210
David Tolnay85b69a42017-12-27 20:43:10 -0500211fn visit_index(&mut self, i: &'ast Index) { visit_index(self, i) }
212# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500213fn visit_item(&mut self, i: &'ast Item) { visit_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400214# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500215fn visit_item_const(&mut self, i: &'ast ItemConst) { visit_item_const(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400216# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500217fn visit_item_enum(&mut self, i: &'ast ItemEnum) { visit_item_enum(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400218# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500219fn visit_item_extern_crate(&mut self, i: &'ast ItemExternCrate) { visit_item_extern_crate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400220# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500221fn visit_item_fn(&mut self, i: &'ast ItemFn) { visit_item_fn(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400222# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500223fn visit_item_foreign_mod(&mut self, i: &'ast ItemForeignMod) { visit_item_foreign_mod(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400224# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500225fn visit_item_impl(&mut self, i: &'ast ItemImpl) { visit_item_impl(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400226# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500227fn visit_item_macro(&mut self, i: &'ast ItemMacro) { visit_item_macro(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400228# [ cfg ( feature = "full" ) ]
David Tolnay500d8322017-12-18 00:32:51 -0800229fn visit_item_macro2(&mut self, i: &'ast ItemMacro2) { visit_item_macro2(self, i) }
230# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500231fn visit_item_mod(&mut self, i: &'ast ItemMod) { visit_item_mod(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400232# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500233fn visit_item_static(&mut self, i: &'ast ItemStatic) { visit_item_static(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400234# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500235fn visit_item_struct(&mut self, i: &'ast ItemStruct) { visit_item_struct(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400236# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500237fn visit_item_trait(&mut self, i: &'ast ItemTrait) { visit_item_trait(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400238# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500239fn visit_item_type(&mut self, i: &'ast ItemType) { visit_item_type(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400240# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500241fn visit_item_union(&mut self, i: &'ast ItemUnion) { visit_item_union(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400242# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500243fn visit_item_use(&mut self, i: &'ast ItemUse) { visit_item_use(self, i) }
David Tolnay2ae520a2017-12-29 11:19:50 -0500244# [ cfg ( feature = "full" ) ]
245fn visit_item_verbatim(&mut self, i: &'ast ItemVerbatim) { visit_item_verbatim(self, i) }
David Tolnaybcd498f2017-12-29 12:02:33 -0500246# [ cfg ( feature = "full" ) ]
247fn visit_label(&mut self, i: &'ast Label) { visit_label(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400248
David Tolnay4ba63a02017-12-28 15:53:05 -0500249fn visit_lifetime(&mut self, i: &'ast Lifetime) { visit_lifetime(self, i) }
250
Nika Layzellc86173a2017-11-18 13:55:22 -0500251fn visit_lifetime_def(&mut self, i: &'ast LifetimeDef) { visit_lifetime_def(self, i) }
David Tolnay4ba63a02017-12-28 15:53:05 -0500252
253fn visit_lit(&mut self, i: &'ast Lit) { visit_lit(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400254# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500255fn visit_local(&mut self, i: &'ast Local) { visit_local(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400256
Nika Layzellc86173a2017-11-18 13:55:22 -0500257fn visit_macro(&mut self, i: &'ast Macro) { visit_macro(self, i) }
David Tolnay14982012017-12-29 00:49:51 -0500258
David Tolnayab919512017-12-30 23:31:51 -0500259fn visit_macro_delimiter(&mut self, i: &'ast MacroDelimiter) { visit_macro_delimiter(self, i) }
260
David Tolnay85b69a42017-12-27 20:43:10 -0500261fn visit_member(&mut self, i: &'ast Member) { visit_member(self, i) }
David Tolnaydecf28d2017-11-11 11:56:45 -0800262
Nika Layzellc86173a2017-11-18 13:55:22 -0500263fn visit_meta_item(&mut self, i: &'ast MetaItem) { visit_meta_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400264
Nika Layzellc86173a2017-11-18 13:55:22 -0500265fn visit_meta_item_list(&mut self, i: &'ast MetaItemList) { visit_meta_item_list(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400266
Nika Layzellc86173a2017-11-18 13:55:22 -0500267fn visit_meta_name_value(&mut self, i: &'ast MetaNameValue) { visit_meta_name_value(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400268# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500269fn visit_method_sig(&mut self, i: &'ast MethodSig) { visit_method_sig(self, i) }
David Tolnayd60cfec2017-12-29 00:21:38 -0500270# [ cfg ( feature = "full" ) ]
271fn visit_method_turbofish(&mut self, i: &'ast MethodTurbofish) { visit_method_turbofish(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400272
Nika Layzellc86173a2017-11-18 13:55:22 -0500273fn visit_nested_meta_item(&mut self, i: &'ast NestedMetaItem) { visit_nested_meta_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400274
Nika Layzellc08227a2017-12-04 16:30:17 -0500275fn visit_parenthesized_generic_arguments(&mut self, i: &'ast ParenthesizedGenericArguments) { visit_parenthesized_generic_arguments(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400276# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500277fn visit_pat(&mut self, i: &'ast Pat) { visit_pat(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400278# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500279fn visit_pat_box(&mut self, i: &'ast PatBox) { visit_pat_box(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400280# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500281fn visit_pat_ident(&mut self, i: &'ast PatIdent) { visit_pat_ident(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400282# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500283fn visit_pat_lit(&mut self, i: &'ast PatLit) { visit_pat_lit(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400284# [ cfg ( feature = "full" ) ]
David Tolnay323279a2017-12-29 11:26:32 -0500285fn visit_pat_macro(&mut self, i: &'ast PatMacro) { visit_pat_macro(self, i) }
286# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500287fn visit_pat_path(&mut self, i: &'ast PatPath) { visit_pat_path(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400288# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500289fn visit_pat_range(&mut self, i: &'ast PatRange) { visit_pat_range(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400290# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500291fn visit_pat_ref(&mut self, i: &'ast PatRef) { visit_pat_ref(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400292# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500293fn visit_pat_slice(&mut self, i: &'ast PatSlice) { visit_pat_slice(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400294# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500295fn visit_pat_struct(&mut self, i: &'ast PatStruct) { visit_pat_struct(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400296# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500297fn visit_pat_tuple(&mut self, i: &'ast PatTuple) { visit_pat_tuple(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400298# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500299fn visit_pat_tuple_struct(&mut self, i: &'ast PatTupleStruct) { visit_pat_tuple_struct(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400300# [ cfg ( feature = "full" ) ]
David Tolnay2ae520a2017-12-29 11:19:50 -0500301fn visit_pat_verbatim(&mut self, i: &'ast PatVerbatim) { visit_pat_verbatim(self, i) }
302# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500303fn visit_pat_wild(&mut self, i: &'ast PatWild) { visit_pat_wild(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400304
Nika Layzellc86173a2017-11-18 13:55:22 -0500305fn visit_path(&mut self, i: &'ast Path) { visit_path(self, i) }
Nika Layzellc08227a2017-12-04 16:30:17 -0500306
307fn visit_path_arguments(&mut self, i: &'ast PathArguments) { visit_path_arguments(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400308
Nika Layzellc86173a2017-11-18 13:55:22 -0500309fn visit_path_segment(&mut self, i: &'ast PathSegment) { visit_path_segment(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400310
Nika Layzellc86173a2017-11-18 13:55:22 -0500311fn visit_poly_trait_ref(&mut self, i: &'ast PolyTraitRef) { visit_poly_trait_ref(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400312
Nika Layzellc86173a2017-11-18 13:55:22 -0500313fn visit_qself(&mut self, i: &'ast QSelf) { visit_qself(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400314# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500315fn visit_range_limits(&mut self, i: &'ast RangeLimits) { visit_range_limits(self, i) }
David Tolnayf93b90d2017-11-11 19:21:26 -0800316
Nika Layzellc86173a2017-11-18 13:55:22 -0500317fn visit_return_type(&mut self, i: &'ast ReturnType) { visit_return_type(self, i) }
Nika Layzellefb83ba2017-12-19 18:23:55 -0500318
319fn visit_span(&mut self, i: &'ast Span) { visit_span(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400320# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500321fn visit_stmt(&mut self, i: &'ast Stmt) { visit_stmt(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400322
Nika Layzellc86173a2017-11-18 13:55:22 -0500323fn visit_trait_bound_modifier(&mut self, i: &'ast TraitBoundModifier) { visit_trait_bound_modifier(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400324# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500325fn visit_trait_item(&mut self, i: &'ast TraitItem) { visit_trait_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400326# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500327fn visit_trait_item_const(&mut self, i: &'ast TraitItemConst) { visit_trait_item_const(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400328# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500329fn visit_trait_item_macro(&mut self, i: &'ast TraitItemMacro) { visit_trait_item_macro(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400330# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500331fn visit_trait_item_method(&mut self, i: &'ast TraitItemMethod) { visit_trait_item_method(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400332# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500333fn visit_trait_item_type(&mut self, i: &'ast TraitItemType) { visit_trait_item_type(self, i) }
David Tolnay2ae520a2017-12-29 11:19:50 -0500334# [ cfg ( feature = "full" ) ]
335fn visit_trait_item_verbatim(&mut self, i: &'ast TraitItemVerbatim) { visit_trait_item_verbatim(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400336
Nika Layzellc86173a2017-11-18 13:55:22 -0500337fn visit_type(&mut self, i: &'ast Type) { visit_type(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400338
Nika Layzellc86173a2017-11-18 13:55:22 -0500339fn visit_type_array(&mut self, i: &'ast TypeArray) { visit_type_array(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400340
Nika Layzellc86173a2017-11-18 13:55:22 -0500341fn visit_type_bare_fn(&mut self, i: &'ast TypeBareFn) { visit_type_bare_fn(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400342
Nika Layzellc86173a2017-11-18 13:55:22 -0500343fn visit_type_group(&mut self, i: &'ast TypeGroup) { visit_type_group(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800344
Nika Layzellc86173a2017-11-18 13:55:22 -0500345fn visit_type_impl_trait(&mut self, i: &'ast TypeImplTrait) { visit_type_impl_trait(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800346
Nika Layzellc86173a2017-11-18 13:55:22 -0500347fn visit_type_infer(&mut self, i: &'ast TypeInfer) { visit_type_infer(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800348
David Tolnay323279a2017-12-29 11:26:32 -0500349fn visit_type_macro(&mut self, i: &'ast TypeMacro) { visit_type_macro(self, i) }
350
Nika Layzellc86173a2017-11-18 13:55:22 -0500351fn visit_type_never(&mut self, i: &'ast TypeNever) { visit_type_never(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800352
Nika Layzellc86173a2017-11-18 13:55:22 -0500353fn visit_type_param(&mut self, i: &'ast TypeParam) { visit_type_param(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800354
Nika Layzellc86173a2017-11-18 13:55:22 -0500355fn visit_type_param_bound(&mut self, i: &'ast TypeParamBound) { visit_type_param_bound(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800356
Nika Layzellc86173a2017-11-18 13:55:22 -0500357fn visit_type_paren(&mut self, i: &'ast TypeParen) { visit_type_paren(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800358
Nika Layzellc86173a2017-11-18 13:55:22 -0500359fn visit_type_path(&mut self, i: &'ast TypePath) { visit_type_path(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800360
Nika Layzellc86173a2017-11-18 13:55:22 -0500361fn visit_type_ptr(&mut self, i: &'ast TypePtr) { visit_type_ptr(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800362
Nika Layzellc86173a2017-11-18 13:55:22 -0500363fn visit_type_reference(&mut self, i: &'ast TypeReference) { visit_type_reference(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800364
Nika Layzellc86173a2017-11-18 13:55:22 -0500365fn visit_type_slice(&mut self, i: &'ast TypeSlice) { visit_type_slice(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800366
Nika Layzellc86173a2017-11-18 13:55:22 -0500367fn visit_type_trait_object(&mut self, i: &'ast TypeTraitObject) { visit_type_trait_object(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800368
David Tolnay05362582017-12-26 01:33:57 -0500369fn visit_type_tuple(&mut self, i: &'ast TypeTuple) { visit_type_tuple(self, i) }
David Tolnayfd6bf5c2017-11-12 09:41:14 -0800370
David Tolnay2ae520a2017-12-29 11:19:50 -0500371fn visit_type_verbatim(&mut self, i: &'ast TypeVerbatim) { visit_type_verbatim(self, i) }
372
Nika Layzellc86173a2017-11-18 13:55:22 -0500373fn visit_un_op(&mut self, i: &'ast UnOp) { visit_un_op(self, i) }
David Tolnay5f332a92017-12-26 00:42:45 -0500374# [ cfg ( feature = "full" ) ]
375fn visit_use_glob(&mut self, i: &'ast UseGlob) { visit_use_glob(self, i) }
376# [ cfg ( feature = "full" ) ]
377fn visit_use_list(&mut self, i: &'ast UseList) { visit_use_list(self, i) }
378# [ cfg ( feature = "full" ) ]
379fn visit_use_path(&mut self, i: &'ast UsePath) { visit_use_path(self, i) }
380# [ cfg ( feature = "full" ) ]
381fn visit_use_tree(&mut self, i: &'ast UseTree) { visit_use_tree(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400382
Nika Layzellc86173a2017-11-18 13:55:22 -0500383fn visit_variant(&mut self, i: &'ast Variant) { visit_variant(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400384
Nika Layzellc86173a2017-11-18 13:55:22 -0500385fn visit_vis_crate(&mut self, i: &'ast VisCrate) { visit_vis_crate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400386
Nika Layzellc86173a2017-11-18 13:55:22 -0500387fn visit_vis_public(&mut self, i: &'ast VisPublic) { visit_vis_public(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400388
Nika Layzellc86173a2017-11-18 13:55:22 -0500389fn visit_vis_restricted(&mut self, i: &'ast VisRestricted) { visit_vis_restricted(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400390
Nika Layzellc86173a2017-11-18 13:55:22 -0500391fn visit_visibility(&mut self, i: &'ast Visibility) { visit_visibility(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400392
Nika Layzellc86173a2017-11-18 13:55:22 -0500393fn visit_where_bound_predicate(&mut self, i: &'ast WhereBoundPredicate) { visit_where_bound_predicate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400394
Nika Layzellc86173a2017-11-18 13:55:22 -0500395fn visit_where_clause(&mut self, i: &'ast WhereClause) { visit_where_clause(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400396
Nika Layzellc86173a2017-11-18 13:55:22 -0500397fn visit_where_eq_predicate(&mut self, i: &'ast WhereEqPredicate) { visit_where_eq_predicate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400398
Nika Layzellc86173a2017-11-18 13:55:22 -0500399fn visit_where_predicate(&mut self, i: &'ast WherePredicate) { visit_where_predicate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400400
Nika Layzellc86173a2017-11-18 13:55:22 -0500401fn visit_where_region_predicate(&mut self, i: &'ast WhereRegionPredicate) { visit_where_region_predicate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400402
403}
404
405
Nika Layzellc86173a2017-11-18 13:55:22 -0500406pub fn visit_abi<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Abi) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500407 tokens_helper(_visitor, &(& _i . extern_token).0);
David Tolnayd5125762017-12-29 02:42:17 -0500408 if let Some(ref it) = _i . name { _visitor.visit_lit(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400409}
410
Nika Layzellc08227a2017-12-04 16:30:17 -0500411pub fn visit_angle_bracketed_generic_arguments<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast AngleBracketedGenericArguments) {
David Tolnay2d4e08a2017-12-28 23:54:07 -0500412 if let Some(ref it) = _i . colon2_token { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500413 tokens_helper(_visitor, &(& _i . lt_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500414 for el in & _i . args { let it = el.item(); _visitor.visit_generic_argument(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500415 tokens_helper(_visitor, &(& _i . gt_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400416}
417# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500418pub fn visit_arg_captured<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ArgCaptured) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500419 _visitor.visit_pat(& _i . pat);
David Tolnaycc0f0372017-12-28 19:11:04 -0500420 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500421 _visitor.visit_type(& _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -0400422}
423# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500424pub fn visit_arg_self<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ArgSelf) {
David Tolnay24237fb2017-12-29 02:15:26 -0500425 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500426 tokens_helper(_visitor, &(& _i . self_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400427}
428# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500429pub fn visit_arg_self_ref<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ArgSelfRef) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500430 tokens_helper(_visitor, &(& _i . and_token).0);
David Tolnay4ba63a02017-12-28 15:53:05 -0500431 if let Some(ref it) = _i . lifetime { _visitor.visit_lifetime(it) };
David Tolnay24237fb2017-12-29 02:15:26 -0500432 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500433 tokens_helper(_visitor, &(& _i . self_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400434}
435# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500436pub fn visit_arm<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Arm) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500437 for it in & _i . attrs { _visitor.visit_attribute(it) };
438 for el in & _i . pats { let it = el.item(); _visitor.visit_pat(it) };
David Tolnay8b4d3022017-12-29 12:11:10 -0500439 if let Some(ref it) = _i . guard {
440 tokens_helper(_visitor, &(& ( it ) . 0).0);
441 _visitor.visit_expr(& * ( it ) . 1);
442 };
David Tolnaycc0f0372017-12-28 19:11:04 -0500443 tokens_helper(_visitor, &(& _i . rocket_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500444 _visitor.visit_expr(& * _i . body);
David Tolnaycc0f0372017-12-28 19:11:04 -0500445 if let Some(ref it) = _i . comma { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -0400446}
447
Nika Layzellc86173a2017-11-18 13:55:22 -0500448pub fn visit_attr_style<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast AttrStyle) {
Nika Layzell27726662017-10-24 23:16:35 -0400449 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -0500450 AttrStyle::Outer => { }
451 AttrStyle::Inner(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500452 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400453 }
454 }
455}
456
Nika Layzellc86173a2017-11-18 13:55:22 -0500457pub fn visit_attribute<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Attribute) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500458 tokens_helper(_visitor, &(& _i . pound_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500459 _visitor.visit_attr_style(& _i . style);
David Tolnay1e01f9c2017-12-28 20:16:19 -0500460 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500461 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -0400462 // Skipped field _i . tts;
463 // Skipped field _i . is_sugared_doc;
464}
465
Nika Layzellc86173a2017-11-18 13:55:22 -0500466pub fn visit_bare_fn_arg<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BareFnArg) {
David Tolnay5c4c0b52017-12-28 17:58:54 -0500467 if let Some(ref it) = _i . name {
468 _visitor.visit_bare_fn_arg_name(& ( it ) . 0);
David Tolnaycc0f0372017-12-28 19:11:04 -0500469 tokens_helper(_visitor, &(& ( it ) . 1).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -0500470 };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500471 _visitor.visit_type(& _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -0400472}
473
Nika Layzellc86173a2017-11-18 13:55:22 -0500474pub fn visit_bare_fn_arg_name<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BareFnArgName) {
Nika Layzell27726662017-10-24 23:16:35 -0400475 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -0500476 BareFnArgName::Named(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500477 _visitor.visit_ident(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400478 }
David Tolnay6702ade2017-12-30 23:38:15 -0500479 BareFnArgName::Wild(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500480 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400481 }
482 }
483}
484
Nika Layzellc86173a2017-11-18 13:55:22 -0500485pub fn visit_bin_op<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BinOp) {
Nika Layzell27726662017-10-24 23:16:35 -0400486 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -0500487 BinOp::Add(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500488 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400489 }
David Tolnay6702ade2017-12-30 23:38:15 -0500490 BinOp::Sub(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500491 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400492 }
David Tolnay6702ade2017-12-30 23:38:15 -0500493 BinOp::Mul(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500494 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400495 }
David Tolnay6702ade2017-12-30 23:38:15 -0500496 BinOp::Div(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500497 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400498 }
David Tolnay6702ade2017-12-30 23:38:15 -0500499 BinOp::Rem(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500500 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400501 }
David Tolnay6702ade2017-12-30 23:38:15 -0500502 BinOp::And(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500503 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400504 }
David Tolnay6702ade2017-12-30 23:38:15 -0500505 BinOp::Or(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500506 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400507 }
David Tolnay6702ade2017-12-30 23:38:15 -0500508 BinOp::BitXor(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500509 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400510 }
David Tolnay6702ade2017-12-30 23:38:15 -0500511 BinOp::BitAnd(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500512 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400513 }
David Tolnay6702ade2017-12-30 23:38:15 -0500514 BinOp::BitOr(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500515 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400516 }
David Tolnay6702ade2017-12-30 23:38:15 -0500517 BinOp::Shl(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500518 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400519 }
David Tolnay6702ade2017-12-30 23:38:15 -0500520 BinOp::Shr(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500521 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400522 }
David Tolnay6702ade2017-12-30 23:38:15 -0500523 BinOp::Eq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500524 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400525 }
David Tolnay6702ade2017-12-30 23:38:15 -0500526 BinOp::Lt(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500527 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400528 }
David Tolnay6702ade2017-12-30 23:38:15 -0500529 BinOp::Le(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500530 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400531 }
David Tolnay6702ade2017-12-30 23:38:15 -0500532 BinOp::Ne(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500533 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400534 }
David Tolnay6702ade2017-12-30 23:38:15 -0500535 BinOp::Ge(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500536 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400537 }
David Tolnay6702ade2017-12-30 23:38:15 -0500538 BinOp::Gt(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500539 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400540 }
David Tolnay6702ade2017-12-30 23:38:15 -0500541 BinOp::AddEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500542 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400543 }
David Tolnay6702ade2017-12-30 23:38:15 -0500544 BinOp::SubEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500545 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400546 }
David Tolnay6702ade2017-12-30 23:38:15 -0500547 BinOp::MulEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500548 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400549 }
David Tolnay6702ade2017-12-30 23:38:15 -0500550 BinOp::DivEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500551 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400552 }
David Tolnay6702ade2017-12-30 23:38:15 -0500553 BinOp::RemEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500554 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400555 }
David Tolnay6702ade2017-12-30 23:38:15 -0500556 BinOp::BitXorEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500557 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400558 }
David Tolnay6702ade2017-12-30 23:38:15 -0500559 BinOp::BitAndEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500560 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400561 }
David Tolnay6702ade2017-12-30 23:38:15 -0500562 BinOp::BitOrEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500563 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400564 }
David Tolnay6702ade2017-12-30 23:38:15 -0500565 BinOp::ShlEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500566 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400567 }
David Tolnay6702ade2017-12-30 23:38:15 -0500568 BinOp::ShrEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500569 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400570 }
571 }
572}
David Tolnay506e43a2017-12-29 11:34:36 -0500573
574pub fn visit_binding<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Binding) {
575 _visitor.visit_ident(& _i . ident);
576 tokens_helper(_visitor, &(& _i . eq_token).0);
577 _visitor.visit_type(& _i . ty);
578}
Nika Layzell27726662017-10-24 23:16:35 -0400579# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500580pub fn visit_block<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Block) {
David Tolnay1e01f9c2017-12-28 20:16:19 -0500581 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500582 for it in & _i . stmts { _visitor.visit_stmt(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400583}
584
Nika Layzellc86173a2017-11-18 13:55:22 -0500585pub fn visit_bound_lifetimes<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BoundLifetimes) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500586 tokens_helper(_visitor, &(& _i . for_token).0);
587 tokens_helper(_visitor, &(& _i . lt_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500588 for el in & _i . lifetimes { let it = el.item(); _visitor.visit_lifetime_def(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500589 tokens_helper(_visitor, &(& _i . gt_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400590}
Nika Layzellf1fdc0b2017-12-04 19:58:32 -0500591
592pub fn visit_const_param<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ConstParam) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500593 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500594 tokens_helper(_visitor, &(& _i . const_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500595 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -0500596 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500597 _visitor.visit_type(& _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -0500598 if let Some(ref it) = _i . eq_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500599 if let Some(ref it) = _i . default { _visitor.visit_expr(it) };
Nika Layzellf1fdc0b2017-12-04 19:58:32 -0500600}
Nika Layzell27726662017-10-24 23:16:35 -0400601
David Tolnaye3d41b72017-12-31 15:24:00 -0500602pub fn visit_data<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Data) {
603 match *_i {
604 Data::Struct(ref _binding_0, ) => {
605 _visitor.visit_data_struct(_binding_0);
606 }
607 Data::Enum(ref _binding_0, ) => {
608 _visitor.visit_data_enum(_binding_0);
609 }
610 Data::Union(ref _binding_0, ) => {
611 _visitor.visit_data_union(_binding_0);
612 }
613 }
614}
615
616pub fn visit_data_enum<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast DataEnum) {
617 tokens_helper(_visitor, &(& _i . enum_token).0);
618 tokens_helper(_visitor, &(& _i . brace_token).0);
619 for el in & _i . variants { let it = el.item(); _visitor.visit_variant(it) };
620}
621
622pub fn visit_data_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast DataStruct) {
623 tokens_helper(_visitor, &(& _i . struct_token).0);
624 _visitor.visit_fields(& _i . fields);
625 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
626}
627
628pub fn visit_data_union<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast DataUnion) {
629 tokens_helper(_visitor, &(& _i . union_token).0);
630 _visitor.visit_fields_named(& _i . fields);
631}
632
Nika Layzellc86173a2017-11-18 13:55:22 -0500633pub fn visit_derive_input<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast DeriveInput) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500634 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500635 _visitor.visit_visibility(& _i . vis);
636 _visitor.visit_ident(& _i . ident);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500637 _visitor.visit_generics(& _i . generics);
David Tolnaye3d41b72017-12-31 15:24:00 -0500638 _visitor.visit_data(& _i . data);
Nika Layzell27726662017-10-24 23:16:35 -0400639}
640
Nika Layzellc86173a2017-11-18 13:55:22 -0500641pub fn visit_expr<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Expr) {
Nika Layzell27726662017-10-24 23:16:35 -0400642 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -0500643 Expr::Box(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500644 full!(_visitor.visit_expr_box(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400645 }
David Tolnay6702ade2017-12-30 23:38:15 -0500646 Expr::InPlace(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500647 full!(_visitor.visit_expr_in_place(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400648 }
David Tolnay6702ade2017-12-30 23:38:15 -0500649 Expr::Array(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500650 full!(_visitor.visit_expr_array(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400651 }
David Tolnay6702ade2017-12-30 23:38:15 -0500652 Expr::Call(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500653 _visitor.visit_expr_call(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400654 }
David Tolnay6702ade2017-12-30 23:38:15 -0500655 Expr::MethodCall(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500656 full!(_visitor.visit_expr_method_call(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400657 }
David Tolnay6702ade2017-12-30 23:38:15 -0500658 Expr::Tuple(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500659 full!(_visitor.visit_expr_tuple(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400660 }
David Tolnay6702ade2017-12-30 23:38:15 -0500661 Expr::Binary(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500662 _visitor.visit_expr_binary(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400663 }
David Tolnay6702ade2017-12-30 23:38:15 -0500664 Expr::Unary(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500665 _visitor.visit_expr_unary(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400666 }
David Tolnay6702ade2017-12-30 23:38:15 -0500667 Expr::Lit(ref _binding_0, ) => {
David Tolnay8c91b882017-12-28 23:04:32 -0500668 _visitor.visit_expr_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400669 }
David Tolnay6702ade2017-12-30 23:38:15 -0500670 Expr::Cast(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500671 _visitor.visit_expr_cast(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400672 }
David Tolnay6702ade2017-12-30 23:38:15 -0500673 Expr::Type(ref _binding_0, ) => {
David Tolnay0cf94f22017-12-28 23:46:26 -0500674 full!(_visitor.visit_expr_type(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400675 }
David Tolnay6702ade2017-12-30 23:38:15 -0500676 Expr::If(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500677 full!(_visitor.visit_expr_if(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400678 }
David Tolnay6702ade2017-12-30 23:38:15 -0500679 Expr::IfLet(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500680 full!(_visitor.visit_expr_if_let(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400681 }
David Tolnay6702ade2017-12-30 23:38:15 -0500682 Expr::While(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500683 full!(_visitor.visit_expr_while(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400684 }
David Tolnay6702ade2017-12-30 23:38:15 -0500685 Expr::WhileLet(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500686 full!(_visitor.visit_expr_while_let(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400687 }
David Tolnay6702ade2017-12-30 23:38:15 -0500688 Expr::ForLoop(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500689 full!(_visitor.visit_expr_for_loop(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400690 }
David Tolnay6702ade2017-12-30 23:38:15 -0500691 Expr::Loop(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500692 full!(_visitor.visit_expr_loop(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400693 }
David Tolnay6702ade2017-12-30 23:38:15 -0500694 Expr::Match(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500695 full!(_visitor.visit_expr_match(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400696 }
David Tolnay6702ade2017-12-30 23:38:15 -0500697 Expr::Closure(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500698 full!(_visitor.visit_expr_closure(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400699 }
David Tolnay6702ade2017-12-30 23:38:15 -0500700 Expr::Unsafe(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500701 full!(_visitor.visit_expr_unsafe(_binding_0));
Nika Layzell640832a2017-12-04 13:37:09 -0500702 }
David Tolnay6702ade2017-12-30 23:38:15 -0500703 Expr::Block(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500704 full!(_visitor.visit_expr_block(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400705 }
David Tolnay6702ade2017-12-30 23:38:15 -0500706 Expr::Assign(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500707 full!(_visitor.visit_expr_assign(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400708 }
David Tolnay6702ade2017-12-30 23:38:15 -0500709 Expr::AssignOp(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500710 full!(_visitor.visit_expr_assign_op(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400711 }
David Tolnay6702ade2017-12-30 23:38:15 -0500712 Expr::Field(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500713 full!(_visitor.visit_expr_field(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400714 }
David Tolnay6702ade2017-12-30 23:38:15 -0500715 Expr::Index(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500716 _visitor.visit_expr_index(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400717 }
David Tolnay6702ade2017-12-30 23:38:15 -0500718 Expr::Range(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500719 full!(_visitor.visit_expr_range(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400720 }
David Tolnay6702ade2017-12-30 23:38:15 -0500721 Expr::Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500722 _visitor.visit_expr_path(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400723 }
David Tolnay6702ade2017-12-30 23:38:15 -0500724 Expr::AddrOf(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500725 full!(_visitor.visit_expr_addr_of(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400726 }
David Tolnay6702ade2017-12-30 23:38:15 -0500727 Expr::Break(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500728 full!(_visitor.visit_expr_break(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400729 }
David Tolnay6702ade2017-12-30 23:38:15 -0500730 Expr::Continue(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500731 full!(_visitor.visit_expr_continue(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400732 }
David Tolnay6702ade2017-12-30 23:38:15 -0500733 Expr::Return(ref _binding_0, ) => {
David Tolnayc246cd32017-12-28 23:14:32 -0500734 full!(_visitor.visit_expr_return(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400735 }
David Tolnay6702ade2017-12-30 23:38:15 -0500736 Expr::Macro(ref _binding_0, ) => {
David Tolnay8c91b882017-12-28 23:04:32 -0500737 full!(_visitor.visit_expr_macro(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400738 }
David Tolnay6702ade2017-12-30 23:38:15 -0500739 Expr::Struct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500740 full!(_visitor.visit_expr_struct(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400741 }
David Tolnay6702ade2017-12-30 23:38:15 -0500742 Expr::Repeat(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500743 full!(_visitor.visit_expr_repeat(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400744 }
David Tolnay6702ade2017-12-30 23:38:15 -0500745 Expr::Paren(ref _binding_0, ) => {
David Tolnaye98775f2017-12-28 23:17:00 -0500746 full!(_visitor.visit_expr_paren(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400747 }
David Tolnay6702ade2017-12-30 23:38:15 -0500748 Expr::Group(ref _binding_0, ) => {
David Tolnaye98775f2017-12-28 23:17:00 -0500749 full!(_visitor.visit_expr_group(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400750 }
David Tolnay6702ade2017-12-30 23:38:15 -0500751 Expr::Try(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500752 full!(_visitor.visit_expr_try(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400753 }
David Tolnay6702ade2017-12-30 23:38:15 -0500754 Expr::Catch(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500755 full!(_visitor.visit_expr_catch(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400756 }
David Tolnay6702ade2017-12-30 23:38:15 -0500757 Expr::Yield(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500758 full!(_visitor.visit_expr_yield(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400759 }
David Tolnay6702ade2017-12-30 23:38:15 -0500760 Expr::Verbatim(ref _binding_0, ) => {
David Tolnay2ae520a2017-12-29 11:19:50 -0500761 _visitor.visit_expr_verbatim(_binding_0);
762 }
Nika Layzell27726662017-10-24 23:16:35 -0400763 }
764}
765# [ cfg ( feature = "full" ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500766pub fn visit_expr_addr_of<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprAddrOf) {
767 for it in & _i . attrs { _visitor.visit_attribute(it) };
768 tokens_helper(_visitor, &(& _i . and_token).0);
David Tolnay24237fb2017-12-29 02:15:26 -0500769 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnay8c91b882017-12-28 23:04:32 -0500770 _visitor.visit_expr(& * _i . expr);
771}
772# [ cfg ( feature = "full" ) ]
773pub fn visit_expr_array<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprArray) {
774 for it in & _i . attrs { _visitor.visit_attribute(it) };
775 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnay2a86fdd2017-12-28 23:34:28 -0500776 for el in & _i . elems { let it = el.item(); _visitor.visit_expr(it) };
David Tolnay8c91b882017-12-28 23:04:32 -0500777}
778# [ cfg ( feature = "full" ) ]
779pub fn visit_expr_assign<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprAssign) {
780 for it in & _i . attrs { _visitor.visit_attribute(it) };
781 _visitor.visit_expr(& * _i . left);
782 tokens_helper(_visitor, &(& _i . eq_token).0);
783 _visitor.visit_expr(& * _i . right);
784}
785# [ cfg ( feature = "full" ) ]
786pub fn visit_expr_assign_op<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprAssignOp) {
787 for it in & _i . attrs { _visitor.visit_attribute(it) };
788 _visitor.visit_expr(& * _i . left);
789 _visitor.visit_bin_op(& _i . op);
790 _visitor.visit_expr(& * _i . right);
791}
792
793pub fn visit_expr_binary<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBinary) {
794 for it in & _i . attrs { _visitor.visit_attribute(it) };
795 _visitor.visit_expr(& * _i . left);
796 _visitor.visit_bin_op(& _i . op);
797 _visitor.visit_expr(& * _i . right);
798}
799# [ cfg ( feature = "full" ) ]
800pub fn visit_expr_block<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBlock) {
801 for it in & _i . attrs { _visitor.visit_attribute(it) };
802 _visitor.visit_block(& _i . block);
803}
804# [ cfg ( feature = "full" ) ]
805pub fn visit_expr_box<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBox) {
806 for it in & _i . attrs { _visitor.visit_attribute(it) };
807 tokens_helper(_visitor, &(& _i . box_token).0);
808 _visitor.visit_expr(& * _i . expr);
809}
810# [ cfg ( feature = "full" ) ]
811pub fn visit_expr_break<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBreak) {
812 for it in & _i . attrs { _visitor.visit_attribute(it) };
813 tokens_helper(_visitor, &(& _i . break_token).0);
814 if let Some(ref it) = _i . label { _visitor.visit_lifetime(it) };
815 if let Some(ref it) = _i . expr { _visitor.visit_expr(& * * it) };
816}
817
818pub fn visit_expr_call<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprCall) {
819 for it in & _i . attrs { _visitor.visit_attribute(it) };
820 _visitor.visit_expr(& * _i . func);
821 tokens_helper(_visitor, &(& _i . paren_token).0);
822 for el in & _i . args { let it = el.item(); _visitor.visit_expr(it) };
823}
824
825pub fn visit_expr_cast<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprCast) {
826 for it in & _i . attrs { _visitor.visit_attribute(it) };
827 _visitor.visit_expr(& * _i . expr);
828 tokens_helper(_visitor, &(& _i . as_token).0);
829 _visitor.visit_type(& * _i . ty);
830}
831# [ cfg ( feature = "full" ) ]
832pub fn visit_expr_catch<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprCatch) {
833 for it in & _i . attrs { _visitor.visit_attribute(it) };
834 tokens_helper(_visitor, &(& _i . do_token).0);
835 tokens_helper(_visitor, &(& _i . catch_token).0);
836 _visitor.visit_block(& _i . block);
837}
838# [ cfg ( feature = "full" ) ]
839pub fn visit_expr_closure<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprClosure) {
840 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnayefc96fb2017-12-29 02:03:15 -0500841 if let Some(ref it) = _i . capture { tokens_helper(_visitor, &(it).0) };
David Tolnay8c91b882017-12-28 23:04:32 -0500842 tokens_helper(_visitor, &(& _i . or1_token).0);
843 for el in & _i . inputs { let it = el.item(); _visitor.visit_fn_arg(it) };
844 tokens_helper(_visitor, &(& _i . or2_token).0);
845 _visitor.visit_return_type(& _i . output);
846 _visitor.visit_expr(& * _i . body);
847}
848# [ cfg ( feature = "full" ) ]
849pub fn visit_expr_continue<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprContinue) {
850 for it in & _i . attrs { _visitor.visit_attribute(it) };
851 tokens_helper(_visitor, &(& _i . continue_token).0);
852 if let Some(ref it) = _i . label { _visitor.visit_lifetime(it) };
853}
854# [ cfg ( feature = "full" ) ]
855pub fn visit_expr_field<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprField) {
856 for it in & _i . attrs { _visitor.visit_attribute(it) };
857 _visitor.visit_expr(& * _i . base);
858 tokens_helper(_visitor, &(& _i . dot_token).0);
859 _visitor.visit_member(& _i . member);
860}
861# [ cfg ( feature = "full" ) ]
862pub fn visit_expr_for_loop<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprForLoop) {
863 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaybcd498f2017-12-29 12:02:33 -0500864 if let Some(ref it) = _i . label { _visitor.visit_label(it) };
David Tolnay8c91b882017-12-28 23:04:32 -0500865 tokens_helper(_visitor, &(& _i . for_token).0);
866 _visitor.visit_pat(& * _i . pat);
867 tokens_helper(_visitor, &(& _i . in_token).0);
868 _visitor.visit_expr(& * _i . expr);
869 _visitor.visit_block(& _i . body);
870}
David Tolnaye98775f2017-12-28 23:17:00 -0500871# [ cfg ( feature = "full" ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500872pub fn visit_expr_group<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprGroup) {
873 for it in & _i . attrs { _visitor.visit_attribute(it) };
874 tokens_helper(_visitor, &(& _i . group_token).0);
875 _visitor.visit_expr(& * _i . expr);
876}
877# [ cfg ( feature = "full" ) ]
878pub fn visit_expr_if<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIf) {
879 for it in & _i . attrs { _visitor.visit_attribute(it) };
880 tokens_helper(_visitor, &(& _i . if_token).0);
881 _visitor.visit_expr(& * _i . cond);
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_if_let<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIfLet) {
890 for it in & _i . attrs { _visitor.visit_attribute(it) };
891 tokens_helper(_visitor, &(& _i . if_token).0);
892 tokens_helper(_visitor, &(& _i . let_token).0);
893 _visitor.visit_pat(& * _i . pat);
894 tokens_helper(_visitor, &(& _i . eq_token).0);
895 _visitor.visit_expr(& * _i . expr);
David Tolnay2ccf32a2017-12-29 00:34:26 -0500896 _visitor.visit_block(& _i . then_branch);
897 if let Some(ref it) = _i . else_branch {
898 tokens_helper(_visitor, &(& ( it ) . 0).0);
899 _visitor.visit_expr(& * ( it ) . 1);
900 };
David Tolnay8c91b882017-12-28 23:04:32 -0500901}
902# [ cfg ( feature = "full" ) ]
903pub fn visit_expr_in_place<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprInPlace) {
904 for it in & _i . attrs { _visitor.visit_attribute(it) };
905 _visitor.visit_expr(& * _i . place);
David Tolnay8701a5c2017-12-28 23:31:10 -0500906 tokens_helper(_visitor, &(& _i . arrow_token).0);
David Tolnay8c91b882017-12-28 23:04:32 -0500907 _visitor.visit_expr(& * _i . value);
908}
909
910pub fn visit_expr_index<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIndex) {
911 for it in & _i . attrs { _visitor.visit_attribute(it) };
912 _visitor.visit_expr(& * _i . expr);
913 tokens_helper(_visitor, &(& _i . bracket_token).0);
914 _visitor.visit_expr(& * _i . index);
915}
916
917pub fn visit_expr_lit<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprLit) {
918 for it in & _i . attrs { _visitor.visit_attribute(it) };
919 _visitor.visit_lit(& _i . lit);
920}
921# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500922pub fn visit_expr_loop<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprLoop) {
David Tolnay8c91b882017-12-28 23:04:32 -0500923 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaybcd498f2017-12-29 12:02:33 -0500924 if let Some(ref it) = _i . label { _visitor.visit_label(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500925 tokens_helper(_visitor, &(& _i . loop_token).0);
926 _visitor.visit_block(& _i . body);
Nika Layzell27726662017-10-24 23:16:35 -0400927}
928# [ cfg ( feature = "full" ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500929pub fn visit_expr_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprMacro) {
930 for it in & _i . attrs { _visitor.visit_attribute(it) };
931 _visitor.visit_macro(& _i . mac);
932}
933# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500934pub fn visit_expr_match<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprMatch) {
David Tolnay8c91b882017-12-28 23:04:32 -0500935 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500936 tokens_helper(_visitor, &(& _i . match_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500937 _visitor.visit_expr(& * _i . expr);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500938 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500939 for it in & _i . arms { _visitor.visit_arm(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400940}
941# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500942pub fn visit_expr_method_call<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprMethodCall) {
David Tolnay8c91b882017-12-28 23:04:32 -0500943 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay76418512017-12-28 23:47:47 -0500944 _visitor.visit_expr(& * _i . receiver);
David Tolnaycc0f0372017-12-28 19:11:04 -0500945 tokens_helper(_visitor, &(& _i . dot_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500946 _visitor.visit_ident(& _i . method);
David Tolnayd60cfec2017-12-29 00:21:38 -0500947 if let Some(ref it) = _i . turbofish { _visitor.visit_method_turbofish(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500948 tokens_helper(_visitor, &(& _i . paren_token).0);
949 for el in & _i . args { let it = el.item(); _visitor.visit_expr(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400950}
David Tolnaye98775f2017-12-28 23:17:00 -0500951# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500952pub fn visit_expr_paren<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprParen) {
David Tolnay8c91b882017-12-28 23:04:32 -0500953 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -0500954 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500955 _visitor.visit_expr(& * _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -0400956}
957
Nika Layzellc86173a2017-11-18 13:55:22 -0500958pub fn visit_expr_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprPath) {
David Tolnay8c91b882017-12-28 23:04:32 -0500959 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500960 if let Some(ref it) = _i . qself { _visitor.visit_qself(it) };
961 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -0400962}
963# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500964pub fn visit_expr_range<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprRange) {
David Tolnay8c91b882017-12-28 23:04:32 -0500965 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a918742017-12-28 16:54:41 -0500966 if let Some(ref it) = _i . from { _visitor.visit_expr(& * * it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500967 _visitor.visit_range_limits(& _i . limits);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500968 if let Some(ref it) = _i . to { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -0400969}
970# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500971pub fn visit_expr_repeat<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprRepeat) {
David Tolnay8c91b882017-12-28 23:04:32 -0500972 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -0500973 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500974 _visitor.visit_expr(& * _i . expr);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500975 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500976 _visitor.visit_expr(& * _i . amt);
Nika Layzell27726662017-10-24 23:16:35 -0400977}
978# [ cfg ( feature = "full" ) ]
David Tolnayc246cd32017-12-28 23:14:32 -0500979pub fn visit_expr_return<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprReturn) {
David Tolnay8c91b882017-12-28 23:04:32 -0500980 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500981 tokens_helper(_visitor, &(& _i . return_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500982 if let Some(ref it) = _i . expr { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -0400983}
984# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500985pub fn visit_expr_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprStruct) {
David Tolnay8c91b882017-12-28 23:04:32 -0500986 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500987 _visitor.visit_path(& _i . path);
David Tolnay1e01f9c2017-12-28 20:16:19 -0500988 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500989 for el in & _i . fields { let it = el.item(); _visitor.visit_field_value(it) };
990 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
991 if let Some(ref it) = _i . rest { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -0400992}
993# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500994pub fn visit_expr_try<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprTry) {
David Tolnay8c91b882017-12-28 23:04:32 -0500995 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a918742017-12-28 16:54:41 -0500996 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -0500997 tokens_helper(_visitor, &(& _i . question_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400998}
999# [ cfg ( feature = "full" ) ]
David Tolnay05362582017-12-26 01:33:57 -05001000pub fn visit_expr_tuple<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprTuple) {
David Tolnay8c91b882017-12-28 23:04:32 -05001001 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -05001002 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay2a86fdd2017-12-28 23:34:28 -05001003 for el in & _i . elems { let it = el.item(); _visitor.visit_expr(it) };
David Tolnay05362582017-12-26 01:33:57 -05001004}
David Tolnay0cf94f22017-12-28 23:46:26 -05001005# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001006pub fn visit_expr_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprType) {
David Tolnay8c91b882017-12-28 23:04:32 -05001007 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a918742017-12-28 16:54:41 -05001008 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -05001009 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001010 _visitor.visit_type(& * _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -04001011}
1012
Nika Layzellc86173a2017-11-18 13:55:22 -05001013pub fn visit_expr_unary<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprUnary) {
David Tolnay8c91b882017-12-28 23:04:32 -05001014 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001015 _visitor.visit_un_op(& _i . op);
David Tolnay4a918742017-12-28 16:54:41 -05001016 _visitor.visit_expr(& * _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -04001017}
1018# [ cfg ( feature = "full" ) ]
Nika Layzell640832a2017-12-04 13:37:09 -05001019pub fn visit_expr_unsafe<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprUnsafe) {
David Tolnay8c91b882017-12-28 23:04:32 -05001020 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001021 tokens_helper(_visitor, &(& _i . unsafe_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001022 _visitor.visit_block(& _i . block);
Nika Layzell640832a2017-12-04 13:37:09 -05001023}
David Tolnay2ae520a2017-12-29 11:19:50 -05001024
1025pub fn visit_expr_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprVerbatim) {
1026 // Skipped field _i . tts;
1027}
Nika Layzell640832a2017-12-04 13:37:09 -05001028# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001029pub fn visit_expr_while<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprWhile) {
David Tolnay8c91b882017-12-28 23:04:32 -05001030 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaybcd498f2017-12-29 12:02:33 -05001031 if let Some(ref it) = _i . label { _visitor.visit_label(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001032 tokens_helper(_visitor, &(& _i . while_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001033 _visitor.visit_expr(& * _i . cond);
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_while_let<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprWhileLet) {
David Tolnay8c91b882017-12-28 23:04:32 -05001038 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaybcd498f2017-12-29 12:02:33 -05001039 if let Some(ref it) = _i . label { _visitor.visit_label(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001040 tokens_helper(_visitor, &(& _i . while_token).0);
1041 tokens_helper(_visitor, &(& _i . let_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001042 _visitor.visit_pat(& * _i . pat);
David Tolnaycc0f0372017-12-28 19:11:04 -05001043 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001044 _visitor.visit_expr(& * _i . expr);
1045 _visitor.visit_block(& _i . body);
Nika Layzell27726662017-10-24 23:16:35 -04001046}
1047# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001048pub fn visit_expr_yield<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprYield) {
David Tolnay8c91b882017-12-28 23:04:32 -05001049 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001050 tokens_helper(_visitor, &(& _i . yield_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001051 if let Some(ref it) = _i . expr { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -04001052}
1053
Nika Layzellc86173a2017-11-18 13:55:22 -05001054pub fn visit_field<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Field) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001055 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001056 _visitor.visit_visibility(& _i . vis);
1057 if let Some(ref it) = _i . ident { _visitor.visit_ident(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001058 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001059 _visitor.visit_type(& _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -04001060}
1061# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001062pub fn visit_field_pat<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldPat) {
David Tolnay4a3f59a2017-12-28 21:21:12 -05001063 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay85b69a42017-12-27 20:43:10 -05001064 _visitor.visit_member(& _i . member);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001065 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a918742017-12-28 16:54:41 -05001066 _visitor.visit_pat(& * _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001067}
1068# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001069pub fn visit_field_value<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldValue) {
David Tolnay85b69a42017-12-27 20:43:10 -05001070 for it in & _i . attrs { _visitor.visit_attribute(it) };
1071 _visitor.visit_member(& _i . member);
David Tolnaycc0f0372017-12-28 19:11:04 -05001072 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001073 _visitor.visit_expr(& _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -04001074}
David Tolnaye3d41b72017-12-31 15:24:00 -05001075
1076pub fn visit_fields<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Fields) {
1077 match *_i {
1078 Fields::Named(ref _binding_0, ) => {
1079 _visitor.visit_fields_named(_binding_0);
1080 }
1081 Fields::Unnamed(ref _binding_0, ) => {
1082 _visitor.visit_fields_unnamed(_binding_0);
1083 }
1084 Fields::Unit => { }
1085 }
1086}
1087
1088pub fn visit_fields_named<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldsNamed) {
1089 tokens_helper(_visitor, &(& _i . brace_token).0);
1090 for el in & _i . fields { let it = el.item(); _visitor.visit_field(it) };
1091}
1092
1093pub fn visit_fields_unnamed<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldsUnnamed) {
1094 tokens_helper(_visitor, &(& _i . paren_token).0);
1095 for el in & _i . fields { let it = el.item(); _visitor.visit_field(it) };
1096}
Nika Layzell27726662017-10-24 23:16:35 -04001097# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001098pub fn visit_file<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast File) {
Nika Layzell27726662017-10-24 23:16:35 -04001099 // Skipped field _i . shebang;
David Tolnayf0d63bf2017-12-26 12:29:47 -05001100 for it in & _i . attrs { _visitor.visit_attribute(it) };
1101 for it in & _i . items { _visitor.visit_item(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001102}
1103# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001104pub fn visit_fn_arg<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FnArg) {
Nika Layzell27726662017-10-24 23:16:35 -04001105 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001106 FnArg::SelfRef(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001107 _visitor.visit_arg_self_ref(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001108 }
David Tolnay6702ade2017-12-30 23:38:15 -05001109 FnArg::SelfValue(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001110 _visitor.visit_arg_self(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001111 }
David Tolnay6702ade2017-12-30 23:38:15 -05001112 FnArg::Captured(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001113 _visitor.visit_arg_captured(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001114 }
David Tolnay6702ade2017-12-30 23:38:15 -05001115 FnArg::Inferred(ref _binding_0, ) => {
David Tolnay80ed55f2017-12-27 22:54:40 -05001116 _visitor.visit_pat(_binding_0);
1117 }
David Tolnay6702ade2017-12-30 23:38:15 -05001118 FnArg::Ignored(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001119 _visitor.visit_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001120 }
1121 }
1122}
1123# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001124pub fn visit_fn_decl<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FnDecl) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001125 tokens_helper(_visitor, &(& _i . fn_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001126 _visitor.visit_generics(& _i . generics);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001127 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001128 for el in & _i . inputs { let it = el.item(); _visitor.visit_fn_arg(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001129 if let Some(ref it) = _i . variadic { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001130 _visitor.visit_return_type(& _i . output);
Nika Layzell27726662017-10-24 23:16:35 -04001131}
1132# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001133pub fn visit_foreign_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItem) {
Nika Layzell27726662017-10-24 23:16:35 -04001134 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001135 ForeignItem::Fn(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001136 _visitor.visit_foreign_item_fn(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001137 }
David Tolnay6702ade2017-12-30 23:38:15 -05001138 ForeignItem::Static(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001139 _visitor.visit_foreign_item_static(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001140 }
David Tolnay6702ade2017-12-30 23:38:15 -05001141 ForeignItem::Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001142 _visitor.visit_foreign_item_type(_binding_0);
David Tolnay199bcbb2017-11-12 10:33:52 -08001143 }
David Tolnay6702ade2017-12-30 23:38:15 -05001144 ForeignItem::Verbatim(ref _binding_0, ) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05001145 _visitor.visit_foreign_item_verbatim(_binding_0);
1146 }
Nika Layzell27726662017-10-24 23:16:35 -04001147 }
1148}
1149# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001150pub fn visit_foreign_item_fn<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemFn) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001151 for it in & _i . attrs { _visitor.visit_attribute(it) };
1152 _visitor.visit_visibility(& _i . vis);
1153 _visitor.visit_ident(& _i . ident);
David Tolnay4a918742017-12-28 16:54:41 -05001154 _visitor.visit_fn_decl(& * _i . decl);
David Tolnaycc0f0372017-12-28 19:11:04 -05001155 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay8894f602017-11-11 12:11:04 -08001156}
1157# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001158pub fn visit_foreign_item_static<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemStatic) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001159 for it in & _i . attrs { _visitor.visit_attribute(it) };
1160 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001161 tokens_helper(_visitor, &(& _i . static_token).0);
David Tolnay24237fb2017-12-29 02:15:26 -05001162 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001163 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001164 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001165 _visitor.visit_type(& * _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001166 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001167}
David Tolnay199bcbb2017-11-12 10:33:52 -08001168# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001169pub fn visit_foreign_item_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001170 for it in & _i . attrs { _visitor.visit_attribute(it) };
1171 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001172 tokens_helper(_visitor, &(& _i . type_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001173 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001174 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay199bcbb2017-11-12 10:33:52 -08001175}
David Tolnay2ae520a2017-12-29 11:19:50 -05001176# [ cfg ( feature = "full" ) ]
1177pub fn visit_foreign_item_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemVerbatim) {
1178 // Skipped field _i . tts;
1179}
Nika Layzell27726662017-10-24 23:16:35 -04001180
Nika Layzellc08227a2017-12-04 16:30:17 -05001181pub fn visit_generic_argument<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast GenericArgument) {
Nika Layzell357885a2017-12-04 15:47:07 -05001182 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001183 GenericArgument::Lifetime(ref _binding_0, ) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05001184 _visitor.visit_lifetime(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001185 }
David Tolnay6702ade2017-12-30 23:38:15 -05001186 GenericArgument::Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001187 _visitor.visit_type(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001188 }
David Tolnay6702ade2017-12-30 23:38:15 -05001189 GenericArgument::Binding(ref _binding_0, ) => {
David Tolnay506e43a2017-12-29 11:34:36 -05001190 _visitor.visit_binding(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001191 }
David Tolnay6702ade2017-12-30 23:38:15 -05001192 GenericArgument::Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001193 _visitor.visit_expr(_binding_0);
Nika Layzellc680e612017-12-04 19:07:20 -05001194 }
Nika Layzell357885a2017-12-04 15:47:07 -05001195 }
1196}
David Tolnayd60cfec2017-12-29 00:21:38 -05001197# [ cfg ( feature = "full" ) ]
1198pub fn visit_generic_method_argument<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast GenericMethodArgument) {
David Tolnayd60cfec2017-12-29 00:21:38 -05001199 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001200 GenericMethodArgument::Type(ref _binding_0, ) => {
David Tolnayd60cfec2017-12-29 00:21:38 -05001201 _visitor.visit_type(_binding_0);
1202 }
David Tolnay6702ade2017-12-30 23:38:15 -05001203 GenericMethodArgument::Const(ref _binding_0, ) => {
David Tolnayd60cfec2017-12-29 00:21:38 -05001204 _visitor.visit_expr(_binding_0);
1205 }
1206 }
1207}
Nika Layzell357885a2017-12-04 15:47:07 -05001208
David Tolnayc2f1aba2017-11-12 20:29:22 -08001209pub fn visit_generic_param<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast GenericParam) {
David Tolnayc2f1aba2017-11-12 20:29:22 -08001210 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001211 GenericParam::Lifetime(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001212 _visitor.visit_lifetime_def(_binding_0);
David Tolnayc2f1aba2017-11-12 20:29:22 -08001213 }
David Tolnay6702ade2017-12-30 23:38:15 -05001214 GenericParam::Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001215 _visitor.visit_type_param(_binding_0);
David Tolnayc2f1aba2017-11-12 20:29:22 -08001216 }
David Tolnay6702ade2017-12-30 23:38:15 -05001217 GenericParam::Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001218 _visitor.visit_const_param(_binding_0);
Nika Layzellf1fdc0b2017-12-04 19:58:32 -05001219 }
David Tolnayc2f1aba2017-11-12 20:29:22 -08001220 }
1221}
1222
Nika Layzellc86173a2017-11-18 13:55:22 -05001223pub fn visit_generics<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Generics) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001224 if let Some(ref it) = _i . lt_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001225 for el in & _i . params { let it = el.item(); _visitor.visit_generic_param(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001226 if let Some(ref it) = _i . gt_token { tokens_helper(_visitor, &(it).0) };
David Tolnayac997dd2017-12-27 23:18:22 -05001227 if let Some(ref it) = _i . where_clause { _visitor.visit_where_clause(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001228}
Nika Layzellefb83ba2017-12-19 18:23:55 -05001229
1230pub fn visit_ident<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Ident) {
David Tolnay4ba63a02017-12-28 15:53:05 -05001231 // Skipped field _i . sym;
1232 _visitor.visit_span(& _i . span);
Nika Layzellefb83ba2017-12-19 18:23:55 -05001233}
Nika Layzell27726662017-10-24 23:16:35 -04001234# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001235pub fn visit_impl_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItem) {
Nika Layzell27726662017-10-24 23:16:35 -04001236 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001237 ImplItem::Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001238 _visitor.visit_impl_item_const(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001239 }
David Tolnay6702ade2017-12-30 23:38:15 -05001240 ImplItem::Method(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001241 _visitor.visit_impl_item_method(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001242 }
David Tolnay6702ade2017-12-30 23:38:15 -05001243 ImplItem::Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001244 _visitor.visit_impl_item_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001245 }
David Tolnay6702ade2017-12-30 23:38:15 -05001246 ImplItem::Macro(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001247 _visitor.visit_impl_item_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001248 }
David Tolnay6702ade2017-12-30 23:38:15 -05001249 ImplItem::Verbatim(ref _binding_0, ) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05001250 _visitor.visit_impl_item_verbatim(_binding_0);
1251 }
Nika Layzell27726662017-10-24 23:16:35 -04001252 }
1253}
1254# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001255pub fn visit_impl_item_const<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemConst) {
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 . const_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001260 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001261 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001262 _visitor.visit_type(& _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001263 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001264 _visitor.visit_expr(& _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -05001265 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay857628c2017-11-11 12:25:31 -08001266}
1267# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001268pub fn visit_impl_item_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemMacro) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001269 for it in & _i . attrs { _visitor.visit_attribute(it) };
1270 _visitor.visit_macro(& _i . mac);
David Tolnaycc0f0372017-12-28 19:11:04 -05001271 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
David Tolnay857628c2017-11-11 12:25:31 -08001272}
1273# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001274pub fn visit_impl_item_method<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemMethod) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001275 for it in & _i . attrs { _visitor.visit_attribute(it) };
1276 _visitor.visit_visibility(& _i . vis);
David Tolnay360a6342017-12-29 02:22:11 -05001277 if let Some(ref it) = _i . defaultness { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001278 _visitor.visit_method_sig(& _i . sig);
1279 _visitor.visit_block(& _i . block);
Nika Layzell27726662017-10-24 23:16:35 -04001280}
1281# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001282pub fn visit_impl_item_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001283 for it in & _i . attrs { _visitor.visit_attribute(it) };
1284 _visitor.visit_visibility(& _i . vis);
David Tolnay360a6342017-12-29 02:22:11 -05001285 if let Some(ref it) = _i . defaultness { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001286 tokens_helper(_visitor, &(& _i . type_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001287 _visitor.visit_ident(& _i . ident);
1288 _visitor.visit_generics(& _i . generics);
David Tolnaycc0f0372017-12-28 19:11:04 -05001289 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001290 _visitor.visit_type(& _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001291 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001292}
David Tolnay2ae520a2017-12-29 11:19:50 -05001293# [ cfg ( feature = "full" ) ]
1294pub fn visit_impl_item_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemVerbatim) {
1295 // Skipped field _i . tts;
1296}
David Tolnay14982012017-12-29 00:49:51 -05001297
David Tolnay85b69a42017-12-27 20:43:10 -05001298pub fn visit_index<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Index) {
1299 // Skipped field _i . index;
1300 _visitor.visit_span(& _i . span);
1301}
1302# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001303pub fn visit_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Item) {
Nika Layzell27726662017-10-24 23:16:35 -04001304 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001305 Item::ExternCrate(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001306 _visitor.visit_item_extern_crate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001307 }
David Tolnay6702ade2017-12-30 23:38:15 -05001308 Item::Use(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001309 _visitor.visit_item_use(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001310 }
David Tolnay6702ade2017-12-30 23:38:15 -05001311 Item::Static(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001312 _visitor.visit_item_static(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001313 }
David Tolnay6702ade2017-12-30 23:38:15 -05001314 Item::Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001315 _visitor.visit_item_const(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001316 }
David Tolnay6702ade2017-12-30 23:38:15 -05001317 Item::Fn(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001318 _visitor.visit_item_fn(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001319 }
David Tolnay6702ade2017-12-30 23:38:15 -05001320 Item::Mod(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001321 _visitor.visit_item_mod(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001322 }
David Tolnay6702ade2017-12-30 23:38:15 -05001323 Item::ForeignMod(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001324 _visitor.visit_item_foreign_mod(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001325 }
David Tolnay6702ade2017-12-30 23:38:15 -05001326 Item::Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001327 _visitor.visit_item_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001328 }
David Tolnay6702ade2017-12-30 23:38:15 -05001329 Item::Struct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001330 _visitor.visit_item_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001331 }
David Tolnaye3d41b72017-12-31 15:24:00 -05001332 Item::Enum(ref _binding_0, ) => {
1333 _visitor.visit_item_enum(_binding_0);
1334 }
David Tolnay6702ade2017-12-30 23:38:15 -05001335 Item::Union(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001336 _visitor.visit_item_union(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001337 }
David Tolnay6702ade2017-12-30 23:38:15 -05001338 Item::Trait(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001339 _visitor.visit_item_trait(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001340 }
David Tolnay6702ade2017-12-30 23:38:15 -05001341 Item::Impl(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001342 _visitor.visit_item_impl(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001343 }
David Tolnay6702ade2017-12-30 23:38:15 -05001344 Item::Macro(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001345 _visitor.visit_item_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001346 }
David Tolnay6702ade2017-12-30 23:38:15 -05001347 Item::Macro2(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001348 _visitor.visit_item_macro2(_binding_0);
David Tolnay500d8322017-12-18 00:32:51 -08001349 }
David Tolnay6702ade2017-12-30 23:38:15 -05001350 Item::Verbatim(ref _binding_0, ) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05001351 _visitor.visit_item_verbatim(_binding_0);
1352 }
Nika Layzell27726662017-10-24 23:16:35 -04001353 }
1354}
1355# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001356pub fn visit_item_const<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemConst) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001357 for it in & _i . attrs { _visitor.visit_attribute(it) };
1358 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001359 tokens_helper(_visitor, &(& _i . const_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001360 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001361 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001362 _visitor.visit_type(& * _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001363 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001364 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -05001365 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnayc6b55bc2017-11-09 22:48:38 -08001366}
1367# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001368pub fn visit_item_enum<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemEnum) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001369 for it in & _i . attrs { _visitor.visit_attribute(it) };
1370 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001371 tokens_helper(_visitor, &(& _i . enum_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001372 _visitor.visit_ident(& _i . ident);
1373 _visitor.visit_generics(& _i . generics);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001374 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001375 for el in & _i . variants { let it = el.item(); _visitor.visit_variant(it) };
David Tolnayc6b55bc2017-11-09 22:48:38 -08001376}
1377# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001378pub fn visit_item_extern_crate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemExternCrate) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001379 for it in & _i . attrs { _visitor.visit_attribute(it) };
1380 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001381 tokens_helper(_visitor, &(& _i . extern_token).0);
1382 tokens_helper(_visitor, &(& _i . crate_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001383 _visitor.visit_ident(& _i . ident);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001384 if let Some(ref it) = _i . rename {
David Tolnaycc0f0372017-12-28 19:11:04 -05001385 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001386 _visitor.visit_ident(& ( it ) . 1);
1387 };
David Tolnaycc0f0372017-12-28 19:11:04 -05001388 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnayc6b55bc2017-11-09 22:48:38 -08001389}
1390# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001391pub fn visit_item_fn<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemFn) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001392 for it in & _i . attrs { _visitor.visit_attribute(it) };
1393 _visitor.visit_visibility(& _i . vis);
David Tolnay360a6342017-12-29 02:22:11 -05001394 if let Some(ref it) = _i . constness { tokens_helper(_visitor, &(it).0) };
David Tolnay9b258702017-12-29 02:24:41 -05001395 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001396 if let Some(ref it) = _i . abi { _visitor.visit_abi(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001397 _visitor.visit_ident(& _i . ident);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001398 _visitor.visit_fn_decl(& * _i . decl);
David Tolnay4a918742017-12-28 16:54:41 -05001399 _visitor.visit_block(& * _i . block);
David Tolnayc6b55bc2017-11-09 22:48:38 -08001400}
1401# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001402pub fn visit_item_foreign_mod<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemForeignMod) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001403 for it in & _i . attrs { _visitor.visit_attribute(it) };
1404 _visitor.visit_abi(& _i . abi);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001405 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001406 for it in & _i . items { _visitor.visit_foreign_item(it) };
David Tolnayc6b55bc2017-11-09 22:48:38 -08001407}
1408# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001409pub fn visit_item_impl<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemImpl) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001410 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay360a6342017-12-29 02:22:11 -05001411 if let Some(ref it) = _i . defaultness { tokens_helper(_visitor, &(it).0) };
David Tolnay9b258702017-12-29 02:24:41 -05001412 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001413 tokens_helper(_visitor, &(& _i . impl_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001414 _visitor.visit_generics(& _i . generics);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001415 if let Some(ref it) = _i . trait_ {
David Tolnay360a6342017-12-29 02:22:11 -05001416 if let Some(ref it) = ( it ) . 0 { tokens_helper(_visitor, &(it).0) };
David Tolnay5c4c0b52017-12-28 17:58:54 -05001417 _visitor.visit_path(& ( it ) . 1);
David Tolnaycc0f0372017-12-28 19:11:04 -05001418 tokens_helper(_visitor, &(& ( it ) . 2).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001419 };
David Tolnay4a918742017-12-28 16:54:41 -05001420 _visitor.visit_type(& * _i . self_ty);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001421 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001422 for it in & _i . items { _visitor.visit_impl_item(it) };
David Tolnayc6b55bc2017-11-09 22:48:38 -08001423}
1424# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001425pub fn visit_item_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMacro) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001426 for it in & _i . attrs { _visitor.visit_attribute(it) };
1427 if let Some(ref it) = _i . ident { _visitor.visit_ident(it) };
1428 _visitor.visit_macro(& _i . mac);
David Tolnaycc0f0372017-12-28 19:11:04 -05001429 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
David Tolnayc6b55bc2017-11-09 22:48:38 -08001430}
1431# [ cfg ( feature = "full" ) ]
David Tolnay500d8322017-12-18 00:32:51 -08001432pub fn visit_item_macro2<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMacro2) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001433 for it in & _i . attrs { _visitor.visit_attribute(it) };
1434 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001435 tokens_helper(_visitor, &(& _i . macro_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001436 _visitor.visit_ident(& _i . ident);
David Tolnayab919512017-12-30 23:31:51 -05001437 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay500d8322017-12-18 00:32:51 -08001438 // Skipped field _i . args;
David Tolnayab919512017-12-30 23:31:51 -05001439 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay500d8322017-12-18 00:32:51 -08001440 // Skipped field _i . body;
1441}
1442# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001443pub fn visit_item_mod<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMod) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001444 for it in & _i . attrs { _visitor.visit_attribute(it) };
1445 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001446 tokens_helper(_visitor, &(& _i . mod_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001447 _visitor.visit_ident(& _i . ident);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001448 if let Some(ref it) = _i . content {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001449 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001450 for it in & ( it ) . 1 { _visitor.visit_item(it) };
1451 };
David Tolnaycc0f0372017-12-28 19:11:04 -05001452 if let Some(ref it) = _i . semi { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04001453}
1454# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001455pub fn visit_item_static<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemStatic) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001456 for it in & _i . attrs { _visitor.visit_attribute(it) };
1457 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001458 tokens_helper(_visitor, &(& _i . static_token).0);
David Tolnay24237fb2017-12-29 02:15:26 -05001459 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001460 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001461 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001462 _visitor.visit_type(& * _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001463 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001464 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -05001465 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001466}
1467# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001468pub fn visit_item_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemStruct) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001469 for it in & _i . attrs { _visitor.visit_attribute(it) };
1470 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001471 tokens_helper(_visitor, &(& _i . struct_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001472 _visitor.visit_ident(& _i . ident);
1473 _visitor.visit_generics(& _i . generics);
David Tolnaye3d41b72017-12-31 15:24:00 -05001474 _visitor.visit_fields(& _i . fields);
David Tolnaycc0f0372017-12-28 19:11:04 -05001475 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04001476}
1477# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001478pub fn visit_item_trait<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemTrait) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001479 for it in & _i . attrs { _visitor.visit_attribute(it) };
1480 _visitor.visit_visibility(& _i . vis);
David Tolnay9b258702017-12-29 02:24:41 -05001481 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001482 if let Some(ref it) = _i . auto_token { tokens_helper(_visitor, &(it).0) };
1483 tokens_helper(_visitor, &(& _i . trait_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001484 _visitor.visit_ident(& _i . ident);
1485 _visitor.visit_generics(& _i . generics);
David Tolnaycc0f0372017-12-28 19:11:04 -05001486 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001487 for el in & _i . supertraits { let it = el.item(); _visitor.visit_type_param_bound(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -05001488 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001489 for it in & _i . items { _visitor.visit_trait_item(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001490}
1491# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001492pub fn visit_item_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001493 for it in & _i . attrs { _visitor.visit_attribute(it) };
1494 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001495 tokens_helper(_visitor, &(& _i . type_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001496 _visitor.visit_ident(& _i . ident);
1497 _visitor.visit_generics(& _i . generics);
David Tolnaycc0f0372017-12-28 19:11:04 -05001498 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001499 _visitor.visit_type(& * _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001500 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001501}
1502# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001503pub fn visit_item_union<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemUnion) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001504 for it in & _i . attrs { _visitor.visit_attribute(it) };
1505 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001506 tokens_helper(_visitor, &(& _i . union_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001507 _visitor.visit_ident(& _i . ident);
1508 _visitor.visit_generics(& _i . generics);
David Tolnaye3d41b72017-12-31 15:24:00 -05001509 _visitor.visit_fields_named(& _i . fields);
Nika Layzell27726662017-10-24 23:16:35 -04001510}
1511# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001512pub fn visit_item_use<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemUse) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001513 for it in & _i . attrs { _visitor.visit_attribute(it) };
1514 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001515 tokens_helper(_visitor, &(& _i . use_token).0);
1516 if let Some(ref it) = _i . leading_colon { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001517 for el in & _i . prefix { let it = el.item(); _visitor.visit_ident(it) };
1518 _visitor.visit_use_tree(& _i . tree);
David Tolnaycc0f0372017-12-28 19:11:04 -05001519 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001520}
David Tolnay2ae520a2017-12-29 11:19:50 -05001521# [ cfg ( feature = "full" ) ]
1522pub fn visit_item_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemVerbatim) {
1523 // Skipped field _i . tts;
1524}
David Tolnaybcd498f2017-12-29 12:02:33 -05001525# [ cfg ( feature = "full" ) ]
1526pub fn visit_label<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Label) {
1527 _visitor.visit_lifetime(& _i . name);
1528 tokens_helper(_visitor, &(& _i . colon_token).0);
1529}
Nika Layzell27726662017-10-24 23:16:35 -04001530
David Tolnay4ba63a02017-12-28 15:53:05 -05001531pub fn visit_lifetime<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Lifetime) {
1532 // Skipped field _i . sym;
1533 _visitor.visit_span(& _i . span);
1534}
1535
Nika Layzellc86173a2017-11-18 13:55:22 -05001536pub fn visit_lifetime_def<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LifetimeDef) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001537 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4ba63a02017-12-28 15:53:05 -05001538 _visitor.visit_lifetime(& _i . lifetime);
David Tolnaycc0f0372017-12-28 19:11:04 -05001539 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4ba63a02017-12-28 15:53:05 -05001540 for el in & _i . bounds { let it = el.item(); _visitor.visit_lifetime(it) };
1541}
1542
1543pub fn visit_lit<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Lit) {
1544 // Skipped field _i . value;
1545 _visitor.visit_span(& _i . span);
Nika Layzell27726662017-10-24 23:16:35 -04001546}
1547# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001548pub fn visit_local<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Local) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001549 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001550 tokens_helper(_visitor, &(& _i . let_token).0);
1551 _visitor.visit_pat(& * _i . pat);
David Tolnay8b4d3022017-12-29 12:11:10 -05001552 if let Some(ref it) = _i . ty {
1553 tokens_helper(_visitor, &(& ( it ) . 0).0);
1554 _visitor.visit_type(& * ( it ) . 1);
1555 };
1556 if let Some(ref it) = _i . init {
1557 tokens_helper(_visitor, &(& ( it ) . 0).0);
1558 _visitor.visit_expr(& * ( it ) . 1);
1559 };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001560 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001561}
Nika Layzell27726662017-10-24 23:16:35 -04001562
Nika Layzellc86173a2017-11-18 13:55:22 -05001563pub fn visit_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Macro) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001564 _visitor.visit_path(& _i . path);
David Tolnaycc0f0372017-12-28 19:11:04 -05001565 tokens_helper(_visitor, &(& _i . bang_token).0);
David Tolnayab919512017-12-30 23:31:51 -05001566 _visitor.visit_macro_delimiter(& _i . delimiter);
1567 // Skipped field _i . tts;
1568}
1569
1570pub fn visit_macro_delimiter<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MacroDelimiter) {
David Tolnayab919512017-12-30 23:31:51 -05001571 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001572 MacroDelimiter::Paren(ref _binding_0, ) => {
David Tolnayab919512017-12-30 23:31:51 -05001573 tokens_helper(_visitor, &(_binding_0).0);
1574 }
David Tolnay6702ade2017-12-30 23:38:15 -05001575 MacroDelimiter::Brace(ref _binding_0, ) => {
David Tolnayab919512017-12-30 23:31:51 -05001576 tokens_helper(_visitor, &(_binding_0).0);
1577 }
David Tolnay6702ade2017-12-30 23:38:15 -05001578 MacroDelimiter::Bracket(ref _binding_0, ) => {
David Tolnayab919512017-12-30 23:31:51 -05001579 tokens_helper(_visitor, &(_binding_0).0);
1580 }
1581 }
David Tolnaydecf28d2017-11-11 11:56:45 -08001582}
David Tolnay14982012017-12-29 00:49:51 -05001583
David Tolnay85b69a42017-12-27 20:43:10 -05001584pub fn visit_member<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Member) {
David Tolnay85b69a42017-12-27 20:43:10 -05001585 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001586 Member::Named(ref _binding_0, ) => {
David Tolnay85b69a42017-12-27 20:43:10 -05001587 _visitor.visit_ident(_binding_0);
1588 }
David Tolnay6702ade2017-12-30 23:38:15 -05001589 Member::Unnamed(ref _binding_0, ) => {
David Tolnay85b69a42017-12-27 20:43:10 -05001590 _visitor.visit_index(_binding_0);
1591 }
1592 }
1593}
David Tolnaydecf28d2017-11-11 11:56:45 -08001594
Nika Layzellc86173a2017-11-18 13:55:22 -05001595pub fn visit_meta_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MetaItem) {
Nika Layzell27726662017-10-24 23:16:35 -04001596 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001597 MetaItem::Term(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001598 _visitor.visit_ident(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001599 }
David Tolnay6702ade2017-12-30 23:38:15 -05001600 MetaItem::List(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001601 _visitor.visit_meta_item_list(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001602 }
David Tolnay6702ade2017-12-30 23:38:15 -05001603 MetaItem::NameValue(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001604 _visitor.visit_meta_name_value(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001605 }
1606 }
1607}
1608
Nika Layzellc86173a2017-11-18 13:55:22 -05001609pub fn visit_meta_item_list<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MetaItemList) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001610 _visitor.visit_ident(& _i . ident);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001611 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001612 for el in & _i . nested { let it = el.item(); _visitor.visit_nested_meta_item(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001613}
1614
Nika Layzellc86173a2017-11-18 13:55:22 -05001615pub fn visit_meta_name_value<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MetaNameValue) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001616 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001617 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4ba63a02017-12-28 15:53:05 -05001618 _visitor.visit_lit(& _i . lit);
Nika Layzell27726662017-10-24 23:16:35 -04001619}
1620# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001621pub fn visit_method_sig<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MethodSig) {
David Tolnay360a6342017-12-29 02:22:11 -05001622 if let Some(ref it) = _i . constness { tokens_helper(_visitor, &(it).0) };
David Tolnay9b258702017-12-29 02:24:41 -05001623 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001624 if let Some(ref it) = _i . abi { _visitor.visit_abi(it) };
1625 _visitor.visit_ident(& _i . ident);
1626 _visitor.visit_fn_decl(& _i . decl);
Nika Layzell27726662017-10-24 23:16:35 -04001627}
David Tolnayd60cfec2017-12-29 00:21:38 -05001628# [ cfg ( feature = "full" ) ]
1629pub fn visit_method_turbofish<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MethodTurbofish) {
1630 tokens_helper(_visitor, &(& _i . colon2_token).0);
1631 tokens_helper(_visitor, &(& _i . lt_token).0);
1632 for el in & _i . args { let it = el.item(); _visitor.visit_generic_method_argument(it) };
1633 tokens_helper(_visitor, &(& _i . gt_token).0);
1634}
Nika Layzell27726662017-10-24 23:16:35 -04001635
Nika Layzellc86173a2017-11-18 13:55:22 -05001636pub fn visit_nested_meta_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast NestedMetaItem) {
Nika Layzell27726662017-10-24 23:16:35 -04001637 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001638 NestedMetaItem::MetaItem(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001639 _visitor.visit_meta_item(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001640 }
David Tolnay6702ade2017-12-30 23:38:15 -05001641 NestedMetaItem::Literal(ref _binding_0, ) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05001642 _visitor.visit_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001643 }
1644 }
1645}
1646
Nika Layzellc08227a2017-12-04 16:30:17 -05001647pub fn visit_parenthesized_generic_arguments<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ParenthesizedGenericArguments) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001648 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001649 for el in & _i . inputs { let it = el.item(); _visitor.visit_type(it) };
1650 _visitor.visit_return_type(& _i . output);
Nika Layzell27726662017-10-24 23:16:35 -04001651}
1652# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001653pub fn visit_pat<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Pat) {
Nika Layzell27726662017-10-24 23:16:35 -04001654 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001655 Pat::Wild(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001656 _visitor.visit_pat_wild(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001657 }
David Tolnay6702ade2017-12-30 23:38:15 -05001658 Pat::Ident(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001659 _visitor.visit_pat_ident(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001660 }
David Tolnay6702ade2017-12-30 23:38:15 -05001661 Pat::Struct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001662 _visitor.visit_pat_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001663 }
David Tolnay6702ade2017-12-30 23:38:15 -05001664 Pat::TupleStruct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001665 _visitor.visit_pat_tuple_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001666 }
David Tolnay6702ade2017-12-30 23:38:15 -05001667 Pat::Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001668 _visitor.visit_pat_path(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001669 }
David Tolnay6702ade2017-12-30 23:38:15 -05001670 Pat::Tuple(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001671 _visitor.visit_pat_tuple(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001672 }
David Tolnay6702ade2017-12-30 23:38:15 -05001673 Pat::Box(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001674 _visitor.visit_pat_box(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001675 }
David Tolnay6702ade2017-12-30 23:38:15 -05001676 Pat::Ref(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001677 _visitor.visit_pat_ref(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001678 }
David Tolnay6702ade2017-12-30 23:38:15 -05001679 Pat::Lit(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001680 _visitor.visit_pat_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001681 }
David Tolnay6702ade2017-12-30 23:38:15 -05001682 Pat::Range(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001683 _visitor.visit_pat_range(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001684 }
David Tolnay6702ade2017-12-30 23:38:15 -05001685 Pat::Slice(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001686 _visitor.visit_pat_slice(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001687 }
David Tolnay6702ade2017-12-30 23:38:15 -05001688 Pat::Macro(ref _binding_0, ) => {
David Tolnay323279a2017-12-29 11:26:32 -05001689 _visitor.visit_pat_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001690 }
David Tolnay6702ade2017-12-30 23:38:15 -05001691 Pat::Verbatim(ref _binding_0, ) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05001692 _visitor.visit_pat_verbatim(_binding_0);
1693 }
Nika Layzell27726662017-10-24 23:16:35 -04001694 }
1695}
1696# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001697pub fn visit_pat_box<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatBox) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001698 tokens_helper(_visitor, &(& _i . box_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001699 _visitor.visit_pat(& * _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001700}
1701# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001702pub fn visit_pat_ident<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatIdent) {
David Tolnay24237fb2017-12-29 02:15:26 -05001703 if let Some(ref it) = _i . by_ref { tokens_helper(_visitor, &(it).0) };
1704 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001705 _visitor.visit_ident(& _i . ident);
David Tolnay8b4d3022017-12-29 12:11:10 -05001706 if let Some(ref it) = _i . subpat {
1707 tokens_helper(_visitor, &(& ( it ) . 0).0);
1708 _visitor.visit_pat(& * ( it ) . 1);
1709 };
Nika Layzell27726662017-10-24 23:16:35 -04001710}
1711# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001712pub fn visit_pat_lit<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatLit) {
David Tolnay4a918742017-12-28 16:54:41 -05001713 _visitor.visit_expr(& * _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -04001714}
1715# [ cfg ( feature = "full" ) ]
David Tolnay323279a2017-12-29 11:26:32 -05001716pub fn visit_pat_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatMacro) {
1717 _visitor.visit_macro(& _i . mac);
1718}
1719# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001720pub fn visit_pat_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatPath) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001721 if let Some(ref it) = _i . qself { _visitor.visit_qself(it) };
1722 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -04001723}
1724# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001725pub fn visit_pat_range<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatRange) {
David Tolnay4a918742017-12-28 16:54:41 -05001726 _visitor.visit_expr(& * _i . lo);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001727 _visitor.visit_range_limits(& _i . limits);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001728 _visitor.visit_expr(& * _i . hi);
Nika Layzell27726662017-10-24 23:16:35 -04001729}
1730# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001731pub fn visit_pat_ref<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatRef) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001732 tokens_helper(_visitor, &(& _i . and_token).0);
David Tolnay24237fb2017-12-29 02:15:26 -05001733 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001734 _visitor.visit_pat(& * _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001735}
1736# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001737pub fn visit_pat_slice<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatSlice) {
David Tolnay4a3f59a2017-12-28 21:21:12 -05001738 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001739 for el in & _i . front { let it = el.item(); _visitor.visit_pat(it) };
David Tolnay4a918742017-12-28 16:54:41 -05001740 if let Some(ref it) = _i . middle { _visitor.visit_pat(& * * it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001741 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
David Tolnay41871922017-12-29 01:53:45 -05001742 if let Some(ref it) = _i . comma_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001743 for el in & _i . back { let it = el.item(); _visitor.visit_pat(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001744}
1745# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001746pub fn visit_pat_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatStruct) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001747 _visitor.visit_path(& _i . path);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001748 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001749 for el in & _i . fields { let it = el.item(); _visitor.visit_field_pat(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001750 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04001751}
1752# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001753pub fn visit_pat_tuple<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatTuple) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001754 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay41871922017-12-29 01:53:45 -05001755 for el in & _i . front { let it = el.item(); _visitor.visit_pat(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001756 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
David Tolnay41871922017-12-29 01:53:45 -05001757 if let Some(ref it) = _i . comma_token { tokens_helper(_visitor, &(it).0) };
1758 for el in & _i . back { let it = el.item(); _visitor.visit_pat(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001759}
1760# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001761pub fn visit_pat_tuple_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatTupleStruct) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001762 _visitor.visit_path(& _i . path);
1763 _visitor.visit_pat_tuple(& _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001764}
1765# [ cfg ( feature = "full" ) ]
David Tolnay2ae520a2017-12-29 11:19:50 -05001766pub fn visit_pat_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatVerbatim) {
1767 // Skipped field _i . tts;
1768}
1769# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001770pub fn visit_pat_wild<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatWild) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001771 tokens_helper(_visitor, &(& _i . underscore_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001772}
1773
Nika Layzellc86173a2017-11-18 13:55:22 -05001774pub fn visit_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Path) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001775 if let Some(ref it) = _i . leading_colon { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001776 for el in & _i . segments { let it = el.item(); _visitor.visit_path_segment(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001777}
Nika Layzellc08227a2017-12-04 16:30:17 -05001778
1779pub fn visit_path_arguments<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PathArguments) {
Nika Layzellc08227a2017-12-04 16:30:17 -05001780 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001781 PathArguments::None => { }
1782 PathArguments::AngleBracketed(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001783 _visitor.visit_angle_bracketed_generic_arguments(_binding_0);
Nika Layzellc08227a2017-12-04 16:30:17 -05001784 }
David Tolnay6702ade2017-12-30 23:38:15 -05001785 PathArguments::Parenthesized(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001786 _visitor.visit_parenthesized_generic_arguments(_binding_0);
Nika Layzellc08227a2017-12-04 16:30:17 -05001787 }
1788 }
1789}
Nika Layzell27726662017-10-24 23:16:35 -04001790
Nika Layzellc86173a2017-11-18 13:55:22 -05001791pub fn visit_path_segment<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PathSegment) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001792 _visitor.visit_ident(& _i . ident);
1793 _visitor.visit_path_arguments(& _i . arguments);
Nika Layzell27726662017-10-24 23:16:35 -04001794}
Nika Layzell27726662017-10-24 23:16:35 -04001795
Nika Layzellc86173a2017-11-18 13:55:22 -05001796pub fn visit_poly_trait_ref<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PolyTraitRef) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001797 if let Some(ref it) = _i . bound_lifetimes { _visitor.visit_bound_lifetimes(it) };
1798 _visitor.visit_path(& _i . trait_ref);
Nika Layzell27726662017-10-24 23:16:35 -04001799}
1800
Nika Layzellc86173a2017-11-18 13:55:22 -05001801pub fn visit_qself<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast QSelf) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001802 tokens_helper(_visitor, &(& _i . lt_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001803 _visitor.visit_type(& * _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -04001804 // Skipped field _i . position;
David Tolnaycc0f0372017-12-28 19:11:04 -05001805 if let Some(ref it) = _i . as_token { tokens_helper(_visitor, &(it).0) };
1806 tokens_helper(_visitor, &(& _i . gt_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001807}
1808# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001809pub fn visit_range_limits<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast RangeLimits) {
Nika Layzell27726662017-10-24 23:16:35 -04001810 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001811 RangeLimits::HalfOpen(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05001812 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04001813 }
David Tolnay6702ade2017-12-30 23:38:15 -05001814 RangeLimits::Closed(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05001815 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04001816 }
1817 }
1818}
David Tolnayf93b90d2017-11-11 19:21:26 -08001819
Nika Layzellc86173a2017-11-18 13:55:22 -05001820pub fn visit_return_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ReturnType) {
David Tolnayf93b90d2017-11-11 19:21:26 -08001821 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001822 ReturnType::Default => { }
1823 ReturnType::Type(ref _binding_0, ref _binding_1, ) => {
David Tolnay4a3f59a2017-12-28 21:21:12 -05001824 tokens_helper(_visitor, &(_binding_0).0);
1825 _visitor.visit_type(& * * _binding_1);
David Tolnayf93b90d2017-11-11 19:21:26 -08001826 }
1827 }
1828}
Nika Layzellefb83ba2017-12-19 18:23:55 -05001829
1830pub fn visit_span<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Span) {
1831}
Nika Layzell27726662017-10-24 23:16:35 -04001832# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001833pub fn visit_stmt<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Stmt) {
Nika Layzell27726662017-10-24 23:16:35 -04001834 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001835 Stmt::Local(ref _binding_0, ) => {
David Tolnay4a918742017-12-28 16:54:41 -05001836 _visitor.visit_local(& * * _binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001837 }
David Tolnay6702ade2017-12-30 23:38:15 -05001838 Stmt::Item(ref _binding_0, ) => {
David Tolnay4a918742017-12-28 16:54:41 -05001839 _visitor.visit_item(& * * _binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001840 }
David Tolnay6702ade2017-12-30 23:38:15 -05001841 Stmt::Expr(ref _binding_0, ) => {
David Tolnay4a918742017-12-28 16:54:41 -05001842 _visitor.visit_expr(& * * _binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001843 }
David Tolnay6702ade2017-12-30 23:38:15 -05001844 Stmt::Semi(ref _binding_0, ref _binding_1, ) => {
David Tolnay4a918742017-12-28 16:54:41 -05001845 _visitor.visit_expr(& * * _binding_0);
David Tolnaycc0f0372017-12-28 19:11:04 -05001846 tokens_helper(_visitor, &(_binding_1).0);
Nika Layzell27726662017-10-24 23:16:35 -04001847 }
Nika Layzell27726662017-10-24 23:16:35 -04001848 }
1849}
1850
Nika Layzellc86173a2017-11-18 13:55:22 -05001851pub fn visit_trait_bound_modifier<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitBoundModifier) {
Nika Layzell27726662017-10-24 23:16:35 -04001852 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001853 TraitBoundModifier::None => { }
1854 TraitBoundModifier::Maybe(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05001855 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04001856 }
1857 }
1858}
1859# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001860pub fn visit_trait_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItem) {
Nika Layzell27726662017-10-24 23:16:35 -04001861 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001862 TraitItem::Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001863 _visitor.visit_trait_item_const(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001864 }
David Tolnay6702ade2017-12-30 23:38:15 -05001865 TraitItem::Method(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001866 _visitor.visit_trait_item_method(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001867 }
David Tolnay6702ade2017-12-30 23:38:15 -05001868 TraitItem::Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001869 _visitor.visit_trait_item_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001870 }
David Tolnay6702ade2017-12-30 23:38:15 -05001871 TraitItem::Macro(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001872 _visitor.visit_trait_item_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001873 }
David Tolnay6702ade2017-12-30 23:38:15 -05001874 TraitItem::Verbatim(ref _binding_0, ) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05001875 _visitor.visit_trait_item_verbatim(_binding_0);
1876 }
Nika Layzell27726662017-10-24 23:16:35 -04001877 }
1878}
1879# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001880pub fn visit_trait_item_const<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemConst) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001881 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001882 tokens_helper(_visitor, &(& _i . const_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001883 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001884 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001885 _visitor.visit_type(& _i . ty);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001886 if let Some(ref it) = _i . default {
David Tolnaycc0f0372017-12-28 19:11:04 -05001887 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001888 _visitor.visit_expr(& ( it ) . 1);
1889 };
David Tolnaycc0f0372017-12-28 19:11:04 -05001890 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnayda705bd2017-11-10 21:58:05 -08001891}
1892# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001893pub fn visit_trait_item_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemMacro) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001894 for it in & _i . attrs { _visitor.visit_attribute(it) };
1895 _visitor.visit_macro(& _i . mac);
David Tolnaycc0f0372017-12-28 19:11:04 -05001896 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
David Tolnayda705bd2017-11-10 21:58:05 -08001897}
1898# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001899pub fn visit_trait_item_method<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemMethod) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001900 for it in & _i . attrs { _visitor.visit_attribute(it) };
1901 _visitor.visit_method_sig(& _i . sig);
1902 if let Some(ref it) = _i . default { _visitor.visit_block(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001903 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04001904}
1905# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001906pub fn visit_trait_item_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001907 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001908 tokens_helper(_visitor, &(& _i . type_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001909 _visitor.visit_ident(& _i . ident);
1910 _visitor.visit_generics(& _i . generics);
David Tolnaycc0f0372017-12-28 19:11:04 -05001911 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001912 for el in & _i . bounds { let it = el.item(); _visitor.visit_type_param_bound(it) };
David Tolnay5c4c0b52017-12-28 17:58:54 -05001913 if let Some(ref it) = _i . default {
David Tolnaycc0f0372017-12-28 19:11:04 -05001914 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001915 _visitor.visit_type(& ( it ) . 1);
1916 };
David Tolnaycc0f0372017-12-28 19:11:04 -05001917 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001918}
David Tolnay2ae520a2017-12-29 11:19:50 -05001919# [ cfg ( feature = "full" ) ]
1920pub fn visit_trait_item_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemVerbatim) {
1921 // Skipped field _i . tts;
1922}
Nika Layzell27726662017-10-24 23:16:35 -04001923
Nika Layzellc86173a2017-11-18 13:55:22 -05001924pub fn visit_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Type) {
Nika Layzell27726662017-10-24 23:16:35 -04001925 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001926 Type::Slice(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001927 _visitor.visit_type_slice(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001928 }
David Tolnay6702ade2017-12-30 23:38:15 -05001929 Type::Array(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001930 _visitor.visit_type_array(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001931 }
David Tolnay6702ade2017-12-30 23:38:15 -05001932 Type::Ptr(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001933 _visitor.visit_type_ptr(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001934 }
David Tolnay6702ade2017-12-30 23:38:15 -05001935 Type::Reference(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001936 _visitor.visit_type_reference(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001937 }
David Tolnay6702ade2017-12-30 23:38:15 -05001938 Type::BareFn(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001939 _visitor.visit_type_bare_fn(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001940 }
David Tolnay6702ade2017-12-30 23:38:15 -05001941 Type::Never(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001942 _visitor.visit_type_never(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001943 }
David Tolnay6702ade2017-12-30 23:38:15 -05001944 Type::Tuple(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001945 _visitor.visit_type_tuple(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001946 }
David Tolnay6702ade2017-12-30 23:38:15 -05001947 Type::Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001948 _visitor.visit_type_path(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001949 }
David Tolnay6702ade2017-12-30 23:38:15 -05001950 Type::TraitObject(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001951 _visitor.visit_type_trait_object(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001952 }
David Tolnay6702ade2017-12-30 23:38:15 -05001953 Type::ImplTrait(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001954 _visitor.visit_type_impl_trait(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001955 }
David Tolnay6702ade2017-12-30 23:38:15 -05001956 Type::Paren(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001957 _visitor.visit_type_paren(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001958 }
David Tolnay6702ade2017-12-30 23:38:15 -05001959 Type::Group(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001960 _visitor.visit_type_group(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001961 }
David Tolnay6702ade2017-12-30 23:38:15 -05001962 Type::Infer(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001963 _visitor.visit_type_infer(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001964 }
David Tolnay6702ade2017-12-30 23:38:15 -05001965 Type::Macro(ref _binding_0, ) => {
David Tolnay323279a2017-12-29 11:26:32 -05001966 _visitor.visit_type_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001967 }
David Tolnay6702ade2017-12-30 23:38:15 -05001968 Type::Verbatim(ref _binding_0, ) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05001969 _visitor.visit_type_verbatim(_binding_0);
1970 }
Nika Layzell27726662017-10-24 23:16:35 -04001971 }
1972}
1973
Nika Layzellc86173a2017-11-18 13:55:22 -05001974pub fn visit_type_array<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeArray) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001975 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05001976 _visitor.visit_type(& * _i . elem);
David Tolnaycc0f0372017-12-28 19:11:04 -05001977 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05001978 _visitor.visit_expr(& _i . len);
Nika Layzell27726662017-10-24 23:16:35 -04001979}
1980
Nika Layzellc86173a2017-11-18 13:55:22 -05001981pub fn visit_type_bare_fn<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeBareFn) {
David Tolnaybe7a9592017-12-29 02:39:53 -05001982 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
1983 if let Some(ref it) = _i . abi { _visitor.visit_abi(it) };
1984 tokens_helper(_visitor, &(& _i . fn_token).0);
1985 if let Some(ref it) = _i . lifetimes { _visitor.visit_bound_lifetimes(it) };
1986 tokens_helper(_visitor, &(& _i . paren_token).0);
1987 for el in & _i . inputs { let it = el.item(); _visitor.visit_bare_fn_arg(it) };
1988 if let Some(ref it) = _i . variadic { tokens_helper(_visitor, &(it).0) };
1989 _visitor.visit_return_type(& _i . output);
Nika Layzell27726662017-10-24 23:16:35 -04001990}
1991
Nika Layzellc86173a2017-11-18 13:55:22 -05001992pub fn visit_type_group<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeGroup) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001993 tokens_helper(_visitor, &(& _i . group_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05001994 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04001995}
1996
Nika Layzellc86173a2017-11-18 13:55:22 -05001997pub fn visit_type_impl_trait<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeImplTrait) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001998 tokens_helper(_visitor, &(& _i . impl_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001999 for el in & _i . bounds { let it = el.item(); _visitor.visit_type_param_bound(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002000}
2001
Nika Layzellc86173a2017-11-18 13:55:22 -05002002pub fn visit_type_infer<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeInfer) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002003 tokens_helper(_visitor, &(& _i . underscore_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04002004}
2005
David Tolnay323279a2017-12-29 11:26:32 -05002006pub fn visit_type_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeMacro) {
2007 _visitor.visit_macro(& _i . mac);
2008}
2009
Nika Layzellc86173a2017-11-18 13:55:22 -05002010pub fn visit_type_never<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeNever) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002011 tokens_helper(_visitor, &(& _i . bang_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04002012}
2013
Nika Layzellc86173a2017-11-18 13:55:22 -05002014pub fn visit_type_param<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParam) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002015 for it in & _i . attrs { _visitor.visit_attribute(it) };
2016 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05002017 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05002018 for el in & _i . bounds { let it = el.item(); _visitor.visit_type_param_bound(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05002019 if let Some(ref it) = _i . eq_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05002020 if let Some(ref it) = _i . default { _visitor.visit_type(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002021}
2022
Nika Layzellc86173a2017-11-18 13:55:22 -05002023pub fn visit_type_param_bound<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParamBound) {
Nika Layzell27726662017-10-24 23:16:35 -04002024 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05002025 TypeParamBound::Trait(ref _binding_0, ref _binding_1, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002026 _visitor.visit_poly_trait_ref(_binding_0);
2027 _visitor.visit_trait_bound_modifier(_binding_1);
Nika Layzell27726662017-10-24 23:16:35 -04002028 }
David Tolnay6702ade2017-12-30 23:38:15 -05002029 TypeParamBound::Region(ref _binding_0, ) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05002030 _visitor.visit_lifetime(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002031 }
2032 }
2033}
2034
Nika Layzellc86173a2017-11-18 13:55:22 -05002035pub fn visit_type_paren<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParen) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002036 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05002037 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04002038}
2039
Nika Layzellc86173a2017-11-18 13:55:22 -05002040pub fn visit_type_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypePath) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002041 if let Some(ref it) = _i . qself { _visitor.visit_qself(it) };
2042 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -04002043}
2044
Nika Layzellc86173a2017-11-18 13:55:22 -05002045pub fn visit_type_ptr<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypePtr) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002046 tokens_helper(_visitor, &(& _i . star_token).0);
2047 if let Some(ref it) = _i . const_token { tokens_helper(_visitor, &(it).0) };
David Tolnay136aaa32017-12-29 02:37:36 -05002048 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
2049 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04002050}
2051
Nika Layzellc86173a2017-11-18 13:55:22 -05002052pub fn visit_type_reference<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeReference) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002053 tokens_helper(_visitor, &(& _i . and_token).0);
David Tolnay4ba63a02017-12-28 15:53:05 -05002054 if let Some(ref it) = _i . lifetime { _visitor.visit_lifetime(it) };
David Tolnay136aaa32017-12-29 02:37:36 -05002055 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
2056 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04002057}
2058
Nika Layzellc86173a2017-11-18 13:55:22 -05002059pub fn visit_type_slice<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeSlice) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002060 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05002061 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04002062}
2063
Nika Layzellc86173a2017-11-18 13:55:22 -05002064pub fn visit_type_trait_object<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeTraitObject) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002065 if let Some(ref it) = _i . dyn_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05002066 for el in & _i . bounds { let it = el.item(); _visitor.visit_type_param_bound(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002067}
2068
David Tolnay05362582017-12-26 01:33:57 -05002069pub fn visit_type_tuple<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeTuple) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002070 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05002071 for el in & _i . elems { let it = el.item(); _visitor.visit_type(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002072}
2073
David Tolnay2ae520a2017-12-29 11:19:50 -05002074pub fn visit_type_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeVerbatim) {
2075 // Skipped field _i . tts;
2076}
2077
Nika Layzellc86173a2017-11-18 13:55:22 -05002078pub fn visit_un_op<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UnOp) {
Nika Layzell27726662017-10-24 23:16:35 -04002079 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05002080 UnOp::Deref(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05002081 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04002082 }
David Tolnay6702ade2017-12-30 23:38:15 -05002083 UnOp::Not(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05002084 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04002085 }
David Tolnay6702ade2017-12-30 23:38:15 -05002086 UnOp::Neg(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05002087 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04002088 }
2089 }
2090}
David Tolnay5f332a92017-12-26 00:42:45 -05002091# [ cfg ( feature = "full" ) ]
2092pub fn visit_use_glob<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseGlob) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002093 tokens_helper(_visitor, &(& _i . star_token).0);
David Tolnay5f332a92017-12-26 00:42:45 -05002094}
2095# [ cfg ( feature = "full" ) ]
2096pub fn visit_use_list<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseList) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002097 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05002098 for el in & _i . items { let it = el.item(); _visitor.visit_use_tree(it) };
David Tolnay5f332a92017-12-26 00:42:45 -05002099}
2100# [ cfg ( feature = "full" ) ]
2101pub fn visit_use_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UsePath) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002102 _visitor.visit_ident(& _i . ident);
David Tolnay5c4c0b52017-12-28 17:58:54 -05002103 if let Some(ref it) = _i . rename {
David Tolnaycc0f0372017-12-28 19:11:04 -05002104 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05002105 _visitor.visit_ident(& ( it ) . 1);
2106 };
David Tolnay5f332a92017-12-26 00:42:45 -05002107}
2108# [ cfg ( feature = "full" ) ]
2109pub fn visit_use_tree<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseTree) {
David Tolnay5f332a92017-12-26 00:42:45 -05002110 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05002111 UseTree::Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002112 _visitor.visit_use_path(_binding_0);
David Tolnay5f332a92017-12-26 00:42:45 -05002113 }
David Tolnay6702ade2017-12-30 23:38:15 -05002114 UseTree::Glob(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002115 _visitor.visit_use_glob(_binding_0);
David Tolnay5f332a92017-12-26 00:42:45 -05002116 }
David Tolnay6702ade2017-12-30 23:38:15 -05002117 UseTree::List(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002118 _visitor.visit_use_list(_binding_0);
David Tolnay5f332a92017-12-26 00:42:45 -05002119 }
2120 }
2121}
Nika Layzell27726662017-10-24 23:16:35 -04002122
Nika Layzellc86173a2017-11-18 13:55:22 -05002123pub fn visit_variant<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Variant) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002124 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05002125 _visitor.visit_ident(& _i . ident);
David Tolnaye3d41b72017-12-31 15:24:00 -05002126 _visitor.visit_fields(& _i . fields);
David Tolnaye67902a2017-12-28 22:12:00 -05002127 if let Some(ref it) = _i . discriminant {
2128 tokens_helper(_visitor, &(& ( it ) . 0).0);
2129 _visitor.visit_expr(& ( it ) . 1);
2130 };
Nika Layzell27726662017-10-24 23:16:35 -04002131}
2132
Nika Layzellc86173a2017-11-18 13:55:22 -05002133pub fn visit_vis_crate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisCrate) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002134 tokens_helper(_visitor, &(& _i . pub_token).0);
David Tolnay1e01f9c2017-12-28 20:16:19 -05002135 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnaycc0f0372017-12-28 19:11:04 -05002136 tokens_helper(_visitor, &(& _i . crate_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04002137}
2138
Nika Layzellc86173a2017-11-18 13:55:22 -05002139pub fn visit_vis_public<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisPublic) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002140 tokens_helper(_visitor, &(& _i . pub_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04002141}
2142
Nika Layzellc86173a2017-11-18 13:55:22 -05002143pub fn visit_vis_restricted<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisRestricted) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002144 tokens_helper(_visitor, &(& _i . pub_token).0);
David Tolnay1e01f9c2017-12-28 20:16:19 -05002145 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnaycc0f0372017-12-28 19:11:04 -05002146 if let Some(ref it) = _i . in_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a918742017-12-28 16:54:41 -05002147 _visitor.visit_path(& * _i . path);
Nika Layzell27726662017-10-24 23:16:35 -04002148}
2149
Nika Layzellc86173a2017-11-18 13:55:22 -05002150pub fn visit_visibility<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Visibility) {
Nika Layzell27726662017-10-24 23:16:35 -04002151 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05002152 Visibility::Public(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002153 _visitor.visit_vis_public(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002154 }
David Tolnay6702ade2017-12-30 23:38:15 -05002155 Visibility::Crate(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002156 _visitor.visit_vis_crate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002157 }
David Tolnay6702ade2017-12-30 23:38:15 -05002158 Visibility::Restricted(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002159 _visitor.visit_vis_restricted(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002160 }
David Tolnay6702ade2017-12-30 23:38:15 -05002161 Visibility::Inherited => { }
Nika Layzell27726662017-10-24 23:16:35 -04002162 }
2163}
2164
Nika Layzellc86173a2017-11-18 13:55:22 -05002165pub fn visit_where_bound_predicate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WhereBoundPredicate) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002166 if let Some(ref it) = _i . bound_lifetimes { _visitor.visit_bound_lifetimes(it) };
2167 _visitor.visit_type(& _i . bounded_ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05002168 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05002169 for el in & _i . bounds { let it = el.item(); _visitor.visit_type_param_bound(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002170}
2171
Nika Layzellc86173a2017-11-18 13:55:22 -05002172pub fn visit_where_clause<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WhereClause) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002173 tokens_helper(_visitor, &(& _i . where_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05002174 for el in & _i . predicates { let it = el.item(); _visitor.visit_where_predicate(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002175}
2176
Nika Layzellc86173a2017-11-18 13:55:22 -05002177pub fn visit_where_eq_predicate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WhereEqPredicate) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002178 _visitor.visit_type(& _i . lhs_ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05002179 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05002180 _visitor.visit_type(& _i . rhs_ty);
Nika Layzell27726662017-10-24 23:16:35 -04002181}
2182
Nika Layzellc86173a2017-11-18 13:55:22 -05002183pub fn visit_where_predicate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WherePredicate) {
Nika Layzell27726662017-10-24 23:16:35 -04002184 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05002185 WherePredicate::BoundPredicate(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002186 _visitor.visit_where_bound_predicate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002187 }
David Tolnay6702ade2017-12-30 23:38:15 -05002188 WherePredicate::RegionPredicate(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002189 _visitor.visit_where_region_predicate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002190 }
David Tolnay6702ade2017-12-30 23:38:15 -05002191 WherePredicate::EqPredicate(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002192 _visitor.visit_where_eq_predicate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002193 }
2194 }
2195}
2196
Nika Layzellc86173a2017-11-18 13:55:22 -05002197pub fn visit_where_region_predicate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WhereRegionPredicate) {
David Tolnay4ba63a02017-12-28 15:53:05 -05002198 _visitor.visit_lifetime(& _i . lifetime);
David Tolnaycc0f0372017-12-28 19:11:04 -05002199 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4ba63a02017-12-28 15:53:05 -05002200 for el in & _i . bounds { let it = el.item(); _visitor.visit_lifetime(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002201}
2202