blob: aaf93772cc80b4af1e5e862c60d30e230f41053e [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 Tolnay360efd22018-01-04 23:35:26 -0800255# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
256fn visit_lit_bool(&mut self, i: &'ast LitBool) { visit_lit_bool(self, i) }
257# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
258fn visit_lit_byte(&mut self, i: &'ast LitByte) { visit_lit_byte(self, i) }
259# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
260fn visit_lit_byte_str(&mut self, i: &'ast LitByteStr) { visit_lit_byte_str(self, i) }
261# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
262fn visit_lit_char(&mut self, i: &'ast LitChar) { visit_lit_char(self, i) }
263# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
264fn visit_lit_float(&mut self, i: &'ast LitFloat) { visit_lit_float(self, i) }
265# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
266fn visit_lit_int(&mut self, i: &'ast LitInt) { visit_lit_int(self, i) }
267# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
268fn visit_lit_str(&mut self, i: &'ast LitStr) { visit_lit_str(self, i) }
269# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
270fn visit_lit_verbatim(&mut self, i: &'ast LitVerbatim) { visit_lit_verbatim(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800271# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500272fn visit_local(&mut self, i: &'ast Local) { visit_local(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_macro(&mut self, i: &'ast Macro) { visit_macro(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800275# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayab919512017-12-30 23:31:51 -0500276fn visit_macro_delimiter(&mut self, i: &'ast MacroDelimiter) { visit_macro_delimiter(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800277# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay85b69a42017-12-27 20:43:10 -0500278fn visit_member(&mut self, i: &'ast Member) { visit_member(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800279# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500280fn visit_meta_item(&mut self, i: &'ast MetaItem) { visit_meta_item(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800281# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500282fn visit_meta_item_list(&mut self, i: &'ast MetaItemList) { visit_meta_item_list(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800283# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500284fn visit_meta_name_value(&mut self, i: &'ast MetaNameValue) { visit_meta_name_value(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400285# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500286fn visit_method_sig(&mut self, i: &'ast MethodSig) { visit_method_sig(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800287# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnayd60cfec2017-12-29 00:21:38 -0500288fn visit_method_turbofish(&mut self, i: &'ast MethodTurbofish) { visit_method_turbofish(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800289# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500290fn visit_nested_meta_item(&mut self, i: &'ast NestedMetaItem) { visit_nested_meta_item(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800291# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc08227a2017-12-04 16:30:17 -0500292fn visit_parenthesized_generic_arguments(&mut self, i: &'ast ParenthesizedGenericArguments) { visit_parenthesized_generic_arguments(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(&mut self, i: &'ast Pat) { visit_pat(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_box(&mut self, i: &'ast PatBox) { visit_pat_box(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_ident(&mut self, i: &'ast PatIdent) { visit_pat_ident(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_lit(&mut self, i: &'ast PatLit) { visit_pat_lit(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800301# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay323279a2017-12-29 11:26:32 -0500302fn visit_pat_macro(&mut self, i: &'ast PatMacro) { visit_pat_macro(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_path(&mut self, i: &'ast PatPath) { visit_pat_path(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800305# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500306fn visit_pat_range(&mut self, i: &'ast PatRange) { visit_pat_range(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800307# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500308fn visit_pat_ref(&mut self, i: &'ast PatRef) { visit_pat_ref(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800309# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500310fn visit_pat_slice(&mut self, i: &'ast PatSlice) { visit_pat_slice(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800311# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500312fn visit_pat_struct(&mut self, i: &'ast PatStruct) { visit_pat_struct(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800313# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500314fn visit_pat_tuple(&mut self, i: &'ast PatTuple) { visit_pat_tuple(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800315# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500316fn visit_pat_tuple_struct(&mut self, i: &'ast PatTupleStruct) { visit_pat_tuple_struct(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800317# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay2ae520a2017-12-29 11:19:50 -0500318fn visit_pat_verbatim(&mut self, i: &'ast PatVerbatim) { visit_pat_verbatim(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_pat_wild(&mut self, i: &'ast PatWild) { visit_pat_wild(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_path(&mut self, i: &'ast Path) { visit_path(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800323# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc08227a2017-12-04 16:30:17 -0500324fn visit_path_arguments(&mut self, i: &'ast PathArguments) { visit_path_arguments(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800325# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500326fn visit_path_segment(&mut self, i: &'ast PathSegment) { visit_path_segment(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800327# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayd4add852018-01-01 20:13:24 -0800328fn visit_predicate_eq(&mut self, i: &'ast PredicateEq) { visit_predicate_eq(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800329# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayd4add852018-01-01 20:13:24 -0800330fn visit_predicate_lifetime(&mut self, i: &'ast PredicateLifetime) { visit_predicate_lifetime(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800331# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayd4add852018-01-01 20:13:24 -0800332fn visit_predicate_type(&mut self, i: &'ast PredicateType) { visit_predicate_type(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800333# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500334fn visit_qself(&mut self, i: &'ast QSelf) { visit_qself(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800335# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500336fn visit_range_limits(&mut self, i: &'ast RangeLimits) { visit_range_limits(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800337# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500338fn visit_return_type(&mut self, i: &'ast ReturnType) { visit_return_type(self, i) }
Nika Layzellefb83ba2017-12-19 18:23:55 -0500339
340fn visit_span(&mut self, i: &'ast Span) { visit_span(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800341# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500342fn visit_stmt(&mut self, i: &'ast Stmt) { visit_stmt(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800343# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay40fb8ce2018-01-02 10:53:46 -0800344fn visit_trait_bound(&mut self, i: &'ast TraitBound) { visit_trait_bound(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_trait_bound_modifier(&mut self, i: &'ast TraitBoundModifier) { visit_trait_bound_modifier(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400347# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500348fn visit_trait_item(&mut self, i: &'ast TraitItem) { visit_trait_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400349# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500350fn visit_trait_item_const(&mut self, i: &'ast TraitItemConst) { visit_trait_item_const(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400351# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500352fn visit_trait_item_macro(&mut self, i: &'ast TraitItemMacro) { visit_trait_item_macro(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400353# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500354fn visit_trait_item_method(&mut self, i: &'ast TraitItemMethod) { visit_trait_item_method(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400355# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500356fn visit_trait_item_type(&mut self, i: &'ast TraitItemType) { visit_trait_item_type(self, i) }
David Tolnay2ae520a2017-12-29 11:19:50 -0500357# [ cfg ( feature = "full" ) ]
358fn visit_trait_item_verbatim(&mut self, i: &'ast TraitItemVerbatim) { visit_trait_item_verbatim(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(&mut self, i: &'ast Type) { visit_type(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_array(&mut self, i: &'ast TypeArray) { visit_type_array(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_bare_fn(&mut self, i: &'ast TypeBareFn) { visit_type_bare_fn(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_group(&mut self, i: &'ast TypeGroup) { visit_type_group(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_impl_trait(&mut self, i: &'ast TypeImplTrait) { visit_type_impl_trait(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_infer(&mut self, i: &'ast TypeInfer) { visit_type_infer(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800371# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay323279a2017-12-29 11:26:32 -0500372fn visit_type_macro(&mut self, i: &'ast TypeMacro) { visit_type_macro(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_never(&mut self, i: &'ast TypeNever) { visit_type_never(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800375# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500376fn visit_type_param(&mut self, i: &'ast TypeParam) { visit_type_param(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800377# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500378fn visit_type_param_bound(&mut self, i: &'ast TypeParamBound) { visit_type_param_bound(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_type_paren(&mut self, i: &'ast TypeParen) { visit_type_paren(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800381# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500382fn visit_type_path(&mut self, i: &'ast TypePath) { visit_type_path(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800383# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500384fn visit_type_ptr(&mut self, i: &'ast TypePtr) { visit_type_ptr(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800385# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500386fn visit_type_reference(&mut self, i: &'ast TypeReference) { visit_type_reference(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800387# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500388fn visit_type_slice(&mut self, i: &'ast TypeSlice) { visit_type_slice(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_type_trait_object(&mut self, i: &'ast TypeTraitObject) { visit_type_trait_object(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800391# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay05362582017-12-26 01:33:57 -0500392fn visit_type_tuple(&mut self, i: &'ast TypeTuple) { visit_type_tuple(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800393# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay2ae520a2017-12-29 11:19:50 -0500394fn visit_type_verbatim(&mut self, i: &'ast TypeVerbatim) { visit_type_verbatim(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_un_op(&mut self, i: &'ast UnOp) { visit_un_op(self, i) }
David Tolnay5f332a92017-12-26 00:42:45 -0500397# [ cfg ( feature = "full" ) ]
398fn visit_use_glob(&mut self, i: &'ast UseGlob) { visit_use_glob(self, i) }
399# [ cfg ( feature = "full" ) ]
400fn visit_use_list(&mut self, i: &'ast UseList) { visit_use_list(self, i) }
401# [ cfg ( feature = "full" ) ]
402fn visit_use_path(&mut self, i: &'ast UsePath) { visit_use_path(self, i) }
403# [ cfg ( feature = "full" ) ]
404fn visit_use_tree(&mut self, i: &'ast UseTree) { visit_use_tree(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800405# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500406fn visit_variant(&mut self, i: &'ast Variant) { visit_variant(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800407# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500408fn visit_vis_crate(&mut self, i: &'ast VisCrate) { visit_vis_crate(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800409# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500410fn visit_vis_public(&mut self, i: &'ast VisPublic) { visit_vis_public(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800411# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500412fn visit_vis_restricted(&mut self, i: &'ast VisRestricted) { visit_vis_restricted(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800413# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500414fn visit_visibility(&mut self, i: &'ast Visibility) { visit_visibility(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800415# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500416fn visit_where_clause(&mut self, i: &'ast WhereClause) { visit_where_clause(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800417# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500418fn visit_where_predicate(&mut self, i: &'ast WherePredicate) { visit_where_predicate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400419
Nika Layzell27726662017-10-24 23:16:35 -0400420}
421
David Tolnay3cfd1d32018-01-03 00:22:08 -0800422# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500423pub fn visit_abi<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Abi) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500424 tokens_helper(_visitor, &(& _i . extern_token).0);
David Tolnayd5125762017-12-29 02:42:17 -0500425 if let Some(ref it) = _i . name { _visitor.visit_lit(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400426}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800427# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc08227a2017-12-04 16:30:17 -0500428pub fn visit_angle_bracketed_generic_arguments<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast AngleBracketedGenericArguments) {
David Tolnay2d4e08a2017-12-28 23:54:07 -0500429 if let Some(ref it) = _i . colon2_token { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500430 tokens_helper(_visitor, &(& _i . lt_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -0800431 for el in Punctuated::elements(& _i . args) { let it = el.item(); _visitor.visit_generic_argument(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500432 tokens_helper(_visitor, &(& _i . gt_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400433}
434# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500435pub fn visit_arg_captured<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ArgCaptured) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500436 _visitor.visit_pat(& _i . pat);
David Tolnaycc0f0372017-12-28 19:11:04 -0500437 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500438 _visitor.visit_type(& _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -0400439}
440# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500441pub fn visit_arg_self<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ArgSelf) {
David Tolnay24237fb2017-12-29 02:15:26 -0500442 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500443 tokens_helper(_visitor, &(& _i . self_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400444}
445# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500446pub fn visit_arg_self_ref<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ArgSelfRef) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500447 tokens_helper(_visitor, &(& _i . and_token).0);
David Tolnay4ba63a02017-12-28 15:53:05 -0500448 if let Some(ref it) = _i . lifetime { _visitor.visit_lifetime(it) };
David Tolnay24237fb2017-12-29 02:15:26 -0500449 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500450 tokens_helper(_visitor, &(& _i . self_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400451}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800452# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500453pub fn visit_arm<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Arm) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500454 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay6eff4da2018-01-01 20:27:45 -0800455 for el in Punctuated::elements(& _i . pats) { let it = el.item(); _visitor.visit_pat(it) };
David Tolnay8b4d3022017-12-29 12:11:10 -0500456 if let Some(ref it) = _i . guard {
457 tokens_helper(_visitor, &(& ( it ) . 0).0);
458 _visitor.visit_expr(& * ( it ) . 1);
459 };
David Tolnaycc0f0372017-12-28 19:11:04 -0500460 tokens_helper(_visitor, &(& _i . rocket_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500461 _visitor.visit_expr(& * _i . body);
David Tolnaycc0f0372017-12-28 19:11:04 -0500462 if let Some(ref it) = _i . comma { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -0400463}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800464# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500465pub fn visit_attr_style<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast AttrStyle) {
Nika Layzell27726662017-10-24 23:16:35 -0400466 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -0500467 AttrStyle::Outer => { }
468 AttrStyle::Inner(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500469 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400470 }
471 }
472}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800473# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500474pub fn visit_attribute<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Attribute) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500475 tokens_helper(_visitor, &(& _i . pound_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500476 _visitor.visit_attr_style(& _i . style);
David Tolnay1e01f9c2017-12-28 20:16:19 -0500477 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500478 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -0400479 // Skipped field _i . tts;
480 // Skipped field _i . is_sugared_doc;
481}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800482# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500483pub fn visit_bare_fn_arg<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BareFnArg) {
David Tolnay5c4c0b52017-12-28 17:58:54 -0500484 if let Some(ref it) = _i . name {
485 _visitor.visit_bare_fn_arg_name(& ( it ) . 0);
David Tolnaycc0f0372017-12-28 19:11:04 -0500486 tokens_helper(_visitor, &(& ( it ) . 1).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -0500487 };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500488 _visitor.visit_type(& _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -0400489}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800490# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500491pub fn visit_bare_fn_arg_name<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BareFnArgName) {
Nika Layzell27726662017-10-24 23:16:35 -0400492 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -0500493 BareFnArgName::Named(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500494 _visitor.visit_ident(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400495 }
David Tolnay6702ade2017-12-30 23:38:15 -0500496 BareFnArgName::Wild(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500497 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400498 }
499 }
500}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800501# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500502pub fn visit_bin_op<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BinOp) {
Nika Layzell27726662017-10-24 23:16:35 -0400503 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -0500504 BinOp::Add(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500505 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400506 }
David Tolnay6702ade2017-12-30 23:38:15 -0500507 BinOp::Sub(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500508 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400509 }
David Tolnay6702ade2017-12-30 23:38:15 -0500510 BinOp::Mul(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500511 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400512 }
David Tolnay6702ade2017-12-30 23:38:15 -0500513 BinOp::Div(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500514 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400515 }
David Tolnay6702ade2017-12-30 23:38:15 -0500516 BinOp::Rem(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500517 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400518 }
David Tolnay6702ade2017-12-30 23:38:15 -0500519 BinOp::And(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500520 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400521 }
David Tolnay6702ade2017-12-30 23:38:15 -0500522 BinOp::Or(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500523 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400524 }
David Tolnay6702ade2017-12-30 23:38:15 -0500525 BinOp::BitXor(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500526 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400527 }
David Tolnay6702ade2017-12-30 23:38:15 -0500528 BinOp::BitAnd(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500529 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400530 }
David Tolnay6702ade2017-12-30 23:38:15 -0500531 BinOp::BitOr(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500532 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400533 }
David Tolnay6702ade2017-12-30 23:38:15 -0500534 BinOp::Shl(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500535 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400536 }
David Tolnay6702ade2017-12-30 23:38:15 -0500537 BinOp::Shr(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500538 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400539 }
David Tolnay6702ade2017-12-30 23:38:15 -0500540 BinOp::Eq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500541 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400542 }
David Tolnay6702ade2017-12-30 23:38:15 -0500543 BinOp::Lt(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500544 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400545 }
David Tolnay6702ade2017-12-30 23:38:15 -0500546 BinOp::Le(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500547 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400548 }
David Tolnay6702ade2017-12-30 23:38:15 -0500549 BinOp::Ne(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500550 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400551 }
David Tolnay6702ade2017-12-30 23:38:15 -0500552 BinOp::Ge(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500553 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400554 }
David Tolnay6702ade2017-12-30 23:38:15 -0500555 BinOp::Gt(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500556 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400557 }
David Tolnay6702ade2017-12-30 23:38:15 -0500558 BinOp::AddEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500559 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400560 }
David Tolnay6702ade2017-12-30 23:38:15 -0500561 BinOp::SubEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500562 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400563 }
David Tolnay6702ade2017-12-30 23:38:15 -0500564 BinOp::MulEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500565 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400566 }
David Tolnay6702ade2017-12-30 23:38:15 -0500567 BinOp::DivEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500568 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400569 }
David Tolnay6702ade2017-12-30 23:38:15 -0500570 BinOp::RemEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500571 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400572 }
David Tolnay6702ade2017-12-30 23:38:15 -0500573 BinOp::BitXorEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500574 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400575 }
David Tolnay6702ade2017-12-30 23:38:15 -0500576 BinOp::BitAndEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500577 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400578 }
David Tolnay6702ade2017-12-30 23:38:15 -0500579 BinOp::BitOrEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500580 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400581 }
David Tolnay6702ade2017-12-30 23:38:15 -0500582 BinOp::ShlEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500583 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400584 }
David Tolnay6702ade2017-12-30 23:38:15 -0500585 BinOp::ShrEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500586 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400587 }
588 }
589}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800590# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay506e43a2017-12-29 11:34:36 -0500591pub fn visit_binding<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Binding) {
592 _visitor.visit_ident(& _i . ident);
593 tokens_helper(_visitor, &(& _i . eq_token).0);
594 _visitor.visit_type(& _i . ty);
595}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800596# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500597pub fn visit_block<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Block) {
David Tolnay1e01f9c2017-12-28 20:16:19 -0500598 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500599 for it in & _i . stmts { _visitor.visit_stmt(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400600}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800601# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500602pub fn visit_bound_lifetimes<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BoundLifetimes) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500603 tokens_helper(_visitor, &(& _i . for_token).0);
604 tokens_helper(_visitor, &(& _i . lt_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -0800605 for el in Punctuated::elements(& _i . lifetimes) { let it = el.item(); _visitor.visit_lifetime_def(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500606 tokens_helper(_visitor, &(& _i . gt_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400607}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800608# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellf1fdc0b2017-12-04 19:58:32 -0500609pub fn visit_const_param<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ConstParam) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500610 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500611 tokens_helper(_visitor, &(& _i . const_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500612 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -0500613 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500614 _visitor.visit_type(& _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -0500615 if let Some(ref it) = _i . eq_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500616 if let Some(ref it) = _i . default { _visitor.visit_expr(it) };
Nika Layzellf1fdc0b2017-12-04 19:58:32 -0500617}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800618# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnaye3d41b72017-12-31 15:24:00 -0500619pub fn visit_data<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Data) {
620 match *_i {
621 Data::Struct(ref _binding_0, ) => {
622 _visitor.visit_data_struct(_binding_0);
623 }
624 Data::Enum(ref _binding_0, ) => {
625 _visitor.visit_data_enum(_binding_0);
626 }
627 Data::Union(ref _binding_0, ) => {
628 _visitor.visit_data_union(_binding_0);
629 }
630 }
631}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800632# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnaye3d41b72017-12-31 15:24:00 -0500633pub fn visit_data_enum<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast DataEnum) {
634 tokens_helper(_visitor, &(& _i . enum_token).0);
635 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -0800636 for el in Punctuated::elements(& _i . variants) { let it = el.item(); _visitor.visit_variant(it) };
David Tolnaye3d41b72017-12-31 15:24:00 -0500637}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800638# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnaye3d41b72017-12-31 15:24:00 -0500639pub fn visit_data_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast DataStruct) {
640 tokens_helper(_visitor, &(& _i . struct_token).0);
641 _visitor.visit_fields(& _i . fields);
642 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
643}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800644# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnaye3d41b72017-12-31 15:24:00 -0500645pub fn visit_data_union<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast DataUnion) {
646 tokens_helper(_visitor, &(& _i . union_token).0);
647 _visitor.visit_fields_named(& _i . fields);
648}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800649# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500650pub fn visit_derive_input<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast DeriveInput) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500651 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500652 _visitor.visit_visibility(& _i . vis);
653 _visitor.visit_ident(& _i . ident);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500654 _visitor.visit_generics(& _i . generics);
David Tolnaye3d41b72017-12-31 15:24:00 -0500655 _visitor.visit_data(& _i . data);
Nika Layzell27726662017-10-24 23:16:35 -0400656}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800657# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500658pub fn visit_expr<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Expr) {
Nika Layzell27726662017-10-24 23:16:35 -0400659 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -0500660 Expr::Box(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500661 full!(_visitor.visit_expr_box(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400662 }
David Tolnay6702ade2017-12-30 23:38:15 -0500663 Expr::InPlace(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500664 full!(_visitor.visit_expr_in_place(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400665 }
David Tolnay6702ade2017-12-30 23:38:15 -0500666 Expr::Array(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500667 full!(_visitor.visit_expr_array(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400668 }
David Tolnay6702ade2017-12-30 23:38:15 -0500669 Expr::Call(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500670 _visitor.visit_expr_call(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400671 }
David Tolnay6702ade2017-12-30 23:38:15 -0500672 Expr::MethodCall(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500673 full!(_visitor.visit_expr_method_call(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400674 }
David Tolnay6702ade2017-12-30 23:38:15 -0500675 Expr::Tuple(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500676 full!(_visitor.visit_expr_tuple(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400677 }
David Tolnay6702ade2017-12-30 23:38:15 -0500678 Expr::Binary(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500679 _visitor.visit_expr_binary(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400680 }
David Tolnay6702ade2017-12-30 23:38:15 -0500681 Expr::Unary(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500682 _visitor.visit_expr_unary(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400683 }
David Tolnay6702ade2017-12-30 23:38:15 -0500684 Expr::Lit(ref _binding_0, ) => {
David Tolnay8c91b882017-12-28 23:04:32 -0500685 _visitor.visit_expr_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400686 }
David Tolnay6702ade2017-12-30 23:38:15 -0500687 Expr::Cast(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500688 _visitor.visit_expr_cast(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400689 }
David Tolnay6702ade2017-12-30 23:38:15 -0500690 Expr::Type(ref _binding_0, ) => {
David Tolnay0cf94f22017-12-28 23:46:26 -0500691 full!(_visitor.visit_expr_type(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400692 }
David Tolnay6702ade2017-12-30 23:38:15 -0500693 Expr::If(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500694 full!(_visitor.visit_expr_if(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400695 }
David Tolnay6702ade2017-12-30 23:38:15 -0500696 Expr::IfLet(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500697 full!(_visitor.visit_expr_if_let(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400698 }
David Tolnay6702ade2017-12-30 23:38:15 -0500699 Expr::While(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500700 full!(_visitor.visit_expr_while(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400701 }
David Tolnay6702ade2017-12-30 23:38:15 -0500702 Expr::WhileLet(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500703 full!(_visitor.visit_expr_while_let(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400704 }
David Tolnay6702ade2017-12-30 23:38:15 -0500705 Expr::ForLoop(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500706 full!(_visitor.visit_expr_for_loop(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400707 }
David Tolnay6702ade2017-12-30 23:38:15 -0500708 Expr::Loop(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500709 full!(_visitor.visit_expr_loop(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400710 }
David Tolnay6702ade2017-12-30 23:38:15 -0500711 Expr::Match(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500712 full!(_visitor.visit_expr_match(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400713 }
David Tolnay6702ade2017-12-30 23:38:15 -0500714 Expr::Closure(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500715 full!(_visitor.visit_expr_closure(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400716 }
David Tolnay6702ade2017-12-30 23:38:15 -0500717 Expr::Unsafe(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500718 full!(_visitor.visit_expr_unsafe(_binding_0));
Nika Layzell640832a2017-12-04 13:37:09 -0500719 }
David Tolnay6702ade2017-12-30 23:38:15 -0500720 Expr::Block(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500721 full!(_visitor.visit_expr_block(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400722 }
David Tolnay6702ade2017-12-30 23:38:15 -0500723 Expr::Assign(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500724 full!(_visitor.visit_expr_assign(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400725 }
David Tolnay6702ade2017-12-30 23:38:15 -0500726 Expr::AssignOp(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500727 full!(_visitor.visit_expr_assign_op(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400728 }
David Tolnay6702ade2017-12-30 23:38:15 -0500729 Expr::Field(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500730 full!(_visitor.visit_expr_field(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400731 }
David Tolnay6702ade2017-12-30 23:38:15 -0500732 Expr::Index(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500733 _visitor.visit_expr_index(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400734 }
David Tolnay6702ade2017-12-30 23:38:15 -0500735 Expr::Range(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500736 full!(_visitor.visit_expr_range(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400737 }
David Tolnay6702ade2017-12-30 23:38:15 -0500738 Expr::Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500739 _visitor.visit_expr_path(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400740 }
David Tolnay6702ade2017-12-30 23:38:15 -0500741 Expr::AddrOf(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500742 full!(_visitor.visit_expr_addr_of(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400743 }
David Tolnay6702ade2017-12-30 23:38:15 -0500744 Expr::Break(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500745 full!(_visitor.visit_expr_break(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400746 }
David Tolnay6702ade2017-12-30 23:38:15 -0500747 Expr::Continue(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500748 full!(_visitor.visit_expr_continue(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400749 }
David Tolnay6702ade2017-12-30 23:38:15 -0500750 Expr::Return(ref _binding_0, ) => {
David Tolnayc246cd32017-12-28 23:14:32 -0500751 full!(_visitor.visit_expr_return(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400752 }
David Tolnay6702ade2017-12-30 23:38:15 -0500753 Expr::Macro(ref _binding_0, ) => {
David Tolnay8c91b882017-12-28 23:04:32 -0500754 full!(_visitor.visit_expr_macro(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400755 }
David Tolnay6702ade2017-12-30 23:38:15 -0500756 Expr::Struct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500757 full!(_visitor.visit_expr_struct(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400758 }
David Tolnay6702ade2017-12-30 23:38:15 -0500759 Expr::Repeat(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500760 full!(_visitor.visit_expr_repeat(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400761 }
David Tolnay6702ade2017-12-30 23:38:15 -0500762 Expr::Paren(ref _binding_0, ) => {
David Tolnaye98775f2017-12-28 23:17:00 -0500763 full!(_visitor.visit_expr_paren(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400764 }
David Tolnay6702ade2017-12-30 23:38:15 -0500765 Expr::Group(ref _binding_0, ) => {
David Tolnaye98775f2017-12-28 23:17:00 -0500766 full!(_visitor.visit_expr_group(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400767 }
David Tolnay6702ade2017-12-30 23:38:15 -0500768 Expr::Try(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500769 full!(_visitor.visit_expr_try(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400770 }
David Tolnay6702ade2017-12-30 23:38:15 -0500771 Expr::Catch(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500772 full!(_visitor.visit_expr_catch(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400773 }
David Tolnay6702ade2017-12-30 23:38:15 -0500774 Expr::Yield(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500775 full!(_visitor.visit_expr_yield(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400776 }
David Tolnay6702ade2017-12-30 23:38:15 -0500777 Expr::Verbatim(ref _binding_0, ) => {
David Tolnay2ae520a2017-12-29 11:19:50 -0500778 _visitor.visit_expr_verbatim(_binding_0);
779 }
Nika Layzell27726662017-10-24 23:16:35 -0400780 }
781}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800782# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500783pub fn visit_expr_addr_of<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprAddrOf) {
784 for it in & _i . attrs { _visitor.visit_attribute(it) };
785 tokens_helper(_visitor, &(& _i . and_token).0);
David Tolnay24237fb2017-12-29 02:15:26 -0500786 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnay8c91b882017-12-28 23:04:32 -0500787 _visitor.visit_expr(& * _i . expr);
788}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800789# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500790pub fn visit_expr_array<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprArray) {
791 for it in & _i . attrs { _visitor.visit_attribute(it) };
792 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -0800793 for el in Punctuated::elements(& _i . elems) { let it = el.item(); _visitor.visit_expr(it) };
David Tolnay8c91b882017-12-28 23:04:32 -0500794}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800795# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500796pub fn visit_expr_assign<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprAssign) {
797 for it in & _i . attrs { _visitor.visit_attribute(it) };
798 _visitor.visit_expr(& * _i . left);
799 tokens_helper(_visitor, &(& _i . eq_token).0);
800 _visitor.visit_expr(& * _i . right);
801}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800802# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500803pub fn visit_expr_assign_op<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprAssignOp) {
804 for it in & _i . attrs { _visitor.visit_attribute(it) };
805 _visitor.visit_expr(& * _i . left);
806 _visitor.visit_bin_op(& _i . op);
807 _visitor.visit_expr(& * _i . right);
808}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800809# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500810pub fn visit_expr_binary<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBinary) {
811 for it in & _i . attrs { _visitor.visit_attribute(it) };
812 _visitor.visit_expr(& * _i . left);
813 _visitor.visit_bin_op(& _i . op);
814 _visitor.visit_expr(& * _i . right);
815}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800816# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500817pub fn visit_expr_block<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBlock) {
818 for it in & _i . attrs { _visitor.visit_attribute(it) };
819 _visitor.visit_block(& _i . block);
820}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800821# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500822pub fn visit_expr_box<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBox) {
823 for it in & _i . attrs { _visitor.visit_attribute(it) };
824 tokens_helper(_visitor, &(& _i . box_token).0);
825 _visitor.visit_expr(& * _i . expr);
826}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800827# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500828pub fn visit_expr_break<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBreak) {
829 for it in & _i . attrs { _visitor.visit_attribute(it) };
830 tokens_helper(_visitor, &(& _i . break_token).0);
831 if let Some(ref it) = _i . label { _visitor.visit_lifetime(it) };
832 if let Some(ref it) = _i . expr { _visitor.visit_expr(& * * it) };
833}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800834# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500835pub fn visit_expr_call<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprCall) {
836 for it in & _i . attrs { _visitor.visit_attribute(it) };
837 _visitor.visit_expr(& * _i . func);
838 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -0800839 for el in Punctuated::elements(& _i . args) { let it = el.item(); _visitor.visit_expr(it) };
David Tolnay8c91b882017-12-28 23:04:32 -0500840}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800841# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500842pub fn visit_expr_cast<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprCast) {
843 for it in & _i . attrs { _visitor.visit_attribute(it) };
844 _visitor.visit_expr(& * _i . expr);
845 tokens_helper(_visitor, &(& _i . as_token).0);
846 _visitor.visit_type(& * _i . ty);
847}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800848# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500849pub fn visit_expr_catch<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprCatch) {
850 for it in & _i . attrs { _visitor.visit_attribute(it) };
851 tokens_helper(_visitor, &(& _i . do_token).0);
852 tokens_helper(_visitor, &(& _i . catch_token).0);
853 _visitor.visit_block(& _i . block);
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_closure<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprClosure) {
857 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnayefc96fb2017-12-29 02:03:15 -0500858 if let Some(ref it) = _i . capture { tokens_helper(_visitor, &(it).0) };
David Tolnay8c91b882017-12-28 23:04:32 -0500859 tokens_helper(_visitor, &(& _i . or1_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -0800860 for el in Punctuated::elements(& _i . inputs) { let it = el.item(); _visitor.visit_fn_arg(it) };
David Tolnay8c91b882017-12-28 23:04:32 -0500861 tokens_helper(_visitor, &(& _i . or2_token).0);
862 _visitor.visit_return_type(& _i . output);
863 _visitor.visit_expr(& * _i . body);
864}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800865# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500866pub fn visit_expr_continue<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprContinue) {
867 for it in & _i . attrs { _visitor.visit_attribute(it) };
868 tokens_helper(_visitor, &(& _i . continue_token).0);
869 if let Some(ref it) = _i . label { _visitor.visit_lifetime(it) };
870}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800871# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500872pub fn visit_expr_field<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprField) {
873 for it in & _i . attrs { _visitor.visit_attribute(it) };
874 _visitor.visit_expr(& * _i . base);
875 tokens_helper(_visitor, &(& _i . dot_token).0);
876 _visitor.visit_member(& _i . member);
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_for_loop<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprForLoop) {
880 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaybcd498f2017-12-29 12:02:33 -0500881 if let Some(ref it) = _i . label { _visitor.visit_label(it) };
David Tolnay8c91b882017-12-28 23:04:32 -0500882 tokens_helper(_visitor, &(& _i . for_token).0);
883 _visitor.visit_pat(& * _i . pat);
884 tokens_helper(_visitor, &(& _i . in_token).0);
885 _visitor.visit_expr(& * _i . expr);
886 _visitor.visit_block(& _i . body);
887}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800888# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500889pub fn visit_expr_group<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprGroup) {
890 for it in & _i . attrs { _visitor.visit_attribute(it) };
891 tokens_helper(_visitor, &(& _i . group_token).0);
892 _visitor.visit_expr(& * _i . expr);
893}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800894# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500895pub fn visit_expr_if<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIf) {
896 for it in & _i . attrs { _visitor.visit_attribute(it) };
897 tokens_helper(_visitor, &(& _i . if_token).0);
898 _visitor.visit_expr(& * _i . cond);
David Tolnay2ccf32a2017-12-29 00:34:26 -0500899 _visitor.visit_block(& _i . then_branch);
900 if let Some(ref it) = _i . else_branch {
901 tokens_helper(_visitor, &(& ( it ) . 0).0);
902 _visitor.visit_expr(& * ( it ) . 1);
903 };
David Tolnay8c91b882017-12-28 23:04:32 -0500904}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800905# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500906pub fn visit_expr_if_let<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIfLet) {
907 for it in & _i . attrs { _visitor.visit_attribute(it) };
908 tokens_helper(_visitor, &(& _i . if_token).0);
909 tokens_helper(_visitor, &(& _i . let_token).0);
910 _visitor.visit_pat(& * _i . pat);
911 tokens_helper(_visitor, &(& _i . eq_token).0);
912 _visitor.visit_expr(& * _i . expr);
David Tolnay2ccf32a2017-12-29 00:34:26 -0500913 _visitor.visit_block(& _i . then_branch);
914 if let Some(ref it) = _i . else_branch {
915 tokens_helper(_visitor, &(& ( it ) . 0).0);
916 _visitor.visit_expr(& * ( it ) . 1);
917 };
David Tolnay8c91b882017-12-28 23:04:32 -0500918}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800919# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500920pub fn visit_expr_in_place<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprInPlace) {
921 for it in & _i . attrs { _visitor.visit_attribute(it) };
922 _visitor.visit_expr(& * _i . place);
David Tolnay8701a5c2017-12-28 23:31:10 -0500923 tokens_helper(_visitor, &(& _i . arrow_token).0);
David Tolnay8c91b882017-12-28 23:04:32 -0500924 _visitor.visit_expr(& * _i . value);
925}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800926# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500927pub fn visit_expr_index<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIndex) {
928 for it in & _i . attrs { _visitor.visit_attribute(it) };
929 _visitor.visit_expr(& * _i . expr);
930 tokens_helper(_visitor, &(& _i . bracket_token).0);
931 _visitor.visit_expr(& * _i . index);
932}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800933# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500934pub fn visit_expr_lit<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprLit) {
935 for it in & _i . attrs { _visitor.visit_attribute(it) };
936 _visitor.visit_lit(& _i . lit);
937}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800938# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500939pub fn visit_expr_loop<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprLoop) {
David Tolnay8c91b882017-12-28 23:04:32 -0500940 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaybcd498f2017-12-29 12:02:33 -0500941 if let Some(ref it) = _i . label { _visitor.visit_label(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500942 tokens_helper(_visitor, &(& _i . loop_token).0);
943 _visitor.visit_block(& _i . body);
Nika Layzell27726662017-10-24 23:16:35 -0400944}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800945# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500946pub fn visit_expr_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprMacro) {
947 for it in & _i . attrs { _visitor.visit_attribute(it) };
948 _visitor.visit_macro(& _i . mac);
949}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800950# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500951pub fn visit_expr_match<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprMatch) {
David Tolnay8c91b882017-12-28 23:04:32 -0500952 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500953 tokens_helper(_visitor, &(& _i . match_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500954 _visitor.visit_expr(& * _i . expr);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500955 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500956 for it in & _i . arms { _visitor.visit_arm(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400957}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800958# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500959pub fn visit_expr_method_call<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprMethodCall) {
David Tolnay8c91b882017-12-28 23:04:32 -0500960 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay76418512017-12-28 23:47:47 -0500961 _visitor.visit_expr(& * _i . receiver);
David Tolnaycc0f0372017-12-28 19:11:04 -0500962 tokens_helper(_visitor, &(& _i . dot_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500963 _visitor.visit_ident(& _i . method);
David Tolnayd60cfec2017-12-29 00:21:38 -0500964 if let Some(ref it) = _i . turbofish { _visitor.visit_method_turbofish(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500965 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -0800966 for el in Punctuated::elements(& _i . args) { let it = el.item(); _visitor.visit_expr(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400967}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800968# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500969pub fn visit_expr_paren<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprParen) {
David Tolnay8c91b882017-12-28 23:04:32 -0500970 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -0500971 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500972 _visitor.visit_expr(& * _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -0400973}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800974# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500975pub fn visit_expr_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprPath) {
David Tolnay8c91b882017-12-28 23:04:32 -0500976 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500977 if let Some(ref it) = _i . qself { _visitor.visit_qself(it) };
978 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -0400979}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800980# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500981pub fn visit_expr_range<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprRange) {
David Tolnay8c91b882017-12-28 23:04:32 -0500982 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a918742017-12-28 16:54:41 -0500983 if let Some(ref it) = _i . from { _visitor.visit_expr(& * * it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500984 _visitor.visit_range_limits(& _i . limits);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500985 if let Some(ref it) = _i . to { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -0400986}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800987# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500988pub fn visit_expr_repeat<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprRepeat) {
David Tolnay8c91b882017-12-28 23:04:32 -0500989 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -0500990 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500991 _visitor.visit_expr(& * _i . expr);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500992 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500993 _visitor.visit_expr(& * _i . amt);
Nika Layzell27726662017-10-24 23:16:35 -0400994}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800995# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayc246cd32017-12-28 23:14:32 -0500996pub fn visit_expr_return<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprReturn) {
David Tolnay8c91b882017-12-28 23:04:32 -0500997 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500998 tokens_helper(_visitor, &(& _i . return_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500999 if let Some(ref it) = _i . expr { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -04001000}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001001# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001002pub fn visit_expr_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprStruct) {
David Tolnay8c91b882017-12-28 23:04:32 -05001003 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001004 _visitor.visit_path(& _i . path);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001005 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -08001006 for el in Punctuated::elements(& _i . fields) { let it = el.item(); _visitor.visit_field_value(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001007 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
1008 if let Some(ref it) = _i . rest { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -04001009}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001010# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001011pub fn visit_expr_try<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprTry) {
David Tolnay8c91b882017-12-28 23:04:32 -05001012 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a918742017-12-28 16:54:41 -05001013 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -05001014 tokens_helper(_visitor, &(& _i . question_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001015}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001016# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay05362582017-12-26 01:33:57 -05001017pub fn visit_expr_tuple<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprTuple) {
David Tolnay8c91b882017-12-28 23:04:32 -05001018 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -05001019 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -08001020 for el in Punctuated::elements(& _i . elems) { let it = el.item(); _visitor.visit_expr(it) };
David Tolnay05362582017-12-26 01:33:57 -05001021}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001022# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001023pub fn visit_expr_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprType) {
David Tolnay8c91b882017-12-28 23:04:32 -05001024 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a918742017-12-28 16:54:41 -05001025 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -05001026 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001027 _visitor.visit_type(& * _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -04001028}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001029# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001030pub fn visit_expr_unary<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprUnary) {
David Tolnay8c91b882017-12-28 23:04:32 -05001031 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001032 _visitor.visit_un_op(& _i . op);
David Tolnay4a918742017-12-28 16:54:41 -05001033 _visitor.visit_expr(& * _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -04001034}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001035# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzell640832a2017-12-04 13:37:09 -05001036pub fn visit_expr_unsafe<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprUnsafe) {
David Tolnay8c91b882017-12-28 23:04:32 -05001037 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001038 tokens_helper(_visitor, &(& _i . unsafe_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001039 _visitor.visit_block(& _i . block);
Nika Layzell640832a2017-12-04 13:37:09 -05001040}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001041# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay2ae520a2017-12-29 11:19:50 -05001042pub fn visit_expr_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprVerbatim) {
1043 // Skipped field _i . tts;
1044}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001045# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001046pub fn visit_expr_while<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprWhile) {
David Tolnay8c91b882017-12-28 23:04:32 -05001047 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaybcd498f2017-12-29 12:02:33 -05001048 if let Some(ref it) = _i . label { _visitor.visit_label(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001049 tokens_helper(_visitor, &(& _i . while_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001050 _visitor.visit_expr(& * _i . cond);
1051 _visitor.visit_block(& _i . body);
Nika Layzell27726662017-10-24 23:16:35 -04001052}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001053# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001054pub fn visit_expr_while_let<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprWhileLet) {
David Tolnay8c91b882017-12-28 23:04:32 -05001055 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaybcd498f2017-12-29 12:02:33 -05001056 if let Some(ref it) = _i . label { _visitor.visit_label(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001057 tokens_helper(_visitor, &(& _i . while_token).0);
1058 tokens_helper(_visitor, &(& _i . let_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001059 _visitor.visit_pat(& * _i . pat);
David Tolnaycc0f0372017-12-28 19:11:04 -05001060 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001061 _visitor.visit_expr(& * _i . expr);
1062 _visitor.visit_block(& _i . body);
Nika Layzell27726662017-10-24 23:16:35 -04001063}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001064# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001065pub fn visit_expr_yield<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprYield) {
David Tolnay8c91b882017-12-28 23:04:32 -05001066 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001067 tokens_helper(_visitor, &(& _i . yield_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001068 if let Some(ref it) = _i . expr { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -04001069}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001070# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001071pub fn visit_field<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Field) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001072 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001073 _visitor.visit_visibility(& _i . vis);
1074 if let Some(ref it) = _i . ident { _visitor.visit_ident(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001075 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001076 _visitor.visit_type(& _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -04001077}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001078# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001079pub fn visit_field_pat<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldPat) {
David Tolnay4a3f59a2017-12-28 21:21:12 -05001080 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay85b69a42017-12-27 20:43:10 -05001081 _visitor.visit_member(& _i . member);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001082 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a918742017-12-28 16:54:41 -05001083 _visitor.visit_pat(& * _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001084}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001085# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001086pub fn visit_field_value<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldValue) {
David Tolnay85b69a42017-12-27 20:43:10 -05001087 for it in & _i . attrs { _visitor.visit_attribute(it) };
1088 _visitor.visit_member(& _i . member);
David Tolnaycc0f0372017-12-28 19:11:04 -05001089 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001090 _visitor.visit_expr(& _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -04001091}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001092# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnaye3d41b72017-12-31 15:24:00 -05001093pub fn visit_fields<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Fields) {
1094 match *_i {
1095 Fields::Named(ref _binding_0, ) => {
1096 _visitor.visit_fields_named(_binding_0);
1097 }
1098 Fields::Unnamed(ref _binding_0, ) => {
1099 _visitor.visit_fields_unnamed(_binding_0);
1100 }
1101 Fields::Unit => { }
1102 }
1103}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001104# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnaye3d41b72017-12-31 15:24:00 -05001105pub fn visit_fields_named<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldsNamed) {
1106 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -08001107 for el in Punctuated::elements(& _i . named) { let it = el.item(); _visitor.visit_field(it) };
David Tolnaye3d41b72017-12-31 15:24:00 -05001108}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001109# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnaye3d41b72017-12-31 15:24:00 -05001110pub fn visit_fields_unnamed<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldsUnnamed) {
1111 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -08001112 for el in Punctuated::elements(& _i . unnamed) { let it = el.item(); _visitor.visit_field(it) };
David Tolnaye3d41b72017-12-31 15:24:00 -05001113}
Nika Layzell27726662017-10-24 23:16:35 -04001114# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001115pub fn visit_file<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast File) {
Nika Layzell27726662017-10-24 23:16:35 -04001116 // Skipped field _i . shebang;
David Tolnayf0d63bf2017-12-26 12:29:47 -05001117 for it in & _i . attrs { _visitor.visit_attribute(it) };
1118 for it in & _i . items { _visitor.visit_item(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001119}
1120# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001121pub fn visit_fn_arg<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FnArg) {
Nika Layzell27726662017-10-24 23:16:35 -04001122 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001123 FnArg::SelfRef(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001124 _visitor.visit_arg_self_ref(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001125 }
David Tolnay6702ade2017-12-30 23:38:15 -05001126 FnArg::SelfValue(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001127 _visitor.visit_arg_self(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001128 }
David Tolnay6702ade2017-12-30 23:38:15 -05001129 FnArg::Captured(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001130 _visitor.visit_arg_captured(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001131 }
David Tolnay6702ade2017-12-30 23:38:15 -05001132 FnArg::Inferred(ref _binding_0, ) => {
David Tolnay80ed55f2017-12-27 22:54:40 -05001133 _visitor.visit_pat(_binding_0);
1134 }
David Tolnay6702ade2017-12-30 23:38:15 -05001135 FnArg::Ignored(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001136 _visitor.visit_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001137 }
1138 }
1139}
1140# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001141pub fn visit_fn_decl<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FnDecl) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001142 tokens_helper(_visitor, &(& _i . fn_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001143 _visitor.visit_generics(& _i . generics);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001144 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -08001145 for el in Punctuated::elements(& _i . inputs) { let it = el.item(); _visitor.visit_fn_arg(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001146 if let Some(ref it) = _i . variadic { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001147 _visitor.visit_return_type(& _i . output);
Nika Layzell27726662017-10-24 23:16:35 -04001148}
1149# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001150pub fn visit_foreign_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItem) {
Nika Layzell27726662017-10-24 23:16:35 -04001151 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001152 ForeignItem::Fn(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001153 _visitor.visit_foreign_item_fn(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001154 }
David Tolnay6702ade2017-12-30 23:38:15 -05001155 ForeignItem::Static(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001156 _visitor.visit_foreign_item_static(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001157 }
David Tolnay6702ade2017-12-30 23:38:15 -05001158 ForeignItem::Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001159 _visitor.visit_foreign_item_type(_binding_0);
David Tolnay199bcbb2017-11-12 10:33:52 -08001160 }
David Tolnay6702ade2017-12-30 23:38:15 -05001161 ForeignItem::Verbatim(ref _binding_0, ) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05001162 _visitor.visit_foreign_item_verbatim(_binding_0);
1163 }
Nika Layzell27726662017-10-24 23:16:35 -04001164 }
1165}
1166# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001167pub fn visit_foreign_item_fn<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemFn) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001168 for it in & _i . attrs { _visitor.visit_attribute(it) };
1169 _visitor.visit_visibility(& _i . vis);
1170 _visitor.visit_ident(& _i . ident);
David Tolnay4a918742017-12-28 16:54:41 -05001171 _visitor.visit_fn_decl(& * _i . decl);
David Tolnaycc0f0372017-12-28 19:11:04 -05001172 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay8894f602017-11-11 12:11:04 -08001173}
1174# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001175pub fn visit_foreign_item_static<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemStatic) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001176 for it in & _i . attrs { _visitor.visit_attribute(it) };
1177 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001178 tokens_helper(_visitor, &(& _i . static_token).0);
David Tolnay24237fb2017-12-29 02:15:26 -05001179 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001180 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001181 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001182 _visitor.visit_type(& * _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001183 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001184}
David Tolnay199bcbb2017-11-12 10:33:52 -08001185# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001186pub fn visit_foreign_item_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001187 for it in & _i . attrs { _visitor.visit_attribute(it) };
1188 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001189 tokens_helper(_visitor, &(& _i . type_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001190 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001191 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay199bcbb2017-11-12 10:33:52 -08001192}
David Tolnay2ae520a2017-12-29 11:19:50 -05001193# [ cfg ( feature = "full" ) ]
1194pub fn visit_foreign_item_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemVerbatim) {
1195 // Skipped field _i . tts;
1196}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001197# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc08227a2017-12-04 16:30:17 -05001198pub fn visit_generic_argument<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast GenericArgument) {
Nika Layzell357885a2017-12-04 15:47:07 -05001199 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001200 GenericArgument::Lifetime(ref _binding_0, ) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05001201 _visitor.visit_lifetime(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001202 }
David Tolnay6702ade2017-12-30 23:38:15 -05001203 GenericArgument::Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001204 _visitor.visit_type(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001205 }
David Tolnay6702ade2017-12-30 23:38:15 -05001206 GenericArgument::Binding(ref _binding_0, ) => {
David Tolnay506e43a2017-12-29 11:34:36 -05001207 _visitor.visit_binding(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001208 }
David Tolnay6702ade2017-12-30 23:38:15 -05001209 GenericArgument::Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001210 _visitor.visit_expr(_binding_0);
Nika Layzellc680e612017-12-04 19:07:20 -05001211 }
Nika Layzell357885a2017-12-04 15:47:07 -05001212 }
1213}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001214# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnayd60cfec2017-12-29 00:21:38 -05001215pub fn visit_generic_method_argument<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast GenericMethodArgument) {
David Tolnayd60cfec2017-12-29 00:21:38 -05001216 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001217 GenericMethodArgument::Type(ref _binding_0, ) => {
David Tolnayd60cfec2017-12-29 00:21:38 -05001218 _visitor.visit_type(_binding_0);
1219 }
David Tolnay6702ade2017-12-30 23:38:15 -05001220 GenericMethodArgument::Const(ref _binding_0, ) => {
David Tolnayd60cfec2017-12-29 00:21:38 -05001221 _visitor.visit_expr(_binding_0);
1222 }
1223 }
1224}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001225# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayc2f1aba2017-11-12 20:29:22 -08001226pub fn visit_generic_param<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast GenericParam) {
David Tolnayc2f1aba2017-11-12 20:29:22 -08001227 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001228 GenericParam::Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001229 _visitor.visit_type_param(_binding_0);
David Tolnayc2f1aba2017-11-12 20:29:22 -08001230 }
David Tolnay517f3692018-01-01 20:17:23 -08001231 GenericParam::Lifetime(ref _binding_0, ) => {
1232 _visitor.visit_lifetime_def(_binding_0);
1233 }
David Tolnay6702ade2017-12-30 23:38:15 -05001234 GenericParam::Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001235 _visitor.visit_const_param(_binding_0);
Nika Layzellf1fdc0b2017-12-04 19:58:32 -05001236 }
David Tolnayc2f1aba2017-11-12 20:29:22 -08001237 }
1238}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001239# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001240pub fn visit_generics<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Generics) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001241 if let Some(ref it) = _i . lt_token { tokens_helper(_visitor, &(it).0) };
David Tolnay6eff4da2018-01-01 20:27:45 -08001242 for el in Punctuated::elements(& _i . params) { let it = el.item(); _visitor.visit_generic_param(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001243 if let Some(ref it) = _i . gt_token { tokens_helper(_visitor, &(it).0) };
David Tolnayac997dd2017-12-27 23:18:22 -05001244 if let Some(ref it) = _i . where_clause { _visitor.visit_where_clause(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001245}
Nika Layzellefb83ba2017-12-19 18:23:55 -05001246
1247pub fn visit_ident<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Ident) {
David Tolnay9a93bfe2017-12-31 17:23:00 -05001248 // Skipped field _i . term;
David Tolnay4ba63a02017-12-28 15:53:05 -05001249 _visitor.visit_span(& _i . span);
Nika Layzellefb83ba2017-12-19 18:23:55 -05001250}
Nika Layzell27726662017-10-24 23:16:35 -04001251# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001252pub fn visit_impl_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItem) {
Nika Layzell27726662017-10-24 23:16:35 -04001253 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001254 ImplItem::Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001255 _visitor.visit_impl_item_const(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001256 }
David Tolnay6702ade2017-12-30 23:38:15 -05001257 ImplItem::Method(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001258 _visitor.visit_impl_item_method(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001259 }
David Tolnay6702ade2017-12-30 23:38:15 -05001260 ImplItem::Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001261 _visitor.visit_impl_item_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001262 }
David Tolnay6702ade2017-12-30 23:38:15 -05001263 ImplItem::Macro(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001264 _visitor.visit_impl_item_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001265 }
David Tolnay6702ade2017-12-30 23:38:15 -05001266 ImplItem::Verbatim(ref _binding_0, ) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05001267 _visitor.visit_impl_item_verbatim(_binding_0);
1268 }
Nika Layzell27726662017-10-24 23:16:35 -04001269 }
1270}
1271# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001272pub fn visit_impl_item_const<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemConst) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001273 for it in & _i . attrs { _visitor.visit_attribute(it) };
1274 _visitor.visit_visibility(& _i . vis);
David Tolnay360a6342017-12-29 02:22:11 -05001275 if let Some(ref it) = _i . defaultness { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001276 tokens_helper(_visitor, &(& _i . const_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001277 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001278 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001279 _visitor.visit_type(& _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001280 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001281 _visitor.visit_expr(& _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -05001282 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay857628c2017-11-11 12:25:31 -08001283}
1284# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001285pub fn visit_impl_item_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemMacro) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001286 for it in & _i . attrs { _visitor.visit_attribute(it) };
1287 _visitor.visit_macro(& _i . mac);
David Tolnaycc0f0372017-12-28 19:11:04 -05001288 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
David Tolnay857628c2017-11-11 12:25:31 -08001289}
1290# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001291pub fn visit_impl_item_method<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemMethod) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001292 for it in & _i . attrs { _visitor.visit_attribute(it) };
1293 _visitor.visit_visibility(& _i . vis);
David Tolnay360a6342017-12-29 02:22:11 -05001294 if let Some(ref it) = _i . defaultness { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001295 _visitor.visit_method_sig(& _i . sig);
1296 _visitor.visit_block(& _i . block);
Nika Layzell27726662017-10-24 23:16:35 -04001297}
1298# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001299pub fn visit_impl_item_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001300 for it in & _i . attrs { _visitor.visit_attribute(it) };
1301 _visitor.visit_visibility(& _i . vis);
David Tolnay360a6342017-12-29 02:22:11 -05001302 if let Some(ref it) = _i . defaultness { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001303 tokens_helper(_visitor, &(& _i . type_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001304 _visitor.visit_ident(& _i . ident);
1305 _visitor.visit_generics(& _i . generics);
David Tolnaycc0f0372017-12-28 19:11:04 -05001306 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001307 _visitor.visit_type(& _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001308 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001309}
David Tolnay2ae520a2017-12-29 11:19:50 -05001310# [ cfg ( feature = "full" ) ]
1311pub fn visit_impl_item_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemVerbatim) {
1312 // Skipped field _i . tts;
1313}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001314# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay85b69a42017-12-27 20:43:10 -05001315pub fn visit_index<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Index) {
1316 // Skipped field _i . index;
1317 _visitor.visit_span(& _i . span);
1318}
1319# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001320pub fn visit_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Item) {
Nika Layzell27726662017-10-24 23:16:35 -04001321 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001322 Item::ExternCrate(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001323 _visitor.visit_item_extern_crate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001324 }
David Tolnay6702ade2017-12-30 23:38:15 -05001325 Item::Use(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001326 _visitor.visit_item_use(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001327 }
David Tolnay6702ade2017-12-30 23:38:15 -05001328 Item::Static(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001329 _visitor.visit_item_static(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001330 }
David Tolnay6702ade2017-12-30 23:38:15 -05001331 Item::Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001332 _visitor.visit_item_const(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001333 }
David Tolnay6702ade2017-12-30 23:38:15 -05001334 Item::Fn(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001335 _visitor.visit_item_fn(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001336 }
David Tolnay6702ade2017-12-30 23:38:15 -05001337 Item::Mod(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001338 _visitor.visit_item_mod(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001339 }
David Tolnay6702ade2017-12-30 23:38:15 -05001340 Item::ForeignMod(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001341 _visitor.visit_item_foreign_mod(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001342 }
David Tolnay6702ade2017-12-30 23:38:15 -05001343 Item::Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001344 _visitor.visit_item_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001345 }
David Tolnay6702ade2017-12-30 23:38:15 -05001346 Item::Struct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001347 _visitor.visit_item_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001348 }
David Tolnaye3d41b72017-12-31 15:24:00 -05001349 Item::Enum(ref _binding_0, ) => {
1350 _visitor.visit_item_enum(_binding_0);
1351 }
David Tolnay6702ade2017-12-30 23:38:15 -05001352 Item::Union(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001353 _visitor.visit_item_union(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001354 }
David Tolnay6702ade2017-12-30 23:38:15 -05001355 Item::Trait(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001356 _visitor.visit_item_trait(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001357 }
David Tolnay6702ade2017-12-30 23:38:15 -05001358 Item::Impl(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001359 _visitor.visit_item_impl(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001360 }
David Tolnay6702ade2017-12-30 23:38:15 -05001361 Item::Macro(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001362 _visitor.visit_item_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001363 }
David Tolnay6702ade2017-12-30 23:38:15 -05001364 Item::Macro2(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001365 _visitor.visit_item_macro2(_binding_0);
David Tolnay500d8322017-12-18 00:32:51 -08001366 }
David Tolnay6702ade2017-12-30 23:38:15 -05001367 Item::Verbatim(ref _binding_0, ) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05001368 _visitor.visit_item_verbatim(_binding_0);
1369 }
Nika Layzell27726662017-10-24 23:16:35 -04001370 }
1371}
1372# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001373pub fn visit_item_const<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemConst) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001374 for it in & _i . attrs { _visitor.visit_attribute(it) };
1375 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001376 tokens_helper(_visitor, &(& _i . const_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001377 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001378 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001379 _visitor.visit_type(& * _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001380 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001381 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -05001382 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnayc6b55bc2017-11-09 22:48:38 -08001383}
1384# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001385pub fn visit_item_enum<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemEnum) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001386 for it in & _i . attrs { _visitor.visit_attribute(it) };
1387 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001388 tokens_helper(_visitor, &(& _i . enum_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001389 _visitor.visit_ident(& _i . ident);
1390 _visitor.visit_generics(& _i . generics);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001391 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -08001392 for el in Punctuated::elements(& _i . variants) { let it = el.item(); _visitor.visit_variant(it) };
David Tolnayc6b55bc2017-11-09 22:48:38 -08001393}
1394# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001395pub fn visit_item_extern_crate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemExternCrate) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001396 for it in & _i . attrs { _visitor.visit_attribute(it) };
1397 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001398 tokens_helper(_visitor, &(& _i . extern_token).0);
1399 tokens_helper(_visitor, &(& _i . crate_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001400 _visitor.visit_ident(& _i . ident);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001401 if let Some(ref it) = _i . rename {
David Tolnaycc0f0372017-12-28 19:11:04 -05001402 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001403 _visitor.visit_ident(& ( it ) . 1);
1404 };
David Tolnaycc0f0372017-12-28 19:11:04 -05001405 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnayc6b55bc2017-11-09 22:48:38 -08001406}
1407# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001408pub fn visit_item_fn<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemFn) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001409 for it in & _i . attrs { _visitor.visit_attribute(it) };
1410 _visitor.visit_visibility(& _i . vis);
David Tolnay360a6342017-12-29 02:22:11 -05001411 if let Some(ref it) = _i . constness { tokens_helper(_visitor, &(it).0) };
David Tolnay9b258702017-12-29 02:24:41 -05001412 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001413 if let Some(ref it) = _i . abi { _visitor.visit_abi(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001414 _visitor.visit_ident(& _i . ident);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001415 _visitor.visit_fn_decl(& * _i . decl);
David Tolnay4a918742017-12-28 16:54:41 -05001416 _visitor.visit_block(& * _i . block);
David Tolnayc6b55bc2017-11-09 22:48:38 -08001417}
1418# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001419pub fn visit_item_foreign_mod<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemForeignMod) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001420 for it in & _i . attrs { _visitor.visit_attribute(it) };
1421 _visitor.visit_abi(& _i . abi);
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_foreign_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_impl<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemImpl) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001427 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay360a6342017-12-29 02:22:11 -05001428 if let Some(ref it) = _i . defaultness { tokens_helper(_visitor, &(it).0) };
David Tolnay9b258702017-12-29 02:24:41 -05001429 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001430 tokens_helper(_visitor, &(& _i . impl_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001431 _visitor.visit_generics(& _i . generics);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001432 if let Some(ref it) = _i . trait_ {
David Tolnay360a6342017-12-29 02:22:11 -05001433 if let Some(ref it) = ( it ) . 0 { tokens_helper(_visitor, &(it).0) };
David Tolnay5c4c0b52017-12-28 17:58:54 -05001434 _visitor.visit_path(& ( it ) . 1);
David Tolnaycc0f0372017-12-28 19:11:04 -05001435 tokens_helper(_visitor, &(& ( it ) . 2).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001436 };
David Tolnay4a918742017-12-28 16:54:41 -05001437 _visitor.visit_type(& * _i . self_ty);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001438 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001439 for it in & _i . items { _visitor.visit_impl_item(it) };
David Tolnayc6b55bc2017-11-09 22:48:38 -08001440}
1441# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001442pub fn visit_item_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMacro) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001443 for it in & _i . attrs { _visitor.visit_attribute(it) };
1444 if let Some(ref it) = _i . ident { _visitor.visit_ident(it) };
1445 _visitor.visit_macro(& _i . mac);
David Tolnaycc0f0372017-12-28 19:11:04 -05001446 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
David Tolnayc6b55bc2017-11-09 22:48:38 -08001447}
1448# [ cfg ( feature = "full" ) ]
David Tolnay500d8322017-12-18 00:32:51 -08001449pub fn visit_item_macro2<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMacro2) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001450 for it in & _i . attrs { _visitor.visit_attribute(it) };
1451 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001452 tokens_helper(_visitor, &(& _i . macro_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001453 _visitor.visit_ident(& _i . ident);
David Tolnayab919512017-12-30 23:31:51 -05001454 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay500d8322017-12-18 00:32:51 -08001455 // Skipped field _i . args;
David Tolnayab919512017-12-30 23:31:51 -05001456 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay500d8322017-12-18 00:32:51 -08001457 // Skipped field _i . body;
1458}
1459# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001460pub fn visit_item_mod<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMod) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001461 for it in & _i . attrs { _visitor.visit_attribute(it) };
1462 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001463 tokens_helper(_visitor, &(& _i . mod_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001464 _visitor.visit_ident(& _i . ident);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001465 if let Some(ref it) = _i . content {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001466 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001467 for it in & ( it ) . 1 { _visitor.visit_item(it) };
1468 };
David Tolnaycc0f0372017-12-28 19:11:04 -05001469 if let Some(ref it) = _i . semi { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04001470}
1471# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001472pub fn visit_item_static<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemStatic) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001473 for it in & _i . attrs { _visitor.visit_attribute(it) };
1474 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001475 tokens_helper(_visitor, &(& _i . static_token).0);
David Tolnay24237fb2017-12-29 02:15:26 -05001476 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001477 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001478 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001479 _visitor.visit_type(& * _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001480 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001481 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -05001482 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001483}
1484# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001485pub fn visit_item_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemStruct) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001486 for it in & _i . attrs { _visitor.visit_attribute(it) };
1487 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001488 tokens_helper(_visitor, &(& _i . struct_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001489 _visitor.visit_ident(& _i . ident);
1490 _visitor.visit_generics(& _i . generics);
David Tolnaye3d41b72017-12-31 15:24:00 -05001491 _visitor.visit_fields(& _i . fields);
David Tolnaycc0f0372017-12-28 19:11:04 -05001492 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04001493}
1494# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001495pub fn visit_item_trait<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemTrait) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001496 for it in & _i . attrs { _visitor.visit_attribute(it) };
1497 _visitor.visit_visibility(& _i . vis);
David Tolnay9b258702017-12-29 02:24:41 -05001498 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001499 if let Some(ref it) = _i . auto_token { tokens_helper(_visitor, &(it).0) };
1500 tokens_helper(_visitor, &(& _i . trait_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001501 _visitor.visit_ident(& _i . ident);
1502 _visitor.visit_generics(& _i . generics);
David Tolnaycc0f0372017-12-28 19:11:04 -05001503 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay6eff4da2018-01-01 20:27:45 -08001504 for el in Punctuated::elements(& _i . supertraits) { let it = el.item(); _visitor.visit_type_param_bound(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -05001505 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001506 for it in & _i . items { _visitor.visit_trait_item(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001507}
1508# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001509pub fn visit_item_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001510 for it in & _i . attrs { _visitor.visit_attribute(it) };
1511 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001512 tokens_helper(_visitor, &(& _i . type_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001513 _visitor.visit_ident(& _i . ident);
1514 _visitor.visit_generics(& _i . generics);
David Tolnaycc0f0372017-12-28 19:11:04 -05001515 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001516 _visitor.visit_type(& * _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001517 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001518}
1519# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001520pub fn visit_item_union<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemUnion) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001521 for it in & _i . attrs { _visitor.visit_attribute(it) };
1522 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001523 tokens_helper(_visitor, &(& _i . union_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001524 _visitor.visit_ident(& _i . ident);
1525 _visitor.visit_generics(& _i . generics);
David Tolnaye3d41b72017-12-31 15:24:00 -05001526 _visitor.visit_fields_named(& _i . fields);
Nika Layzell27726662017-10-24 23:16:35 -04001527}
1528# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001529pub fn visit_item_use<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemUse) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001530 for it in & _i . attrs { _visitor.visit_attribute(it) };
1531 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001532 tokens_helper(_visitor, &(& _i . use_token).0);
1533 if let Some(ref it) = _i . leading_colon { tokens_helper(_visitor, &(it).0) };
David Tolnay6eff4da2018-01-01 20:27:45 -08001534 for el in Punctuated::elements(& _i . prefix) { let it = el.item(); _visitor.visit_ident(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001535 _visitor.visit_use_tree(& _i . tree);
David Tolnaycc0f0372017-12-28 19:11:04 -05001536 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001537}
David Tolnay2ae520a2017-12-29 11:19:50 -05001538# [ cfg ( feature = "full" ) ]
1539pub fn visit_item_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemVerbatim) {
1540 // Skipped field _i . tts;
1541}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001542# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnaybcd498f2017-12-29 12:02:33 -05001543pub fn visit_label<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Label) {
1544 _visitor.visit_lifetime(& _i . name);
1545 tokens_helper(_visitor, &(& _i . colon_token).0);
1546}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001547# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4ba63a02017-12-28 15:53:05 -05001548pub fn visit_lifetime<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Lifetime) {
David Tolnay9a93bfe2017-12-31 17:23:00 -05001549 // Skipped field _i . term;
David Tolnay4ba63a02017-12-28 15:53:05 -05001550 _visitor.visit_span(& _i . span);
1551}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001552# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001553pub fn visit_lifetime_def<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LifetimeDef) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001554 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4ba63a02017-12-28 15:53:05 -05001555 _visitor.visit_lifetime(& _i . lifetime);
David Tolnaycc0f0372017-12-28 19:11:04 -05001556 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay6eff4da2018-01-01 20:27:45 -08001557 for el in Punctuated::elements(& _i . bounds) { let it = el.item(); _visitor.visit_lifetime(it) };
David Tolnay4ba63a02017-12-28 15:53:05 -05001558}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001559# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4ba63a02017-12-28 15:53:05 -05001560pub fn visit_lit<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Lit) {
David Tolnay360efd22018-01-04 23:35:26 -08001561 match *_i {
1562 Lit::Str(ref _binding_0, ) => {
1563 _visitor.visit_lit_str(_binding_0);
1564 }
1565 Lit::ByteStr(ref _binding_0, ) => {
1566 _visitor.visit_lit_byte_str(_binding_0);
1567 }
1568 Lit::Byte(ref _binding_0, ) => {
1569 _visitor.visit_lit_byte(_binding_0);
1570 }
1571 Lit::Char(ref _binding_0, ) => {
1572 _visitor.visit_lit_char(_binding_0);
1573 }
1574 Lit::Int(ref _binding_0, ) => {
1575 _visitor.visit_lit_int(_binding_0);
1576 }
1577 Lit::Float(ref _binding_0, ) => {
1578 _visitor.visit_lit_float(_binding_0);
1579 }
1580 Lit::Bool(ref _binding_0, ) => {
1581 _visitor.visit_lit_bool(_binding_0);
1582 }
1583 Lit::Verbatim(ref _binding_0, ) => {
1584 _visitor.visit_lit_verbatim(_binding_0);
1585 }
1586 }
1587}
1588# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1589pub fn visit_lit_bool<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitBool) {
David Tolnay4ba63a02017-12-28 15:53:05 -05001590 // Skipped field _i . value;
1591 _visitor.visit_span(& _i . span);
Nika Layzell27726662017-10-24 23:16:35 -04001592}
David Tolnay360efd22018-01-04 23:35:26 -08001593# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1594pub fn visit_lit_byte<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitByte) {
1595 // Skipped field _i . token;
1596 _visitor.visit_span(& _i . span);
1597}
1598# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1599pub fn visit_lit_byte_str<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitByteStr) {
1600 // Skipped field _i . token;
1601 _visitor.visit_span(& _i . span);
1602}
1603# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1604pub fn visit_lit_char<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitChar) {
1605 // Skipped field _i . token;
1606 _visitor.visit_span(& _i . span);
1607}
1608# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1609pub fn visit_lit_float<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitFloat) {
1610 // Skipped field _i . token;
1611 _visitor.visit_span(& _i . span);
1612}
1613# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1614pub fn visit_lit_int<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitInt) {
1615 // Skipped field _i . token;
1616 _visitor.visit_span(& _i . span);
1617}
1618# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1619pub fn visit_lit_str<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitStr) {
1620 // Skipped field _i . token;
1621 _visitor.visit_span(& _i . span);
1622}
1623# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1624pub fn visit_lit_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitVerbatim) {
1625 // Skipped field _i . token;
1626 _visitor.visit_span(& _i . span);
1627}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001628# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001629pub fn visit_local<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Local) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001630 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001631 tokens_helper(_visitor, &(& _i . let_token).0);
1632 _visitor.visit_pat(& * _i . pat);
David Tolnay8b4d3022017-12-29 12:11:10 -05001633 if let Some(ref it) = _i . ty {
1634 tokens_helper(_visitor, &(& ( it ) . 0).0);
1635 _visitor.visit_type(& * ( it ) . 1);
1636 };
1637 if let Some(ref it) = _i . init {
1638 tokens_helper(_visitor, &(& ( it ) . 0).0);
1639 _visitor.visit_expr(& * ( it ) . 1);
1640 };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001641 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001642}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001643# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001644pub fn visit_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Macro) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001645 _visitor.visit_path(& _i . path);
David Tolnaycc0f0372017-12-28 19:11:04 -05001646 tokens_helper(_visitor, &(& _i . bang_token).0);
David Tolnayab919512017-12-30 23:31:51 -05001647 _visitor.visit_macro_delimiter(& _i . delimiter);
1648 // Skipped field _i . tts;
1649}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001650# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayab919512017-12-30 23:31:51 -05001651pub fn visit_macro_delimiter<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MacroDelimiter) {
David Tolnayab919512017-12-30 23:31:51 -05001652 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001653 MacroDelimiter::Paren(ref _binding_0, ) => {
David Tolnayab919512017-12-30 23:31:51 -05001654 tokens_helper(_visitor, &(_binding_0).0);
1655 }
David Tolnay6702ade2017-12-30 23:38:15 -05001656 MacroDelimiter::Brace(ref _binding_0, ) => {
David Tolnayab919512017-12-30 23:31:51 -05001657 tokens_helper(_visitor, &(_binding_0).0);
1658 }
David Tolnay6702ade2017-12-30 23:38:15 -05001659 MacroDelimiter::Bracket(ref _binding_0, ) => {
David Tolnayab919512017-12-30 23:31:51 -05001660 tokens_helper(_visitor, &(_binding_0).0);
1661 }
1662 }
David Tolnaydecf28d2017-11-11 11:56:45 -08001663}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001664# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay85b69a42017-12-27 20:43:10 -05001665pub fn visit_member<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Member) {
David Tolnay85b69a42017-12-27 20:43:10 -05001666 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001667 Member::Named(ref _binding_0, ) => {
David Tolnay85b69a42017-12-27 20:43:10 -05001668 _visitor.visit_ident(_binding_0);
1669 }
David Tolnay6702ade2017-12-30 23:38:15 -05001670 Member::Unnamed(ref _binding_0, ) => {
David Tolnay85b69a42017-12-27 20:43:10 -05001671 _visitor.visit_index(_binding_0);
1672 }
1673 }
1674}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001675# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001676pub fn visit_meta_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MetaItem) {
Nika Layzell27726662017-10-24 23:16:35 -04001677 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001678 MetaItem::Term(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001679 _visitor.visit_ident(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001680 }
David Tolnay6702ade2017-12-30 23:38:15 -05001681 MetaItem::List(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001682 _visitor.visit_meta_item_list(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001683 }
David Tolnay6702ade2017-12-30 23:38:15 -05001684 MetaItem::NameValue(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001685 _visitor.visit_meta_name_value(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001686 }
1687 }
1688}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001689# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001690pub fn visit_meta_item_list<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MetaItemList) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001691 _visitor.visit_ident(& _i . ident);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001692 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -08001693 for el in Punctuated::elements(& _i . nested) { let it = el.item(); _visitor.visit_nested_meta_item(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001694}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001695# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001696pub fn visit_meta_name_value<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MetaNameValue) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001697 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001698 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4ba63a02017-12-28 15:53:05 -05001699 _visitor.visit_lit(& _i . lit);
Nika Layzell27726662017-10-24 23:16:35 -04001700}
1701# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001702pub fn visit_method_sig<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MethodSig) {
David Tolnay360a6342017-12-29 02:22:11 -05001703 if let Some(ref it) = _i . constness { tokens_helper(_visitor, &(it).0) };
David Tolnay9b258702017-12-29 02:24:41 -05001704 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001705 if let Some(ref it) = _i . abi { _visitor.visit_abi(it) };
1706 _visitor.visit_ident(& _i . ident);
1707 _visitor.visit_fn_decl(& _i . decl);
Nika Layzell27726662017-10-24 23:16:35 -04001708}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001709# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnayd60cfec2017-12-29 00:21:38 -05001710pub fn visit_method_turbofish<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MethodTurbofish) {
1711 tokens_helper(_visitor, &(& _i . colon2_token).0);
1712 tokens_helper(_visitor, &(& _i . lt_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -08001713 for el in Punctuated::elements(& _i . args) { let it = el.item(); _visitor.visit_generic_method_argument(it) };
David Tolnayd60cfec2017-12-29 00:21:38 -05001714 tokens_helper(_visitor, &(& _i . gt_token).0);
1715}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001716# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001717pub fn visit_nested_meta_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast NestedMetaItem) {
Nika Layzell27726662017-10-24 23:16:35 -04001718 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001719 NestedMetaItem::MetaItem(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001720 _visitor.visit_meta_item(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001721 }
David Tolnay6702ade2017-12-30 23:38:15 -05001722 NestedMetaItem::Literal(ref _binding_0, ) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05001723 _visitor.visit_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001724 }
1725 }
1726}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001727# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc08227a2017-12-04 16:30:17 -05001728pub fn visit_parenthesized_generic_arguments<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ParenthesizedGenericArguments) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001729 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -08001730 for el in Punctuated::elements(& _i . inputs) { let it = el.item(); _visitor.visit_type(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001731 _visitor.visit_return_type(& _i . output);
Nika Layzell27726662017-10-24 23:16:35 -04001732}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001733# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001734pub fn visit_pat<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Pat) {
Nika Layzell27726662017-10-24 23:16:35 -04001735 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001736 Pat::Wild(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001737 _visitor.visit_pat_wild(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001738 }
David Tolnay6702ade2017-12-30 23:38:15 -05001739 Pat::Ident(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001740 _visitor.visit_pat_ident(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001741 }
David Tolnay6702ade2017-12-30 23:38:15 -05001742 Pat::Struct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001743 _visitor.visit_pat_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001744 }
David Tolnay6702ade2017-12-30 23:38:15 -05001745 Pat::TupleStruct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001746 _visitor.visit_pat_tuple_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001747 }
David Tolnay6702ade2017-12-30 23:38:15 -05001748 Pat::Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001749 _visitor.visit_pat_path(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001750 }
David Tolnay6702ade2017-12-30 23:38:15 -05001751 Pat::Tuple(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001752 _visitor.visit_pat_tuple(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001753 }
David Tolnay6702ade2017-12-30 23:38:15 -05001754 Pat::Box(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001755 _visitor.visit_pat_box(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001756 }
David Tolnay6702ade2017-12-30 23:38:15 -05001757 Pat::Ref(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001758 _visitor.visit_pat_ref(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001759 }
David Tolnay6702ade2017-12-30 23:38:15 -05001760 Pat::Lit(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001761 _visitor.visit_pat_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001762 }
David Tolnay6702ade2017-12-30 23:38:15 -05001763 Pat::Range(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001764 _visitor.visit_pat_range(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001765 }
David Tolnay6702ade2017-12-30 23:38:15 -05001766 Pat::Slice(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001767 _visitor.visit_pat_slice(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001768 }
David Tolnay6702ade2017-12-30 23:38:15 -05001769 Pat::Macro(ref _binding_0, ) => {
David Tolnay323279a2017-12-29 11:26:32 -05001770 _visitor.visit_pat_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001771 }
David Tolnay6702ade2017-12-30 23:38:15 -05001772 Pat::Verbatim(ref _binding_0, ) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05001773 _visitor.visit_pat_verbatim(_binding_0);
1774 }
Nika Layzell27726662017-10-24 23:16:35 -04001775 }
1776}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001777# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001778pub fn visit_pat_box<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatBox) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001779 tokens_helper(_visitor, &(& _i . box_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001780 _visitor.visit_pat(& * _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001781}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001782# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001783pub fn visit_pat_ident<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatIdent) {
David Tolnay24237fb2017-12-29 02:15:26 -05001784 if let Some(ref it) = _i . by_ref { tokens_helper(_visitor, &(it).0) };
1785 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001786 _visitor.visit_ident(& _i . ident);
David Tolnay8b4d3022017-12-29 12:11:10 -05001787 if let Some(ref it) = _i . subpat {
1788 tokens_helper(_visitor, &(& ( it ) . 0).0);
1789 _visitor.visit_pat(& * ( it ) . 1);
1790 };
Nika Layzell27726662017-10-24 23:16:35 -04001791}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001792# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001793pub fn visit_pat_lit<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatLit) {
David Tolnay4a918742017-12-28 16:54:41 -05001794 _visitor.visit_expr(& * _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -04001795}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001796# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay323279a2017-12-29 11:26:32 -05001797pub fn visit_pat_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatMacro) {
1798 _visitor.visit_macro(& _i . mac);
1799}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001800# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001801pub fn visit_pat_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatPath) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001802 if let Some(ref it) = _i . qself { _visitor.visit_qself(it) };
1803 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -04001804}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001805# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001806pub fn visit_pat_range<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatRange) {
David Tolnay4a918742017-12-28 16:54:41 -05001807 _visitor.visit_expr(& * _i . lo);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001808 _visitor.visit_range_limits(& _i . limits);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001809 _visitor.visit_expr(& * _i . hi);
Nika Layzell27726662017-10-24 23:16:35 -04001810}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001811# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001812pub fn visit_pat_ref<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatRef) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001813 tokens_helper(_visitor, &(& _i . and_token).0);
David Tolnay24237fb2017-12-29 02:15:26 -05001814 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001815 _visitor.visit_pat(& * _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001816}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001817# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001818pub fn visit_pat_slice<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatSlice) {
David Tolnay4a3f59a2017-12-28 21:21:12 -05001819 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -08001820 for el in Punctuated::elements(& _i . front) { let it = el.item(); _visitor.visit_pat(it) };
David Tolnay4a918742017-12-28 16:54:41 -05001821 if let Some(ref it) = _i . middle { _visitor.visit_pat(& * * it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001822 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
David Tolnay41871922017-12-29 01:53:45 -05001823 if let Some(ref it) = _i . comma_token { tokens_helper(_visitor, &(it).0) };
David Tolnay6eff4da2018-01-01 20:27:45 -08001824 for el in Punctuated::elements(& _i . back) { let it = el.item(); _visitor.visit_pat(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001825}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001826# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001827pub fn visit_pat_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatStruct) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001828 _visitor.visit_path(& _i . path);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001829 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -08001830 for el in Punctuated::elements(& _i . fields) { let it = el.item(); _visitor.visit_field_pat(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001831 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04001832}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001833# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001834pub fn visit_pat_tuple<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatTuple) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001835 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -08001836 for el in Punctuated::elements(& _i . front) { let it = el.item(); _visitor.visit_pat(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001837 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
David Tolnay41871922017-12-29 01:53:45 -05001838 if let Some(ref it) = _i . comma_token { tokens_helper(_visitor, &(it).0) };
David Tolnay6eff4da2018-01-01 20:27:45 -08001839 for el in Punctuated::elements(& _i . back) { let it = el.item(); _visitor.visit_pat(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001840}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001841# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001842pub fn visit_pat_tuple_struct<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatTupleStruct) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001843 _visitor.visit_path(& _i . path);
1844 _visitor.visit_pat_tuple(& _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001845}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001846# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay2ae520a2017-12-29 11:19:50 -05001847pub fn visit_pat_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatVerbatim) {
1848 // Skipped field _i . tts;
1849}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001850# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001851pub fn visit_pat_wild<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatWild) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001852 tokens_helper(_visitor, &(& _i . underscore_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001853}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001854# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001855pub fn visit_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Path) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001856 if let Some(ref it) = _i . leading_colon { tokens_helper(_visitor, &(it).0) };
David Tolnay6eff4da2018-01-01 20:27:45 -08001857 for el in Punctuated::elements(& _i . segments) { let it = el.item(); _visitor.visit_path_segment(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001858}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001859# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc08227a2017-12-04 16:30:17 -05001860pub fn visit_path_arguments<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PathArguments) {
Nika Layzellc08227a2017-12-04 16:30:17 -05001861 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001862 PathArguments::None => { }
1863 PathArguments::AngleBracketed(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001864 _visitor.visit_angle_bracketed_generic_arguments(_binding_0);
Nika Layzellc08227a2017-12-04 16:30:17 -05001865 }
David Tolnay6702ade2017-12-30 23:38:15 -05001866 PathArguments::Parenthesized(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001867 _visitor.visit_parenthesized_generic_arguments(_binding_0);
Nika Layzellc08227a2017-12-04 16:30:17 -05001868 }
1869 }
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_path_segment<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PathSegment) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001873 _visitor.visit_ident(& _i . ident);
1874 _visitor.visit_path_arguments(& _i . arguments);
Nika Layzell27726662017-10-24 23:16:35 -04001875}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001876# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayd4add852018-01-01 20:13:24 -08001877pub fn visit_predicate_eq<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PredicateEq) {
1878 _visitor.visit_type(& _i . lhs_ty);
1879 tokens_helper(_visitor, &(& _i . eq_token).0);
1880 _visitor.visit_type(& _i . rhs_ty);
1881}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001882# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayd4add852018-01-01 20:13:24 -08001883pub fn visit_predicate_lifetime<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PredicateLifetime) {
1884 _visitor.visit_lifetime(& _i . lifetime);
1885 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay6eff4da2018-01-01 20:27:45 -08001886 for el in Punctuated::elements(& _i . bounds) { let it = el.item(); _visitor.visit_lifetime(it) };
David Tolnayd4add852018-01-01 20:13:24 -08001887}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001888# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayd4add852018-01-01 20:13:24 -08001889pub fn visit_predicate_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PredicateType) {
David Tolnay40fb8ce2018-01-02 10:53:46 -08001890 if let Some(ref it) = _i . lifetimes { _visitor.visit_bound_lifetimes(it) };
David Tolnayd4add852018-01-01 20:13:24 -08001891 _visitor.visit_type(& _i . bounded_ty);
1892 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -08001893 for el in Punctuated::elements(& _i . bounds) { let it = el.item(); _visitor.visit_type_param_bound(it) };
David Tolnayd4add852018-01-01 20:13:24 -08001894}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001895# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001896pub fn visit_qself<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast QSelf) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001897 tokens_helper(_visitor, &(& _i . lt_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001898 _visitor.visit_type(& * _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -04001899 // Skipped field _i . position;
David Tolnaycc0f0372017-12-28 19:11:04 -05001900 if let Some(ref it) = _i . as_token { tokens_helper(_visitor, &(it).0) };
1901 tokens_helper(_visitor, &(& _i . gt_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001902}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001903# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001904pub fn visit_range_limits<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast RangeLimits) {
Nika Layzell27726662017-10-24 23:16:35 -04001905 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001906 RangeLimits::HalfOpen(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05001907 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04001908 }
David Tolnay6702ade2017-12-30 23:38:15 -05001909 RangeLimits::Closed(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05001910 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04001911 }
1912 }
1913}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001914# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001915pub fn visit_return_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ReturnType) {
David Tolnayf93b90d2017-11-11 19:21:26 -08001916 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001917 ReturnType::Default => { }
1918 ReturnType::Type(ref _binding_0, ref _binding_1, ) => {
David Tolnay4a3f59a2017-12-28 21:21:12 -05001919 tokens_helper(_visitor, &(_binding_0).0);
1920 _visitor.visit_type(& * * _binding_1);
David Tolnayf93b90d2017-11-11 19:21:26 -08001921 }
1922 }
1923}
Nika Layzellefb83ba2017-12-19 18:23:55 -05001924
1925pub fn visit_span<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Span) {
1926}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001927# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001928pub fn visit_stmt<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Stmt) {
Nika Layzell27726662017-10-24 23:16:35 -04001929 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001930 Stmt::Local(ref _binding_0, ) => {
David Tolnay4a918742017-12-28 16:54:41 -05001931 _visitor.visit_local(& * * _binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001932 }
David Tolnay6702ade2017-12-30 23:38:15 -05001933 Stmt::Item(ref _binding_0, ) => {
David Tolnay4a918742017-12-28 16:54:41 -05001934 _visitor.visit_item(& * * _binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001935 }
David Tolnay6702ade2017-12-30 23:38:15 -05001936 Stmt::Expr(ref _binding_0, ) => {
David Tolnay4a918742017-12-28 16:54:41 -05001937 _visitor.visit_expr(& * * _binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001938 }
David Tolnay6702ade2017-12-30 23:38:15 -05001939 Stmt::Semi(ref _binding_0, ref _binding_1, ) => {
David Tolnay4a918742017-12-28 16:54:41 -05001940 _visitor.visit_expr(& * * _binding_0);
David Tolnaycc0f0372017-12-28 19:11:04 -05001941 tokens_helper(_visitor, &(_binding_1).0);
Nika Layzell27726662017-10-24 23:16:35 -04001942 }
Nika Layzell27726662017-10-24 23:16:35 -04001943 }
1944}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001945# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay40fb8ce2018-01-02 10:53:46 -08001946pub fn visit_trait_bound<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitBound) {
1947 _visitor.visit_trait_bound_modifier(& _i . modifier);
1948 if let Some(ref it) = _i . lifetimes { _visitor.visit_bound_lifetimes(it) };
1949 _visitor.visit_path(& _i . path);
1950}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001951# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001952pub fn visit_trait_bound_modifier<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitBoundModifier) {
Nika Layzell27726662017-10-24 23:16:35 -04001953 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001954 TraitBoundModifier::None => { }
1955 TraitBoundModifier::Maybe(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05001956 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04001957 }
1958 }
1959}
1960# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001961pub fn visit_trait_item<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItem) {
Nika Layzell27726662017-10-24 23:16:35 -04001962 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001963 TraitItem::Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001964 _visitor.visit_trait_item_const(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001965 }
David Tolnay6702ade2017-12-30 23:38:15 -05001966 TraitItem::Method(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001967 _visitor.visit_trait_item_method(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001968 }
David Tolnay6702ade2017-12-30 23:38:15 -05001969 TraitItem::Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001970 _visitor.visit_trait_item_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001971 }
David Tolnay6702ade2017-12-30 23:38:15 -05001972 TraitItem::Macro(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001973 _visitor.visit_trait_item_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001974 }
David Tolnay6702ade2017-12-30 23:38:15 -05001975 TraitItem::Verbatim(ref _binding_0, ) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05001976 _visitor.visit_trait_item_verbatim(_binding_0);
1977 }
Nika Layzell27726662017-10-24 23:16:35 -04001978 }
1979}
1980# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001981pub fn visit_trait_item_const<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemConst) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001982 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001983 tokens_helper(_visitor, &(& _i . const_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001984 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001985 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001986 _visitor.visit_type(& _i . ty);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001987 if let Some(ref it) = _i . default {
David Tolnaycc0f0372017-12-28 19:11:04 -05001988 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001989 _visitor.visit_expr(& ( it ) . 1);
1990 };
David Tolnaycc0f0372017-12-28 19:11:04 -05001991 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnayda705bd2017-11-10 21:58:05 -08001992}
1993# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05001994pub fn visit_trait_item_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemMacro) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001995 for it in & _i . attrs { _visitor.visit_attribute(it) };
1996 _visitor.visit_macro(& _i . mac);
David Tolnaycc0f0372017-12-28 19:11:04 -05001997 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
David Tolnayda705bd2017-11-10 21:58:05 -08001998}
1999# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002000pub fn visit_trait_item_method<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemMethod) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002001 for it in & _i . attrs { _visitor.visit_attribute(it) };
2002 _visitor.visit_method_sig(& _i . sig);
2003 if let Some(ref it) = _i . default { _visitor.visit_block(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05002004 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04002005}
2006# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002007pub fn visit_trait_item_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002008 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05002009 tokens_helper(_visitor, &(& _i . type_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05002010 _visitor.visit_ident(& _i . ident);
2011 _visitor.visit_generics(& _i . generics);
David Tolnaycc0f0372017-12-28 19:11:04 -05002012 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay6eff4da2018-01-01 20:27:45 -08002013 for el in Punctuated::elements(& _i . bounds) { let it = el.item(); _visitor.visit_type_param_bound(it) };
David Tolnay5c4c0b52017-12-28 17:58:54 -05002014 if let Some(ref it) = _i . default {
David Tolnaycc0f0372017-12-28 19:11:04 -05002015 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05002016 _visitor.visit_type(& ( it ) . 1);
2017 };
David Tolnaycc0f0372017-12-28 19:11:04 -05002018 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04002019}
David Tolnay2ae520a2017-12-29 11:19:50 -05002020# [ cfg ( feature = "full" ) ]
2021pub fn visit_trait_item_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemVerbatim) {
2022 // Skipped field _i . tts;
2023}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002024# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002025pub fn visit_type<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Type) {
Nika Layzell27726662017-10-24 23:16:35 -04002026 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05002027 Type::Slice(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002028 _visitor.visit_type_slice(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002029 }
David Tolnay6702ade2017-12-30 23:38:15 -05002030 Type::Array(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002031 _visitor.visit_type_array(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002032 }
David Tolnay6702ade2017-12-30 23:38:15 -05002033 Type::Ptr(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002034 _visitor.visit_type_ptr(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002035 }
David Tolnay6702ade2017-12-30 23:38:15 -05002036 Type::Reference(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002037 _visitor.visit_type_reference(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002038 }
David Tolnay6702ade2017-12-30 23:38:15 -05002039 Type::BareFn(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002040 _visitor.visit_type_bare_fn(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002041 }
David Tolnay6702ade2017-12-30 23:38:15 -05002042 Type::Never(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002043 _visitor.visit_type_never(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002044 }
David Tolnay6702ade2017-12-30 23:38:15 -05002045 Type::Tuple(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002046 _visitor.visit_type_tuple(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002047 }
David Tolnay6702ade2017-12-30 23:38:15 -05002048 Type::Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002049 _visitor.visit_type_path(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002050 }
David Tolnay6702ade2017-12-30 23:38:15 -05002051 Type::TraitObject(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002052 _visitor.visit_type_trait_object(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002053 }
David Tolnay6702ade2017-12-30 23:38:15 -05002054 Type::ImplTrait(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002055 _visitor.visit_type_impl_trait(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002056 }
David Tolnay6702ade2017-12-30 23:38:15 -05002057 Type::Paren(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002058 _visitor.visit_type_paren(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002059 }
David Tolnay6702ade2017-12-30 23:38:15 -05002060 Type::Group(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002061 _visitor.visit_type_group(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002062 }
David Tolnay6702ade2017-12-30 23:38:15 -05002063 Type::Infer(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002064 _visitor.visit_type_infer(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002065 }
David Tolnay6702ade2017-12-30 23:38:15 -05002066 Type::Macro(ref _binding_0, ) => {
David Tolnay323279a2017-12-29 11:26:32 -05002067 _visitor.visit_type_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002068 }
David Tolnay6702ade2017-12-30 23:38:15 -05002069 Type::Verbatim(ref _binding_0, ) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05002070 _visitor.visit_type_verbatim(_binding_0);
2071 }
Nika Layzell27726662017-10-24 23:16:35 -04002072 }
2073}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002074# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002075pub fn visit_type_array<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeArray) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002076 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05002077 _visitor.visit_type(& * _i . elem);
David Tolnaycc0f0372017-12-28 19:11:04 -05002078 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05002079 _visitor.visit_expr(& _i . len);
Nika Layzell27726662017-10-24 23:16:35 -04002080}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002081# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002082pub fn visit_type_bare_fn<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeBareFn) {
David Tolnaybe7a9592017-12-29 02:39:53 -05002083 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
2084 if let Some(ref it) = _i . abi { _visitor.visit_abi(it) };
2085 tokens_helper(_visitor, &(& _i . fn_token).0);
2086 if let Some(ref it) = _i . lifetimes { _visitor.visit_bound_lifetimes(it) };
2087 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -08002088 for el in Punctuated::elements(& _i . inputs) { let it = el.item(); _visitor.visit_bare_fn_arg(it) };
David Tolnaybe7a9592017-12-29 02:39:53 -05002089 if let Some(ref it) = _i . variadic { tokens_helper(_visitor, &(it).0) };
2090 _visitor.visit_return_type(& _i . output);
Nika Layzell27726662017-10-24 23:16:35 -04002091}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002092# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002093pub fn visit_type_group<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeGroup) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002094 tokens_helper(_visitor, &(& _i . group_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05002095 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04002096}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002097# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002098pub fn visit_type_impl_trait<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeImplTrait) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002099 tokens_helper(_visitor, &(& _i . impl_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -08002100 for el in Punctuated::elements(& _i . bounds) { let it = el.item(); _visitor.visit_type_param_bound(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002101}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002102# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002103pub fn visit_type_infer<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeInfer) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002104 tokens_helper(_visitor, &(& _i . underscore_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04002105}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002106# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay323279a2017-12-29 11:26:32 -05002107pub fn visit_type_macro<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeMacro) {
2108 _visitor.visit_macro(& _i . mac);
2109}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002110# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002111pub fn visit_type_never<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeNever) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002112 tokens_helper(_visitor, &(& _i . bang_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04002113}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002114# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002115pub fn visit_type_param<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParam) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002116 for it in & _i . attrs { _visitor.visit_attribute(it) };
2117 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05002118 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay6eff4da2018-01-01 20:27:45 -08002119 for el in Punctuated::elements(& _i . bounds) { let it = el.item(); _visitor.visit_type_param_bound(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05002120 if let Some(ref it) = _i . eq_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05002121 if let Some(ref it) = _i . default { _visitor.visit_type(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002122}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002123# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002124pub fn visit_type_param_bound<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParamBound) {
Nika Layzell27726662017-10-24 23:16:35 -04002125 match *_i {
David Tolnay40fb8ce2018-01-02 10:53:46 -08002126 TypeParamBound::Trait(ref _binding_0, ) => {
2127 _visitor.visit_trait_bound(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002128 }
David Tolnay40fb8ce2018-01-02 10:53:46 -08002129 TypeParamBound::Lifetime(ref _binding_0, ) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05002130 _visitor.visit_lifetime(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002131 }
2132 }
2133}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002134# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002135pub fn visit_type_paren<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParen) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002136 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05002137 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04002138}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002139# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002140pub fn visit_type_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypePath) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002141 if let Some(ref it) = _i . qself { _visitor.visit_qself(it) };
2142 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -04002143}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002144# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002145pub fn visit_type_ptr<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypePtr) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002146 tokens_helper(_visitor, &(& _i . star_token).0);
2147 if let Some(ref it) = _i . const_token { tokens_helper(_visitor, &(it).0) };
David Tolnay136aaa32017-12-29 02:37:36 -05002148 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
2149 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04002150}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002151# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002152pub fn visit_type_reference<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeReference) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002153 tokens_helper(_visitor, &(& _i . and_token).0);
David Tolnay4ba63a02017-12-28 15:53:05 -05002154 if let Some(ref it) = _i . lifetime { _visitor.visit_lifetime(it) };
David Tolnay136aaa32017-12-29 02:37:36 -05002155 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
2156 _visitor.visit_type(& * _i . elem);
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_type_slice<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeSlice) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002160 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05002161 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04002162}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002163# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002164pub fn visit_type_trait_object<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeTraitObject) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002165 if let Some(ref it) = _i . dyn_token { tokens_helper(_visitor, &(it).0) };
David Tolnay6eff4da2018-01-01 20:27:45 -08002166 for el in Punctuated::elements(& _i . bounds) { let it = el.item(); _visitor.visit_type_param_bound(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002167}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002168# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay05362582017-12-26 01:33:57 -05002169pub fn visit_type_tuple<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeTuple) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002170 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -08002171 for el in Punctuated::elements(& _i . elems) { let it = el.item(); _visitor.visit_type(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002172}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002173# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay2ae520a2017-12-29 11:19:50 -05002174pub fn visit_type_verbatim<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeVerbatim) {
2175 // Skipped field _i . tts;
2176}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002177# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002178pub fn visit_un_op<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UnOp) {
Nika Layzell27726662017-10-24 23:16:35 -04002179 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05002180 UnOp::Deref(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05002181 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04002182 }
David Tolnay6702ade2017-12-30 23:38:15 -05002183 UnOp::Not(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05002184 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04002185 }
David Tolnay6702ade2017-12-30 23:38:15 -05002186 UnOp::Neg(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05002187 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04002188 }
2189 }
2190}
David Tolnay5f332a92017-12-26 00:42:45 -05002191# [ cfg ( feature = "full" ) ]
2192pub fn visit_use_glob<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseGlob) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002193 tokens_helper(_visitor, &(& _i . star_token).0);
David Tolnay5f332a92017-12-26 00:42:45 -05002194}
2195# [ cfg ( feature = "full" ) ]
2196pub fn visit_use_list<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseList) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002197 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -08002198 for el in Punctuated::elements(& _i . items) { let it = el.item(); _visitor.visit_use_tree(it) };
David Tolnay5f332a92017-12-26 00:42:45 -05002199}
2200# [ cfg ( feature = "full" ) ]
2201pub fn visit_use_path<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UsePath) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002202 _visitor.visit_ident(& _i . ident);
David Tolnay5c4c0b52017-12-28 17:58:54 -05002203 if let Some(ref it) = _i . rename {
David Tolnaycc0f0372017-12-28 19:11:04 -05002204 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05002205 _visitor.visit_ident(& ( it ) . 1);
2206 };
David Tolnay5f332a92017-12-26 00:42:45 -05002207}
2208# [ cfg ( feature = "full" ) ]
2209pub fn visit_use_tree<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseTree) {
David Tolnay5f332a92017-12-26 00:42:45 -05002210 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05002211 UseTree::Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002212 _visitor.visit_use_path(_binding_0);
David Tolnay5f332a92017-12-26 00:42:45 -05002213 }
David Tolnay6702ade2017-12-30 23:38:15 -05002214 UseTree::Glob(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002215 _visitor.visit_use_glob(_binding_0);
David Tolnay5f332a92017-12-26 00:42:45 -05002216 }
David Tolnay6702ade2017-12-30 23:38:15 -05002217 UseTree::List(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002218 _visitor.visit_use_list(_binding_0);
David Tolnay5f332a92017-12-26 00:42:45 -05002219 }
2220 }
2221}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002222# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002223pub fn visit_variant<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Variant) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002224 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05002225 _visitor.visit_ident(& _i . ident);
David Tolnaye3d41b72017-12-31 15:24:00 -05002226 _visitor.visit_fields(& _i . fields);
David Tolnaye67902a2017-12-28 22:12:00 -05002227 if let Some(ref it) = _i . discriminant {
2228 tokens_helper(_visitor, &(& ( it ) . 0).0);
2229 _visitor.visit_expr(& ( it ) . 1);
2230 };
Nika Layzell27726662017-10-24 23:16:35 -04002231}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002232# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002233pub fn visit_vis_crate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisCrate) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002234 tokens_helper(_visitor, &(& _i . pub_token).0);
David Tolnay1e01f9c2017-12-28 20:16:19 -05002235 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnaycc0f0372017-12-28 19:11:04 -05002236 tokens_helper(_visitor, &(& _i . crate_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04002237}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002238# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002239pub fn visit_vis_public<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisPublic) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002240 tokens_helper(_visitor, &(& _i . pub_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04002241}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002242# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002243pub fn visit_vis_restricted<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisRestricted) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002244 tokens_helper(_visitor, &(& _i . pub_token).0);
David Tolnay1e01f9c2017-12-28 20:16:19 -05002245 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnaycc0f0372017-12-28 19:11:04 -05002246 if let Some(ref it) = _i . in_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a918742017-12-28 16:54:41 -05002247 _visitor.visit_path(& * _i . path);
Nika Layzell27726662017-10-24 23:16:35 -04002248}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002249# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002250pub fn visit_visibility<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Visibility) {
Nika Layzell27726662017-10-24 23:16:35 -04002251 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05002252 Visibility::Public(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002253 _visitor.visit_vis_public(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002254 }
David Tolnay6702ade2017-12-30 23:38:15 -05002255 Visibility::Crate(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002256 _visitor.visit_vis_crate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002257 }
David Tolnay6702ade2017-12-30 23:38:15 -05002258 Visibility::Restricted(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002259 _visitor.visit_vis_restricted(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002260 }
David Tolnay6702ade2017-12-30 23:38:15 -05002261 Visibility::Inherited => { }
Nika Layzell27726662017-10-24 23:16:35 -04002262 }
2263}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002264# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002265pub fn visit_where_clause<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WhereClause) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002266 tokens_helper(_visitor, &(& _i . where_token).0);
David Tolnay6eff4da2018-01-01 20:27:45 -08002267 for el in Punctuated::elements(& _i . predicates) { let it = el.item(); _visitor.visit_where_predicate(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002268}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002269# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -05002270pub fn visit_where_predicate<'ast, V: Visitor<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WherePredicate) {
Nika Layzell27726662017-10-24 23:16:35 -04002271 match *_i {
David Tolnayd4add852018-01-01 20:13:24 -08002272 WherePredicate::Type(ref _binding_0, ) => {
2273 _visitor.visit_predicate_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002274 }
David Tolnayd4add852018-01-01 20:13:24 -08002275 WherePredicate::Lifetime(ref _binding_0, ) => {
2276 _visitor.visit_predicate_lifetime(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002277 }
David Tolnayd4add852018-01-01 20:13:24 -08002278 WherePredicate::Eq(ref _binding_0, ) => {
2279 _visitor.visit_predicate_eq(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002280 }
2281 }
2282}
2283