blob: b9338a5919b5450c18244103618fc267f6f711cf [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 Tolnay6eff4da2018-01-01 20:27:45 -080013use punctuated::Punctuated;
David Tolnay98942562017-12-26 21:24:35 -050014use proc_macro2::Span;
David Tolnaycc0f0372017-12-28 19:11:04 -050015use gen::helper::visit::*;
Nika Layzell27726662017-10-24 23:16:35 -040016
Nika Layzell4ab8d6e2017-10-26 09:45:49 -040017
18#[cfg(feature = "full")]
19macro_rules! full {
20 ($e:expr) => { $e }
21}
22
23#[cfg(not(feature = "full"))]
24macro_rules! full {
25 ($e:expr) => { unreachable!() }
26}
27
28
Nika Layzell27726662017-10-24 23:16:35 -040029/// Each method of the Visitor trait is a hook to be potentially
30/// overridden. Each method's default implementation recursively visits
31/// the substructure of the input via the corresponding `walk` method;
32/// e.g. the `visit_mod` method by default calls `visit::walk_mod`.
33///
34/// If you want to ensure that your code handles every variant
35/// explicitly, you need to override each method. (And you also need
36/// to monitor future changes to `Visitor` in case a new method with a
37/// new default implementation gets introduced.)
Nika Layzellc86173a2017-11-18 13:55:22 -050038pub trait Visitor<'ast> {
David Tolnay3cfd1d32018-01-03 00:22:08 -080039# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050040fn visit_abi(&mut self, i: &'ast Abi) { visit_abi(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080041# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc08227a2017-12-04 16:30:17 -050042fn visit_angle_bracketed_generic_arguments(&mut self, i: &'ast AngleBracketedGenericArguments) { visit_angle_bracketed_generic_arguments(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040043# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050044fn visit_arg_captured(&mut self, i: &'ast ArgCaptured) { visit_arg_captured(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040045# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050046fn visit_arg_self(&mut self, i: &'ast ArgSelf) { visit_arg_self(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040047# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050048fn visit_arg_self_ref(&mut self, i: &'ast ArgSelfRef) { visit_arg_self_ref(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080049# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050050fn visit_arm(&mut self, i: &'ast Arm) { visit_arm(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080051# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050052fn visit_attr_style(&mut self, i: &'ast AttrStyle) { visit_attr_style(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080053# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050054fn visit_attribute(&mut self, i: &'ast Attribute) { visit_attribute(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080055# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050056fn visit_bare_fn_arg(&mut self, i: &'ast BareFnArg) { visit_bare_fn_arg(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080057# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050058fn visit_bare_fn_arg_name(&mut self, i: &'ast BareFnArgName) { visit_bare_fn_arg_name(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080059# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050060fn visit_bin_op(&mut self, i: &'ast BinOp) { visit_bin_op(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080061# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay506e43a2017-12-29 11:34:36 -050062fn visit_binding(&mut self, i: &'ast Binding) { visit_binding(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080063# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050064fn visit_block(&mut self, i: &'ast Block) { visit_block(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080065# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050066fn visit_bound_lifetimes(&mut self, i: &'ast BoundLifetimes) { visit_bound_lifetimes(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080067# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellf1fdc0b2017-12-04 19:58:32 -050068fn visit_const_param(&mut self, i: &'ast ConstParam) { visit_const_param(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080069# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnaye3d41b72017-12-31 15:24:00 -050070fn visit_data(&mut self, i: &'ast Data) { visit_data(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080071# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnaye3d41b72017-12-31 15:24:00 -050072fn visit_data_enum(&mut self, i: &'ast DataEnum) { visit_data_enum(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080073# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnaye3d41b72017-12-31 15:24:00 -050074fn visit_data_struct(&mut self, i: &'ast DataStruct) { visit_data_struct(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080075# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnaye3d41b72017-12-31 15:24:00 -050076fn visit_data_union(&mut self, i: &'ast DataUnion) { visit_data_union(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080077# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050078fn visit_derive_input(&mut self, i: &'ast DeriveInput) { visit_derive_input(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080079# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050080fn visit_expr(&mut self, i: &'ast Expr) { visit_expr(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080081# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050082fn visit_expr_addr_of(&mut self, i: &'ast ExprAddrOf) { visit_expr_addr_of(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080083# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050084fn visit_expr_array(&mut self, i: &'ast ExprArray) { visit_expr_array(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080085# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050086fn visit_expr_assign(&mut self, i: &'ast ExprAssign) { visit_expr_assign(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080087# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050088fn visit_expr_assign_op(&mut self, i: &'ast ExprAssignOp) { visit_expr_assign_op(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080089# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050090fn visit_expr_binary(&mut self, i: &'ast ExprBinary) { visit_expr_binary(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080091# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050092fn visit_expr_block(&mut self, i: &'ast ExprBlock) { visit_expr_block(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080093# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050094fn visit_expr_box(&mut self, i: &'ast ExprBox) { visit_expr_box(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080095# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050096fn visit_expr_break(&mut self, i: &'ast ExprBreak) { visit_expr_break(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080097# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050098fn visit_expr_call(&mut self, i: &'ast ExprCall) { visit_expr_call(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080099# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500100fn visit_expr_cast(&mut self, i: &'ast ExprCast) { visit_expr_cast(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800101# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500102fn visit_expr_catch(&mut self, i: &'ast ExprCatch) { visit_expr_catch(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800103# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500104fn visit_expr_closure(&mut self, i: &'ast ExprClosure) { visit_expr_closure(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800105# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500106fn visit_expr_continue(&mut self, i: &'ast ExprContinue) { visit_expr_continue(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800107# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500108fn visit_expr_field(&mut self, i: &'ast ExprField) { visit_expr_field(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800109# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500110fn visit_expr_for_loop(&mut self, i: &'ast ExprForLoop) { visit_expr_for_loop(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800111# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500112fn visit_expr_group(&mut self, i: &'ast ExprGroup) { visit_expr_group(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800113# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500114fn visit_expr_if(&mut self, i: &'ast ExprIf) { visit_expr_if(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800115# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500116fn visit_expr_if_let(&mut self, i: &'ast ExprIfLet) { visit_expr_if_let(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800117# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500118fn visit_expr_in_place(&mut self, i: &'ast ExprInPlace) { visit_expr_in_place(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800119# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500120fn visit_expr_index(&mut self, i: &'ast ExprIndex) { visit_expr_index(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800121# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500122fn visit_expr_lit(&mut self, i: &'ast ExprLit) { visit_expr_lit(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800123# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500124fn visit_expr_loop(&mut self, i: &'ast ExprLoop) { visit_expr_loop(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800125# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500126fn visit_expr_macro(&mut self, i: &'ast ExprMacro) { visit_expr_macro(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800127# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500128fn visit_expr_match(&mut self, i: &'ast ExprMatch) { visit_expr_match(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800129# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500130fn visit_expr_method_call(&mut self, i: &'ast ExprMethodCall) { visit_expr_method_call(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800131# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500132fn visit_expr_paren(&mut self, i: &'ast ExprParen) { visit_expr_paren(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800133# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500134fn visit_expr_path(&mut self, i: &'ast ExprPath) { visit_expr_path(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800135# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500136fn visit_expr_range(&mut self, i: &'ast ExprRange) { visit_expr_range(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800137# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500138fn visit_expr_repeat(&mut self, i: &'ast ExprRepeat) { visit_expr_repeat(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800139# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayc246cd32017-12-28 23:14:32 -0500140fn visit_expr_return(&mut self, i: &'ast ExprReturn) { visit_expr_return(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800141# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500142fn visit_expr_struct(&mut self, i: &'ast ExprStruct) { visit_expr_struct(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800143# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500144fn visit_expr_try(&mut self, i: &'ast ExprTry) { visit_expr_try(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800145# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay05362582017-12-26 01:33:57 -0500146fn visit_expr_tuple(&mut self, i: &'ast ExprTuple) { visit_expr_tuple(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800147# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500148fn visit_expr_type(&mut self, i: &'ast ExprType) { visit_expr_type(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800149# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500150fn visit_expr_unary(&mut self, i: &'ast ExprUnary) { visit_expr_unary(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800151# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzell640832a2017-12-04 13:37:09 -0500152fn visit_expr_unsafe(&mut self, i: &'ast ExprUnsafe) { visit_expr_unsafe(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800153# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay2ae520a2017-12-29 11:19:50 -0500154fn visit_expr_verbatim(&mut self, i: &'ast ExprVerbatim) { visit_expr_verbatim(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800155# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500156fn visit_expr_while(&mut self, i: &'ast ExprWhile) { visit_expr_while(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800157# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500158fn visit_expr_while_let(&mut self, i: &'ast ExprWhileLet) { visit_expr_while_let(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800159# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500160fn visit_expr_yield(&mut self, i: &'ast ExprYield) { visit_expr_yield(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800161# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500162fn visit_field(&mut self, i: &'ast Field) { visit_field(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800163# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500164fn visit_field_pat(&mut self, i: &'ast FieldPat) { visit_field_pat(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800165# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500166fn visit_field_value(&mut self, i: &'ast FieldValue) { visit_field_value(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800167# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnaye3d41b72017-12-31 15:24:00 -0500168fn visit_fields(&mut self, i: &'ast Fields) { visit_fields(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800169# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnaye3d41b72017-12-31 15:24:00 -0500170fn visit_fields_named(&mut self, i: &'ast FieldsNamed) { visit_fields_named(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800171# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnaye3d41b72017-12-31 15:24:00 -0500172fn visit_fields_unnamed(&mut self, i: &'ast FieldsUnnamed) { visit_fields_unnamed(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400173# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500174fn visit_file(&mut self, i: &'ast File) { visit_file(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400175# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500176fn visit_fn_arg(&mut self, i: &'ast FnArg) { visit_fn_arg(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400177# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500178fn visit_fn_decl(&mut self, i: &'ast FnDecl) { visit_fn_decl(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400179# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500180fn visit_foreign_item(&mut self, i: &'ast ForeignItem) { visit_foreign_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400181# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500182fn visit_foreign_item_fn(&mut self, i: &'ast ForeignItemFn) { visit_foreign_item_fn(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400183# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500184fn visit_foreign_item_static(&mut self, i: &'ast ForeignItemStatic) { visit_foreign_item_static(self, i) }
David Tolnay199bcbb2017-11-12 10:33:52 -0800185# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500186fn visit_foreign_item_type(&mut self, i: &'ast ForeignItemType) { visit_foreign_item_type(self, i) }
David Tolnay2ae520a2017-12-29 11:19:50 -0500187# [ cfg ( feature = "full" ) ]
188fn visit_foreign_item_verbatim(&mut self, i: &'ast ForeignItemVerbatim) { visit_foreign_item_verbatim(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800189# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc08227a2017-12-04 16:30:17 -0500190fn visit_generic_argument(&mut self, i: &'ast GenericArgument) { visit_generic_argument(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800191# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnayd60cfec2017-12-29 00:21:38 -0500192fn visit_generic_method_argument(&mut self, i: &'ast GenericMethodArgument) { visit_generic_method_argument(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800193# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayc2f1aba2017-11-12 20:29:22 -0800194fn visit_generic_param(&mut self, i: &'ast GenericParam) { visit_generic_param(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800195# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500196fn visit_generics(&mut self, i: &'ast Generics) { visit_generics(self, i) }
Nika Layzellefb83ba2017-12-19 18:23:55 -0500197
198fn visit_ident(&mut self, i: &'ast Ident) { visit_ident(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400199# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500200fn visit_impl_item(&mut self, i: &'ast ImplItem) { visit_impl_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400201# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500202fn visit_impl_item_const(&mut self, i: &'ast ImplItemConst) { visit_impl_item_const(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400203# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500204fn visit_impl_item_macro(&mut self, i: &'ast ImplItemMacro) { visit_impl_item_macro(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400205# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500206fn visit_impl_item_method(&mut self, i: &'ast ImplItemMethod) { visit_impl_item_method(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400207# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500208fn visit_impl_item_type(&mut self, i: &'ast ImplItemType) { visit_impl_item_type(self, i) }
David Tolnay2ae520a2017-12-29 11:19:50 -0500209# [ cfg ( feature = "full" ) ]
210fn visit_impl_item_verbatim(&mut self, i: &'ast ImplItemVerbatim) { visit_impl_item_verbatim(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800211# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay85b69a42017-12-27 20:43:10 -0500212fn visit_index(&mut self, i: &'ast Index) { visit_index(self, i) }
213# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500214fn visit_item(&mut self, i: &'ast Item) { visit_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400215# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500216fn visit_item_const(&mut self, i: &'ast ItemConst) { visit_item_const(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400217# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500218fn visit_item_enum(&mut self, i: &'ast ItemEnum) { visit_item_enum(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400219# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500220fn visit_item_extern_crate(&mut self, i: &'ast ItemExternCrate) { visit_item_extern_crate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400221# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500222fn visit_item_fn(&mut self, i: &'ast ItemFn) { visit_item_fn(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400223# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500224fn visit_item_foreign_mod(&mut self, i: &'ast ItemForeignMod) { visit_item_foreign_mod(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400225# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500226fn visit_item_impl(&mut self, i: &'ast ItemImpl) { visit_item_impl(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400227# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500228fn visit_item_macro(&mut self, i: &'ast ItemMacro) { visit_item_macro(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400229# [ cfg ( feature = "full" ) ]
David Tolnay500d8322017-12-18 00:32:51 -0800230fn visit_item_macro2(&mut self, i: &'ast ItemMacro2) { visit_item_macro2(self, i) }
231# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500232fn visit_item_mod(&mut self, i: &'ast ItemMod) { visit_item_mod(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400233# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500234fn visit_item_static(&mut self, i: &'ast ItemStatic) { visit_item_static(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400235# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500236fn visit_item_struct(&mut self, i: &'ast ItemStruct) { visit_item_struct(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400237# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500238fn visit_item_trait(&mut self, i: &'ast ItemTrait) { visit_item_trait(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400239# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500240fn visit_item_type(&mut self, i: &'ast ItemType) { visit_item_type(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400241# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500242fn visit_item_union(&mut self, i: &'ast ItemUnion) { visit_item_union(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400243# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500244fn visit_item_use(&mut self, i: &'ast ItemUse) { visit_item_use(self, i) }
David Tolnay2ae520a2017-12-29 11:19:50 -0500245# [ cfg ( feature = "full" ) ]
246fn visit_item_verbatim(&mut self, i: &'ast ItemVerbatim) { visit_item_verbatim(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800247# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnaybcd498f2017-12-29 12:02:33 -0500248fn visit_label(&mut self, i: &'ast Label) { visit_label(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800249# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4ba63a02017-12-28 15:53:05 -0500250fn visit_lifetime(&mut self, i: &'ast Lifetime) { visit_lifetime(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800251# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500252fn visit_lifetime_def(&mut self, i: &'ast LifetimeDef) { visit_lifetime_def(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800253# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4ba63a02017-12-28 15:53:05 -0500254fn visit_lit(&mut self, i: &'ast Lit) { visit_lit(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800255# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500256fn visit_local(&mut self, i: &'ast Local) { visit_local(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800257# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500258fn visit_macro(&mut self, i: &'ast Macro) { visit_macro(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800259# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayab919512017-12-30 23:31:51 -0500260fn visit_macro_delimiter(&mut self, i: &'ast MacroDelimiter) { visit_macro_delimiter(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800261# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay85b69a42017-12-27 20:43:10 -0500262fn visit_member(&mut self, i: &'ast Member) { visit_member(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800263# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500264fn visit_meta_item(&mut self, i: &'ast MetaItem) { visit_meta_item(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800265# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500266fn visit_meta_item_list(&mut self, i: &'ast MetaItemList) { visit_meta_item_list(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800267# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500268fn visit_meta_name_value(&mut self, i: &'ast MetaNameValue) { visit_meta_name_value(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400269# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500270fn visit_method_sig(&mut self, i: &'ast MethodSig) { visit_method_sig(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800271# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnayd60cfec2017-12-29 00:21:38 -0500272fn visit_method_turbofish(&mut self, i: &'ast MethodTurbofish) { visit_method_turbofish(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800273# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500274fn visit_nested_meta_item(&mut self, i: &'ast NestedMetaItem) { visit_nested_meta_item(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800275# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc08227a2017-12-04 16:30:17 -0500276fn visit_parenthesized_generic_arguments(&mut self, i: &'ast ParenthesizedGenericArguments) { visit_parenthesized_generic_arguments(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800277# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500278fn visit_pat(&mut self, i: &'ast Pat) { visit_pat(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800279# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500280fn visit_pat_box(&mut self, i: &'ast PatBox) { visit_pat_box(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800281# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500282fn visit_pat_ident(&mut self, i: &'ast PatIdent) { visit_pat_ident(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800283# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500284fn visit_pat_lit(&mut self, i: &'ast PatLit) { visit_pat_lit(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800285# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay323279a2017-12-29 11:26:32 -0500286fn visit_pat_macro(&mut self, i: &'ast PatMacro) { visit_pat_macro(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800287# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500288fn visit_pat_path(&mut self, i: &'ast PatPath) { visit_pat_path(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800289# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500290fn visit_pat_range(&mut self, i: &'ast PatRange) { visit_pat_range(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800291# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500292fn visit_pat_ref(&mut self, i: &'ast PatRef) { visit_pat_ref(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800293# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500294fn visit_pat_slice(&mut self, i: &'ast PatSlice) { visit_pat_slice(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800295# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500296fn visit_pat_struct(&mut self, i: &'ast PatStruct) { visit_pat_struct(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800297# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500298fn visit_pat_tuple(&mut self, i: &'ast PatTuple) { visit_pat_tuple(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800299# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500300fn visit_pat_tuple_struct(&mut self, i: &'ast PatTupleStruct) { visit_pat_tuple_struct(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800301# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay2ae520a2017-12-29 11:19:50 -0500302fn visit_pat_verbatim(&mut self, i: &'ast PatVerbatim) { visit_pat_verbatim(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800303# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500304fn visit_pat_wild(&mut self, i: &'ast PatWild) { visit_pat_wild(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800305# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500306fn visit_path(&mut self, i: &'ast Path) { visit_path(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800307# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc08227a2017-12-04 16:30:17 -0500308fn visit_path_arguments(&mut self, i: &'ast PathArguments) { visit_path_arguments(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800309# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500310fn visit_path_segment(&mut self, i: &'ast PathSegment) { visit_path_segment(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800311# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayd4add852018-01-01 20:13:24 -0800312fn visit_predicate_eq(&mut self, i: &'ast PredicateEq) { visit_predicate_eq(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800313# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayd4add852018-01-01 20:13:24 -0800314fn visit_predicate_lifetime(&mut self, i: &'ast PredicateLifetime) { visit_predicate_lifetime(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800315# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayd4add852018-01-01 20:13:24 -0800316fn visit_predicate_type(&mut self, i: &'ast PredicateType) { visit_predicate_type(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800317# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500318fn visit_qself(&mut self, i: &'ast QSelf) { visit_qself(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800319# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500320fn visit_range_limits(&mut self, i: &'ast RangeLimits) { visit_range_limits(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800321# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500322fn visit_return_type(&mut self, i: &'ast ReturnType) { visit_return_type(self, i) }
Nika Layzellefb83ba2017-12-19 18:23:55 -0500323
324fn visit_span(&mut self, i: &'ast Span) { visit_span(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800325# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500326fn visit_stmt(&mut self, i: &'ast Stmt) { visit_stmt(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800327# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay40fb8ce2018-01-02 10:53:46 -0800328fn visit_trait_bound(&mut self, i: &'ast TraitBound) { visit_trait_bound(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800329# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500330fn visit_trait_bound_modifier(&mut self, i: &'ast TraitBoundModifier) { visit_trait_bound_modifier(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400331# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500332fn visit_trait_item(&mut self, i: &'ast TraitItem) { visit_trait_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400333# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500334fn visit_trait_item_const(&mut self, i: &'ast TraitItemConst) { visit_trait_item_const(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400335# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500336fn visit_trait_item_macro(&mut self, i: &'ast TraitItemMacro) { visit_trait_item_macro(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400337# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500338fn visit_trait_item_method(&mut self, i: &'ast TraitItemMethod) { visit_trait_item_method(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400339# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500340fn visit_trait_item_type(&mut self, i: &'ast TraitItemType) { visit_trait_item_type(self, i) }
David Tolnay2ae520a2017-12-29 11:19:50 -0500341# [ cfg ( feature = "full" ) ]
342fn visit_trait_item_verbatim(&mut self, i: &'ast TraitItemVerbatim) { visit_trait_item_verbatim(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800343# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500344fn visit_type(&mut self, i: &'ast Type) { visit_type(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800345# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500346fn visit_type_array(&mut self, i: &'ast TypeArray) { visit_type_array(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800347# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500348fn visit_type_bare_fn(&mut self, i: &'ast TypeBareFn) { visit_type_bare_fn(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800349# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500350fn visit_type_group(&mut self, i: &'ast TypeGroup) { visit_type_group(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800351# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500352fn visit_type_impl_trait(&mut self, i: &'ast TypeImplTrait) { visit_type_impl_trait(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800353# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500354fn visit_type_infer(&mut self, i: &'ast TypeInfer) { visit_type_infer(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800355# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay323279a2017-12-29 11:26:32 -0500356fn visit_type_macro(&mut self, i: &'ast TypeMacro) { visit_type_macro(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800357# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500358fn visit_type_never(&mut self, i: &'ast TypeNever) { visit_type_never(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800359# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500360fn visit_type_param(&mut self, i: &'ast TypeParam) { visit_type_param(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800361# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500362fn visit_type_param_bound(&mut self, i: &'ast TypeParamBound) { visit_type_param_bound(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800363# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500364fn visit_type_paren(&mut self, i: &'ast TypeParen) { visit_type_paren(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800365# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500366fn visit_type_path(&mut self, i: &'ast TypePath) { visit_type_path(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800367# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500368fn visit_type_ptr(&mut self, i: &'ast TypePtr) { visit_type_ptr(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800369# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500370fn visit_type_reference(&mut self, i: &'ast TypeReference) { visit_type_reference(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800371# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500372fn visit_type_slice(&mut self, i: &'ast TypeSlice) { visit_type_slice(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800373# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500374fn visit_type_trait_object(&mut self, i: &'ast TypeTraitObject) { visit_type_trait_object(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800375# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay05362582017-12-26 01:33:57 -0500376fn visit_type_tuple(&mut self, i: &'ast TypeTuple) { visit_type_tuple(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800377# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay2ae520a2017-12-29 11:19:50 -0500378fn visit_type_verbatim(&mut self, i: &'ast TypeVerbatim) { visit_type_verbatim(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800379# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500380fn visit_un_op(&mut self, i: &'ast UnOp) { visit_un_op(self, i) }
David Tolnay5f332a92017-12-26 00:42:45 -0500381# [ cfg ( feature = "full" ) ]
382fn visit_use_glob(&mut self, i: &'ast UseGlob) { visit_use_glob(self, i) }
383# [ cfg ( feature = "full" ) ]
384fn visit_use_list(&mut self, i: &'ast UseList) { visit_use_list(self, i) }
385# [ cfg ( feature = "full" ) ]
386fn visit_use_path(&mut self, i: &'ast UsePath) { visit_use_path(self, i) }
387# [ cfg ( feature = "full" ) ]
388fn visit_use_tree(&mut self, i: &'ast UseTree) { visit_use_tree(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800389# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500390fn visit_variant(&mut self, i: &'ast Variant) { visit_variant(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800391# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500392fn visit_vis_crate(&mut self, i: &'ast VisCrate) { visit_vis_crate(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800393# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500394fn visit_vis_public(&mut self, i: &'ast VisPublic) { visit_vis_public(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800395# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500396fn visit_vis_restricted(&mut self, i: &'ast VisRestricted) { visit_vis_restricted(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800397# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500398fn visit_visibility(&mut self, i: &'ast Visibility) { visit_visibility(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800399# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500400fn visit_where_clause(&mut self, i: &'ast WhereClause) { visit_where_clause(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800401# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500402fn visit_where_predicate(&mut self, i: &'ast WherePredicate) { visit_where_predicate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400403
Nika Layzell27726662017-10-24 23:16:35 -0400404}
405
David Tolnay3cfd1d32018-01-03 00:22:08 -0800406# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500407pub fn visit_abi<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Abi) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500408 tokens_helper(_visitor, &(& _i . extern_token).0);
David Tolnayd5125762017-12-29 02:42:17 -0500409 if let Some(ref it) = _i . name { _visitor.visit_lit(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400410}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800411# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc08227a2017-12-04 16:30:17 -0500412pub fn visit_angle_bracketed_generic_arguments<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast AngleBracketedGenericArguments) {
David Tolnay2d4e08a2017-12-28 23:54:07 -0500413 if let Some(ref it) = _i . colon2_token { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500414 tokens_helper(_visitor, &(& _i . lt_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -0800415 for el in Punctuated::elements(& _i . args) { let it = el.item(); _visitor.visit_generic_argument(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500416 tokens_helper(_visitor, &(& _i . gt_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400417}
418# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500419pub fn visit_arg_captured<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ArgCaptured) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500420 _visitor.visit_pat(& _i . pat);
David Tolnaycc0f0372017-12-28 19:11:04 -0500421 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500422 _visitor.visit_type(& _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -0400423}
424# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500425pub fn visit_arg_self<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ArgSelf) {
David Tolnay24237fb2017-12-29 02:15:26 -0500426 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500427 tokens_helper(_visitor, &(& _i . self_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400428}
429# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500430pub fn visit_arg_self_ref<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ArgSelfRef) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500431 tokens_helper(_visitor, &(& _i . and_token).0);
David Tolnay4ba63a02017-12-28 15:53:05 -0500432 if let Some(ref it) = _i . lifetime { _visitor.visit_lifetime(it) };
David Tolnay24237fb2017-12-29 02:15:26 -0500433 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500434 tokens_helper(_visitor, &(& _i . self_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400435}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800436# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500437pub fn visit_arm<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Arm) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500438 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay6eff4da2018-01-01 20:27:45 -0800439 for el in Punctuated::elements(& _i . pats) { let it = el.item(); _visitor.visit_pat(it) };
David Tolnay8b4d3022017-12-29 12:11:10 -0500440 if let Some(ref it) = _i . guard {
441 tokens_helper(_visitor, &(& ( it ) . 0).0);
442 _visitor.visit_expr(& * ( it ) . 1);
443 };
David Tolnaycc0f0372017-12-28 19:11:04 -0500444 tokens_helper(_visitor, &(& _i . rocket_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500445 _visitor.visit_expr(& * _i . body);
David Tolnaycc0f0372017-12-28 19:11:04 -0500446 if let Some(ref it) = _i . comma { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -0400447}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800448# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500449pub fn visit_attr_style<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast AttrStyle) {
Nika Layzell27726662017-10-24 23:16:35 -0400450 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -0500451 AttrStyle::Outer => { }
452 AttrStyle::Inner(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500453 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400454 }
455 }
456}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800457# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500458pub fn visit_attribute<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Attribute) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500459 tokens_helper(_visitor, &(& _i . pound_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500460 _visitor.visit_attr_style(& _i . style);
David Tolnay1e01f9c2017-12-28 20:16:19 -0500461 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500462 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -0400463 // Skipped field _i . tts;
464 // Skipped field _i . is_sugared_doc;
465}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800466# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500467pub fn visit_bare_fn_arg<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BareFnArg) {
David Tolnay5c4c0b52017-12-28 17:58:54 -0500468 if let Some(ref it) = _i . name {
469 _visitor.visit_bare_fn_arg_name(& ( it ) . 0);
David Tolnaycc0f0372017-12-28 19:11:04 -0500470 tokens_helper(_visitor, &(& ( it ) . 1).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -0500471 };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500472 _visitor.visit_type(& _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -0400473}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800474# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500475pub fn visit_bare_fn_arg_name<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BareFnArgName) {
Nika Layzell27726662017-10-24 23:16:35 -0400476 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -0500477 BareFnArgName::Named(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500478 _visitor.visit_ident(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400479 }
David Tolnay6702ade2017-12-30 23:38:15 -0500480 BareFnArgName::Wild(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500481 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400482 }
483 }
484}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800485# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500486pub fn visit_bin_op<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BinOp) {
Nika Layzell27726662017-10-24 23:16:35 -0400487 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -0500488 BinOp::Add(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500489 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400490 }
David Tolnay6702ade2017-12-30 23:38:15 -0500491 BinOp::Sub(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500492 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400493 }
David Tolnay6702ade2017-12-30 23:38:15 -0500494 BinOp::Mul(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500495 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400496 }
David Tolnay6702ade2017-12-30 23:38:15 -0500497 BinOp::Div(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500498 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400499 }
David Tolnay6702ade2017-12-30 23:38:15 -0500500 BinOp::Rem(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500501 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400502 }
David Tolnay6702ade2017-12-30 23:38:15 -0500503 BinOp::And(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500504 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400505 }
David Tolnay6702ade2017-12-30 23:38:15 -0500506 BinOp::Or(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500507 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400508 }
David Tolnay6702ade2017-12-30 23:38:15 -0500509 BinOp::BitXor(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500510 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400511 }
David Tolnay6702ade2017-12-30 23:38:15 -0500512 BinOp::BitAnd(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500513 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400514 }
David Tolnay6702ade2017-12-30 23:38:15 -0500515 BinOp::BitOr(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500516 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400517 }
David Tolnay6702ade2017-12-30 23:38:15 -0500518 BinOp::Shl(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500519 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400520 }
David Tolnay6702ade2017-12-30 23:38:15 -0500521 BinOp::Shr(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500522 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400523 }
David Tolnay6702ade2017-12-30 23:38:15 -0500524 BinOp::Eq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500525 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400526 }
David Tolnay6702ade2017-12-30 23:38:15 -0500527 BinOp::Lt(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500528 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400529 }
David Tolnay6702ade2017-12-30 23:38:15 -0500530 BinOp::Le(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500531 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400532 }
David Tolnay6702ade2017-12-30 23:38:15 -0500533 BinOp::Ne(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500534 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400535 }
David Tolnay6702ade2017-12-30 23:38:15 -0500536 BinOp::Ge(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500537 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400538 }
David Tolnay6702ade2017-12-30 23:38:15 -0500539 BinOp::Gt(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500540 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400541 }
David Tolnay6702ade2017-12-30 23:38:15 -0500542 BinOp::AddEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500543 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400544 }
David Tolnay6702ade2017-12-30 23:38:15 -0500545 BinOp::SubEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500546 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400547 }
David Tolnay6702ade2017-12-30 23:38:15 -0500548 BinOp::MulEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500549 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400550 }
David Tolnay6702ade2017-12-30 23:38:15 -0500551 BinOp::DivEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500552 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400553 }
David Tolnay6702ade2017-12-30 23:38:15 -0500554 BinOp::RemEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500555 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400556 }
David Tolnay6702ade2017-12-30 23:38:15 -0500557 BinOp::BitXorEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500558 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400559 }
David Tolnay6702ade2017-12-30 23:38:15 -0500560 BinOp::BitAndEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500561 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400562 }
David Tolnay6702ade2017-12-30 23:38:15 -0500563 BinOp::BitOrEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500564 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400565 }
David Tolnay6702ade2017-12-30 23:38:15 -0500566 BinOp::ShlEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500567 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400568 }
David Tolnay6702ade2017-12-30 23:38:15 -0500569 BinOp::ShrEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500570 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400571 }
572 }
573}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800574# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay506e43a2017-12-29 11:34:36 -0500575pub fn visit_binding<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Binding) {
576 _visitor.visit_ident(& _i . ident);
577 tokens_helper(_visitor, &(& _i . eq_token).0);
578 _visitor.visit_type(& _i . ty);
579}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800580# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500581pub fn visit_block<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Block) {
David Tolnay1e01f9c2017-12-28 20:16:19 -0500582 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500583 for it in & _i . stmts { _visitor.visit_stmt(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400584}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800585# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500586pub fn visit_bound_lifetimes<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BoundLifetimes) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500587 tokens_helper(_visitor, &(& _i . for_token).0);
588 tokens_helper(_visitor, &(& _i . lt_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -0800589 for el in Punctuated::elements(& _i . lifetimes) { let it = el.item(); _visitor.visit_lifetime_def(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500590 tokens_helper(_visitor, &(& _i . gt_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400591}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800592# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellf1fdc0b2017-12-04 19:58:32 -0500593pub fn visit_const_param<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ConstParam) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500594 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500595 tokens_helper(_visitor, &(& _i . const_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500596 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -0500597 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500598 _visitor.visit_type(& _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -0500599 if let Some(ref it) = _i . eq_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500600 if let Some(ref it) = _i . default { _visitor.visit_expr(it) };
Nika Layzellf1fdc0b2017-12-04 19:58:32 -0500601}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800602# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnaye3d41b72017-12-31 15:24:00 -0500603pub fn visit_data<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Data) {
604 match *_i {
605 Data::Struct(ref _binding_0, ) => {
606 _visitor.visit_data_struct(_binding_0);
607 }
608 Data::Enum(ref _binding_0, ) => {
609 _visitor.visit_data_enum(_binding_0);
610 }
611 Data::Union(ref _binding_0, ) => {
612 _visitor.visit_data_union(_binding_0);
613 }
614 }
615}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800616# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnaye3d41b72017-12-31 15:24:00 -0500617pub fn visit_data_enum<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast DataEnum) {
618 tokens_helper(_visitor, &(& _i . enum_token).0);
619 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -0800620 for el in Punctuated::elements(& _i . variants) { let it = el.item(); _visitor.visit_variant(it) };
David Tolnaye3d41b72017-12-31 15:24:00 -0500621}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800622# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnaye3d41b72017-12-31 15:24:00 -0500623pub fn visit_data_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast DataStruct) {
624 tokens_helper(_visitor, &(& _i . struct_token).0);
625 _visitor.visit_fields(& _i . fields);
626 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
627}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800628# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnaye3d41b72017-12-31 15:24:00 -0500629pub fn visit_data_union<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast DataUnion) {
630 tokens_helper(_visitor, &(& _i . union_token).0);
631 _visitor.visit_fields_named(& _i . fields);
632}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800633# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500634pub fn visit_derive_input<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast DeriveInput) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500635 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500636 _visitor.visit_visibility(& _i . vis);
637 _visitor.visit_ident(& _i . ident);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500638 _visitor.visit_generics(& _i . generics);
David Tolnaye3d41b72017-12-31 15:24:00 -0500639 _visitor.visit_data(& _i . data);
Nika Layzell27726662017-10-24 23:16:35 -0400640}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800641# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500642pub fn visit_expr<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Expr) {
Nika Layzell27726662017-10-24 23:16:35 -0400643 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -0500644 Expr::Box(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500645 full!(_visitor.visit_expr_box(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400646 }
David Tolnay6702ade2017-12-30 23:38:15 -0500647 Expr::InPlace(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500648 full!(_visitor.visit_expr_in_place(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400649 }
David Tolnay6702ade2017-12-30 23:38:15 -0500650 Expr::Array(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500651 full!(_visitor.visit_expr_array(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400652 }
David Tolnay6702ade2017-12-30 23:38:15 -0500653 Expr::Call(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500654 _visitor.visit_expr_call(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400655 }
David Tolnay6702ade2017-12-30 23:38:15 -0500656 Expr::MethodCall(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500657 full!(_visitor.visit_expr_method_call(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400658 }
David Tolnay6702ade2017-12-30 23:38:15 -0500659 Expr::Tuple(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500660 full!(_visitor.visit_expr_tuple(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400661 }
David Tolnay6702ade2017-12-30 23:38:15 -0500662 Expr::Binary(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500663 _visitor.visit_expr_binary(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400664 }
David Tolnay6702ade2017-12-30 23:38:15 -0500665 Expr::Unary(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500666 _visitor.visit_expr_unary(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400667 }
David Tolnay6702ade2017-12-30 23:38:15 -0500668 Expr::Lit(ref _binding_0, ) => {
David Tolnay8c91b882017-12-28 23:04:32 -0500669 _visitor.visit_expr_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400670 }
David Tolnay6702ade2017-12-30 23:38:15 -0500671 Expr::Cast(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500672 _visitor.visit_expr_cast(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400673 }
David Tolnay6702ade2017-12-30 23:38:15 -0500674 Expr::Type(ref _binding_0, ) => {
David Tolnay0cf94f22017-12-28 23:46:26 -0500675 full!(_visitor.visit_expr_type(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400676 }
David Tolnay6702ade2017-12-30 23:38:15 -0500677 Expr::If(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500678 full!(_visitor.visit_expr_if(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400679 }
David Tolnay6702ade2017-12-30 23:38:15 -0500680 Expr::IfLet(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500681 full!(_visitor.visit_expr_if_let(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400682 }
David Tolnay6702ade2017-12-30 23:38:15 -0500683 Expr::While(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500684 full!(_visitor.visit_expr_while(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400685 }
David Tolnay6702ade2017-12-30 23:38:15 -0500686 Expr::WhileLet(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500687 full!(_visitor.visit_expr_while_let(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400688 }
David Tolnay6702ade2017-12-30 23:38:15 -0500689 Expr::ForLoop(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500690 full!(_visitor.visit_expr_for_loop(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400691 }
David Tolnay6702ade2017-12-30 23:38:15 -0500692 Expr::Loop(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500693 full!(_visitor.visit_expr_loop(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400694 }
David Tolnay6702ade2017-12-30 23:38:15 -0500695 Expr::Match(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500696 full!(_visitor.visit_expr_match(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400697 }
David Tolnay6702ade2017-12-30 23:38:15 -0500698 Expr::Closure(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500699 full!(_visitor.visit_expr_closure(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400700 }
David Tolnay6702ade2017-12-30 23:38:15 -0500701 Expr::Unsafe(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500702 full!(_visitor.visit_expr_unsafe(_binding_0));
Nika Layzell640832a2017-12-04 13:37:09 -0500703 }
David Tolnay6702ade2017-12-30 23:38:15 -0500704 Expr::Block(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500705 full!(_visitor.visit_expr_block(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400706 }
David Tolnay6702ade2017-12-30 23:38:15 -0500707 Expr::Assign(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500708 full!(_visitor.visit_expr_assign(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400709 }
David Tolnay6702ade2017-12-30 23:38:15 -0500710 Expr::AssignOp(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500711 full!(_visitor.visit_expr_assign_op(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400712 }
David Tolnay6702ade2017-12-30 23:38:15 -0500713 Expr::Field(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500714 full!(_visitor.visit_expr_field(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400715 }
David Tolnay6702ade2017-12-30 23:38:15 -0500716 Expr::Index(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500717 _visitor.visit_expr_index(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400718 }
David Tolnay6702ade2017-12-30 23:38:15 -0500719 Expr::Range(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500720 full!(_visitor.visit_expr_range(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400721 }
David Tolnay6702ade2017-12-30 23:38:15 -0500722 Expr::Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500723 _visitor.visit_expr_path(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400724 }
David Tolnay6702ade2017-12-30 23:38:15 -0500725 Expr::AddrOf(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500726 full!(_visitor.visit_expr_addr_of(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400727 }
David Tolnay6702ade2017-12-30 23:38:15 -0500728 Expr::Break(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500729 full!(_visitor.visit_expr_break(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400730 }
David Tolnay6702ade2017-12-30 23:38:15 -0500731 Expr::Continue(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500732 full!(_visitor.visit_expr_continue(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400733 }
David Tolnay6702ade2017-12-30 23:38:15 -0500734 Expr::Return(ref _binding_0, ) => {
David Tolnayc246cd32017-12-28 23:14:32 -0500735 full!(_visitor.visit_expr_return(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400736 }
David Tolnay6702ade2017-12-30 23:38:15 -0500737 Expr::Macro(ref _binding_0, ) => {
David Tolnay8c91b882017-12-28 23:04:32 -0500738 full!(_visitor.visit_expr_macro(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400739 }
David Tolnay6702ade2017-12-30 23:38:15 -0500740 Expr::Struct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500741 full!(_visitor.visit_expr_struct(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400742 }
David Tolnay6702ade2017-12-30 23:38:15 -0500743 Expr::Repeat(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500744 full!(_visitor.visit_expr_repeat(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400745 }
David Tolnay6702ade2017-12-30 23:38:15 -0500746 Expr::Paren(ref _binding_0, ) => {
David Tolnaye98775f2017-12-28 23:17:00 -0500747 full!(_visitor.visit_expr_paren(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400748 }
David Tolnay6702ade2017-12-30 23:38:15 -0500749 Expr::Group(ref _binding_0, ) => {
David Tolnaye98775f2017-12-28 23:17:00 -0500750 full!(_visitor.visit_expr_group(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400751 }
David Tolnay6702ade2017-12-30 23:38:15 -0500752 Expr::Try(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500753 full!(_visitor.visit_expr_try(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400754 }
David Tolnay6702ade2017-12-30 23:38:15 -0500755 Expr::Catch(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500756 full!(_visitor.visit_expr_catch(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400757 }
David Tolnay6702ade2017-12-30 23:38:15 -0500758 Expr::Yield(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500759 full!(_visitor.visit_expr_yield(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400760 }
David Tolnay6702ade2017-12-30 23:38:15 -0500761 Expr::Verbatim(ref _binding_0, ) => {
David Tolnay2ae520a2017-12-29 11:19:50 -0500762 _visitor.visit_expr_verbatim(_binding_0);
763 }
Nika Layzell27726662017-10-24 23:16:35 -0400764 }
765}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800766# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500767pub fn visit_expr_addr_of<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprAddrOf) {
768 for it in & _i . attrs { _visitor.visit_attribute(it) };
769 tokens_helper(_visitor, &(& _i . and_token).0);
David Tolnay24237fb2017-12-29 02:15:26 -0500770 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnay8c91b882017-12-28 23:04:32 -0500771 _visitor.visit_expr(& * _i . expr);
772}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800773# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500774pub fn visit_expr_array<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprArray) {
775 for it in & _i . attrs { _visitor.visit_attribute(it) };
776 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -0800777 for el in Punctuated::elements(& _i . elems) { let it = el.item(); _visitor.visit_expr(it) };
David Tolnay8c91b882017-12-28 23:04:32 -0500778}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800779# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500780pub fn visit_expr_assign<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprAssign) {
781 for it in & _i . attrs { _visitor.visit_attribute(it) };
782 _visitor.visit_expr(& * _i . left);
783 tokens_helper(_visitor, &(& _i . eq_token).0);
784 _visitor.visit_expr(& * _i . right);
785}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800786# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500787pub fn visit_expr_assign_op<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprAssignOp) {
788 for it in & _i . attrs { _visitor.visit_attribute(it) };
789 _visitor.visit_expr(& * _i . left);
790 _visitor.visit_bin_op(& _i . op);
791 _visitor.visit_expr(& * _i . right);
792}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800793# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500794pub fn visit_expr_binary<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBinary) {
795 for it in & _i . attrs { _visitor.visit_attribute(it) };
796 _visitor.visit_expr(& * _i . left);
797 _visitor.visit_bin_op(& _i . op);
798 _visitor.visit_expr(& * _i . right);
799}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800800# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500801pub fn visit_expr_block<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBlock) {
802 for it in & _i . attrs { _visitor.visit_attribute(it) };
803 _visitor.visit_block(& _i . block);
804}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800805# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500806pub fn visit_expr_box<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBox) {
807 for it in & _i . attrs { _visitor.visit_attribute(it) };
808 tokens_helper(_visitor, &(& _i . box_token).0);
809 _visitor.visit_expr(& * _i . expr);
810}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800811# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500812pub fn visit_expr_break<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBreak) {
813 for it in & _i . attrs { _visitor.visit_attribute(it) };
814 tokens_helper(_visitor, &(& _i . break_token).0);
815 if let Some(ref it) = _i . label { _visitor.visit_lifetime(it) };
816 if let Some(ref it) = _i . expr { _visitor.visit_expr(& * * it) };
817}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800818# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500819pub fn visit_expr_call<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprCall) {
820 for it in & _i . attrs { _visitor.visit_attribute(it) };
821 _visitor.visit_expr(& * _i . func);
822 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -0800823 for el in Punctuated::elements(& _i . args) { let it = el.item(); _visitor.visit_expr(it) };
David Tolnay8c91b882017-12-28 23:04:32 -0500824}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800825# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500826pub fn visit_expr_cast<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprCast) {
827 for it in & _i . attrs { _visitor.visit_attribute(it) };
828 _visitor.visit_expr(& * _i . expr);
829 tokens_helper(_visitor, &(& _i . as_token).0);
830 _visitor.visit_type(& * _i . ty);
831}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800832# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500833pub fn visit_expr_catch<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprCatch) {
834 for it in & _i . attrs { _visitor.visit_attribute(it) };
835 tokens_helper(_visitor, &(& _i . do_token).0);
836 tokens_helper(_visitor, &(& _i . catch_token).0);
837 _visitor.visit_block(& _i . block);
838}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800839# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500840pub fn visit_expr_closure<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprClosure) {
841 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnayefc96fb2017-12-29 02:03:15 -0500842 if let Some(ref it) = _i . capture { tokens_helper(_visitor, &(it).0) };
David Tolnay8c91b882017-12-28 23:04:32 -0500843 tokens_helper(_visitor, &(& _i . or1_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -0800844 for el in Punctuated::elements(& _i . inputs) { let it = el.item(); _visitor.visit_fn_arg(it) };
David Tolnay8c91b882017-12-28 23:04:32 -0500845 tokens_helper(_visitor, &(& _i . or2_token).0);
846 _visitor.visit_return_type(& _i . output);
847 _visitor.visit_expr(& * _i . body);
848}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800849# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500850pub fn visit_expr_continue<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprContinue) {
851 for it in & _i . attrs { _visitor.visit_attribute(it) };
852 tokens_helper(_visitor, &(& _i . continue_token).0);
853 if let Some(ref it) = _i . label { _visitor.visit_lifetime(it) };
854}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800855# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500856pub fn visit_expr_field<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprField) {
857 for it in & _i . attrs { _visitor.visit_attribute(it) };
858 _visitor.visit_expr(& * _i . base);
859 tokens_helper(_visitor, &(& _i . dot_token).0);
860 _visitor.visit_member(& _i . member);
861}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800862# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500863pub fn visit_expr_for_loop<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprForLoop) {
864 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaybcd498f2017-12-29 12:02:33 -0500865 if let Some(ref it) = _i . label { _visitor.visit_label(it) };
David Tolnay8c91b882017-12-28 23:04:32 -0500866 tokens_helper(_visitor, &(& _i . for_token).0);
867 _visitor.visit_pat(& * _i . pat);
868 tokens_helper(_visitor, &(& _i . in_token).0);
869 _visitor.visit_expr(& * _i . expr);
870 _visitor.visit_block(& _i . body);
871}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800872# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500873pub fn visit_expr_group<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprGroup) {
874 for it in & _i . attrs { _visitor.visit_attribute(it) };
875 tokens_helper(_visitor, &(& _i . group_token).0);
876 _visitor.visit_expr(& * _i . expr);
877}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800878# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500879pub fn visit_expr_if<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIf) {
880 for it in & _i . attrs { _visitor.visit_attribute(it) };
881 tokens_helper(_visitor, &(& _i . if_token).0);
882 _visitor.visit_expr(& * _i . cond);
David Tolnay2ccf32a2017-12-29 00:34:26 -0500883 _visitor.visit_block(& _i . then_branch);
884 if let Some(ref it) = _i . else_branch {
885 tokens_helper(_visitor, &(& ( it ) . 0).0);
886 _visitor.visit_expr(& * ( it ) . 1);
887 };
David Tolnay8c91b882017-12-28 23:04:32 -0500888}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800889# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500890pub fn visit_expr_if_let<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIfLet) {
891 for it in & _i . attrs { _visitor.visit_attribute(it) };
892 tokens_helper(_visitor, &(& _i . if_token).0);
893 tokens_helper(_visitor, &(& _i . let_token).0);
894 _visitor.visit_pat(& * _i . pat);
895 tokens_helper(_visitor, &(& _i . eq_token).0);
896 _visitor.visit_expr(& * _i . expr);
David Tolnay2ccf32a2017-12-29 00:34:26 -0500897 _visitor.visit_block(& _i . then_branch);
898 if let Some(ref it) = _i . else_branch {
899 tokens_helper(_visitor, &(& ( it ) . 0).0);
900 _visitor.visit_expr(& * ( it ) . 1);
901 };
David Tolnay8c91b882017-12-28 23:04:32 -0500902}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800903# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500904pub fn visit_expr_in_place<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprInPlace) {
905 for it in & _i . attrs { _visitor.visit_attribute(it) };
906 _visitor.visit_expr(& * _i . place);
David Tolnay8701a5c2017-12-28 23:31:10 -0500907 tokens_helper(_visitor, &(& _i . arrow_token).0);
David Tolnay8c91b882017-12-28 23:04:32 -0500908 _visitor.visit_expr(& * _i . value);
909}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800910# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500911pub fn visit_expr_index<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIndex) {
912 for it in & _i . attrs { _visitor.visit_attribute(it) };
913 _visitor.visit_expr(& * _i . expr);
914 tokens_helper(_visitor, &(& _i . bracket_token).0);
915 _visitor.visit_expr(& * _i . index);
916}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800917# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500918pub fn visit_expr_lit<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprLit) {
919 for it in & _i . attrs { _visitor.visit_attribute(it) };
920 _visitor.visit_lit(& _i . lit);
921}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800922# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500923pub fn visit_expr_loop<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprLoop) {
David Tolnay8c91b882017-12-28 23:04:32 -0500924 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaybcd498f2017-12-29 12:02:33 -0500925 if let Some(ref it) = _i . label { _visitor.visit_label(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500926 tokens_helper(_visitor, &(& _i . loop_token).0);
927 _visitor.visit_block(& _i . body);
Nika Layzell27726662017-10-24 23:16:35 -0400928}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800929# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500930pub fn visit_expr_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprMacro) {
931 for it in & _i . attrs { _visitor.visit_attribute(it) };
932 _visitor.visit_macro(& _i . mac);
933}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800934# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500935pub fn visit_expr_match<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprMatch) {
David Tolnay8c91b882017-12-28 23:04:32 -0500936 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500937 tokens_helper(_visitor, &(& _i . match_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500938 _visitor.visit_expr(& * _i . expr);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500939 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500940 for it in & _i . arms { _visitor.visit_arm(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400941}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800942# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500943pub fn visit_expr_method_call<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprMethodCall) {
David Tolnay8c91b882017-12-28 23:04:32 -0500944 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay76418512017-12-28 23:47:47 -0500945 _visitor.visit_expr(& * _i . receiver);
David Tolnaycc0f0372017-12-28 19:11:04 -0500946 tokens_helper(_visitor, &(& _i . dot_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500947 _visitor.visit_ident(& _i . method);
David Tolnayd60cfec2017-12-29 00:21:38 -0500948 if let Some(ref it) = _i . turbofish { _visitor.visit_method_turbofish(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500949 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -0800950 for el in Punctuated::elements(& _i . args) { let it = el.item(); _visitor.visit_expr(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400951}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800952# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500953pub fn visit_expr_paren<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprParen) {
David Tolnay8c91b882017-12-28 23:04:32 -0500954 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -0500955 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500956 _visitor.visit_expr(& * _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -0400957}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800958# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500959pub fn visit_expr_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprPath) {
David Tolnay8c91b882017-12-28 23:04:32 -0500960 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500961 if let Some(ref it) = _i . qself { _visitor.visit_qself(it) };
962 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -0400963}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800964# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500965pub fn visit_expr_range<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprRange) {
David Tolnay8c91b882017-12-28 23:04:32 -0500966 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a918742017-12-28 16:54:41 -0500967 if let Some(ref it) = _i . from { _visitor.visit_expr(& * * it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500968 _visitor.visit_range_limits(& _i . limits);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500969 if let Some(ref it) = _i . to { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -0400970}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800971# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500972pub fn visit_expr_repeat<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprRepeat) {
David Tolnay8c91b882017-12-28 23:04:32 -0500973 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -0500974 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500975 _visitor.visit_expr(& * _i . expr);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500976 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500977 _visitor.visit_expr(& * _i . amt);
Nika Layzell27726662017-10-24 23:16:35 -0400978}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800979# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayc246cd32017-12-28 23:14:32 -0500980pub fn visit_expr_return<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprReturn) {
David Tolnay8c91b882017-12-28 23:04:32 -0500981 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500982 tokens_helper(_visitor, &(& _i . return_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500983 if let Some(ref it) = _i . expr { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -0400984}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800985# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500986pub fn visit_expr_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprStruct) {
David Tolnay8c91b882017-12-28 23:04:32 -0500987 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500988 _visitor.visit_path(& _i . path);
David Tolnay1e01f9c2017-12-28 20:16:19 -0500989 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -0800990 for el in Punctuated::elements(& _i . fields) { let it = el.item(); _visitor.visit_field_value(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500991 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
992 if let Some(ref it) = _i . rest { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -0400993}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800994# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500995pub fn visit_expr_try<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprTry) {
David Tolnay8c91b882017-12-28 23:04:32 -0500996 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a918742017-12-28 16:54:41 -0500997 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -0500998 tokens_helper(_visitor, &(& _i . question_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400999}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001000# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay05362582017-12-26 01:33:57 -05001001pub fn visit_expr_tuple<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprTuple) {
David Tolnay8c91b882017-12-28 23:04:32 -05001002 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -05001003 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -08001004 for el in Punctuated::elements(& _i . elems) { let it = el.item(); _visitor.visit_expr(it) };
David Tolnay05362582017-12-26 01:33:57 -05001005}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001006# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001007pub fn visit_expr_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprType) {
David Tolnay8c91b882017-12-28 23:04:32 -05001008 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a918742017-12-28 16:54:41 -05001009 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -05001010 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001011 _visitor.visit_type(& * _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -04001012}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001013# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001014pub fn visit_expr_unary<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprUnary) {
David Tolnay8c91b882017-12-28 23:04:32 -05001015 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001016 _visitor.visit_un_op(& _i . op);
David Tolnay4a918742017-12-28 16:54:41 -05001017 _visitor.visit_expr(& * _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -04001018}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001019# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzell640832a2017-12-04 13:37:09 -05001020pub fn visit_expr_unsafe<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprUnsafe) {
David Tolnay8c91b882017-12-28 23:04:32 -05001021 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001022 tokens_helper(_visitor, &(& _i . unsafe_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001023 _visitor.visit_block(& _i . block);
Nika Layzell640832a2017-12-04 13:37:09 -05001024}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001025# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay2ae520a2017-12-29 11:19:50 -05001026pub fn visit_expr_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprVerbatim) {
1027 // Skipped field _i . tts;
1028}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001029# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001030pub fn visit_expr_while<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprWhile) {
David Tolnay8c91b882017-12-28 23:04:32 -05001031 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaybcd498f2017-12-29 12:02:33 -05001032 if let Some(ref it) = _i . label { _visitor.visit_label(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001033 tokens_helper(_visitor, &(& _i . while_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001034 _visitor.visit_expr(& * _i . cond);
1035 _visitor.visit_block(& _i . body);
Nika Layzell27726662017-10-24 23:16:35 -04001036}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001037# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001038pub fn visit_expr_while_let<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprWhileLet) {
David Tolnay8c91b882017-12-28 23:04:32 -05001039 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaybcd498f2017-12-29 12:02:33 -05001040 if let Some(ref it) = _i . label { _visitor.visit_label(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001041 tokens_helper(_visitor, &(& _i . while_token).0);
1042 tokens_helper(_visitor, &(& _i . let_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001043 _visitor.visit_pat(& * _i . pat);
David Tolnaycc0f0372017-12-28 19:11:04 -05001044 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001045 _visitor.visit_expr(& * _i . expr);
1046 _visitor.visit_block(& _i . body);
Nika Layzell27726662017-10-24 23:16:35 -04001047}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001048# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001049pub fn visit_expr_yield<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprYield) {
David Tolnay8c91b882017-12-28 23:04:32 -05001050 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001051 tokens_helper(_visitor, &(& _i . yield_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001052 if let Some(ref it) = _i . expr { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -04001053}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001054# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001055pub fn visit_field<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Field) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001056 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001057 _visitor.visit_visibility(& _i . vis);
1058 if let Some(ref it) = _i . ident { _visitor.visit_ident(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001059 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001060 _visitor.visit_type(& _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -04001061}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001062# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001063pub fn visit_field_pat<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldPat) {
David Tolnay4a3f59a2017-12-28 21:21:12 -05001064 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay85b69a42017-12-27 20:43:10 -05001065 _visitor.visit_member(& _i . member);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001066 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a918742017-12-28 16:54:41 -05001067 _visitor.visit_pat(& * _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001068}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001069# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001070pub fn visit_field_value<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldValue) {
David Tolnay85b69a42017-12-27 20:43:10 -05001071 for it in & _i . attrs { _visitor.visit_attribute(it) };
1072 _visitor.visit_member(& _i . member);
David Tolnaycc0f0372017-12-28 19:11:04 -05001073 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001074 _visitor.visit_expr(& _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -04001075}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001076# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnaye3d41b72017-12-31 15:24:00 -05001077pub fn visit_fields<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Fields) {
1078 match *_i {
1079 Fields::Named(ref _binding_0, ) => {
1080 _visitor.visit_fields_named(_binding_0);
1081 }
1082 Fields::Unnamed(ref _binding_0, ) => {
1083 _visitor.visit_fields_unnamed(_binding_0);
1084 }
1085 Fields::Unit => { }
1086 }
1087}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001088# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnaye3d41b72017-12-31 15:24:00 -05001089pub fn visit_fields_named<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldsNamed) {
1090 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -08001091 for el in Punctuated::elements(& _i . named) { let it = el.item(); _visitor.visit_field(it) };
David Tolnaye3d41b72017-12-31 15:24:00 -05001092}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001093# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnaye3d41b72017-12-31 15:24:00 -05001094pub fn visit_fields_unnamed<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldsUnnamed) {
1095 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -08001096 for el in Punctuated::elements(& _i . unnamed) { let it = el.item(); _visitor.visit_field(it) };
David Tolnaye3d41b72017-12-31 15:24:00 -05001097}
Nika Layzell27726662017-10-24 23:16:35 -04001098# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001099pub fn visit_file<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast File) {
Nika Layzell27726662017-10-24 23:16:35 -04001100 // Skipped field _i . shebang;
David Tolnayf0d63bf2017-12-26 12:29:47 -05001101 for it in & _i . attrs { _visitor.visit_attribute(it) };
1102 for it in & _i . items { _visitor.visit_item(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001103}
1104# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001105pub fn visit_fn_arg<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FnArg) {
Nika Layzell27726662017-10-24 23:16:35 -04001106 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001107 FnArg::SelfRef(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001108 _visitor.visit_arg_self_ref(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001109 }
David Tolnay6702ade2017-12-30 23:38:15 -05001110 FnArg::SelfValue(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001111 _visitor.visit_arg_self(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001112 }
David Tolnay6702ade2017-12-30 23:38:15 -05001113 FnArg::Captured(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001114 _visitor.visit_arg_captured(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001115 }
David Tolnay6702ade2017-12-30 23:38:15 -05001116 FnArg::Inferred(ref _binding_0, ) => {
David Tolnay80ed55f2017-12-27 22:54:40 -05001117 _visitor.visit_pat(_binding_0);
1118 }
David Tolnay6702ade2017-12-30 23:38:15 -05001119 FnArg::Ignored(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001120 _visitor.visit_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001121 }
1122 }
1123}
1124# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001125pub fn visit_fn_decl<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FnDecl) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001126 tokens_helper(_visitor, &(& _i . fn_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001127 _visitor.visit_generics(& _i . generics);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001128 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -08001129 for el in Punctuated::elements(& _i . inputs) { let it = el.item(); _visitor.visit_fn_arg(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001130 if let Some(ref it) = _i . variadic { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001131 _visitor.visit_return_type(& _i . output);
Nika Layzell27726662017-10-24 23:16:35 -04001132}
1133# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001134pub fn visit_foreign_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItem) {
Nika Layzell27726662017-10-24 23:16:35 -04001135 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001136 ForeignItem::Fn(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001137 _visitor.visit_foreign_item_fn(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001138 }
David Tolnay6702ade2017-12-30 23:38:15 -05001139 ForeignItem::Static(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001140 _visitor.visit_foreign_item_static(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001141 }
David Tolnay6702ade2017-12-30 23:38:15 -05001142 ForeignItem::Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001143 _visitor.visit_foreign_item_type(_binding_0);
David Tolnay199bcbb2017-11-12 10:33:52 -08001144 }
David Tolnay6702ade2017-12-30 23:38:15 -05001145 ForeignItem::Verbatim(ref _binding_0, ) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05001146 _visitor.visit_foreign_item_verbatim(_binding_0);
1147 }
Nika Layzell27726662017-10-24 23:16:35 -04001148 }
1149}
1150# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001151pub fn visit_foreign_item_fn<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemFn) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001152 for it in & _i . attrs { _visitor.visit_attribute(it) };
1153 _visitor.visit_visibility(& _i . vis);
1154 _visitor.visit_ident(& _i . ident);
David Tolnay4a918742017-12-28 16:54:41 -05001155 _visitor.visit_fn_decl(& * _i . decl);
David Tolnaycc0f0372017-12-28 19:11:04 -05001156 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay8894f602017-11-11 12:11:04 -08001157}
1158# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001159pub fn visit_foreign_item_static<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemStatic) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001160 for it in & _i . attrs { _visitor.visit_attribute(it) };
1161 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001162 tokens_helper(_visitor, &(& _i . static_token).0);
David Tolnay24237fb2017-12-29 02:15:26 -05001163 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001164 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001165 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001166 _visitor.visit_type(& * _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001167 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001168}
David Tolnay199bcbb2017-11-12 10:33:52 -08001169# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001170pub fn visit_foreign_item_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001171 for it in & _i . attrs { _visitor.visit_attribute(it) };
1172 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001173 tokens_helper(_visitor, &(& _i . type_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001174 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001175 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay199bcbb2017-11-12 10:33:52 -08001176}
David Tolnay2ae520a2017-12-29 11:19:50 -05001177# [ cfg ( feature = "full" ) ]
1178pub fn visit_foreign_item_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemVerbatim) {
1179 // Skipped field _i . tts;
1180}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001181# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc08227a2017-12-04 16:30:17 -05001182pub fn visit_generic_argument<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast GenericArgument) {
Nika Layzell357885a2017-12-04 15:47:07 -05001183 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001184 GenericArgument::Lifetime(ref _binding_0, ) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05001185 _visitor.visit_lifetime(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001186 }
David Tolnay6702ade2017-12-30 23:38:15 -05001187 GenericArgument::Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001188 _visitor.visit_type(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001189 }
David Tolnay6702ade2017-12-30 23:38:15 -05001190 GenericArgument::Binding(ref _binding_0, ) => {
David Tolnay506e43a2017-12-29 11:34:36 -05001191 _visitor.visit_binding(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001192 }
David Tolnay6702ade2017-12-30 23:38:15 -05001193 GenericArgument::Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001194 _visitor.visit_expr(_binding_0);
Nika Layzellc680e612017-12-04 19:07:20 -05001195 }
Nika Layzell357885a2017-12-04 15:47:07 -05001196 }
1197}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001198# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnayd60cfec2017-12-29 00:21:38 -05001199pub fn visit_generic_method_argument<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast GenericMethodArgument) {
David Tolnayd60cfec2017-12-29 00:21:38 -05001200 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001201 GenericMethodArgument::Type(ref _binding_0, ) => {
David Tolnayd60cfec2017-12-29 00:21:38 -05001202 _visitor.visit_type(_binding_0);
1203 }
David Tolnay6702ade2017-12-30 23:38:15 -05001204 GenericMethodArgument::Const(ref _binding_0, ) => {
David Tolnayd60cfec2017-12-29 00:21:38 -05001205 _visitor.visit_expr(_binding_0);
1206 }
1207 }
1208}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001209# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayc2f1aba2017-11-12 20:29:22 -08001210pub fn visit_generic_param<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast GenericParam) {
David Tolnayc2f1aba2017-11-12 20:29:22 -08001211 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001212 GenericParam::Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001213 _visitor.visit_type_param(_binding_0);
David Tolnayc2f1aba2017-11-12 20:29:22 -08001214 }
David Tolnay517f3692018-01-01 20:17:23 -08001215 GenericParam::Lifetime(ref _binding_0, ) => {
1216 _visitor.visit_lifetime_def(_binding_0);
1217 }
David Tolnay6702ade2017-12-30 23:38:15 -05001218 GenericParam::Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001219 _visitor.visit_const_param(_binding_0);
Nika Layzellf1fdc0b2017-12-04 19:58:32 -05001220 }
David Tolnayc2f1aba2017-11-12 20:29:22 -08001221 }
1222}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001223# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001224pub fn visit_generics<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Generics) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001225 if let Some(ref it) = _i . lt_token { tokens_helper(_visitor, &(it).0) };
David Tolnay6eff4da2018-01-01 20:27:45 -08001226 for el in Punctuated::elements(& _i . params) { let it = el.item(); _visitor.visit_generic_param(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001227 if let Some(ref it) = _i . gt_token { tokens_helper(_visitor, &(it).0) };
David Tolnayac997dd2017-12-27 23:18:22 -05001228 if let Some(ref it) = _i . where_clause { _visitor.visit_where_clause(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001229}
Nika Layzellefb83ba2017-12-19 18:23:55 -05001230
1231pub fn visit_ident<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Ident) {
David Tolnay9a93bfe2017-12-31 17:23:00 -05001232 // Skipped field _i . term;
David Tolnay4ba63a02017-12-28 15:53:05 -05001233 _visitor.visit_span(& _i . span);
Nika Layzellefb83ba2017-12-19 18:23:55 -05001234}
Nika Layzell27726662017-10-24 23:16:35 -04001235# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001236pub fn visit_impl_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItem) {
Nika Layzell27726662017-10-24 23:16:35 -04001237 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001238 ImplItem::Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001239 _visitor.visit_impl_item_const(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001240 }
David Tolnay6702ade2017-12-30 23:38:15 -05001241 ImplItem::Method(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001242 _visitor.visit_impl_item_method(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001243 }
David Tolnay6702ade2017-12-30 23:38:15 -05001244 ImplItem::Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001245 _visitor.visit_impl_item_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001246 }
David Tolnay6702ade2017-12-30 23:38:15 -05001247 ImplItem::Macro(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001248 _visitor.visit_impl_item_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001249 }
David Tolnay6702ade2017-12-30 23:38:15 -05001250 ImplItem::Verbatim(ref _binding_0, ) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05001251 _visitor.visit_impl_item_verbatim(_binding_0);
1252 }
Nika Layzell27726662017-10-24 23:16:35 -04001253 }
1254}
1255# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001256pub fn visit_impl_item_const<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemConst) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001257 for it in & _i . attrs { _visitor.visit_attribute(it) };
1258 _visitor.visit_visibility(& _i . vis);
David Tolnay360a6342017-12-29 02:22:11 -05001259 if let Some(ref it) = _i . defaultness { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001260 tokens_helper(_visitor, &(& _i . const_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001261 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001262 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001263 _visitor.visit_type(& _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001264 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001265 _visitor.visit_expr(& _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -05001266 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay857628c2017-11-11 12:25:31 -08001267}
1268# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001269pub fn visit_impl_item_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemMacro) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001270 for it in & _i . attrs { _visitor.visit_attribute(it) };
1271 _visitor.visit_macro(& _i . mac);
David Tolnaycc0f0372017-12-28 19:11:04 -05001272 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
David Tolnay857628c2017-11-11 12:25:31 -08001273}
1274# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001275pub fn visit_impl_item_method<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemMethod) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001276 for it in & _i . attrs { _visitor.visit_attribute(it) };
1277 _visitor.visit_visibility(& _i . vis);
David Tolnay360a6342017-12-29 02:22:11 -05001278 if let Some(ref it) = _i . defaultness { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001279 _visitor.visit_method_sig(& _i . sig);
1280 _visitor.visit_block(& _i . block);
Nika Layzell27726662017-10-24 23:16:35 -04001281}
1282# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001283pub fn visit_impl_item_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001284 for it in & _i . attrs { _visitor.visit_attribute(it) };
1285 _visitor.visit_visibility(& _i . vis);
David Tolnay360a6342017-12-29 02:22:11 -05001286 if let Some(ref it) = _i . defaultness { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001287 tokens_helper(_visitor, &(& _i . type_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001288 _visitor.visit_ident(& _i . ident);
1289 _visitor.visit_generics(& _i . generics);
David Tolnaycc0f0372017-12-28 19:11:04 -05001290 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001291 _visitor.visit_type(& _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001292 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001293}
David Tolnay2ae520a2017-12-29 11:19:50 -05001294# [ cfg ( feature = "full" ) ]
1295pub fn visit_impl_item_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemVerbatim) {
1296 // Skipped field _i . tts;
1297}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001298# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay85b69a42017-12-27 20:43:10 -05001299pub fn visit_index<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Index) {
1300 // Skipped field _i . index;
1301 _visitor.visit_span(& _i . span);
1302}
1303# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001304pub fn visit_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Item) {
Nika Layzell27726662017-10-24 23:16:35 -04001305 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001306 Item::ExternCrate(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001307 _visitor.visit_item_extern_crate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001308 }
David Tolnay6702ade2017-12-30 23:38:15 -05001309 Item::Use(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001310 _visitor.visit_item_use(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001311 }
David Tolnay6702ade2017-12-30 23:38:15 -05001312 Item::Static(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001313 _visitor.visit_item_static(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001314 }
David Tolnay6702ade2017-12-30 23:38:15 -05001315 Item::Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001316 _visitor.visit_item_const(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001317 }
David Tolnay6702ade2017-12-30 23:38:15 -05001318 Item::Fn(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001319 _visitor.visit_item_fn(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001320 }
David Tolnay6702ade2017-12-30 23:38:15 -05001321 Item::Mod(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001322 _visitor.visit_item_mod(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001323 }
David Tolnay6702ade2017-12-30 23:38:15 -05001324 Item::ForeignMod(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001325 _visitor.visit_item_foreign_mod(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001326 }
David Tolnay6702ade2017-12-30 23:38:15 -05001327 Item::Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001328 _visitor.visit_item_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001329 }
David Tolnay6702ade2017-12-30 23:38:15 -05001330 Item::Struct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001331 _visitor.visit_item_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001332 }
David Tolnaye3d41b72017-12-31 15:24:00 -05001333 Item::Enum(ref _binding_0, ) => {
1334 _visitor.visit_item_enum(_binding_0);
1335 }
David Tolnay6702ade2017-12-30 23:38:15 -05001336 Item::Union(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001337 _visitor.visit_item_union(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001338 }
David Tolnay6702ade2017-12-30 23:38:15 -05001339 Item::Trait(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001340 _visitor.visit_item_trait(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001341 }
David Tolnay6702ade2017-12-30 23:38:15 -05001342 Item::Impl(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001343 _visitor.visit_item_impl(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001344 }
David Tolnay6702ade2017-12-30 23:38:15 -05001345 Item::Macro(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001346 _visitor.visit_item_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001347 }
David Tolnay6702ade2017-12-30 23:38:15 -05001348 Item::Macro2(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001349 _visitor.visit_item_macro2(_binding_0);
David Tolnay500d8322017-12-18 00:32:51 -08001350 }
David Tolnay6702ade2017-12-30 23:38:15 -05001351 Item::Verbatim(ref _binding_0, ) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05001352 _visitor.visit_item_verbatim(_binding_0);
1353 }
Nika Layzell27726662017-10-24 23:16:35 -04001354 }
1355}
1356# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001357pub fn visit_item_const<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemConst) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001358 for it in & _i . attrs { _visitor.visit_attribute(it) };
1359 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001360 tokens_helper(_visitor, &(& _i . const_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001361 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001362 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001363 _visitor.visit_type(& * _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001364 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001365 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -05001366 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnayc6b55bc2017-11-09 22:48:38 -08001367}
1368# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001369pub fn visit_item_enum<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemEnum) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001370 for it in & _i . attrs { _visitor.visit_attribute(it) };
1371 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001372 tokens_helper(_visitor, &(& _i . enum_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001373 _visitor.visit_ident(& _i . ident);
1374 _visitor.visit_generics(& _i . generics);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001375 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -08001376 for el in Punctuated::elements(& _i . variants) { let it = el.item(); _visitor.visit_variant(it) };
David Tolnayc6b55bc2017-11-09 22:48:38 -08001377}
1378# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001379pub fn visit_item_extern_crate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemExternCrate) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001380 for it in & _i . attrs { _visitor.visit_attribute(it) };
1381 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001382 tokens_helper(_visitor, &(& _i . extern_token).0);
1383 tokens_helper(_visitor, &(& _i . crate_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001384 _visitor.visit_ident(& _i . ident);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001385 if let Some(ref it) = _i . rename {
David Tolnaycc0f0372017-12-28 19:11:04 -05001386 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001387 _visitor.visit_ident(& ( it ) . 1);
1388 };
David Tolnaycc0f0372017-12-28 19:11:04 -05001389 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnayc6b55bc2017-11-09 22:48:38 -08001390}
1391# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001392pub fn visit_item_fn<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemFn) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001393 for it in & _i . attrs { _visitor.visit_attribute(it) };
1394 _visitor.visit_visibility(& _i . vis);
David Tolnay360a6342017-12-29 02:22:11 -05001395 if let Some(ref it) = _i . constness { tokens_helper(_visitor, &(it).0) };
David Tolnay9b258702017-12-29 02:24:41 -05001396 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001397 if let Some(ref it) = _i . abi { _visitor.visit_abi(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001398 _visitor.visit_ident(& _i . ident);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001399 _visitor.visit_fn_decl(& * _i . decl);
David Tolnay4a918742017-12-28 16:54:41 -05001400 _visitor.visit_block(& * _i . block);
David Tolnayc6b55bc2017-11-09 22:48:38 -08001401}
1402# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001403pub fn visit_item_foreign_mod<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemForeignMod) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001404 for it in & _i . attrs { _visitor.visit_attribute(it) };
1405 _visitor.visit_abi(& _i . abi);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001406 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001407 for it in & _i . items { _visitor.visit_foreign_item(it) };
David Tolnayc6b55bc2017-11-09 22:48:38 -08001408}
1409# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001410pub fn visit_item_impl<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemImpl) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001411 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay360a6342017-12-29 02:22:11 -05001412 if let Some(ref it) = _i . defaultness { tokens_helper(_visitor, &(it).0) };
David Tolnay9b258702017-12-29 02:24:41 -05001413 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001414 tokens_helper(_visitor, &(& _i . impl_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001415 _visitor.visit_generics(& _i . generics);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001416 if let Some(ref it) = _i . trait_ {
David Tolnay360a6342017-12-29 02:22:11 -05001417 if let Some(ref it) = ( it ) . 0 { tokens_helper(_visitor, &(it).0) };
David Tolnay5c4c0b52017-12-28 17:58:54 -05001418 _visitor.visit_path(& ( it ) . 1);
David Tolnaycc0f0372017-12-28 19:11:04 -05001419 tokens_helper(_visitor, &(& ( it ) . 2).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001420 };
David Tolnay4a918742017-12-28 16:54:41 -05001421 _visitor.visit_type(& * _i . self_ty);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001422 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001423 for it in & _i . items { _visitor.visit_impl_item(it) };
David Tolnayc6b55bc2017-11-09 22:48:38 -08001424}
1425# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001426pub fn visit_item_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMacro) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001427 for it in & _i . attrs { _visitor.visit_attribute(it) };
1428 if let Some(ref it) = _i . ident { _visitor.visit_ident(it) };
1429 _visitor.visit_macro(& _i . mac);
David Tolnaycc0f0372017-12-28 19:11:04 -05001430 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
David Tolnayc6b55bc2017-11-09 22:48:38 -08001431}
1432# [ cfg ( feature = "full" ) ]
David Tolnay500d8322017-12-18 00:32:51 -08001433pub fn visit_item_macro2<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMacro2) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001434 for it in & _i . attrs { _visitor.visit_attribute(it) };
1435 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001436 tokens_helper(_visitor, &(& _i . macro_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001437 _visitor.visit_ident(& _i . ident);
David Tolnayab919512017-12-30 23:31:51 -05001438 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay500d8322017-12-18 00:32:51 -08001439 // Skipped field _i . args;
David Tolnayab919512017-12-30 23:31:51 -05001440 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay500d8322017-12-18 00:32:51 -08001441 // Skipped field _i . body;
1442}
1443# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001444pub fn visit_item_mod<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMod) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001445 for it in & _i . attrs { _visitor.visit_attribute(it) };
1446 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001447 tokens_helper(_visitor, &(& _i . mod_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001448 _visitor.visit_ident(& _i . ident);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001449 if let Some(ref it) = _i . content {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001450 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001451 for it in & ( it ) . 1 { _visitor.visit_item(it) };
1452 };
David Tolnaycc0f0372017-12-28 19:11:04 -05001453 if let Some(ref it) = _i . semi { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04001454}
1455# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001456pub fn visit_item_static<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemStatic) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001457 for it in & _i . attrs { _visitor.visit_attribute(it) };
1458 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001459 tokens_helper(_visitor, &(& _i . static_token).0);
David Tolnay24237fb2017-12-29 02:15:26 -05001460 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001461 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001462 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001463 _visitor.visit_type(& * _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001464 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001465 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -05001466 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001467}
1468# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001469pub fn visit_item_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemStruct) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001470 for it in & _i . attrs { _visitor.visit_attribute(it) };
1471 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001472 tokens_helper(_visitor, &(& _i . struct_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001473 _visitor.visit_ident(& _i . ident);
1474 _visitor.visit_generics(& _i . generics);
David Tolnaye3d41b72017-12-31 15:24:00 -05001475 _visitor.visit_fields(& _i . fields);
David Tolnaycc0f0372017-12-28 19:11:04 -05001476 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04001477}
1478# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001479pub fn visit_item_trait<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemTrait) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001480 for it in & _i . attrs { _visitor.visit_attribute(it) };
1481 _visitor.visit_visibility(& _i . vis);
David Tolnay9b258702017-12-29 02:24:41 -05001482 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001483 if let Some(ref it) = _i . auto_token { tokens_helper(_visitor, &(it).0) };
1484 tokens_helper(_visitor, &(& _i . trait_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001485 _visitor.visit_ident(& _i . ident);
1486 _visitor.visit_generics(& _i . generics);
David Tolnaycc0f0372017-12-28 19:11:04 -05001487 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay6eff4da2018-01-01 20:27:45 -08001488 for el in Punctuated::elements(& _i . supertraits) { let it = el.item(); _visitor.visit_type_param_bound(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -05001489 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001490 for it in & _i . items { _visitor.visit_trait_item(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001491}
1492# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001493pub fn visit_item_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001494 for it in & _i . attrs { _visitor.visit_attribute(it) };
1495 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001496 tokens_helper(_visitor, &(& _i . type_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001497 _visitor.visit_ident(& _i . ident);
1498 _visitor.visit_generics(& _i . generics);
David Tolnaycc0f0372017-12-28 19:11:04 -05001499 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001500 _visitor.visit_type(& * _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001501 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001502}
1503# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001504pub fn visit_item_union<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemUnion) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001505 for it in & _i . attrs { _visitor.visit_attribute(it) };
1506 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001507 tokens_helper(_visitor, &(& _i . union_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001508 _visitor.visit_ident(& _i . ident);
1509 _visitor.visit_generics(& _i . generics);
David Tolnaye3d41b72017-12-31 15:24:00 -05001510 _visitor.visit_fields_named(& _i . fields);
Nika Layzell27726662017-10-24 23:16:35 -04001511}
1512# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001513pub fn visit_item_use<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemUse) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001514 for it in & _i . attrs { _visitor.visit_attribute(it) };
1515 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001516 tokens_helper(_visitor, &(& _i . use_token).0);
1517 if let Some(ref it) = _i . leading_colon { tokens_helper(_visitor, &(it).0) };
David Tolnay6eff4da2018-01-01 20:27:45 -08001518 for el in Punctuated::elements(& _i . prefix) { let it = el.item(); _visitor.visit_ident(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001519 _visitor.visit_use_tree(& _i . tree);
David Tolnaycc0f0372017-12-28 19:11:04 -05001520 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001521}
David Tolnay2ae520a2017-12-29 11:19:50 -05001522# [ cfg ( feature = "full" ) ]
1523pub fn visit_item_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemVerbatim) {
1524 // Skipped field _i . tts;
1525}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001526# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnaybcd498f2017-12-29 12:02:33 -05001527pub fn visit_label<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Label) {
1528 _visitor.visit_lifetime(& _i . name);
1529 tokens_helper(_visitor, &(& _i . colon_token).0);
1530}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001531# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4ba63a02017-12-28 15:53:05 -05001532pub fn visit_lifetime<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Lifetime) {
David Tolnay9a93bfe2017-12-31 17:23:00 -05001533 // Skipped field _i . term;
David Tolnay4ba63a02017-12-28 15:53:05 -05001534 _visitor.visit_span(& _i . span);
1535}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001536# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001537pub fn visit_lifetime_def<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LifetimeDef) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001538 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4ba63a02017-12-28 15:53:05 -05001539 _visitor.visit_lifetime(& _i . lifetime);
David Tolnaycc0f0372017-12-28 19:11:04 -05001540 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay6eff4da2018-01-01 20:27:45 -08001541 for el in Punctuated::elements(& _i . bounds) { let it = el.item(); _visitor.visit_lifetime(it) };
David Tolnay4ba63a02017-12-28 15:53:05 -05001542}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001543# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4ba63a02017-12-28 15:53:05 -05001544pub fn visit_lit<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Lit) {
1545 // Skipped field _i . value;
1546 _visitor.visit_span(& _i . span);
Nika Layzell27726662017-10-24 23:16:35 -04001547}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001548# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001549pub fn visit_local<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Local) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001550 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001551 tokens_helper(_visitor, &(& _i . let_token).0);
1552 _visitor.visit_pat(& * _i . pat);
David Tolnay8b4d3022017-12-29 12:11:10 -05001553 if let Some(ref it) = _i . ty {
1554 tokens_helper(_visitor, &(& ( it ) . 0).0);
1555 _visitor.visit_type(& * ( it ) . 1);
1556 };
1557 if let Some(ref it) = _i . init {
1558 tokens_helper(_visitor, &(& ( it ) . 0).0);
1559 _visitor.visit_expr(& * ( it ) . 1);
1560 };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001561 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001562}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001563# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001564pub fn visit_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Macro) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001565 _visitor.visit_path(& _i . path);
David Tolnaycc0f0372017-12-28 19:11:04 -05001566 tokens_helper(_visitor, &(& _i . bang_token).0);
David Tolnayab919512017-12-30 23:31:51 -05001567 _visitor.visit_macro_delimiter(& _i . delimiter);
1568 // Skipped field _i . tts;
1569}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001570# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayab919512017-12-30 23:31:51 -05001571pub fn visit_macro_delimiter<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MacroDelimiter) {
David Tolnayab919512017-12-30 23:31:51 -05001572 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001573 MacroDelimiter::Paren(ref _binding_0, ) => {
David Tolnayab919512017-12-30 23:31:51 -05001574 tokens_helper(_visitor, &(_binding_0).0);
1575 }
David Tolnay6702ade2017-12-30 23:38:15 -05001576 MacroDelimiter::Brace(ref _binding_0, ) => {
David Tolnayab919512017-12-30 23:31:51 -05001577 tokens_helper(_visitor, &(_binding_0).0);
1578 }
David Tolnay6702ade2017-12-30 23:38:15 -05001579 MacroDelimiter::Bracket(ref _binding_0, ) => {
David Tolnayab919512017-12-30 23:31:51 -05001580 tokens_helper(_visitor, &(_binding_0).0);
1581 }
1582 }
David Tolnaydecf28d2017-11-11 11:56:45 -08001583}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001584# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay85b69a42017-12-27 20:43:10 -05001585pub fn visit_member<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Member) {
David Tolnay85b69a42017-12-27 20:43:10 -05001586 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001587 Member::Named(ref _binding_0, ) => {
David Tolnay85b69a42017-12-27 20:43:10 -05001588 _visitor.visit_ident(_binding_0);
1589 }
David Tolnay6702ade2017-12-30 23:38:15 -05001590 Member::Unnamed(ref _binding_0, ) => {
David Tolnay85b69a42017-12-27 20:43:10 -05001591 _visitor.visit_index(_binding_0);
1592 }
1593 }
1594}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001595# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001596pub fn visit_meta_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MetaItem) {
Nika Layzell27726662017-10-24 23:16:35 -04001597 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001598 MetaItem::Term(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001599 _visitor.visit_ident(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001600 }
David Tolnay6702ade2017-12-30 23:38:15 -05001601 MetaItem::List(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001602 _visitor.visit_meta_item_list(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001603 }
David Tolnay6702ade2017-12-30 23:38:15 -05001604 MetaItem::NameValue(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001605 _visitor.visit_meta_name_value(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001606 }
1607 }
1608}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001609# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001610pub fn visit_meta_item_list<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MetaItemList) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001611 _visitor.visit_ident(& _i . ident);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001612 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -08001613 for el in Punctuated::elements(& _i . nested) { let it = el.item(); _visitor.visit_nested_meta_item(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001614}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001615# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001616pub fn visit_meta_name_value<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MetaNameValue) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001617 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001618 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4ba63a02017-12-28 15:53:05 -05001619 _visitor.visit_lit(& _i . lit);
Nika Layzell27726662017-10-24 23:16:35 -04001620}
1621# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001622pub fn visit_method_sig<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MethodSig) {
David Tolnay360a6342017-12-29 02:22:11 -05001623 if let Some(ref it) = _i . constness { tokens_helper(_visitor, &(it).0) };
David Tolnay9b258702017-12-29 02:24:41 -05001624 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001625 if let Some(ref it) = _i . abi { _visitor.visit_abi(it) };
1626 _visitor.visit_ident(& _i . ident);
1627 _visitor.visit_fn_decl(& _i . decl);
Nika Layzell27726662017-10-24 23:16:35 -04001628}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001629# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnayd60cfec2017-12-29 00:21:38 -05001630pub fn visit_method_turbofish<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MethodTurbofish) {
1631 tokens_helper(_visitor, &(& _i . colon2_token).0);
1632 tokens_helper(_visitor, &(& _i . lt_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -08001633 for el in Punctuated::elements(& _i . args) { let it = el.item(); _visitor.visit_generic_method_argument(it) };
David Tolnayd60cfec2017-12-29 00:21:38 -05001634 tokens_helper(_visitor, &(& _i . gt_token).0);
1635}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001636# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001637pub fn visit_nested_meta_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast NestedMetaItem) {
Nika Layzell27726662017-10-24 23:16:35 -04001638 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001639 NestedMetaItem::MetaItem(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001640 _visitor.visit_meta_item(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001641 }
David Tolnay6702ade2017-12-30 23:38:15 -05001642 NestedMetaItem::Literal(ref _binding_0, ) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05001643 _visitor.visit_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001644 }
1645 }
1646}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001647# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc08227a2017-12-04 16:30:17 -05001648pub fn visit_parenthesized_generic_arguments<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ParenthesizedGenericArguments) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001649 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -08001650 for el in Punctuated::elements(& _i . inputs) { let it = el.item(); _visitor.visit_type(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001651 _visitor.visit_return_type(& _i . output);
Nika Layzell27726662017-10-24 23:16:35 -04001652}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001653# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001654pub fn visit_pat<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Pat) {
Nika Layzell27726662017-10-24 23:16:35 -04001655 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001656 Pat::Wild(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001657 _visitor.visit_pat_wild(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001658 }
David Tolnay6702ade2017-12-30 23:38:15 -05001659 Pat::Ident(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001660 _visitor.visit_pat_ident(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001661 }
David Tolnay6702ade2017-12-30 23:38:15 -05001662 Pat::Struct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001663 _visitor.visit_pat_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001664 }
David Tolnay6702ade2017-12-30 23:38:15 -05001665 Pat::TupleStruct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001666 _visitor.visit_pat_tuple_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001667 }
David Tolnay6702ade2017-12-30 23:38:15 -05001668 Pat::Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001669 _visitor.visit_pat_path(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001670 }
David Tolnay6702ade2017-12-30 23:38:15 -05001671 Pat::Tuple(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001672 _visitor.visit_pat_tuple(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001673 }
David Tolnay6702ade2017-12-30 23:38:15 -05001674 Pat::Box(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001675 _visitor.visit_pat_box(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001676 }
David Tolnay6702ade2017-12-30 23:38:15 -05001677 Pat::Ref(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001678 _visitor.visit_pat_ref(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001679 }
David Tolnay6702ade2017-12-30 23:38:15 -05001680 Pat::Lit(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001681 _visitor.visit_pat_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001682 }
David Tolnay6702ade2017-12-30 23:38:15 -05001683 Pat::Range(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001684 _visitor.visit_pat_range(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001685 }
David Tolnay6702ade2017-12-30 23:38:15 -05001686 Pat::Slice(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001687 _visitor.visit_pat_slice(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001688 }
David Tolnay6702ade2017-12-30 23:38:15 -05001689 Pat::Macro(ref _binding_0, ) => {
David Tolnay323279a2017-12-29 11:26:32 -05001690 _visitor.visit_pat_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001691 }
David Tolnay6702ade2017-12-30 23:38:15 -05001692 Pat::Verbatim(ref _binding_0, ) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05001693 _visitor.visit_pat_verbatim(_binding_0);
1694 }
Nika Layzell27726662017-10-24 23:16:35 -04001695 }
1696}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001697# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001698pub fn visit_pat_box<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatBox) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001699 tokens_helper(_visitor, &(& _i . box_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001700 _visitor.visit_pat(& * _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001701}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001702# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001703pub fn visit_pat_ident<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatIdent) {
David Tolnay24237fb2017-12-29 02:15:26 -05001704 if let Some(ref it) = _i . by_ref { tokens_helper(_visitor, &(it).0) };
1705 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001706 _visitor.visit_ident(& _i . ident);
David Tolnay8b4d3022017-12-29 12:11:10 -05001707 if let Some(ref it) = _i . subpat {
1708 tokens_helper(_visitor, &(& ( it ) . 0).0);
1709 _visitor.visit_pat(& * ( it ) . 1);
1710 };
Nika Layzell27726662017-10-24 23:16:35 -04001711}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001712# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001713pub fn visit_pat_lit<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatLit) {
David Tolnay4a918742017-12-28 16:54:41 -05001714 _visitor.visit_expr(& * _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -04001715}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001716# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay323279a2017-12-29 11:26:32 -05001717pub fn visit_pat_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatMacro) {
1718 _visitor.visit_macro(& _i . mac);
1719}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001720# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001721pub fn visit_pat_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatPath) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001722 if let Some(ref it) = _i . qself { _visitor.visit_qself(it) };
1723 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -04001724}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001725# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001726pub fn visit_pat_range<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatRange) {
David Tolnay4a918742017-12-28 16:54:41 -05001727 _visitor.visit_expr(& * _i . lo);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001728 _visitor.visit_range_limits(& _i . limits);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001729 _visitor.visit_expr(& * _i . hi);
Nika Layzell27726662017-10-24 23:16:35 -04001730}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001731# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001732pub fn visit_pat_ref<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatRef) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001733 tokens_helper(_visitor, &(& _i . and_token).0);
David Tolnay24237fb2017-12-29 02:15:26 -05001734 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001735 _visitor.visit_pat(& * _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001736}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001737# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001738pub fn visit_pat_slice<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatSlice) {
David Tolnay4a3f59a2017-12-28 21:21:12 -05001739 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -08001740 for el in Punctuated::elements(& _i . front) { let it = el.item(); _visitor.visit_pat(it) };
David Tolnay4a918742017-12-28 16:54:41 -05001741 if let Some(ref it) = _i . middle { _visitor.visit_pat(& * * it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001742 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
David Tolnay41871922017-12-29 01:53:45 -05001743 if let Some(ref it) = _i . comma_token { tokens_helper(_visitor, &(it).0) };
David Tolnay6eff4da2018-01-01 20:27:45 -08001744 for el in Punctuated::elements(& _i . back) { let it = el.item(); _visitor.visit_pat(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001745}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001746# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001747pub fn visit_pat_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatStruct) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001748 _visitor.visit_path(& _i . path);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001749 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -08001750 for el in Punctuated::elements(& _i . fields) { let it = el.item(); _visitor.visit_field_pat(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001751 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04001752}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001753# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001754pub fn visit_pat_tuple<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatTuple) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001755 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -08001756 for el in Punctuated::elements(& _i . front) { let it = el.item(); _visitor.visit_pat(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001757 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
David Tolnay41871922017-12-29 01:53:45 -05001758 if let Some(ref it) = _i . comma_token { tokens_helper(_visitor, &(it).0) };
David Tolnay6eff4da2018-01-01 20:27:45 -08001759 for el in Punctuated::elements(& _i . back) { let it = el.item(); _visitor.visit_pat(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001760}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001761# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001762pub fn visit_pat_tuple_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatTupleStruct) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001763 _visitor.visit_path(& _i . path);
1764 _visitor.visit_pat_tuple(& _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001765}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001766# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay2ae520a2017-12-29 11:19:50 -05001767pub fn visit_pat_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatVerbatim) {
1768 // Skipped field _i . tts;
1769}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001770# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001771pub fn visit_pat_wild<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatWild) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001772 tokens_helper(_visitor, &(& _i . underscore_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001773}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001774# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001775pub fn visit_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Path) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001776 if let Some(ref it) = _i . leading_colon { tokens_helper(_visitor, &(it).0) };
David Tolnay6eff4da2018-01-01 20:27:45 -08001777 for el in Punctuated::elements(& _i . segments) { let it = el.item(); _visitor.visit_path_segment(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001778}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001779# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc08227a2017-12-04 16:30:17 -05001780pub fn visit_path_arguments<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PathArguments) {
Nika Layzellc08227a2017-12-04 16:30:17 -05001781 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001782 PathArguments::None => { }
1783 PathArguments::AngleBracketed(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001784 _visitor.visit_angle_bracketed_generic_arguments(_binding_0);
Nika Layzellc08227a2017-12-04 16:30:17 -05001785 }
David Tolnay6702ade2017-12-30 23:38:15 -05001786 PathArguments::Parenthesized(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001787 _visitor.visit_parenthesized_generic_arguments(_binding_0);
Nika Layzellc08227a2017-12-04 16:30:17 -05001788 }
1789 }
1790}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001791# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001792pub fn visit_path_segment<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PathSegment) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001793 _visitor.visit_ident(& _i . ident);
1794 _visitor.visit_path_arguments(& _i . arguments);
Nika Layzell27726662017-10-24 23:16:35 -04001795}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001796# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayd4add852018-01-01 20:13:24 -08001797pub fn visit_predicate_eq<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PredicateEq) {
1798 _visitor.visit_type(& _i . lhs_ty);
1799 tokens_helper(_visitor, &(& _i . eq_token).0);
1800 _visitor.visit_type(& _i . rhs_ty);
1801}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001802# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayd4add852018-01-01 20:13:24 -08001803pub fn visit_predicate_lifetime<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PredicateLifetime) {
1804 _visitor.visit_lifetime(& _i . lifetime);
1805 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay6eff4da2018-01-01 20:27:45 -08001806 for el in Punctuated::elements(& _i . bounds) { let it = el.item(); _visitor.visit_lifetime(it) };
David Tolnayd4add852018-01-01 20:13:24 -08001807}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001808# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayd4add852018-01-01 20:13:24 -08001809pub fn visit_predicate_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PredicateType) {
David Tolnay40fb8ce2018-01-02 10:53:46 -08001810 if let Some(ref it) = _i . lifetimes { _visitor.visit_bound_lifetimes(it) };
David Tolnayd4add852018-01-01 20:13:24 -08001811 _visitor.visit_type(& _i . bounded_ty);
1812 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -08001813 for el in Punctuated::elements(& _i . bounds) { let it = el.item(); _visitor.visit_type_param_bound(it) };
David Tolnayd4add852018-01-01 20:13:24 -08001814}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001815# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001816pub fn visit_qself<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast QSelf) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001817 tokens_helper(_visitor, &(& _i . lt_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001818 _visitor.visit_type(& * _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -04001819 // Skipped field _i . position;
David Tolnaycc0f0372017-12-28 19:11:04 -05001820 if let Some(ref it) = _i . as_token { tokens_helper(_visitor, &(it).0) };
1821 tokens_helper(_visitor, &(& _i . gt_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001822}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001823# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001824pub fn visit_range_limits<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast RangeLimits) {
Nika Layzell27726662017-10-24 23:16:35 -04001825 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001826 RangeLimits::HalfOpen(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05001827 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04001828 }
David Tolnay6702ade2017-12-30 23:38:15 -05001829 RangeLimits::Closed(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05001830 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04001831 }
1832 }
1833}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001834# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001835pub fn visit_return_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ReturnType) {
David Tolnayf93b90d2017-11-11 19:21:26 -08001836 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001837 ReturnType::Default => { }
1838 ReturnType::Type(ref _binding_0, ref _binding_1, ) => {
David Tolnay4a3f59a2017-12-28 21:21:12 -05001839 tokens_helper(_visitor, &(_binding_0).0);
1840 _visitor.visit_type(& * * _binding_1);
David Tolnayf93b90d2017-11-11 19:21:26 -08001841 }
1842 }
1843}
Nika Layzellefb83ba2017-12-19 18:23:55 -05001844
1845pub fn visit_span<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Span) {
1846}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001847# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001848pub fn visit_stmt<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Stmt) {
Nika Layzell27726662017-10-24 23:16:35 -04001849 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001850 Stmt::Local(ref _binding_0, ) => {
David Tolnay4a918742017-12-28 16:54:41 -05001851 _visitor.visit_local(& * * _binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001852 }
David Tolnay6702ade2017-12-30 23:38:15 -05001853 Stmt::Item(ref _binding_0, ) => {
David Tolnay4a918742017-12-28 16:54:41 -05001854 _visitor.visit_item(& * * _binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001855 }
David Tolnay6702ade2017-12-30 23:38:15 -05001856 Stmt::Expr(ref _binding_0, ) => {
David Tolnay4a918742017-12-28 16:54:41 -05001857 _visitor.visit_expr(& * * _binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001858 }
David Tolnay6702ade2017-12-30 23:38:15 -05001859 Stmt::Semi(ref _binding_0, ref _binding_1, ) => {
David Tolnay4a918742017-12-28 16:54:41 -05001860 _visitor.visit_expr(& * * _binding_0);
David Tolnaycc0f0372017-12-28 19:11:04 -05001861 tokens_helper(_visitor, &(_binding_1).0);
Nika Layzell27726662017-10-24 23:16:35 -04001862 }
Nika Layzell27726662017-10-24 23:16:35 -04001863 }
1864}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001865# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay40fb8ce2018-01-02 10:53:46 -08001866pub fn visit_trait_bound<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitBound) {
1867 _visitor.visit_trait_bound_modifier(& _i . modifier);
1868 if let Some(ref it) = _i . lifetimes { _visitor.visit_bound_lifetimes(it) };
1869 _visitor.visit_path(& _i . path);
1870}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001871# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001872pub fn visit_trait_bound_modifier<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitBoundModifier) {
Nika Layzell27726662017-10-24 23:16:35 -04001873 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001874 TraitBoundModifier::None => { }
1875 TraitBoundModifier::Maybe(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05001876 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04001877 }
1878 }
1879}
1880# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001881pub fn visit_trait_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItem) {
Nika Layzell27726662017-10-24 23:16:35 -04001882 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001883 TraitItem::Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001884 _visitor.visit_trait_item_const(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001885 }
David Tolnay6702ade2017-12-30 23:38:15 -05001886 TraitItem::Method(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001887 _visitor.visit_trait_item_method(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001888 }
David Tolnay6702ade2017-12-30 23:38:15 -05001889 TraitItem::Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001890 _visitor.visit_trait_item_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001891 }
David Tolnay6702ade2017-12-30 23:38:15 -05001892 TraitItem::Macro(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001893 _visitor.visit_trait_item_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001894 }
David Tolnay6702ade2017-12-30 23:38:15 -05001895 TraitItem::Verbatim(ref _binding_0, ) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05001896 _visitor.visit_trait_item_verbatim(_binding_0);
1897 }
Nika Layzell27726662017-10-24 23:16:35 -04001898 }
1899}
1900# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001901pub fn visit_trait_item_const<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemConst) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001902 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001903 tokens_helper(_visitor, &(& _i . const_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001904 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001905 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001906 _visitor.visit_type(& _i . ty);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001907 if let Some(ref it) = _i . default {
David Tolnaycc0f0372017-12-28 19:11:04 -05001908 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001909 _visitor.visit_expr(& ( it ) . 1);
1910 };
David Tolnaycc0f0372017-12-28 19:11:04 -05001911 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnayda705bd2017-11-10 21:58:05 -08001912}
1913# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001914pub fn visit_trait_item_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemMacro) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001915 for it in & _i . attrs { _visitor.visit_attribute(it) };
1916 _visitor.visit_macro(& _i . mac);
David Tolnaycc0f0372017-12-28 19:11:04 -05001917 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
David Tolnayda705bd2017-11-10 21:58:05 -08001918}
1919# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001920pub fn visit_trait_item_method<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemMethod) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001921 for it in & _i . attrs { _visitor.visit_attribute(it) };
1922 _visitor.visit_method_sig(& _i . sig);
1923 if let Some(ref it) = _i . default { _visitor.visit_block(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001924 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04001925}
1926# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001927pub fn visit_trait_item_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001928 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001929 tokens_helper(_visitor, &(& _i . type_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001930 _visitor.visit_ident(& _i . ident);
1931 _visitor.visit_generics(& _i . generics);
David Tolnaycc0f0372017-12-28 19:11:04 -05001932 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay6eff4da2018-01-01 20:27:45 -08001933 for el in Punctuated::elements(& _i . bounds) { let it = el.item(); _visitor.visit_type_param_bound(it) };
David Tolnay5c4c0b52017-12-28 17:58:54 -05001934 if let Some(ref it) = _i . default {
David Tolnaycc0f0372017-12-28 19:11:04 -05001935 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001936 _visitor.visit_type(& ( it ) . 1);
1937 };
David Tolnaycc0f0372017-12-28 19:11:04 -05001938 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001939}
David Tolnay2ae520a2017-12-29 11:19:50 -05001940# [ cfg ( feature = "full" ) ]
1941pub fn visit_trait_item_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemVerbatim) {
1942 // Skipped field _i . tts;
1943}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001944# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001945pub fn visit_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Type) {
Nika Layzell27726662017-10-24 23:16:35 -04001946 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001947 Type::Slice(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001948 _visitor.visit_type_slice(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001949 }
David Tolnay6702ade2017-12-30 23:38:15 -05001950 Type::Array(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001951 _visitor.visit_type_array(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001952 }
David Tolnay6702ade2017-12-30 23:38:15 -05001953 Type::Ptr(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001954 _visitor.visit_type_ptr(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001955 }
David Tolnay6702ade2017-12-30 23:38:15 -05001956 Type::Reference(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001957 _visitor.visit_type_reference(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001958 }
David Tolnay6702ade2017-12-30 23:38:15 -05001959 Type::BareFn(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001960 _visitor.visit_type_bare_fn(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001961 }
David Tolnay6702ade2017-12-30 23:38:15 -05001962 Type::Never(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001963 _visitor.visit_type_never(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001964 }
David Tolnay6702ade2017-12-30 23:38:15 -05001965 Type::Tuple(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001966 _visitor.visit_type_tuple(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001967 }
David Tolnay6702ade2017-12-30 23:38:15 -05001968 Type::Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001969 _visitor.visit_type_path(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001970 }
David Tolnay6702ade2017-12-30 23:38:15 -05001971 Type::TraitObject(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001972 _visitor.visit_type_trait_object(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001973 }
David Tolnay6702ade2017-12-30 23:38:15 -05001974 Type::ImplTrait(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001975 _visitor.visit_type_impl_trait(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001976 }
David Tolnay6702ade2017-12-30 23:38:15 -05001977 Type::Paren(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001978 _visitor.visit_type_paren(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001979 }
David Tolnay6702ade2017-12-30 23:38:15 -05001980 Type::Group(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001981 _visitor.visit_type_group(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001982 }
David Tolnay6702ade2017-12-30 23:38:15 -05001983 Type::Infer(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001984 _visitor.visit_type_infer(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001985 }
David Tolnay6702ade2017-12-30 23:38:15 -05001986 Type::Macro(ref _binding_0, ) => {
David Tolnay323279a2017-12-29 11:26:32 -05001987 _visitor.visit_type_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001988 }
David Tolnay6702ade2017-12-30 23:38:15 -05001989 Type::Verbatim(ref _binding_0, ) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05001990 _visitor.visit_type_verbatim(_binding_0);
1991 }
Nika Layzell27726662017-10-24 23:16:35 -04001992 }
1993}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001994# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001995pub fn visit_type_array<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeArray) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001996 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05001997 _visitor.visit_type(& * _i . elem);
David Tolnaycc0f0372017-12-28 19:11:04 -05001998 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05001999 _visitor.visit_expr(& _i . len);
Nika Layzell27726662017-10-24 23:16:35 -04002000}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002001# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002002pub fn visit_type_bare_fn<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeBareFn) {
David Tolnaybe7a9592017-12-29 02:39:53 -05002003 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
2004 if let Some(ref it) = _i . abi { _visitor.visit_abi(it) };
2005 tokens_helper(_visitor, &(& _i . fn_token).0);
2006 if let Some(ref it) = _i . lifetimes { _visitor.visit_bound_lifetimes(it) };
2007 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -08002008 for el in Punctuated::elements(& _i . inputs) { let it = el.item(); _visitor.visit_bare_fn_arg(it) };
David Tolnaybe7a9592017-12-29 02:39:53 -05002009 if let Some(ref it) = _i . variadic { tokens_helper(_visitor, &(it).0) };
2010 _visitor.visit_return_type(& _i . output);
Nika Layzell27726662017-10-24 23:16:35 -04002011}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002012# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002013pub fn visit_type_group<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeGroup) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002014 tokens_helper(_visitor, &(& _i . group_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05002015 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04002016}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002017# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002018pub fn visit_type_impl_trait<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeImplTrait) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002019 tokens_helper(_visitor, &(& _i . impl_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -08002020 for el in Punctuated::elements(& _i . bounds) { let it = el.item(); _visitor.visit_type_param_bound(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002021}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002022# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002023pub fn visit_type_infer<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeInfer) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002024 tokens_helper(_visitor, &(& _i . underscore_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04002025}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002026# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay323279a2017-12-29 11:26:32 -05002027pub fn visit_type_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeMacro) {
2028 _visitor.visit_macro(& _i . mac);
2029}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002030# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002031pub fn visit_type_never<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeNever) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002032 tokens_helper(_visitor, &(& _i . bang_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04002033}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002034# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002035pub fn visit_type_param<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParam) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002036 for it in & _i . attrs { _visitor.visit_attribute(it) };
2037 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05002038 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay6eff4da2018-01-01 20:27:45 -08002039 for el in Punctuated::elements(& _i . bounds) { let it = el.item(); _visitor.visit_type_param_bound(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05002040 if let Some(ref it) = _i . eq_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05002041 if let Some(ref it) = _i . default { _visitor.visit_type(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002042}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002043# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002044pub fn visit_type_param_bound<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParamBound) {
Nika Layzell27726662017-10-24 23:16:35 -04002045 match *_i {
David Tolnay40fb8ce2018-01-02 10:53:46 -08002046 TypeParamBound::Trait(ref _binding_0, ) => {
2047 _visitor.visit_trait_bound(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002048 }
David Tolnay40fb8ce2018-01-02 10:53:46 -08002049 TypeParamBound::Lifetime(ref _binding_0, ) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05002050 _visitor.visit_lifetime(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002051 }
2052 }
2053}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002054# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002055pub fn visit_type_paren<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParen) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002056 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05002057 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04002058}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002059# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002060pub fn visit_type_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypePath) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002061 if let Some(ref it) = _i . qself { _visitor.visit_qself(it) };
2062 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -04002063}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002064# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002065pub fn visit_type_ptr<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypePtr) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002066 tokens_helper(_visitor, &(& _i . star_token).0);
2067 if let Some(ref it) = _i . const_token { tokens_helper(_visitor, &(it).0) };
David Tolnay136aaa32017-12-29 02:37:36 -05002068 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
2069 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04002070}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002071# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002072pub fn visit_type_reference<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeReference) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002073 tokens_helper(_visitor, &(& _i . and_token).0);
David Tolnay4ba63a02017-12-28 15:53:05 -05002074 if let Some(ref it) = _i . lifetime { _visitor.visit_lifetime(it) };
David Tolnay136aaa32017-12-29 02:37:36 -05002075 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
2076 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04002077}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002078# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002079pub fn visit_type_slice<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeSlice) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002080 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05002081 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04002082}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002083# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002084pub fn visit_type_trait_object<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeTraitObject) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002085 if let Some(ref it) = _i . dyn_token { tokens_helper(_visitor, &(it).0) };
David Tolnay6eff4da2018-01-01 20:27:45 -08002086 for el in Punctuated::elements(& _i . bounds) { let it = el.item(); _visitor.visit_type_param_bound(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002087}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002088# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay05362582017-12-26 01:33:57 -05002089pub fn visit_type_tuple<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeTuple) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002090 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -08002091 for el in Punctuated::elements(& _i . elems) { let it = el.item(); _visitor.visit_type(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002092}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002093# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay2ae520a2017-12-29 11:19:50 -05002094pub fn visit_type_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeVerbatim) {
2095 // Skipped field _i . tts;
2096}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002097# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002098pub fn visit_un_op<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UnOp) {
Nika Layzell27726662017-10-24 23:16:35 -04002099 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05002100 UnOp::Deref(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05002101 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04002102 }
David Tolnay6702ade2017-12-30 23:38:15 -05002103 UnOp::Not(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05002104 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04002105 }
David Tolnay6702ade2017-12-30 23:38:15 -05002106 UnOp::Neg(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05002107 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04002108 }
2109 }
2110}
David Tolnay5f332a92017-12-26 00:42:45 -05002111# [ cfg ( feature = "full" ) ]
2112pub fn visit_use_glob<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseGlob) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002113 tokens_helper(_visitor, &(& _i . star_token).0);
David Tolnay5f332a92017-12-26 00:42:45 -05002114}
2115# [ cfg ( feature = "full" ) ]
2116pub fn visit_use_list<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseList) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002117 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -08002118 for el in Punctuated::elements(& _i . items) { let it = el.item(); _visitor.visit_use_tree(it) };
David Tolnay5f332a92017-12-26 00:42:45 -05002119}
2120# [ cfg ( feature = "full" ) ]
2121pub fn visit_use_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UsePath) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002122 _visitor.visit_ident(& _i . ident);
David Tolnay5c4c0b52017-12-28 17:58:54 -05002123 if let Some(ref it) = _i . rename {
David Tolnaycc0f0372017-12-28 19:11:04 -05002124 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05002125 _visitor.visit_ident(& ( it ) . 1);
2126 };
David Tolnay5f332a92017-12-26 00:42:45 -05002127}
2128# [ cfg ( feature = "full" ) ]
2129pub fn visit_use_tree<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseTree) {
David Tolnay5f332a92017-12-26 00:42:45 -05002130 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05002131 UseTree::Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002132 _visitor.visit_use_path(_binding_0);
David Tolnay5f332a92017-12-26 00:42:45 -05002133 }
David Tolnay6702ade2017-12-30 23:38:15 -05002134 UseTree::Glob(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002135 _visitor.visit_use_glob(_binding_0);
David Tolnay5f332a92017-12-26 00:42:45 -05002136 }
David Tolnay6702ade2017-12-30 23:38:15 -05002137 UseTree::List(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002138 _visitor.visit_use_list(_binding_0);
David Tolnay5f332a92017-12-26 00:42:45 -05002139 }
2140 }
2141}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002142# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002143pub fn visit_variant<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Variant) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002144 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05002145 _visitor.visit_ident(& _i . ident);
David Tolnaye3d41b72017-12-31 15:24:00 -05002146 _visitor.visit_fields(& _i . fields);
David Tolnaye67902a2017-12-28 22:12:00 -05002147 if let Some(ref it) = _i . discriminant {
2148 tokens_helper(_visitor, &(& ( it ) . 0).0);
2149 _visitor.visit_expr(& ( it ) . 1);
2150 };
Nika Layzell27726662017-10-24 23:16:35 -04002151}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002152# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002153pub fn visit_vis_crate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisCrate) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002154 tokens_helper(_visitor, &(& _i . pub_token).0);
David Tolnay1e01f9c2017-12-28 20:16:19 -05002155 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnaycc0f0372017-12-28 19:11:04 -05002156 tokens_helper(_visitor, &(& _i . crate_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04002157}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002158# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002159pub fn visit_vis_public<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisPublic) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002160 tokens_helper(_visitor, &(& _i . pub_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04002161}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002162# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002163pub fn visit_vis_restricted<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisRestricted) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002164 tokens_helper(_visitor, &(& _i . pub_token).0);
David Tolnay1e01f9c2017-12-28 20:16:19 -05002165 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnaycc0f0372017-12-28 19:11:04 -05002166 if let Some(ref it) = _i . in_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a918742017-12-28 16:54:41 -05002167 _visitor.visit_path(& * _i . path);
Nika Layzell27726662017-10-24 23:16:35 -04002168}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002169# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002170pub fn visit_visibility<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Visibility) {
Nika Layzell27726662017-10-24 23:16:35 -04002171 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05002172 Visibility::Public(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002173 _visitor.visit_vis_public(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002174 }
David Tolnay6702ade2017-12-30 23:38:15 -05002175 Visibility::Crate(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002176 _visitor.visit_vis_crate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002177 }
David Tolnay6702ade2017-12-30 23:38:15 -05002178 Visibility::Restricted(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002179 _visitor.visit_vis_restricted(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002180 }
David Tolnay6702ade2017-12-30 23:38:15 -05002181 Visibility::Inherited => { }
Nika Layzell27726662017-10-24 23:16:35 -04002182 }
2183}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002184# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002185pub fn visit_where_clause<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WhereClause) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002186 tokens_helper(_visitor, &(& _i . where_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -08002187 for el in Punctuated::elements(& _i . predicates) { let it = el.item(); _visitor.visit_where_predicate(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002188}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002189# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002190pub fn visit_where_predicate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WherePredicate) {
Nika Layzell27726662017-10-24 23:16:35 -04002191 match *_i {
David Tolnayd4add852018-01-01 20:13:24 -08002192 WherePredicate::Type(ref _binding_0, ) => {
2193 _visitor.visit_predicate_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002194 }
David Tolnayd4add852018-01-01 20:13:24 -08002195 WherePredicate::Lifetime(ref _binding_0, ) => {
2196 _visitor.visit_predicate_lifetime(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002197 }
David Tolnayd4add852018-01-01 20:13:24 -08002198 WherePredicate::Eq(ref _binding_0, ) => {
2199 _visitor.visit_predicate_eq(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002200 }
2201 }
2202}
2203