blob: 9e719b5832c80cde2a1b4ab6458a528442b6c3bf [file] [log] [blame]
Nika Layzell27726662017-10-24 23:16:35 -04001// THIS FILE IS AUTOMATICALLY GENERATED; DO NOT EDIT
2
David Tolnay0afc9b32017-12-27 13:38:24 -05003#![cfg_attr(rustfmt, rustfmt_skip)]
4
David Tolnayf0d63bf2017-12-26 12:29:47 -05005#![cfg_attr(feature = "cargo-clippy", allow(match_same_arms))]
6
Alex Crichton715862b2018-05-17 12:31:49 -07007#[cfg(any(feature = "full", feature = "derive"))]
Nika Layzella6f46c42017-10-26 15:26:16 -04008use *;
David Tolnay0a0d78c2018-01-05 15:24:01 -08009#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay6eff4da2018-01-01 20:27:45 -080010use punctuated::Punctuated;
David Tolnay98942562017-12-26 21:24:35 -050011use proc_macro2::Span;
David Tolnay0a0d78c2018-01-05 15:24:01 -080012#[cfg(any(feature = "full", feature = "derive"))]
David Tolnaycc0f0372017-12-28 19:11:04 -050013use gen::helper::visit::*;
Nika Layzell27726662017-10-24 23:16:35 -040014
Nika Layzell4ab8d6e2017-10-26 09:45:49 -040015
16#[cfg(feature = "full")]
17macro_rules! full {
18 ($e:expr) => { $e }
19}
20
David Tolnay0a0d78c2018-01-05 15:24:01 -080021#[cfg(all(feature = "derive", not(feature = "full")))]
Nika Layzell4ab8d6e2017-10-26 09:45:49 -040022macro_rules! full {
23 ($e:expr) => { unreachable!() }
24}
25
26
David Tolnayded2d682018-01-06 18:53:53 -080027/// Syntax tree traversal to walk a shared borrow of a syntax tree.
Nika Layzell27726662017-10-24 23:16:35 -040028///
David Tolnayded2d682018-01-06 18:53:53 -080029/// See the [module documentation] for details.
30///
31/// [module documentation]: index.html
David Tolnay12374262018-01-07 12:38:34 -080032///
33/// *This trait is available if Syn is built with the `"visit"` feature.*
David Tolnay4b4c4b62018-01-06 13:48:05 -080034pub trait Visit<'ast> {
David Tolnay3cfd1d32018-01-03 00:22:08 -080035# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050036fn visit_abi(&mut self, i: &'ast Abi) { visit_abi(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080037# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc08227a2017-12-04 16:30:17 -050038fn visit_angle_bracketed_generic_arguments(&mut self, i: &'ast AngleBracketedGenericArguments) { visit_angle_bracketed_generic_arguments(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040039# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050040fn visit_arg_captured(&mut self, i: &'ast ArgCaptured) { visit_arg_captured(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040041# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050042fn visit_arg_self(&mut self, i: &'ast ArgSelf) { visit_arg_self(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -040043# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050044fn visit_arg_self_ref(&mut self, i: &'ast ArgSelfRef) { visit_arg_self_ref(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080045# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050046fn visit_arm(&mut self, i: &'ast Arm) { visit_arm(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080047# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050048fn visit_attr_style(&mut self, i: &'ast AttrStyle) { visit_attr_style(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080049# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050050fn visit_attribute(&mut self, i: &'ast Attribute) { visit_attribute(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_bare_fn_arg(&mut self, i: &'ast BareFnArg) { visit_bare_fn_arg(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_bare_fn_arg_name(&mut self, i: &'ast BareFnArgName) { visit_bare_fn_arg_name(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_bin_op(&mut self, i: &'ast BinOp) { visit_bin_op(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080057# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay506e43a2017-12-29 11:34:36 -050058fn visit_binding(&mut self, i: &'ast Binding) { visit_binding(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080059# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050060fn visit_block(&mut self, i: &'ast Block) { visit_block(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080061# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050062fn visit_bound_lifetimes(&mut self, i: &'ast BoundLifetimes) { visit_bound_lifetimes(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080063# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellf1fdc0b2017-12-04 19:58:32 -050064fn visit_const_param(&mut self, i: &'ast ConstParam) { visit_const_param(self, i) }
David Tolnay0a0d78c2018-01-05 15:24:01 -080065# [ cfg ( feature = "derive" ) ]
David Tolnaye3d41b72017-12-31 15:24:00 -050066fn visit_data(&mut self, i: &'ast Data) { visit_data(self, i) }
David Tolnay0a0d78c2018-01-05 15:24:01 -080067# [ cfg ( feature = "derive" ) ]
David Tolnaye3d41b72017-12-31 15:24:00 -050068fn visit_data_enum(&mut self, i: &'ast DataEnum) { visit_data_enum(self, i) }
David Tolnay0a0d78c2018-01-05 15:24:01 -080069# [ cfg ( feature = "derive" ) ]
David Tolnaye3d41b72017-12-31 15:24:00 -050070fn visit_data_struct(&mut self, i: &'ast DataStruct) { visit_data_struct(self, i) }
David Tolnay0a0d78c2018-01-05 15:24:01 -080071# [ cfg ( feature = "derive" ) ]
David Tolnaye3d41b72017-12-31 15:24:00 -050072fn visit_data_union(&mut self, i: &'ast DataUnion) { visit_data_union(self, i) }
David Tolnay0a0d78c2018-01-05 15:24:01 -080073# [ cfg ( feature = "derive" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050074fn visit_derive_input(&mut self, i: &'ast DeriveInput) { visit_derive_input(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080075# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050076fn visit_expr(&mut self, i: &'ast Expr) { visit_expr(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080077# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050078fn visit_expr_array(&mut self, i: &'ast ExprArray) { visit_expr_array(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080079# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050080fn visit_expr_assign(&mut self, i: &'ast ExprAssign) { visit_expr_assign(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_assign_op(&mut self, i: &'ast ExprAssignOp) { visit_expr_assign_op(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080083# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050084fn visit_expr_binary(&mut self, i: &'ast ExprBinary) { visit_expr_binary(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_block(&mut self, i: &'ast ExprBlock) { visit_expr_block(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_box(&mut self, i: &'ast ExprBox) { visit_expr_box(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080089# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050090fn visit_expr_break(&mut self, i: &'ast ExprBreak) { visit_expr_break(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080091# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050092fn visit_expr_call(&mut self, i: &'ast ExprCall) { visit_expr_call(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080093# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050094fn visit_expr_cast(&mut self, i: &'ast ExprCast) { visit_expr_cast(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_catch(&mut self, i: &'ast ExprCatch) { visit_expr_catch(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080097# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -050098fn visit_expr_closure(&mut self, i: &'ast ExprClosure) { visit_expr_closure(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -080099# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500100fn visit_expr_continue(&mut self, i: &'ast ExprContinue) { visit_expr_continue(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_field(&mut self, i: &'ast ExprField) { visit_expr_field(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_for_loop(&mut self, i: &'ast ExprForLoop) { visit_expr_for_loop(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_group(&mut self, i: &'ast ExprGroup) { visit_expr_group(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_if(&mut self, i: &'ast ExprIf) { visit_expr_if(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_if_let(&mut self, i: &'ast ExprIfLet) { visit_expr_if_let(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_in_place(&mut self, i: &'ast ExprInPlace) { visit_expr_in_place(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800113# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500114fn visit_expr_index(&mut self, i: &'ast ExprIndex) { visit_expr_index(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800115# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500116fn visit_expr_lit(&mut self, i: &'ast ExprLit) { visit_expr_lit(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_loop(&mut self, i: &'ast ExprLoop) { visit_expr_loop(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800119# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay8c91b882017-12-28 23:04:32 -0500120fn visit_expr_macro(&mut self, i: &'ast ExprMacro) { visit_expr_macro(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800121# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500122fn visit_expr_match(&mut self, i: &'ast ExprMatch) { visit_expr_match(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_method_call(&mut self, i: &'ast ExprMethodCall) { visit_expr_method_call(self, i) }
David Tolnay81ab4f62018-01-27 19:02:51 -0800125# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500126fn visit_expr_paren(&mut self, i: &'ast ExprParen) { visit_expr_paren(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800127# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500128fn visit_expr_path(&mut self, i: &'ast ExprPath) { visit_expr_path(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_range(&mut self, i: &'ast ExprRange) { visit_expr_range(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800131# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay00674ba2018-03-31 18:14:11 +0200132fn visit_expr_reference(&mut self, i: &'ast ExprReference) { visit_expr_reference(self, i) }
133# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500134fn visit_expr_repeat(&mut self, i: &'ast ExprRepeat) { visit_expr_repeat(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800135# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayc246cd32017-12-28 23:14:32 -0500136fn visit_expr_return(&mut self, i: &'ast ExprReturn) { visit_expr_return(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_struct(&mut self, i: &'ast ExprStruct) { visit_expr_struct(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800139# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500140fn visit_expr_try(&mut self, i: &'ast ExprTry) { visit_expr_try(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800141# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay05362582017-12-26 01:33:57 -0500142fn visit_expr_tuple(&mut self, i: &'ast ExprTuple) { visit_expr_tuple(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_type(&mut self, i: &'ast ExprType) { visit_expr_type(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800145# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500146fn visit_expr_unary(&mut self, i: &'ast ExprUnary) { visit_expr_unary(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800147# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzell640832a2017-12-04 13:37:09 -0500148fn visit_expr_unsafe(&mut self, i: &'ast ExprUnsafe) { visit_expr_unsafe(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800149# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay2ae520a2017-12-29 11:19:50 -0500150fn visit_expr_verbatim(&mut self, i: &'ast ExprVerbatim) { visit_expr_verbatim(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800151# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500152fn visit_expr_while(&mut self, i: &'ast ExprWhile) { visit_expr_while(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800153# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500154fn visit_expr_while_let(&mut self, i: &'ast ExprWhileLet) { visit_expr_while_let(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_yield(&mut self, i: &'ast ExprYield) { visit_expr_yield(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800157# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500158fn visit_field(&mut self, i: &'ast Field) { visit_field(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800159# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500160fn visit_field_pat(&mut self, i: &'ast FieldPat) { visit_field_pat(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800161# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500162fn visit_field_value(&mut self, i: &'ast FieldValue) { visit_field_value(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800163# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnaye3d41b72017-12-31 15:24:00 -0500164fn visit_fields(&mut self, i: &'ast Fields) { visit_fields(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800165# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnaye3d41b72017-12-31 15:24:00 -0500166fn visit_fields_named(&mut self, i: &'ast FieldsNamed) { visit_fields_named(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_unnamed(&mut self, i: &'ast FieldsUnnamed) { visit_fields_unnamed(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400169# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500170fn visit_file(&mut self, i: &'ast File) { visit_file(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400171# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500172fn visit_fn_arg(&mut self, i: &'ast FnArg) { visit_fn_arg(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400173# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500174fn visit_fn_decl(&mut self, i: &'ast FnDecl) { visit_fn_decl(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400175# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500176fn visit_foreign_item(&mut self, i: &'ast ForeignItem) { visit_foreign_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400177# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500178fn visit_foreign_item_fn(&mut self, i: &'ast ForeignItemFn) { visit_foreign_item_fn(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400179# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500180fn visit_foreign_item_static(&mut self, i: &'ast ForeignItemStatic) { visit_foreign_item_static(self, i) }
David Tolnay199bcbb2017-11-12 10:33:52 -0800181# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500182fn visit_foreign_item_type(&mut self, i: &'ast ForeignItemType) { visit_foreign_item_type(self, i) }
David Tolnay2ae520a2017-12-29 11:19:50 -0500183# [ cfg ( feature = "full" ) ]
184fn visit_foreign_item_verbatim(&mut self, i: &'ast ForeignItemVerbatim) { visit_foreign_item_verbatim(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800185# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc08227a2017-12-04 16:30:17 -0500186fn visit_generic_argument(&mut self, i: &'ast GenericArgument) { visit_generic_argument(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800187# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnayd60cfec2017-12-29 00:21:38 -0500188fn visit_generic_method_argument(&mut self, i: &'ast GenericMethodArgument) { visit_generic_method_argument(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800189# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayc2f1aba2017-11-12 20:29:22 -0800190fn visit_generic_param(&mut self, i: &'ast GenericParam) { visit_generic_param(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800191# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500192fn visit_generics(&mut self, i: &'ast Generics) { visit_generics(self, i) }
Alex Crichtond261d092018-05-18 13:47:35 -0700193
194fn visit_ident(&mut self, i: &'ast Ident) { visit_ident(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400195# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500196fn visit_impl_item(&mut self, i: &'ast ImplItem) { visit_impl_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400197# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500198fn visit_impl_item_const(&mut self, i: &'ast ImplItemConst) { visit_impl_item_const(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400199# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500200fn visit_impl_item_macro(&mut self, i: &'ast ImplItemMacro) { visit_impl_item_macro(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400201# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500202fn visit_impl_item_method(&mut self, i: &'ast ImplItemMethod) { visit_impl_item_method(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400203# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500204fn visit_impl_item_type(&mut self, i: &'ast ImplItemType) { visit_impl_item_type(self, i) }
David Tolnay2ae520a2017-12-29 11:19:50 -0500205# [ cfg ( feature = "full" ) ]
206fn visit_impl_item_verbatim(&mut self, i: &'ast ImplItemVerbatim) { visit_impl_item_verbatim(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800207# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay85b69a42017-12-27 20:43:10 -0500208fn visit_index(&mut self, i: &'ast Index) { visit_index(self, i) }
209# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500210fn visit_item(&mut self, i: &'ast Item) { visit_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400211# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500212fn visit_item_const(&mut self, i: &'ast ItemConst) { visit_item_const(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400213# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500214fn visit_item_enum(&mut self, i: &'ast ItemEnum) { visit_item_enum(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400215# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500216fn visit_item_extern_crate(&mut self, i: &'ast ItemExternCrate) { visit_item_extern_crate(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400217# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500218fn visit_item_fn(&mut self, i: &'ast ItemFn) { visit_item_fn(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400219# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500220fn visit_item_foreign_mod(&mut self, i: &'ast ItemForeignMod) { visit_item_foreign_mod(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400221# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500222fn visit_item_impl(&mut self, i: &'ast ItemImpl) { visit_item_impl(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400223# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500224fn visit_item_macro(&mut self, i: &'ast ItemMacro) { visit_item_macro(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400225# [ cfg ( feature = "full" ) ]
David Tolnay500d8322017-12-18 00:32:51 -0800226fn visit_item_macro2(&mut self, i: &'ast ItemMacro2) { visit_item_macro2(self, i) }
227# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500228fn visit_item_mod(&mut self, i: &'ast ItemMod) { visit_item_mod(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400229# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500230fn visit_item_static(&mut self, i: &'ast ItemStatic) { visit_item_static(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400231# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500232fn visit_item_struct(&mut self, i: &'ast ItemStruct) { visit_item_struct(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400233# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500234fn visit_item_trait(&mut self, i: &'ast ItemTrait) { visit_item_trait(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400235# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500236fn visit_item_type(&mut self, i: &'ast ItemType) { visit_item_type(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400237# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500238fn visit_item_union(&mut self, i: &'ast ItemUnion) { visit_item_union(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400239# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500240fn visit_item_use(&mut self, i: &'ast ItemUse) { visit_item_use(self, i) }
David Tolnay2ae520a2017-12-29 11:19:50 -0500241# [ cfg ( feature = "full" ) ]
242fn visit_item_verbatim(&mut self, i: &'ast ItemVerbatim) { visit_item_verbatim(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800243# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnaybcd498f2017-12-29 12:02:33 -0500244fn visit_label(&mut self, i: &'ast Label) { visit_label(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800245# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4ba63a02017-12-28 15:53:05 -0500246fn visit_lifetime(&mut self, i: &'ast Lifetime) { visit_lifetime(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800247# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500248fn visit_lifetime_def(&mut self, i: &'ast LifetimeDef) { visit_lifetime_def(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_lit(&mut self, i: &'ast Lit) { visit_lit(self, i) }
David Tolnay360efd22018-01-04 23:35:26 -0800251# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
252fn visit_lit_bool(&mut self, i: &'ast LitBool) { visit_lit_bool(self, i) }
253# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
254fn visit_lit_byte(&mut self, i: &'ast LitByte) { visit_lit_byte(self, i) }
255# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
256fn visit_lit_byte_str(&mut self, i: &'ast LitByteStr) { visit_lit_byte_str(self, i) }
257# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
258fn visit_lit_char(&mut self, i: &'ast LitChar) { visit_lit_char(self, i) }
259# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
260fn visit_lit_float(&mut self, i: &'ast LitFloat) { visit_lit_float(self, i) }
261# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
262fn visit_lit_int(&mut self, i: &'ast LitInt) { visit_lit_int(self, i) }
263# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
264fn visit_lit_str(&mut self, i: &'ast LitStr) { visit_lit_str(self, i) }
265# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
266fn visit_lit_verbatim(&mut self, i: &'ast LitVerbatim) { visit_lit_verbatim(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800267# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500268fn visit_local(&mut self, i: &'ast Local) { visit_local(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800269# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500270fn visit_macro(&mut self, i: &'ast Macro) { visit_macro(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800271# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayab919512017-12-30 23:31:51 -0500272fn visit_macro_delimiter(&mut self, i: &'ast MacroDelimiter) { visit_macro_delimiter(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800273# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay85b69a42017-12-27 20:43:10 -0500274fn visit_member(&mut self, i: &'ast Member) { visit_member(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800275# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayaaadd782018-01-06 22:58:13 -0800276fn visit_meta(&mut self, i: &'ast Meta) { visit_meta(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800277# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayaaadd782018-01-06 22:58:13 -0800278fn visit_meta_list(&mut self, i: &'ast MetaList) { visit_meta_list(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_name_value(&mut self, i: &'ast MetaNameValue) { visit_meta_name_value(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400281# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500282fn visit_method_sig(&mut self, i: &'ast MethodSig) { visit_method_sig(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800283# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnayd60cfec2017-12-29 00:21:38 -0500284fn visit_method_turbofish(&mut self, i: &'ast MethodTurbofish) { visit_method_turbofish(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800285# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayaaadd782018-01-06 22:58:13 -0800286fn visit_nested_meta(&mut self, i: &'ast NestedMeta) { visit_nested_meta(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800287# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc08227a2017-12-04 16:30:17 -0500288fn visit_parenthesized_generic_arguments(&mut self, i: &'ast ParenthesizedGenericArguments) { visit_parenthesized_generic_arguments(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800289# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500290fn visit_pat(&mut self, i: &'ast Pat) { visit_pat(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800291# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500292fn visit_pat_box(&mut self, i: &'ast PatBox) { visit_pat_box(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_ident(&mut self, i: &'ast PatIdent) { visit_pat_ident(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_lit(&mut self, i: &'ast PatLit) { visit_pat_lit(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800297# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay323279a2017-12-29 11:26:32 -0500298fn visit_pat_macro(&mut self, i: &'ast PatMacro) { visit_pat_macro(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_path(&mut self, i: &'ast PatPath) { visit_pat_path(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800301# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500302fn visit_pat_range(&mut self, i: &'ast PatRange) { visit_pat_range(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_ref(&mut self, i: &'ast PatRef) { visit_pat_ref(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_slice(&mut self, i: &'ast PatSlice) { visit_pat_slice(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_struct(&mut self, i: &'ast PatStruct) { visit_pat_struct(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_tuple(&mut self, i: &'ast PatTuple) { visit_pat_tuple(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_tuple_struct(&mut self, i: &'ast PatTupleStruct) { visit_pat_tuple_struct(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800313# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay2ae520a2017-12-29 11:19:50 -0500314fn visit_pat_verbatim(&mut self, i: &'ast PatVerbatim) { visit_pat_verbatim(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_wild(&mut self, i: &'ast PatWild) { visit_pat_wild(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800317# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500318fn visit_path(&mut self, i: &'ast Path) { visit_path(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800319# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc08227a2017-12-04 16:30:17 -0500320fn visit_path_arguments(&mut self, i: &'ast PathArguments) { visit_path_arguments(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_segment(&mut self, i: &'ast PathSegment) { visit_path_segment(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800323# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayd4add852018-01-01 20:13:24 -0800324fn visit_predicate_eq(&mut self, i: &'ast PredicateEq) { visit_predicate_eq(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800325# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayd4add852018-01-01 20:13:24 -0800326fn visit_predicate_lifetime(&mut self, i: &'ast PredicateLifetime) { visit_predicate_lifetime(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_type(&mut self, i: &'ast PredicateType) { visit_predicate_type(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800329# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500330fn visit_qself(&mut self, i: &'ast QSelf) { visit_qself(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800331# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500332fn visit_range_limits(&mut self, i: &'ast RangeLimits) { visit_range_limits(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_return_type(&mut self, i: &'ast ReturnType) { visit_return_type(self, i) }
Nika Layzellefb83ba2017-12-19 18:23:55 -0500335
336fn visit_span(&mut self, i: &'ast Span) { visit_span(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800337# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500338fn visit_stmt(&mut self, i: &'ast Stmt) { visit_stmt(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800339# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay40fb8ce2018-01-02 10:53:46 -0800340fn visit_trait_bound(&mut self, i: &'ast TraitBound) { visit_trait_bound(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800341# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500342fn visit_trait_bound_modifier(&mut self, i: &'ast TraitBoundModifier) { visit_trait_bound_modifier(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400343# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500344fn visit_trait_item(&mut self, i: &'ast TraitItem) { visit_trait_item(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400345# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500346fn visit_trait_item_const(&mut self, i: &'ast TraitItemConst) { visit_trait_item_const(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400347# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500348fn visit_trait_item_macro(&mut self, i: &'ast TraitItemMacro) { visit_trait_item_macro(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400349# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500350fn visit_trait_item_method(&mut self, i: &'ast TraitItemMethod) { visit_trait_item_method(self, i) }
Nika Layzell27726662017-10-24 23:16:35 -0400351# [ cfg ( feature = "full" ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500352fn visit_trait_item_type(&mut self, i: &'ast TraitItemType) { visit_trait_item_type(self, i) }
David Tolnay2ae520a2017-12-29 11:19:50 -0500353# [ cfg ( feature = "full" ) ]
354fn visit_trait_item_verbatim(&mut self, i: &'ast TraitItemVerbatim) { visit_trait_item_verbatim(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800355# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500356fn visit_type(&mut self, i: &'ast Type) { visit_type(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800357# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500358fn visit_type_array(&mut self, i: &'ast TypeArray) { visit_type_array(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_bare_fn(&mut self, i: &'ast TypeBareFn) { visit_type_bare_fn(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_group(&mut self, i: &'ast TypeGroup) { visit_type_group(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_impl_trait(&mut self, i: &'ast TypeImplTrait) { visit_type_impl_trait(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_infer(&mut self, i: &'ast TypeInfer) { visit_type_infer(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800367# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay323279a2017-12-29 11:26:32 -0500368fn visit_type_macro(&mut self, i: &'ast TypeMacro) { visit_type_macro(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_never(&mut self, i: &'ast TypeNever) { visit_type_never(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800371# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500372fn visit_type_param(&mut self, i: &'ast TypeParam) { visit_type_param(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_param_bound(&mut self, i: &'ast TypeParamBound) { visit_type_param_bound(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_paren(&mut self, i: &'ast TypeParen) { visit_type_paren(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_path(&mut self, i: &'ast TypePath) { visit_type_path(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_ptr(&mut self, i: &'ast TypePtr) { visit_type_ptr(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_reference(&mut self, i: &'ast TypeReference) { visit_type_reference(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_slice(&mut self, i: &'ast TypeSlice) { visit_type_slice(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_trait_object(&mut self, i: &'ast TypeTraitObject) { visit_type_trait_object(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800387# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay05362582017-12-26 01:33:57 -0500388fn visit_type_tuple(&mut self, i: &'ast TypeTuple) { visit_type_tuple(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800389# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay2ae520a2017-12-29 11:19:50 -0500390fn visit_type_verbatim(&mut self, i: &'ast TypeVerbatim) { visit_type_verbatim(self, i) }
David Tolnay3cfd1d32018-01-03 00:22:08 -0800391# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
Nika Layzellc86173a2017-11-18 13:55:22 -0500392fn visit_un_op(&mut self, i: &'ast UnOp) { visit_un_op(self, i) }
David Tolnay5f332a92017-12-26 00:42:45 -0500393# [ cfg ( feature = "full" ) ]
394fn visit_use_glob(&mut self, i: &'ast UseGlob) { visit_use_glob(self, i) }
395# [ cfg ( feature = "full" ) ]
David Tolnayd97a7d22018-03-31 19:17:01 +0200396fn visit_use_group(&mut self, i: &'ast UseGroup) { visit_use_group(self, i) }
397# [ cfg ( feature = "full" ) ]
398fn visit_use_name(&mut self, i: &'ast UseName) { visit_use_name(self, i) }
David Tolnay5f332a92017-12-26 00:42:45 -0500399# [ cfg ( feature = "full" ) ]
400fn visit_use_path(&mut self, i: &'ast UsePath) { visit_use_path(self, i) }
401# [ cfg ( feature = "full" ) ]
David Tolnayd97a7d22018-03-31 19:17:01 +0200402fn visit_use_rename(&mut self, i: &'ast UseRename) { visit_use_rename(self, i) }
403# [ cfg ( feature = "full" ) ]
David Tolnay5f332a92017-12-26 00:42:45 -0500404fn 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" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800423pub fn visit_abi<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Abi) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500424 tokens_helper(_visitor, &(& _i . extern_token).0);
David Tolnayc2749802018-01-06 23:40:41 -0800425 if let Some(ref it) = _i . name { _visitor.visit_lit_str(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400426}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800427# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800428pub fn visit_angle_bracketed_generic_arguments<'ast, V: Visit<'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 Tolnay56080682018-01-06 14:01:52 -0800431 for el in Punctuated::pairs(& _i . args) { let it = el.value(); _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" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800435pub fn visit_arg_captured<'ast, V: Visit<'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" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800441pub fn visit_arg_self<'ast, V: Visit<'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" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800446pub fn visit_arg_self_ref<'ast, V: Visit<'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" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800453pub fn visit_arm<'ast, V: Visit<'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 Tolnay18cc4d42018-03-31 18:47:20 +0200455 if let Some(ref it) = _i . leading_vert { tokens_helper(_visitor, &(it).0) };
David Tolnay56080682018-01-06 14:01:52 -0800456 for el in Punctuated::pairs(& _i . pats) { let it = el.value(); _visitor.visit_pat(it) };
David Tolnay8b4d3022017-12-29 12:11:10 -0500457 if let Some(ref it) = _i . guard {
458 tokens_helper(_visitor, &(& ( it ) . 0).0);
459 _visitor.visit_expr(& * ( it ) . 1);
460 };
David Tolnaydfb91432018-03-31 19:19:44 +0200461 tokens_helper(_visitor, &(& _i . fat_arrow_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500462 _visitor.visit_expr(& * _i . body);
David Tolnaycc0f0372017-12-28 19:11:04 -0500463 if let Some(ref it) = _i . comma { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -0400464}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800465# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800466pub fn visit_attr_style<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast AttrStyle) {
Nika Layzell27726662017-10-24 23:16:35 -0400467 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -0500468 AttrStyle::Outer => { }
469 AttrStyle::Inner(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500470 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400471 }
472 }
473}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800474# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800475pub fn visit_attribute<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Attribute) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500476 tokens_helper(_visitor, &(& _i . pound_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500477 _visitor.visit_attr_style(& _i . style);
David Tolnay1e01f9c2017-12-28 20:16:19 -0500478 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500479 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -0400480 // Skipped field _i . tts;
481 // Skipped field _i . is_sugared_doc;
482}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800483# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800484pub fn visit_bare_fn_arg<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BareFnArg) {
David Tolnay5c4c0b52017-12-28 17:58:54 -0500485 if let Some(ref it) = _i . name {
486 _visitor.visit_bare_fn_arg_name(& ( it ) . 0);
David Tolnaycc0f0372017-12-28 19:11:04 -0500487 tokens_helper(_visitor, &(& ( it ) . 1).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -0500488 };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500489 _visitor.visit_type(& _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -0400490}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800491# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800492pub fn visit_bare_fn_arg_name<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BareFnArgName) {
Nika Layzell27726662017-10-24 23:16:35 -0400493 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -0500494 BareFnArgName::Named(ref _binding_0, ) => {
Alex Crichtond261d092018-05-18 13:47:35 -0700495 _visitor.visit_ident(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400496 }
David Tolnay6702ade2017-12-30 23:38:15 -0500497 BareFnArgName::Wild(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500498 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400499 }
500 }
501}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800502# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800503pub fn visit_bin_op<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BinOp) {
Nika Layzell27726662017-10-24 23:16:35 -0400504 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -0500505 BinOp::Add(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500506 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400507 }
David Tolnay6702ade2017-12-30 23:38:15 -0500508 BinOp::Sub(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500509 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400510 }
David Tolnay6702ade2017-12-30 23:38:15 -0500511 BinOp::Mul(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500512 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400513 }
David Tolnay6702ade2017-12-30 23:38:15 -0500514 BinOp::Div(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500515 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400516 }
David Tolnay6702ade2017-12-30 23:38:15 -0500517 BinOp::Rem(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500518 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400519 }
David Tolnay6702ade2017-12-30 23:38:15 -0500520 BinOp::And(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500521 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400522 }
David Tolnay6702ade2017-12-30 23:38:15 -0500523 BinOp::Or(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500524 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400525 }
David Tolnay6702ade2017-12-30 23:38:15 -0500526 BinOp::BitXor(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500527 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400528 }
David Tolnay6702ade2017-12-30 23:38:15 -0500529 BinOp::BitAnd(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500530 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400531 }
David Tolnay6702ade2017-12-30 23:38:15 -0500532 BinOp::BitOr(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500533 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400534 }
David Tolnay6702ade2017-12-30 23:38:15 -0500535 BinOp::Shl(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500536 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400537 }
David Tolnay6702ade2017-12-30 23:38:15 -0500538 BinOp::Shr(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500539 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400540 }
David Tolnay6702ade2017-12-30 23:38:15 -0500541 BinOp::Eq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500542 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400543 }
David Tolnay6702ade2017-12-30 23:38:15 -0500544 BinOp::Lt(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500545 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400546 }
David Tolnay6702ade2017-12-30 23:38:15 -0500547 BinOp::Le(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500548 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400549 }
David Tolnay6702ade2017-12-30 23:38:15 -0500550 BinOp::Ne(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500551 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400552 }
David Tolnay6702ade2017-12-30 23:38:15 -0500553 BinOp::Ge(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500554 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400555 }
David Tolnay6702ade2017-12-30 23:38:15 -0500556 BinOp::Gt(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500557 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400558 }
David Tolnay6702ade2017-12-30 23:38:15 -0500559 BinOp::AddEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500560 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400561 }
David Tolnay6702ade2017-12-30 23:38:15 -0500562 BinOp::SubEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500563 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400564 }
David Tolnay6702ade2017-12-30 23:38:15 -0500565 BinOp::MulEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500566 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400567 }
David Tolnay6702ade2017-12-30 23:38:15 -0500568 BinOp::DivEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500569 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400570 }
David Tolnay6702ade2017-12-30 23:38:15 -0500571 BinOp::RemEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500572 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400573 }
David Tolnay6702ade2017-12-30 23:38:15 -0500574 BinOp::BitXorEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500575 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400576 }
David Tolnay6702ade2017-12-30 23:38:15 -0500577 BinOp::BitAndEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500578 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400579 }
David Tolnay6702ade2017-12-30 23:38:15 -0500580 BinOp::BitOrEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500581 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400582 }
David Tolnay6702ade2017-12-30 23:38:15 -0500583 BinOp::ShlEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500584 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400585 }
David Tolnay6702ade2017-12-30 23:38:15 -0500586 BinOp::ShrEq(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -0500587 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -0400588 }
589 }
590}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800591# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800592pub fn visit_binding<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Binding) {
Alex Crichtond261d092018-05-18 13:47:35 -0700593 _visitor.visit_ident(& _i . ident);
David Tolnay506e43a2017-12-29 11:34:36 -0500594 tokens_helper(_visitor, &(& _i . eq_token).0);
595 _visitor.visit_type(& _i . ty);
596}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800597# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800598pub fn visit_block<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Block) {
David Tolnay1e01f9c2017-12-28 20:16:19 -0500599 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500600 for it in & _i . stmts { _visitor.visit_stmt(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400601}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800602# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800603pub fn visit_bound_lifetimes<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BoundLifetimes) {
David Tolnaycc0f0372017-12-28 19:11:04 -0500604 tokens_helper(_visitor, &(& _i . for_token).0);
605 tokens_helper(_visitor, &(& _i . lt_token).0);
David Tolnay56080682018-01-06 14:01:52 -0800606 for el in Punctuated::pairs(& _i . lifetimes) { let it = el.value(); _visitor.visit_lifetime_def(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500607 tokens_helper(_visitor, &(& _i . gt_token).0);
Nika Layzell27726662017-10-24 23:16:35 -0400608}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800609# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800610pub fn visit_const_param<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ConstParam) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500611 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500612 tokens_helper(_visitor, &(& _i . const_token).0);
Alex Crichtond261d092018-05-18 13:47:35 -0700613 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -0500614 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500615 _visitor.visit_type(& _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -0500616 if let Some(ref it) = _i . eq_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500617 if let Some(ref it) = _i . default { _visitor.visit_expr(it) };
Nika Layzellf1fdc0b2017-12-04 19:58:32 -0500618}
David Tolnay0a0d78c2018-01-05 15:24:01 -0800619# [ cfg ( feature = "derive" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800620pub fn visit_data<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Data) {
David Tolnaye3d41b72017-12-31 15:24:00 -0500621 match *_i {
622 Data::Struct(ref _binding_0, ) => {
623 _visitor.visit_data_struct(_binding_0);
624 }
625 Data::Enum(ref _binding_0, ) => {
626 _visitor.visit_data_enum(_binding_0);
627 }
628 Data::Union(ref _binding_0, ) => {
629 _visitor.visit_data_union(_binding_0);
630 }
631 }
632}
David Tolnay0a0d78c2018-01-05 15:24:01 -0800633# [ cfg ( feature = "derive" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800634pub fn visit_data_enum<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast DataEnum) {
David Tolnaye3d41b72017-12-31 15:24:00 -0500635 tokens_helper(_visitor, &(& _i . enum_token).0);
636 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay56080682018-01-06 14:01:52 -0800637 for el in Punctuated::pairs(& _i . variants) { let it = el.value(); _visitor.visit_variant(it) };
David Tolnaye3d41b72017-12-31 15:24:00 -0500638}
David Tolnay0a0d78c2018-01-05 15:24:01 -0800639# [ cfg ( feature = "derive" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800640pub fn visit_data_struct<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast DataStruct) {
David Tolnaye3d41b72017-12-31 15:24:00 -0500641 tokens_helper(_visitor, &(& _i . struct_token).0);
642 _visitor.visit_fields(& _i . fields);
643 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
644}
David Tolnay0a0d78c2018-01-05 15:24:01 -0800645# [ cfg ( feature = "derive" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800646pub fn visit_data_union<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast DataUnion) {
David Tolnaye3d41b72017-12-31 15:24:00 -0500647 tokens_helper(_visitor, &(& _i . union_token).0);
648 _visitor.visit_fields_named(& _i . fields);
649}
David Tolnay0a0d78c2018-01-05 15:24:01 -0800650# [ cfg ( feature = "derive" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800651pub fn visit_derive_input<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast DeriveInput) {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500652 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500653 _visitor.visit_visibility(& _i . vis);
Alex Crichtond261d092018-05-18 13:47:35 -0700654 _visitor.visit_ident(& _i . ident);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500655 _visitor.visit_generics(& _i . generics);
David Tolnaye3d41b72017-12-31 15:24:00 -0500656 _visitor.visit_data(& _i . data);
Nika Layzell27726662017-10-24 23:16:35 -0400657}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800658# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800659pub fn visit_expr<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Expr) {
Nika Layzell27726662017-10-24 23:16:35 -0400660 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -0500661 Expr::Box(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500662 full!(_visitor.visit_expr_box(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400663 }
David Tolnay6702ade2017-12-30 23:38:15 -0500664 Expr::InPlace(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500665 full!(_visitor.visit_expr_in_place(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400666 }
David Tolnay6702ade2017-12-30 23:38:15 -0500667 Expr::Array(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500668 full!(_visitor.visit_expr_array(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400669 }
David Tolnay6702ade2017-12-30 23:38:15 -0500670 Expr::Call(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500671 _visitor.visit_expr_call(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400672 }
David Tolnay6702ade2017-12-30 23:38:15 -0500673 Expr::MethodCall(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500674 full!(_visitor.visit_expr_method_call(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400675 }
David Tolnay6702ade2017-12-30 23:38:15 -0500676 Expr::Tuple(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500677 full!(_visitor.visit_expr_tuple(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400678 }
David Tolnay6702ade2017-12-30 23:38:15 -0500679 Expr::Binary(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500680 _visitor.visit_expr_binary(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400681 }
David Tolnay6702ade2017-12-30 23:38:15 -0500682 Expr::Unary(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500683 _visitor.visit_expr_unary(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400684 }
David Tolnay6702ade2017-12-30 23:38:15 -0500685 Expr::Lit(ref _binding_0, ) => {
David Tolnay8c91b882017-12-28 23:04:32 -0500686 _visitor.visit_expr_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400687 }
David Tolnay6702ade2017-12-30 23:38:15 -0500688 Expr::Cast(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500689 _visitor.visit_expr_cast(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400690 }
David Tolnay6702ade2017-12-30 23:38:15 -0500691 Expr::Type(ref _binding_0, ) => {
David Tolnay0cf94f22017-12-28 23:46:26 -0500692 full!(_visitor.visit_expr_type(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400693 }
David Tolnay6702ade2017-12-30 23:38:15 -0500694 Expr::If(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500695 full!(_visitor.visit_expr_if(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400696 }
David Tolnay6702ade2017-12-30 23:38:15 -0500697 Expr::IfLet(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500698 full!(_visitor.visit_expr_if_let(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400699 }
David Tolnay6702ade2017-12-30 23:38:15 -0500700 Expr::While(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500701 full!(_visitor.visit_expr_while(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400702 }
David Tolnay6702ade2017-12-30 23:38:15 -0500703 Expr::WhileLet(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500704 full!(_visitor.visit_expr_while_let(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400705 }
David Tolnay6702ade2017-12-30 23:38:15 -0500706 Expr::ForLoop(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500707 full!(_visitor.visit_expr_for_loop(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400708 }
David Tolnay6702ade2017-12-30 23:38:15 -0500709 Expr::Loop(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500710 full!(_visitor.visit_expr_loop(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400711 }
David Tolnay6702ade2017-12-30 23:38:15 -0500712 Expr::Match(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500713 full!(_visitor.visit_expr_match(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400714 }
David Tolnay6702ade2017-12-30 23:38:15 -0500715 Expr::Closure(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500716 full!(_visitor.visit_expr_closure(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400717 }
David Tolnay6702ade2017-12-30 23:38:15 -0500718 Expr::Unsafe(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500719 full!(_visitor.visit_expr_unsafe(_binding_0));
Nika Layzell640832a2017-12-04 13:37:09 -0500720 }
David Tolnay6702ade2017-12-30 23:38:15 -0500721 Expr::Block(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500722 full!(_visitor.visit_expr_block(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400723 }
David Tolnay6702ade2017-12-30 23:38:15 -0500724 Expr::Assign(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500725 full!(_visitor.visit_expr_assign(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400726 }
David Tolnay6702ade2017-12-30 23:38:15 -0500727 Expr::AssignOp(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500728 full!(_visitor.visit_expr_assign_op(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400729 }
David Tolnay6702ade2017-12-30 23:38:15 -0500730 Expr::Field(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500731 full!(_visitor.visit_expr_field(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400732 }
David Tolnay6702ade2017-12-30 23:38:15 -0500733 Expr::Index(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500734 _visitor.visit_expr_index(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400735 }
David Tolnay6702ade2017-12-30 23:38:15 -0500736 Expr::Range(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500737 full!(_visitor.visit_expr_range(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400738 }
David Tolnay6702ade2017-12-30 23:38:15 -0500739 Expr::Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500740 _visitor.visit_expr_path(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400741 }
David Tolnay00674ba2018-03-31 18:14:11 +0200742 Expr::Reference(ref _binding_0, ) => {
743 full!(_visitor.visit_expr_reference(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400744 }
David Tolnay6702ade2017-12-30 23:38:15 -0500745 Expr::Break(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500746 full!(_visitor.visit_expr_break(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400747 }
David Tolnay6702ade2017-12-30 23:38:15 -0500748 Expr::Continue(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500749 full!(_visitor.visit_expr_continue(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400750 }
David Tolnay6702ade2017-12-30 23:38:15 -0500751 Expr::Return(ref _binding_0, ) => {
David Tolnayc246cd32017-12-28 23:14:32 -0500752 full!(_visitor.visit_expr_return(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400753 }
David Tolnay6702ade2017-12-30 23:38:15 -0500754 Expr::Macro(ref _binding_0, ) => {
David Tolnay8c91b882017-12-28 23:04:32 -0500755 full!(_visitor.visit_expr_macro(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400756 }
David Tolnay6702ade2017-12-30 23:38:15 -0500757 Expr::Struct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500758 full!(_visitor.visit_expr_struct(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400759 }
David Tolnay6702ade2017-12-30 23:38:15 -0500760 Expr::Repeat(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500761 full!(_visitor.visit_expr_repeat(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400762 }
David Tolnay6702ade2017-12-30 23:38:15 -0500763 Expr::Paren(ref _binding_0, ) => {
David Tolnay81ab4f62018-01-27 19:02:51 -0800764 _visitor.visit_expr_paren(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400765 }
David Tolnay6702ade2017-12-30 23:38:15 -0500766 Expr::Group(ref _binding_0, ) => {
David Tolnaye98775f2017-12-28 23:17:00 -0500767 full!(_visitor.visit_expr_group(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400768 }
David Tolnay6702ade2017-12-30 23:38:15 -0500769 Expr::Try(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500770 full!(_visitor.visit_expr_try(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400771 }
David Tolnay6702ade2017-12-30 23:38:15 -0500772 Expr::Catch(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500773 full!(_visitor.visit_expr_catch(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400774 }
David Tolnay6702ade2017-12-30 23:38:15 -0500775 Expr::Yield(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -0500776 full!(_visitor.visit_expr_yield(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -0400777 }
David Tolnay6702ade2017-12-30 23:38:15 -0500778 Expr::Verbatim(ref _binding_0, ) => {
David Tolnay2ae520a2017-12-29 11:19:50 -0500779 _visitor.visit_expr_verbatim(_binding_0);
780 }
Nika Layzell27726662017-10-24 23:16:35 -0400781 }
782}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800783# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800784pub fn visit_expr_array<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprArray) {
David Tolnay8c91b882017-12-28 23:04:32 -0500785 for it in & _i . attrs { _visitor.visit_attribute(it) };
786 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnay56080682018-01-06 14:01:52 -0800787 for el in Punctuated::pairs(& _i . elems) { let it = el.value(); _visitor.visit_expr(it) };
David Tolnay8c91b882017-12-28 23:04:32 -0500788}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800789# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800790pub fn visit_expr_assign<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprAssign) {
David Tolnay8c91b882017-12-28 23:04:32 -0500791 for it in & _i . attrs { _visitor.visit_attribute(it) };
792 _visitor.visit_expr(& * _i . left);
793 tokens_helper(_visitor, &(& _i . eq_token).0);
794 _visitor.visit_expr(& * _i . right);
795}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800796# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800797pub fn visit_expr_assign_op<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprAssignOp) {
David Tolnay8c91b882017-12-28 23:04:32 -0500798 for it in & _i . attrs { _visitor.visit_attribute(it) };
799 _visitor.visit_expr(& * _i . left);
800 _visitor.visit_bin_op(& _i . op);
801 _visitor.visit_expr(& * _i . right);
802}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800803# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800804pub fn visit_expr_binary<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBinary) {
David Tolnay8c91b882017-12-28 23:04:32 -0500805 for it in & _i . attrs { _visitor.visit_attribute(it) };
806 _visitor.visit_expr(& * _i . left);
807 _visitor.visit_bin_op(& _i . op);
808 _visitor.visit_expr(& * _i . right);
809}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800810# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800811pub fn visit_expr_block<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBlock) {
David Tolnay8c91b882017-12-28 23:04:32 -0500812 for it in & _i . attrs { _visitor.visit_attribute(it) };
813 _visitor.visit_block(& _i . block);
814}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800815# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800816pub fn visit_expr_box<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBox) {
David Tolnay8c91b882017-12-28 23:04:32 -0500817 for it in & _i . attrs { _visitor.visit_attribute(it) };
818 tokens_helper(_visitor, &(& _i . box_token).0);
819 _visitor.visit_expr(& * _i . expr);
820}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800821# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800822pub fn visit_expr_break<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBreak) {
David Tolnay8c91b882017-12-28 23:04:32 -0500823 for it in & _i . attrs { _visitor.visit_attribute(it) };
824 tokens_helper(_visitor, &(& _i . break_token).0);
825 if let Some(ref it) = _i . label { _visitor.visit_lifetime(it) };
826 if let Some(ref it) = _i . expr { _visitor.visit_expr(& * * it) };
827}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800828# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800829pub fn visit_expr_call<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprCall) {
David Tolnay8c91b882017-12-28 23:04:32 -0500830 for it in & _i . attrs { _visitor.visit_attribute(it) };
831 _visitor.visit_expr(& * _i . func);
832 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay56080682018-01-06 14:01:52 -0800833 for el in Punctuated::pairs(& _i . args) { let it = el.value(); _visitor.visit_expr(it) };
David Tolnay8c91b882017-12-28 23:04:32 -0500834}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800835# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800836pub fn visit_expr_cast<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprCast) {
David Tolnay8c91b882017-12-28 23:04:32 -0500837 for it in & _i . attrs { _visitor.visit_attribute(it) };
838 _visitor.visit_expr(& * _i . expr);
839 tokens_helper(_visitor, &(& _i . as_token).0);
840 _visitor.visit_type(& * _i . ty);
841}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800842# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800843pub fn visit_expr_catch<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprCatch) {
David Tolnay8c91b882017-12-28 23:04:32 -0500844 for it in & _i . attrs { _visitor.visit_attribute(it) };
845 tokens_helper(_visitor, &(& _i . do_token).0);
846 tokens_helper(_visitor, &(& _i . catch_token).0);
847 _visitor.visit_block(& _i . block);
848}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800849# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800850pub fn visit_expr_closure<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprClosure) {
David Tolnay8c91b882017-12-28 23:04:32 -0500851 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay13d4c0e2018-03-31 20:53:59 +0200852 if let Some(ref it) = _i . movability { tokens_helper(_visitor, &(it).0) };
David Tolnayefc96fb2017-12-29 02:03:15 -0500853 if let Some(ref it) = _i . capture { tokens_helper(_visitor, &(it).0) };
David Tolnay8c91b882017-12-28 23:04:32 -0500854 tokens_helper(_visitor, &(& _i . or1_token).0);
David Tolnay56080682018-01-06 14:01:52 -0800855 for el in Punctuated::pairs(& _i . inputs) { let it = el.value(); _visitor.visit_fn_arg(it) };
David Tolnay8c91b882017-12-28 23:04:32 -0500856 tokens_helper(_visitor, &(& _i . or2_token).0);
857 _visitor.visit_return_type(& _i . output);
858 _visitor.visit_expr(& * _i . body);
859}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800860# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800861pub fn visit_expr_continue<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprContinue) {
David Tolnay8c91b882017-12-28 23:04:32 -0500862 for it in & _i . attrs { _visitor.visit_attribute(it) };
863 tokens_helper(_visitor, &(& _i . continue_token).0);
864 if let Some(ref it) = _i . label { _visitor.visit_lifetime(it) };
865}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800866# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800867pub fn visit_expr_field<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprField) {
David Tolnay8c91b882017-12-28 23:04:32 -0500868 for it in & _i . attrs { _visitor.visit_attribute(it) };
869 _visitor.visit_expr(& * _i . base);
870 tokens_helper(_visitor, &(& _i . dot_token).0);
871 _visitor.visit_member(& _i . member);
872}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800873# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800874pub fn visit_expr_for_loop<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprForLoop) {
David Tolnay8c91b882017-12-28 23:04:32 -0500875 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaybcd498f2017-12-29 12:02:33 -0500876 if let Some(ref it) = _i . label { _visitor.visit_label(it) };
David Tolnay8c91b882017-12-28 23:04:32 -0500877 tokens_helper(_visitor, &(& _i . for_token).0);
878 _visitor.visit_pat(& * _i . pat);
879 tokens_helper(_visitor, &(& _i . in_token).0);
880 _visitor.visit_expr(& * _i . expr);
881 _visitor.visit_block(& _i . body);
882}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800883# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800884pub fn visit_expr_group<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprGroup) {
David Tolnay8c91b882017-12-28 23:04:32 -0500885 for it in & _i . attrs { _visitor.visit_attribute(it) };
886 tokens_helper(_visitor, &(& _i . group_token).0);
887 _visitor.visit_expr(& * _i . expr);
888}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800889# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800890pub fn visit_expr_if<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIf) {
David Tolnay8c91b882017-12-28 23:04:32 -0500891 for it in & _i . attrs { _visitor.visit_attribute(it) };
892 tokens_helper(_visitor, &(& _i . if_token).0);
893 _visitor.visit_expr(& * _i . cond);
David Tolnay2ccf32a2017-12-29 00:34:26 -0500894 _visitor.visit_block(& _i . then_branch);
895 if let Some(ref it) = _i . else_branch {
896 tokens_helper(_visitor, &(& ( it ) . 0).0);
897 _visitor.visit_expr(& * ( it ) . 1);
898 };
David Tolnay8c91b882017-12-28 23:04:32 -0500899}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800900# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800901pub fn visit_expr_if_let<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIfLet) {
David Tolnay8c91b882017-12-28 23:04:32 -0500902 for it in & _i . attrs { _visitor.visit_attribute(it) };
903 tokens_helper(_visitor, &(& _i . if_token).0);
904 tokens_helper(_visitor, &(& _i . let_token).0);
David Tolnay5b5b7d22018-03-31 21:05:00 +0200905 for el in Punctuated::pairs(& _i . pats) { let it = el.value(); _visitor.visit_pat(it) };
David Tolnay8c91b882017-12-28 23:04:32 -0500906 tokens_helper(_visitor, &(& _i . eq_token).0);
907 _visitor.visit_expr(& * _i . expr);
David Tolnay2ccf32a2017-12-29 00:34:26 -0500908 _visitor.visit_block(& _i . then_branch);
909 if let Some(ref it) = _i . else_branch {
910 tokens_helper(_visitor, &(& ( it ) . 0).0);
911 _visitor.visit_expr(& * ( it ) . 1);
912 };
David Tolnay8c91b882017-12-28 23:04:32 -0500913}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800914# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800915pub fn visit_expr_in_place<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprInPlace) {
David Tolnay8c91b882017-12-28 23:04:32 -0500916 for it in & _i . attrs { _visitor.visit_attribute(it) };
917 _visitor.visit_expr(& * _i . place);
David Tolnay8701a5c2017-12-28 23:31:10 -0500918 tokens_helper(_visitor, &(& _i . arrow_token).0);
David Tolnay8c91b882017-12-28 23:04:32 -0500919 _visitor.visit_expr(& * _i . value);
920}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800921# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800922pub fn visit_expr_index<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIndex) {
David Tolnay8c91b882017-12-28 23:04:32 -0500923 for it in & _i . attrs { _visitor.visit_attribute(it) };
924 _visitor.visit_expr(& * _i . expr);
925 tokens_helper(_visitor, &(& _i . bracket_token).0);
926 _visitor.visit_expr(& * _i . index);
927}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800928# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800929pub fn visit_expr_lit<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprLit) {
David Tolnay8c91b882017-12-28 23:04:32 -0500930 for it in & _i . attrs { _visitor.visit_attribute(it) };
931 _visitor.visit_lit(& _i . lit);
932}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800933# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800934pub fn visit_expr_loop<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprLoop) {
David Tolnay8c91b882017-12-28 23:04:32 -0500935 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaybcd498f2017-12-29 12:02:33 -0500936 if let Some(ref it) = _i . label { _visitor.visit_label(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500937 tokens_helper(_visitor, &(& _i . loop_token).0);
938 _visitor.visit_block(& _i . body);
Nika Layzell27726662017-10-24 23:16:35 -0400939}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800940# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800941pub fn visit_expr_macro<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprMacro) {
David Tolnay8c91b882017-12-28 23:04:32 -0500942 for it in & _i . attrs { _visitor.visit_attribute(it) };
943 _visitor.visit_macro(& _i . mac);
944}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800945# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800946pub fn visit_expr_match<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprMatch) {
David Tolnay8c91b882017-12-28 23:04:32 -0500947 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -0500948 tokens_helper(_visitor, &(& _i . match_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500949 _visitor.visit_expr(& * _i . expr);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500950 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -0500951 for it in & _i . arms { _visitor.visit_arm(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400952}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800953# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800954pub fn visit_expr_method_call<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprMethodCall) {
David Tolnay8c91b882017-12-28 23:04:32 -0500955 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay76418512017-12-28 23:47:47 -0500956 _visitor.visit_expr(& * _i . receiver);
David Tolnaycc0f0372017-12-28 19:11:04 -0500957 tokens_helper(_visitor, &(& _i . dot_token).0);
Alex Crichtond261d092018-05-18 13:47:35 -0700958 _visitor.visit_ident(& _i . method);
David Tolnayd60cfec2017-12-29 00:21:38 -0500959 if let Some(ref it) = _i . turbofish { _visitor.visit_method_turbofish(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -0500960 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay56080682018-01-06 14:01:52 -0800961 for el in Punctuated::pairs(& _i . args) { let it = el.value(); _visitor.visit_expr(it) };
Nika Layzell27726662017-10-24 23:16:35 -0400962}
David Tolnay81ab4f62018-01-27 19:02:51 -0800963# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800964pub fn visit_expr_paren<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprParen) {
David Tolnay8c91b882017-12-28 23:04:32 -0500965 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -0500966 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500967 _visitor.visit_expr(& * _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -0400968}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800969# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800970pub fn visit_expr_path<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprPath) {
David Tolnay8c91b882017-12-28 23:04:32 -0500971 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500972 if let Some(ref it) = _i . qself { _visitor.visit_qself(it) };
973 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -0400974}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800975# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800976pub fn visit_expr_range<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprRange) {
David Tolnay8c91b882017-12-28 23:04:32 -0500977 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a918742017-12-28 16:54:41 -0500978 if let Some(ref it) = _i . from { _visitor.visit_expr(& * * it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -0500979 _visitor.visit_range_limits(& _i . limits);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500980 if let Some(ref it) = _i . to { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -0400981}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800982# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay00674ba2018-03-31 18:14:11 +0200983pub fn visit_expr_reference<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprReference) {
984 for it in & _i . attrs { _visitor.visit_attribute(it) };
985 tokens_helper(_visitor, &(& _i . and_token).0);
986 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
987 _visitor.visit_expr(& * _i . expr);
988}
989# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800990pub fn visit_expr_repeat<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprRepeat) {
David Tolnay8c91b882017-12-28 23:04:32 -0500991 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -0500992 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnay4a918742017-12-28 16:54:41 -0500993 _visitor.visit_expr(& * _i . expr);
David Tolnay4a3f59a2017-12-28 21:21:12 -0500994 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay84d80442018-01-07 01:03:20 -0800995 _visitor.visit_expr(& * _i . len);
Nika Layzell27726662017-10-24 23:16:35 -0400996}
David Tolnay3cfd1d32018-01-03 00:22:08 -0800997# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800998pub fn visit_expr_return<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprReturn) {
David Tolnay8c91b882017-12-28 23:04:32 -0500999 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001000 tokens_helper(_visitor, &(& _i . return_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001001 if let Some(ref it) = _i . expr { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -04001002}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001003# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001004pub fn visit_expr_struct<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprStruct) {
David Tolnay8c91b882017-12-28 23:04:32 -05001005 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001006 _visitor.visit_path(& _i . path);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001007 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay56080682018-01-06 14:01:52 -08001008 for el in Punctuated::pairs(& _i . fields) { let it = el.value(); _visitor.visit_field_value(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001009 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
1010 if let Some(ref it) = _i . rest { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -04001011}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001012# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001013pub fn visit_expr_try<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprTry) {
David Tolnay8c91b882017-12-28 23:04:32 -05001014 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a918742017-12-28 16:54:41 -05001015 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -05001016 tokens_helper(_visitor, &(& _i . question_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001017}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001018# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001019pub fn visit_expr_tuple<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprTuple) {
David Tolnay8c91b882017-12-28 23:04:32 -05001020 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay1e01f9c2017-12-28 20:16:19 -05001021 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay56080682018-01-06 14:01:52 -08001022 for el in Punctuated::pairs(& _i . elems) { let it = el.value(); _visitor.visit_expr(it) };
David Tolnay05362582017-12-26 01:33:57 -05001023}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001024# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001025pub fn visit_expr_type<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprType) {
David Tolnay8c91b882017-12-28 23:04:32 -05001026 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a918742017-12-28 16:54:41 -05001027 _visitor.visit_expr(& * _i . expr);
David Tolnaycc0f0372017-12-28 19:11:04 -05001028 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001029 _visitor.visit_type(& * _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -04001030}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001031# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001032pub fn visit_expr_unary<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprUnary) {
David Tolnay8c91b882017-12-28 23:04:32 -05001033 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001034 _visitor.visit_un_op(& _i . op);
David Tolnay4a918742017-12-28 16:54:41 -05001035 _visitor.visit_expr(& * _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -04001036}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001037# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001038pub fn visit_expr_unsafe<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprUnsafe) {
David Tolnay8c91b882017-12-28 23:04:32 -05001039 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001040 tokens_helper(_visitor, &(& _i . unsafe_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001041 _visitor.visit_block(& _i . block);
Nika Layzell640832a2017-12-04 13:37:09 -05001042}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001043# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001044pub fn visit_expr_verbatim<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprVerbatim) {
David Tolnay2ae520a2017-12-29 11:19:50 -05001045 // Skipped field _i . tts;
1046}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001047# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001048pub fn visit_expr_while<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprWhile) {
David Tolnay8c91b882017-12-28 23:04:32 -05001049 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaybcd498f2017-12-29 12:02:33 -05001050 if let Some(ref it) = _i . label { _visitor.visit_label(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001051 tokens_helper(_visitor, &(& _i . while_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001052 _visitor.visit_expr(& * _i . cond);
1053 _visitor.visit_block(& _i . body);
Nika Layzell27726662017-10-24 23:16:35 -04001054}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001055# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001056pub fn visit_expr_while_let<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprWhileLet) {
David Tolnay8c91b882017-12-28 23:04:32 -05001057 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaybcd498f2017-12-29 12:02:33 -05001058 if let Some(ref it) = _i . label { _visitor.visit_label(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001059 tokens_helper(_visitor, &(& _i . while_token).0);
1060 tokens_helper(_visitor, &(& _i . let_token).0);
David Tolnay5b5b7d22018-03-31 21:05:00 +02001061 for el in Punctuated::pairs(& _i . pats) { let it = el.value(); _visitor.visit_pat(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001062 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001063 _visitor.visit_expr(& * _i . expr);
1064 _visitor.visit_block(& _i . body);
Nika Layzell27726662017-10-24 23:16:35 -04001065}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001066# [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001067pub fn visit_expr_yield<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprYield) {
David Tolnay8c91b882017-12-28 23:04:32 -05001068 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001069 tokens_helper(_visitor, &(& _i . yield_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001070 if let Some(ref it) = _i . expr { _visitor.visit_expr(& * * it) };
Nika Layzell27726662017-10-24 23:16:35 -04001071}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001072# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001073pub fn visit_field<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Field) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001074 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001075 _visitor.visit_visibility(& _i . vis);
Alex Crichtond261d092018-05-18 13:47:35 -07001076 if let Some(ref it) = _i . ident { _visitor.visit_ident(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001077 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001078 _visitor.visit_type(& _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -04001079}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001080# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001081pub fn visit_field_pat<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldPat) {
David Tolnay4a3f59a2017-12-28 21:21:12 -05001082 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay85b69a42017-12-27 20:43:10 -05001083 _visitor.visit_member(& _i . member);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001084 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a918742017-12-28 16:54:41 -05001085 _visitor.visit_pat(& * _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001086}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001087# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001088pub fn visit_field_value<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldValue) {
David Tolnay85b69a42017-12-27 20:43:10 -05001089 for it in & _i . attrs { _visitor.visit_attribute(it) };
1090 _visitor.visit_member(& _i . member);
David Tolnaycc0f0372017-12-28 19:11:04 -05001091 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001092 _visitor.visit_expr(& _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -04001093}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001094# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001095pub fn visit_fields<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Fields) {
David Tolnaye3d41b72017-12-31 15:24:00 -05001096 match *_i {
1097 Fields::Named(ref _binding_0, ) => {
1098 _visitor.visit_fields_named(_binding_0);
1099 }
1100 Fields::Unnamed(ref _binding_0, ) => {
1101 _visitor.visit_fields_unnamed(_binding_0);
1102 }
1103 Fields::Unit => { }
1104 }
1105}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001106# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001107pub fn visit_fields_named<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldsNamed) {
David Tolnaye3d41b72017-12-31 15:24:00 -05001108 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay56080682018-01-06 14:01:52 -08001109 for el in Punctuated::pairs(& _i . named) { let it = el.value(); _visitor.visit_field(it) };
David Tolnaye3d41b72017-12-31 15:24:00 -05001110}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001111# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001112pub fn visit_fields_unnamed<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldsUnnamed) {
David Tolnaye3d41b72017-12-31 15:24:00 -05001113 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay56080682018-01-06 14:01:52 -08001114 for el in Punctuated::pairs(& _i . unnamed) { let it = el.value(); _visitor.visit_field(it) };
David Tolnaye3d41b72017-12-31 15:24:00 -05001115}
Nika Layzell27726662017-10-24 23:16:35 -04001116# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001117pub fn visit_file<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast File) {
Nika Layzell27726662017-10-24 23:16:35 -04001118 // Skipped field _i . shebang;
David Tolnayf0d63bf2017-12-26 12:29:47 -05001119 for it in & _i . attrs { _visitor.visit_attribute(it) };
1120 for it in & _i . items { _visitor.visit_item(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001121}
1122# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001123pub fn visit_fn_arg<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FnArg) {
Nika Layzell27726662017-10-24 23:16:35 -04001124 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001125 FnArg::SelfRef(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001126 _visitor.visit_arg_self_ref(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001127 }
David Tolnay6702ade2017-12-30 23:38:15 -05001128 FnArg::SelfValue(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001129 _visitor.visit_arg_self(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001130 }
David Tolnay6702ade2017-12-30 23:38:15 -05001131 FnArg::Captured(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001132 _visitor.visit_arg_captured(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001133 }
David Tolnay6702ade2017-12-30 23:38:15 -05001134 FnArg::Inferred(ref _binding_0, ) => {
David Tolnay80ed55f2017-12-27 22:54:40 -05001135 _visitor.visit_pat(_binding_0);
1136 }
David Tolnay6702ade2017-12-30 23:38:15 -05001137 FnArg::Ignored(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001138 _visitor.visit_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001139 }
1140 }
1141}
1142# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001143pub fn visit_fn_decl<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FnDecl) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001144 tokens_helper(_visitor, &(& _i . fn_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001145 _visitor.visit_generics(& _i . generics);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001146 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay56080682018-01-06 14:01:52 -08001147 for el in Punctuated::pairs(& _i . inputs) { let it = el.value(); _visitor.visit_fn_arg(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001148 if let Some(ref it) = _i . variadic { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001149 _visitor.visit_return_type(& _i . output);
Nika Layzell27726662017-10-24 23:16:35 -04001150}
1151# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001152pub fn visit_foreign_item<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItem) {
Nika Layzell27726662017-10-24 23:16:35 -04001153 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001154 ForeignItem::Fn(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001155 _visitor.visit_foreign_item_fn(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001156 }
David Tolnay6702ade2017-12-30 23:38:15 -05001157 ForeignItem::Static(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001158 _visitor.visit_foreign_item_static(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001159 }
David Tolnay6702ade2017-12-30 23:38:15 -05001160 ForeignItem::Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001161 _visitor.visit_foreign_item_type(_binding_0);
David Tolnay199bcbb2017-11-12 10:33:52 -08001162 }
David Tolnay6702ade2017-12-30 23:38:15 -05001163 ForeignItem::Verbatim(ref _binding_0, ) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05001164 _visitor.visit_foreign_item_verbatim(_binding_0);
1165 }
Nika Layzell27726662017-10-24 23:16:35 -04001166 }
1167}
1168# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001169pub fn visit_foreign_item_fn<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemFn) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001170 for it in & _i . attrs { _visitor.visit_attribute(it) };
1171 _visitor.visit_visibility(& _i . vis);
Alex Crichtond261d092018-05-18 13:47:35 -07001172 _visitor.visit_ident(& _i . ident);
David Tolnay4a918742017-12-28 16:54:41 -05001173 _visitor.visit_fn_decl(& * _i . decl);
David Tolnaycc0f0372017-12-28 19:11:04 -05001174 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay8894f602017-11-11 12:11:04 -08001175}
1176# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001177pub fn visit_foreign_item_static<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemStatic) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001178 for it in & _i . attrs { _visitor.visit_attribute(it) };
1179 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001180 tokens_helper(_visitor, &(& _i . static_token).0);
David Tolnay24237fb2017-12-29 02:15:26 -05001181 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
Alex Crichtond261d092018-05-18 13:47:35 -07001182 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001183 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001184 _visitor.visit_type(& * _i . ty);
David Tolnaycc0f0372017-12-28 19:11:04 -05001185 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001186}
David Tolnay199bcbb2017-11-12 10:33:52 -08001187# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001188pub fn visit_foreign_item_type<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001189 for it in & _i . attrs { _visitor.visit_attribute(it) };
1190 _visitor.visit_visibility(& _i . vis);
David Tolnaycc0f0372017-12-28 19:11:04 -05001191 tokens_helper(_visitor, &(& _i . type_token).0);
Alex Crichtond261d092018-05-18 13:47:35 -07001192 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001193 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnay199bcbb2017-11-12 10:33:52 -08001194}
David Tolnay2ae520a2017-12-29 11:19:50 -05001195# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001196pub fn visit_foreign_item_verbatim<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemVerbatim) {
David Tolnay2ae520a2017-12-29 11:19:50 -05001197 // Skipped field _i . tts;
1198}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001199# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001200pub fn visit_generic_argument<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast GenericArgument) {
Nika Layzell357885a2017-12-04 15:47:07 -05001201 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001202 GenericArgument::Lifetime(ref _binding_0, ) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05001203 _visitor.visit_lifetime(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001204 }
David Tolnay6702ade2017-12-30 23:38:15 -05001205 GenericArgument::Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001206 _visitor.visit_type(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001207 }
David Tolnay6702ade2017-12-30 23:38:15 -05001208 GenericArgument::Binding(ref _binding_0, ) => {
David Tolnay506e43a2017-12-29 11:34:36 -05001209 _visitor.visit_binding(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001210 }
David Tolnay6702ade2017-12-30 23:38:15 -05001211 GenericArgument::Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001212 _visitor.visit_expr(_binding_0);
Nika Layzellc680e612017-12-04 19:07:20 -05001213 }
Nika Layzell357885a2017-12-04 15:47:07 -05001214 }
1215}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001216# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001217pub fn visit_generic_method_argument<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast GenericMethodArgument) {
David Tolnayd60cfec2017-12-29 00:21:38 -05001218 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001219 GenericMethodArgument::Type(ref _binding_0, ) => {
David Tolnayd60cfec2017-12-29 00:21:38 -05001220 _visitor.visit_type(_binding_0);
1221 }
David Tolnay6702ade2017-12-30 23:38:15 -05001222 GenericMethodArgument::Const(ref _binding_0, ) => {
David Tolnayd60cfec2017-12-29 00:21:38 -05001223 _visitor.visit_expr(_binding_0);
1224 }
1225 }
1226}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001227# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001228pub fn visit_generic_param<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast GenericParam) {
David Tolnayc2f1aba2017-11-12 20:29:22 -08001229 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001230 GenericParam::Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001231 _visitor.visit_type_param(_binding_0);
David Tolnayc2f1aba2017-11-12 20:29:22 -08001232 }
David Tolnay517f3692018-01-01 20:17:23 -08001233 GenericParam::Lifetime(ref _binding_0, ) => {
1234 _visitor.visit_lifetime_def(_binding_0);
1235 }
David Tolnay6702ade2017-12-30 23:38:15 -05001236 GenericParam::Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001237 _visitor.visit_const_param(_binding_0);
Nika Layzellf1fdc0b2017-12-04 19:58:32 -05001238 }
David Tolnayc2f1aba2017-11-12 20:29:22 -08001239 }
1240}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001241# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001242pub fn visit_generics<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Generics) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001243 if let Some(ref it) = _i . lt_token { tokens_helper(_visitor, &(it).0) };
David Tolnay56080682018-01-06 14:01:52 -08001244 for el in Punctuated::pairs(& _i . params) { let it = el.value(); _visitor.visit_generic_param(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001245 if let Some(ref it) = _i . gt_token { tokens_helper(_visitor, &(it).0) };
David Tolnayac997dd2017-12-27 23:18:22 -05001246 if let Some(ref it) = _i . where_clause { _visitor.visit_where_clause(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001247}
Alex Crichtond261d092018-05-18 13:47:35 -07001248
1249pub fn visit_ident<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Ident) {
1250}
Nika Layzell27726662017-10-24 23:16:35 -04001251# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001252pub fn visit_impl_item<'ast, V: Visit<'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" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001272pub fn visit_impl_item_const<'ast, V: Visit<'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);
Alex Crichtond261d092018-05-18 13:47:35 -07001277 _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" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001285pub fn visit_impl_item_macro<'ast, V: Visit<'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" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001291pub fn visit_impl_item_method<'ast, V: Visit<'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" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001299pub fn visit_impl_item_type<'ast, V: Visit<'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);
Alex Crichtond261d092018-05-18 13:47:35 -07001304 _visitor.visit_ident(& _i . ident);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001305 _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" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001311pub fn visit_impl_item_verbatim<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemVerbatim) {
David Tolnay2ae520a2017-12-29 11:19:50 -05001312 // Skipped field _i . tts;
1313}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001314# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001315pub fn visit_index<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Index) {
David Tolnay85b69a42017-12-27 20:43:10 -05001316 // Skipped field _i . index;
1317 _visitor.visit_span(& _i . span);
1318}
1319# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001320pub fn visit_item<'ast, V: Visit<'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" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001373pub fn visit_item_const<'ast, V: Visit<'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);
Alex Crichtond261d092018-05-18 13:47:35 -07001377 _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" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001385pub fn visit_item_enum<'ast, V: Visit<'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);
Alex Crichtond261d092018-05-18 13:47:35 -07001389 _visitor.visit_ident(& _i . ident);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001390 _visitor.visit_generics(& _i . generics);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001391 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay56080682018-01-06 14:01:52 -08001392 for el in Punctuated::pairs(& _i . variants) { let it = el.value(); _visitor.visit_variant(it) };
David Tolnayc6b55bc2017-11-09 22:48:38 -08001393}
1394# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001395pub fn visit_item_extern_crate<'ast, V: Visit<'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);
Alex Crichtond261d092018-05-18 13:47:35 -07001400 _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);
Alex Crichtond261d092018-05-18 13:47:35 -07001403 _visitor.visit_ident(& ( it ) . 1);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001404 };
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" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001408pub fn visit_item_fn<'ast, V: Visit<'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) };
Alex Crichtond261d092018-05-18 13:47:35 -07001414 _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" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001419pub fn visit_item_foreign_mod<'ast, V: Visit<'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" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001426pub fn visit_item_impl<'ast, V: Visit<'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" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001442pub fn visit_item_macro<'ast, V: Visit<'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) };
Alex Crichtond261d092018-05-18 13:47:35 -07001444 if let Some(ref it) = _i . ident { _visitor.visit_ident(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001445 _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 Tolnay4b4c4b62018-01-06 13:48:05 -08001449pub fn visit_item_macro2<'ast, V: Visit<'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);
Alex Crichtond261d092018-05-18 13:47:35 -07001453 _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" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001460pub fn visit_item_mod<'ast, V: Visit<'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);
Alex Crichtond261d092018-05-18 13:47:35 -07001464 _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" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001472pub fn visit_item_static<'ast, V: Visit<'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) };
Alex Crichtond261d092018-05-18 13:47:35 -07001477 _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" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001485pub fn visit_item_struct<'ast, V: Visit<'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);
Alex Crichtond261d092018-05-18 13:47:35 -07001489 _visitor.visit_ident(& _i . ident);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001490 _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" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001495pub fn visit_item_trait<'ast, V: Visit<'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);
Alex Crichtond261d092018-05-18 13:47:35 -07001501 _visitor.visit_ident(& _i . ident);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001502 _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 Tolnay56080682018-01-06 14:01:52 -08001504 for el in Punctuated::pairs(& _i . supertraits) { let it = el.value(); _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" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001509pub fn visit_item_type<'ast, V: Visit<'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);
Alex Crichtond261d092018-05-18 13:47:35 -07001513 _visitor.visit_ident(& _i . ident);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001514 _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" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001520pub fn visit_item_union<'ast, V: Visit<'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);
Alex Crichtond261d092018-05-18 13:47:35 -07001524 _visitor.visit_ident(& _i . ident);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001525 _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" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001529pub fn visit_item_use<'ast, V: Visit<'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 Tolnayf0d63bf2017-12-26 12:29:47 -05001534 _visitor.visit_use_tree(& _i . tree);
David Tolnaycc0f0372017-12-28 19:11:04 -05001535 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001536}
David Tolnay2ae520a2017-12-29 11:19:50 -05001537# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001538pub fn visit_item_verbatim<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemVerbatim) {
David Tolnay2ae520a2017-12-29 11:19:50 -05001539 // Skipped field _i . tts;
1540}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001541# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001542pub fn visit_label<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Label) {
David Tolnaybcd498f2017-12-29 12:02:33 -05001543 _visitor.visit_lifetime(& _i . name);
1544 tokens_helper(_visitor, &(& _i . colon_token).0);
1545}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001546# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001547pub fn visit_lifetime<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Lifetime) {
Alex Crichtond261d092018-05-18 13:47:35 -07001548 _visitor.visit_ident(& _i . ident);
David Tolnay4ba63a02017-12-28 15:53:05 -05001549}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001550# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001551pub fn visit_lifetime_def<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LifetimeDef) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001552 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4ba63a02017-12-28 15:53:05 -05001553 _visitor.visit_lifetime(& _i . lifetime);
David Tolnaycc0f0372017-12-28 19:11:04 -05001554 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay56080682018-01-06 14:01:52 -08001555 for el in Punctuated::pairs(& _i . bounds) { let it = el.value(); _visitor.visit_lifetime(it) };
David Tolnay4ba63a02017-12-28 15:53:05 -05001556}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001557# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001558pub fn visit_lit<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Lit) {
David Tolnay360efd22018-01-04 23:35:26 -08001559 match *_i {
1560 Lit::Str(ref _binding_0, ) => {
1561 _visitor.visit_lit_str(_binding_0);
1562 }
1563 Lit::ByteStr(ref _binding_0, ) => {
1564 _visitor.visit_lit_byte_str(_binding_0);
1565 }
1566 Lit::Byte(ref _binding_0, ) => {
1567 _visitor.visit_lit_byte(_binding_0);
1568 }
1569 Lit::Char(ref _binding_0, ) => {
1570 _visitor.visit_lit_char(_binding_0);
1571 }
1572 Lit::Int(ref _binding_0, ) => {
1573 _visitor.visit_lit_int(_binding_0);
1574 }
1575 Lit::Float(ref _binding_0, ) => {
1576 _visitor.visit_lit_float(_binding_0);
1577 }
1578 Lit::Bool(ref _binding_0, ) => {
1579 _visitor.visit_lit_bool(_binding_0);
1580 }
1581 Lit::Verbatim(ref _binding_0, ) => {
1582 _visitor.visit_lit_verbatim(_binding_0);
1583 }
1584 }
1585}
1586# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001587pub fn visit_lit_bool<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitBool) {
David Tolnay4ba63a02017-12-28 15:53:05 -05001588 // Skipped field _i . value;
1589 _visitor.visit_span(& _i . span);
Nika Layzell27726662017-10-24 23:16:35 -04001590}
David Tolnay360efd22018-01-04 23:35:26 -08001591# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001592pub fn visit_lit_byte<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitByte) {
David Tolnay360efd22018-01-04 23:35:26 -08001593 // Skipped field _i . token;
David Tolnay360efd22018-01-04 23:35:26 -08001594}
1595# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001596pub fn visit_lit_byte_str<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitByteStr) {
David Tolnay360efd22018-01-04 23:35:26 -08001597 // Skipped field _i . token;
David Tolnay360efd22018-01-04 23:35:26 -08001598}
1599# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001600pub fn visit_lit_char<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitChar) {
David Tolnay360efd22018-01-04 23:35:26 -08001601 // Skipped field _i . token;
David Tolnay360efd22018-01-04 23:35:26 -08001602}
1603# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001604pub fn visit_lit_float<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitFloat) {
David Tolnay360efd22018-01-04 23:35:26 -08001605 // Skipped field _i . token;
David Tolnay360efd22018-01-04 23:35:26 -08001606}
1607# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001608pub fn visit_lit_int<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitInt) {
David Tolnay360efd22018-01-04 23:35:26 -08001609 // Skipped field _i . token;
David Tolnay360efd22018-01-04 23:35:26 -08001610}
1611# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001612pub fn visit_lit_str<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitStr) {
David Tolnay360efd22018-01-04 23:35:26 -08001613 // Skipped field _i . token;
David Tolnay360efd22018-01-04 23:35:26 -08001614}
1615# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001616pub fn visit_lit_verbatim<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitVerbatim) {
David Tolnay360efd22018-01-04 23:35:26 -08001617 // Skipped field _i . token;
David Tolnay360efd22018-01-04 23:35:26 -08001618}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001619# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001620pub fn visit_local<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Local) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001621 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001622 tokens_helper(_visitor, &(& _i . let_token).0);
David Tolnay5b5b7d22018-03-31 21:05:00 +02001623 for el in Punctuated::pairs(& _i . pats) { let it = el.value(); _visitor.visit_pat(it) };
David Tolnay8b4d3022017-12-29 12:11:10 -05001624 if let Some(ref it) = _i . ty {
1625 tokens_helper(_visitor, &(& ( it ) . 0).0);
1626 _visitor.visit_type(& * ( it ) . 1);
1627 };
1628 if let Some(ref it) = _i . init {
1629 tokens_helper(_visitor, &(& ( it ) . 0).0);
1630 _visitor.visit_expr(& * ( it ) . 1);
1631 };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001632 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001633}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001634# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001635pub fn visit_macro<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Macro) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001636 _visitor.visit_path(& _i . path);
David Tolnaycc0f0372017-12-28 19:11:04 -05001637 tokens_helper(_visitor, &(& _i . bang_token).0);
David Tolnayab919512017-12-30 23:31:51 -05001638 _visitor.visit_macro_delimiter(& _i . delimiter);
1639 // Skipped field _i . tts;
1640}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001641# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001642pub fn visit_macro_delimiter<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MacroDelimiter) {
David Tolnayab919512017-12-30 23:31:51 -05001643 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001644 MacroDelimiter::Paren(ref _binding_0, ) => {
David Tolnayab919512017-12-30 23:31:51 -05001645 tokens_helper(_visitor, &(_binding_0).0);
1646 }
David Tolnay6702ade2017-12-30 23:38:15 -05001647 MacroDelimiter::Brace(ref _binding_0, ) => {
David Tolnayab919512017-12-30 23:31:51 -05001648 tokens_helper(_visitor, &(_binding_0).0);
1649 }
David Tolnay6702ade2017-12-30 23:38:15 -05001650 MacroDelimiter::Bracket(ref _binding_0, ) => {
David Tolnayab919512017-12-30 23:31:51 -05001651 tokens_helper(_visitor, &(_binding_0).0);
1652 }
1653 }
David Tolnaydecf28d2017-11-11 11:56:45 -08001654}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001655# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001656pub fn visit_member<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Member) {
David Tolnay85b69a42017-12-27 20:43:10 -05001657 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001658 Member::Named(ref _binding_0, ) => {
Alex Crichtond261d092018-05-18 13:47:35 -07001659 _visitor.visit_ident(_binding_0);
David Tolnay85b69a42017-12-27 20:43:10 -05001660 }
David Tolnay6702ade2017-12-30 23:38:15 -05001661 Member::Unnamed(ref _binding_0, ) => {
David Tolnay85b69a42017-12-27 20:43:10 -05001662 _visitor.visit_index(_binding_0);
1663 }
1664 }
1665}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001666# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayaaadd782018-01-06 22:58:13 -08001667pub fn visit_meta<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Meta) {
Nika Layzell27726662017-10-24 23:16:35 -04001668 match *_i {
David Tolnayaaadd782018-01-06 22:58:13 -08001669 Meta::Word(ref _binding_0, ) => {
Alex Crichtond261d092018-05-18 13:47:35 -07001670 _visitor.visit_ident(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001671 }
David Tolnayaaadd782018-01-06 22:58:13 -08001672 Meta::List(ref _binding_0, ) => {
1673 _visitor.visit_meta_list(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001674 }
David Tolnayaaadd782018-01-06 22:58:13 -08001675 Meta::NameValue(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001676 _visitor.visit_meta_name_value(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001677 }
1678 }
1679}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001680# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayaaadd782018-01-06 22:58:13 -08001681pub fn visit_meta_list<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MetaList) {
Alex Crichtond261d092018-05-18 13:47:35 -07001682 _visitor.visit_ident(& _i . ident);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001683 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnayaaadd782018-01-06 22:58:13 -08001684 for el in Punctuated::pairs(& _i . nested) { let it = el.value(); _visitor.visit_nested_meta(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001685}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001686# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001687pub fn visit_meta_name_value<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MetaNameValue) {
Alex Crichtond261d092018-05-18 13:47:35 -07001688 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001689 tokens_helper(_visitor, &(& _i . eq_token).0);
David Tolnay4ba63a02017-12-28 15:53:05 -05001690 _visitor.visit_lit(& _i . lit);
Nika Layzell27726662017-10-24 23:16:35 -04001691}
1692# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001693pub fn visit_method_sig<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MethodSig) {
David Tolnay360a6342017-12-29 02:22:11 -05001694 if let Some(ref it) = _i . constness { tokens_helper(_visitor, &(it).0) };
David Tolnay9b258702017-12-29 02:24:41 -05001695 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001696 if let Some(ref it) = _i . abi { _visitor.visit_abi(it) };
Alex Crichtond261d092018-05-18 13:47:35 -07001697 _visitor.visit_ident(& _i . ident);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001698 _visitor.visit_fn_decl(& _i . decl);
Nika Layzell27726662017-10-24 23:16:35 -04001699}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001700# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001701pub fn visit_method_turbofish<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MethodTurbofish) {
David Tolnayd60cfec2017-12-29 00:21:38 -05001702 tokens_helper(_visitor, &(& _i . colon2_token).0);
1703 tokens_helper(_visitor, &(& _i . lt_token).0);
David Tolnay56080682018-01-06 14:01:52 -08001704 for el in Punctuated::pairs(& _i . args) { let it = el.value(); _visitor.visit_generic_method_argument(it) };
David Tolnayd60cfec2017-12-29 00:21:38 -05001705 tokens_helper(_visitor, &(& _i . gt_token).0);
1706}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001707# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnayaaadd782018-01-06 22:58:13 -08001708pub fn visit_nested_meta<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast NestedMeta) {
Nika Layzell27726662017-10-24 23:16:35 -04001709 match *_i {
David Tolnayaaadd782018-01-06 22:58:13 -08001710 NestedMeta::Meta(ref _binding_0, ) => {
1711 _visitor.visit_meta(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001712 }
David Tolnayaaadd782018-01-06 22:58:13 -08001713 NestedMeta::Literal(ref _binding_0, ) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05001714 _visitor.visit_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001715 }
1716 }
1717}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001718# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001719pub fn visit_parenthesized_generic_arguments<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ParenthesizedGenericArguments) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001720 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay56080682018-01-06 14:01:52 -08001721 for el in Punctuated::pairs(& _i . inputs) { let it = el.value(); _visitor.visit_type(it) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05001722 _visitor.visit_return_type(& _i . output);
Nika Layzell27726662017-10-24 23:16:35 -04001723}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001724# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001725pub fn visit_pat<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Pat) {
Nika Layzell27726662017-10-24 23:16:35 -04001726 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001727 Pat::Wild(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001728 _visitor.visit_pat_wild(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001729 }
David Tolnay6702ade2017-12-30 23:38:15 -05001730 Pat::Ident(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001731 _visitor.visit_pat_ident(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001732 }
David Tolnay6702ade2017-12-30 23:38:15 -05001733 Pat::Struct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001734 _visitor.visit_pat_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001735 }
David Tolnay6702ade2017-12-30 23:38:15 -05001736 Pat::TupleStruct(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001737 _visitor.visit_pat_tuple_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001738 }
David Tolnay6702ade2017-12-30 23:38:15 -05001739 Pat::Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001740 _visitor.visit_pat_path(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001741 }
David Tolnay6702ade2017-12-30 23:38:15 -05001742 Pat::Tuple(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001743 _visitor.visit_pat_tuple(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001744 }
David Tolnay6702ade2017-12-30 23:38:15 -05001745 Pat::Box(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001746 _visitor.visit_pat_box(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001747 }
David Tolnay6702ade2017-12-30 23:38:15 -05001748 Pat::Ref(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001749 _visitor.visit_pat_ref(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001750 }
David Tolnay6702ade2017-12-30 23:38:15 -05001751 Pat::Lit(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001752 _visitor.visit_pat_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001753 }
David Tolnay6702ade2017-12-30 23:38:15 -05001754 Pat::Range(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001755 _visitor.visit_pat_range(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001756 }
David Tolnay6702ade2017-12-30 23:38:15 -05001757 Pat::Slice(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001758 _visitor.visit_pat_slice(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001759 }
David Tolnay6702ade2017-12-30 23:38:15 -05001760 Pat::Macro(ref _binding_0, ) => {
David Tolnay323279a2017-12-29 11:26:32 -05001761 _visitor.visit_pat_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001762 }
David Tolnay6702ade2017-12-30 23:38:15 -05001763 Pat::Verbatim(ref _binding_0, ) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05001764 _visitor.visit_pat_verbatim(_binding_0);
1765 }
Nika Layzell27726662017-10-24 23:16:35 -04001766 }
1767}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001768# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001769pub fn visit_pat_box<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatBox) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001770 tokens_helper(_visitor, &(& _i . box_token).0);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001771 _visitor.visit_pat(& * _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001772}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001773# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001774pub fn visit_pat_ident<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatIdent) {
David Tolnay24237fb2017-12-29 02:15:26 -05001775 if let Some(ref it) = _i . by_ref { tokens_helper(_visitor, &(it).0) };
1776 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
Alex Crichtond261d092018-05-18 13:47:35 -07001777 _visitor.visit_ident(& _i . ident);
David Tolnay8b4d3022017-12-29 12:11:10 -05001778 if let Some(ref it) = _i . subpat {
1779 tokens_helper(_visitor, &(& ( it ) . 0).0);
1780 _visitor.visit_pat(& * ( it ) . 1);
1781 };
Nika Layzell27726662017-10-24 23:16:35 -04001782}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001783# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001784pub fn visit_pat_lit<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatLit) {
David Tolnay4a918742017-12-28 16:54:41 -05001785 _visitor.visit_expr(& * _i . expr);
Nika Layzell27726662017-10-24 23:16:35 -04001786}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001787# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001788pub fn visit_pat_macro<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatMacro) {
David Tolnay323279a2017-12-29 11:26:32 -05001789 _visitor.visit_macro(& _i . mac);
1790}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001791# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001792pub fn visit_pat_path<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatPath) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001793 if let Some(ref it) = _i . qself { _visitor.visit_qself(it) };
1794 _visitor.visit_path(& _i . path);
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 Tolnay4b4c4b62018-01-06 13:48:05 -08001797pub fn visit_pat_range<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatRange) {
David Tolnay4a918742017-12-28 16:54:41 -05001798 _visitor.visit_expr(& * _i . lo);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001799 _visitor.visit_range_limits(& _i . limits);
David Tolnay4a3f59a2017-12-28 21:21:12 -05001800 _visitor.visit_expr(& * _i . hi);
Nika Layzell27726662017-10-24 23:16:35 -04001801}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001802# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001803pub fn visit_pat_ref<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatRef) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001804 tokens_helper(_visitor, &(& _i . and_token).0);
David Tolnay24237fb2017-12-29 02:15:26 -05001805 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001806 _visitor.visit_pat(& * _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001807}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001808# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001809pub fn visit_pat_slice<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatSlice) {
David Tolnay4a3f59a2017-12-28 21:21:12 -05001810 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnay56080682018-01-06 14:01:52 -08001811 for el in Punctuated::pairs(& _i . front) { let it = el.value(); _visitor.visit_pat(it) };
David Tolnay4a918742017-12-28 16:54:41 -05001812 if let Some(ref it) = _i . middle { _visitor.visit_pat(& * * it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001813 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
David Tolnay41871922017-12-29 01:53:45 -05001814 if let Some(ref it) = _i . comma_token { tokens_helper(_visitor, &(it).0) };
David Tolnay56080682018-01-06 14:01:52 -08001815 for el in Punctuated::pairs(& _i . back) { let it = el.value(); _visitor.visit_pat(it) };
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" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001818pub fn visit_pat_struct<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatStruct) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001819 _visitor.visit_path(& _i . path);
David Tolnay1e01f9c2017-12-28 20:16:19 -05001820 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay56080682018-01-06 14:01:52 -08001821 for el in Punctuated::pairs(& _i . fields) { let it = el.value(); _visitor.visit_field_pat(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001822 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04001823}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001824# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001825pub fn visit_pat_tuple<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatTuple) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05001826 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay56080682018-01-06 14:01:52 -08001827 for el in Punctuated::pairs(& _i . front) { let it = el.value(); _visitor.visit_pat(it) };
David Tolnay4a3f59a2017-12-28 21:21:12 -05001828 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
David Tolnay41871922017-12-29 01:53:45 -05001829 if let Some(ref it) = _i . comma_token { tokens_helper(_visitor, &(it).0) };
David Tolnay56080682018-01-06 14:01:52 -08001830 for el in Punctuated::pairs(& _i . back) { let it = el.value(); _visitor.visit_pat(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001831}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001832# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001833pub fn visit_pat_tuple_struct<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatTupleStruct) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001834 _visitor.visit_path(& _i . path);
1835 _visitor.visit_pat_tuple(& _i . pat);
Nika Layzell27726662017-10-24 23:16:35 -04001836}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001837# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001838pub fn visit_pat_verbatim<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatVerbatim) {
David Tolnay2ae520a2017-12-29 11:19:50 -05001839 // Skipped field _i . tts;
1840}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001841# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001842pub fn visit_pat_wild<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatWild) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001843 tokens_helper(_visitor, &(& _i . underscore_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001844}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001845# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001846pub fn visit_path<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Path) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001847 if let Some(ref it) = _i . leading_colon { tokens_helper(_visitor, &(it).0) };
David Tolnay56080682018-01-06 14:01:52 -08001848 for el in Punctuated::pairs(& _i . segments) { let it = el.value(); _visitor.visit_path_segment(it) };
Nika Layzell27726662017-10-24 23:16:35 -04001849}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001850# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001851pub fn visit_path_arguments<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PathArguments) {
Nika Layzellc08227a2017-12-04 16:30:17 -05001852 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001853 PathArguments::None => { }
1854 PathArguments::AngleBracketed(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001855 _visitor.visit_angle_bracketed_generic_arguments(_binding_0);
Nika Layzellc08227a2017-12-04 16:30:17 -05001856 }
David Tolnay6702ade2017-12-30 23:38:15 -05001857 PathArguments::Parenthesized(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001858 _visitor.visit_parenthesized_generic_arguments(_binding_0);
Nika Layzellc08227a2017-12-04 16:30:17 -05001859 }
1860 }
1861}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001862# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001863pub fn visit_path_segment<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PathSegment) {
Alex Crichtond261d092018-05-18 13:47:35 -07001864 _visitor.visit_ident(& _i . ident);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001865 _visitor.visit_path_arguments(& _i . arguments);
Nika Layzell27726662017-10-24 23:16:35 -04001866}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001867# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001868pub fn visit_predicate_eq<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PredicateEq) {
David Tolnayd4add852018-01-01 20:13:24 -08001869 _visitor.visit_type(& _i . lhs_ty);
1870 tokens_helper(_visitor, &(& _i . eq_token).0);
1871 _visitor.visit_type(& _i . rhs_ty);
1872}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001873# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001874pub fn visit_predicate_lifetime<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PredicateLifetime) {
David Tolnayd4add852018-01-01 20:13:24 -08001875 _visitor.visit_lifetime(& _i . lifetime);
1876 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay56080682018-01-06 14:01:52 -08001877 for el in Punctuated::pairs(& _i . bounds) { let it = el.value(); _visitor.visit_lifetime(it) };
David Tolnayd4add852018-01-01 20:13:24 -08001878}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001879# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001880pub fn visit_predicate_type<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PredicateType) {
David Tolnay40fb8ce2018-01-02 10:53:46 -08001881 if let Some(ref it) = _i . lifetimes { _visitor.visit_bound_lifetimes(it) };
David Tolnayd4add852018-01-01 20:13:24 -08001882 _visitor.visit_type(& _i . bounded_ty);
1883 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnay56080682018-01-06 14:01:52 -08001884 for el in Punctuated::pairs(& _i . bounds) { let it = el.value(); _visitor.visit_type_param_bound(it) };
David Tolnayd4add852018-01-01 20:13:24 -08001885}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001886# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001887pub fn visit_qself<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast QSelf) {
David Tolnaycc0f0372017-12-28 19:11:04 -05001888 tokens_helper(_visitor, &(& _i . lt_token).0);
David Tolnay4a918742017-12-28 16:54:41 -05001889 _visitor.visit_type(& * _i . ty);
Nika Layzell27726662017-10-24 23:16:35 -04001890 // Skipped field _i . position;
David Tolnaycc0f0372017-12-28 19:11:04 -05001891 if let Some(ref it) = _i . as_token { tokens_helper(_visitor, &(it).0) };
1892 tokens_helper(_visitor, &(& _i . gt_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04001893}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001894# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001895pub fn visit_range_limits<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast RangeLimits) {
Nika Layzell27726662017-10-24 23:16:35 -04001896 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001897 RangeLimits::HalfOpen(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05001898 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04001899 }
David Tolnay6702ade2017-12-30 23:38:15 -05001900 RangeLimits::Closed(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05001901 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04001902 }
1903 }
1904}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001905# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001906pub fn visit_return_type<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ReturnType) {
David Tolnayf93b90d2017-11-11 19:21:26 -08001907 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001908 ReturnType::Default => { }
1909 ReturnType::Type(ref _binding_0, ref _binding_1, ) => {
David Tolnay4a3f59a2017-12-28 21:21:12 -05001910 tokens_helper(_visitor, &(_binding_0).0);
1911 _visitor.visit_type(& * * _binding_1);
David Tolnayf93b90d2017-11-11 19:21:26 -08001912 }
1913 }
1914}
Nika Layzellefb83ba2017-12-19 18:23:55 -05001915
David Tolnay4b4c4b62018-01-06 13:48:05 -08001916pub fn visit_span<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Span) {
Nika Layzellefb83ba2017-12-19 18:23:55 -05001917}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001918# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001919pub fn visit_stmt<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Stmt) {
Nika Layzell27726662017-10-24 23:16:35 -04001920 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001921 Stmt::Local(ref _binding_0, ) => {
David Tolnay1f0b7b82018-01-06 16:07:14 -08001922 _visitor.visit_local(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001923 }
David Tolnay6702ade2017-12-30 23:38:15 -05001924 Stmt::Item(ref _binding_0, ) => {
David Tolnay1f0b7b82018-01-06 16:07:14 -08001925 _visitor.visit_item(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001926 }
David Tolnay6702ade2017-12-30 23:38:15 -05001927 Stmt::Expr(ref _binding_0, ) => {
David Tolnay1f0b7b82018-01-06 16:07:14 -08001928 _visitor.visit_expr(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001929 }
David Tolnay6702ade2017-12-30 23:38:15 -05001930 Stmt::Semi(ref _binding_0, ref _binding_1, ) => {
David Tolnay1f0b7b82018-01-06 16:07:14 -08001931 _visitor.visit_expr(_binding_0);
David Tolnaycc0f0372017-12-28 19:11:04 -05001932 tokens_helper(_visitor, &(_binding_1).0);
Nika Layzell27726662017-10-24 23:16:35 -04001933 }
Nika Layzell27726662017-10-24 23:16:35 -04001934 }
1935}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001936# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001937pub fn visit_trait_bound<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitBound) {
David Tolnayc1f5d5d2018-03-31 22:17:56 +02001938 if let Some(ref it) = _i . paren_token { tokens_helper(_visitor, &(it).0) };
David Tolnay40fb8ce2018-01-02 10:53:46 -08001939 _visitor.visit_trait_bound_modifier(& _i . modifier);
1940 if let Some(ref it) = _i . lifetimes { _visitor.visit_bound_lifetimes(it) };
1941 _visitor.visit_path(& _i . path);
1942}
David Tolnay3cfd1d32018-01-03 00:22:08 -08001943# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001944pub fn visit_trait_bound_modifier<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitBoundModifier) {
Nika Layzell27726662017-10-24 23:16:35 -04001945 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001946 TraitBoundModifier::None => { }
1947 TraitBoundModifier::Maybe(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05001948 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04001949 }
1950 }
1951}
1952# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001953pub fn visit_trait_item<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItem) {
Nika Layzell27726662017-10-24 23:16:35 -04001954 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05001955 TraitItem::Const(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001956 _visitor.visit_trait_item_const(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001957 }
David Tolnay6702ade2017-12-30 23:38:15 -05001958 TraitItem::Method(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001959 _visitor.visit_trait_item_method(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001960 }
David Tolnay6702ade2017-12-30 23:38:15 -05001961 TraitItem::Type(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001962 _visitor.visit_trait_item_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001963 }
David Tolnay6702ade2017-12-30 23:38:15 -05001964 TraitItem::Macro(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001965 _visitor.visit_trait_item_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001966 }
David Tolnay6702ade2017-12-30 23:38:15 -05001967 TraitItem::Verbatim(ref _binding_0, ) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05001968 _visitor.visit_trait_item_verbatim(_binding_0);
1969 }
Nika Layzell27726662017-10-24 23:16:35 -04001970 }
1971}
1972# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001973pub fn visit_trait_item_const<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemConst) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001974 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001975 tokens_helper(_visitor, &(& _i . const_token).0);
Alex Crichtond261d092018-05-18 13:47:35 -07001976 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05001977 tokens_helper(_visitor, &(& _i . colon_token).0);
David Tolnayf0d63bf2017-12-26 12:29:47 -05001978 _visitor.visit_type(& _i . ty);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001979 if let Some(ref it) = _i . default {
David Tolnaycc0f0372017-12-28 19:11:04 -05001980 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05001981 _visitor.visit_expr(& ( it ) . 1);
1982 };
David Tolnaycc0f0372017-12-28 19:11:04 -05001983 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnayda705bd2017-11-10 21:58:05 -08001984}
1985# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001986pub fn visit_trait_item_macro<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemMacro) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001987 for it in & _i . attrs { _visitor.visit_attribute(it) };
1988 _visitor.visit_macro(& _i . mac);
David Tolnaycc0f0372017-12-28 19:11:04 -05001989 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
David Tolnayda705bd2017-11-10 21:58:05 -08001990}
1991# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001992pub fn visit_trait_item_method<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemMethod) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001993 for it in & _i . attrs { _visitor.visit_attribute(it) };
1994 _visitor.visit_method_sig(& _i . sig);
1995 if let Some(ref it) = _i . default { _visitor.visit_block(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05001996 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
Nika Layzell27726662017-10-24 23:16:35 -04001997}
1998# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001999pub fn visit_trait_item_type<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemType) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002000 for it in & _i . attrs { _visitor.visit_attribute(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05002001 tokens_helper(_visitor, &(& _i . type_token).0);
Alex Crichtond261d092018-05-18 13:47:35 -07002002 _visitor.visit_ident(& _i . ident);
David Tolnayf0d63bf2017-12-26 12:29:47 -05002003 _visitor.visit_generics(& _i . generics);
David Tolnaycc0f0372017-12-28 19:11:04 -05002004 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay56080682018-01-06 14:01:52 -08002005 for el in Punctuated::pairs(& _i . bounds) { let it = el.value(); _visitor.visit_type_param_bound(it) };
David Tolnay5c4c0b52017-12-28 17:58:54 -05002006 if let Some(ref it) = _i . default {
David Tolnaycc0f0372017-12-28 19:11:04 -05002007 tokens_helper(_visitor, &(& ( it ) . 0).0);
David Tolnay5c4c0b52017-12-28 17:58:54 -05002008 _visitor.visit_type(& ( it ) . 1);
2009 };
David Tolnaycc0f0372017-12-28 19:11:04 -05002010 tokens_helper(_visitor, &(& _i . semi_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04002011}
David Tolnay2ae520a2017-12-29 11:19:50 -05002012# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002013pub fn visit_trait_item_verbatim<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemVerbatim) {
David Tolnay2ae520a2017-12-29 11:19:50 -05002014 // Skipped field _i . tts;
2015}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002016# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002017pub fn visit_type<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Type) {
Nika Layzell27726662017-10-24 23:16:35 -04002018 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05002019 Type::Slice(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002020 _visitor.visit_type_slice(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002021 }
David Tolnay6702ade2017-12-30 23:38:15 -05002022 Type::Array(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002023 _visitor.visit_type_array(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002024 }
David Tolnay6702ade2017-12-30 23:38:15 -05002025 Type::Ptr(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002026 _visitor.visit_type_ptr(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002027 }
David Tolnay6702ade2017-12-30 23:38:15 -05002028 Type::Reference(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002029 _visitor.visit_type_reference(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002030 }
David Tolnay6702ade2017-12-30 23:38:15 -05002031 Type::BareFn(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002032 _visitor.visit_type_bare_fn(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002033 }
David Tolnay6702ade2017-12-30 23:38:15 -05002034 Type::Never(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002035 _visitor.visit_type_never(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002036 }
David Tolnay6702ade2017-12-30 23:38:15 -05002037 Type::Tuple(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002038 _visitor.visit_type_tuple(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002039 }
David Tolnay6702ade2017-12-30 23:38:15 -05002040 Type::Path(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002041 _visitor.visit_type_path(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002042 }
David Tolnay6702ade2017-12-30 23:38:15 -05002043 Type::TraitObject(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002044 _visitor.visit_type_trait_object(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002045 }
David Tolnay6702ade2017-12-30 23:38:15 -05002046 Type::ImplTrait(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002047 _visitor.visit_type_impl_trait(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002048 }
David Tolnay6702ade2017-12-30 23:38:15 -05002049 Type::Paren(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002050 _visitor.visit_type_paren(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002051 }
David Tolnay6702ade2017-12-30 23:38:15 -05002052 Type::Group(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002053 _visitor.visit_type_group(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002054 }
David Tolnay6702ade2017-12-30 23:38:15 -05002055 Type::Infer(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002056 _visitor.visit_type_infer(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002057 }
David Tolnay6702ade2017-12-30 23:38:15 -05002058 Type::Macro(ref _binding_0, ) => {
David Tolnay323279a2017-12-29 11:26:32 -05002059 _visitor.visit_type_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002060 }
David Tolnay6702ade2017-12-30 23:38:15 -05002061 Type::Verbatim(ref _binding_0, ) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05002062 _visitor.visit_type_verbatim(_binding_0);
2063 }
Nika Layzell27726662017-10-24 23:16:35 -04002064 }
2065}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002066# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002067pub fn visit_type_array<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeArray) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002068 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05002069 _visitor.visit_type(& * _i . elem);
David Tolnaycc0f0372017-12-28 19:11:04 -05002070 tokens_helper(_visitor, &(& _i . semi_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05002071 _visitor.visit_expr(& _i . len);
Nika Layzell27726662017-10-24 23:16:35 -04002072}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002073# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002074pub fn visit_type_bare_fn<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeBareFn) {
David Tolnaybe7a9592017-12-29 02:39:53 -05002075 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
2076 if let Some(ref it) = _i . abi { _visitor.visit_abi(it) };
2077 tokens_helper(_visitor, &(& _i . fn_token).0);
2078 if let Some(ref it) = _i . lifetimes { _visitor.visit_bound_lifetimes(it) };
2079 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay56080682018-01-06 14:01:52 -08002080 for el in Punctuated::pairs(& _i . inputs) { let it = el.value(); _visitor.visit_bare_fn_arg(it) };
David Tolnaybe7a9592017-12-29 02:39:53 -05002081 if let Some(ref it) = _i . variadic { tokens_helper(_visitor, &(it).0) };
2082 _visitor.visit_return_type(& _i . output);
Nika Layzell27726662017-10-24 23:16:35 -04002083}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002084# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002085pub fn visit_type_group<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeGroup) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002086 tokens_helper(_visitor, &(& _i . group_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05002087 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04002088}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002089# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002090pub fn visit_type_impl_trait<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeImplTrait) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002091 tokens_helper(_visitor, &(& _i . impl_token).0);
David Tolnay56080682018-01-06 14:01:52 -08002092 for el in Punctuated::pairs(& _i . bounds) { let it = el.value(); _visitor.visit_type_param_bound(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002093}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002094# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002095pub fn visit_type_infer<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeInfer) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002096 tokens_helper(_visitor, &(& _i . underscore_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04002097}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002098# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002099pub fn visit_type_macro<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeMacro) {
David Tolnay323279a2017-12-29 11:26:32 -05002100 _visitor.visit_macro(& _i . mac);
2101}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002102# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002103pub fn visit_type_never<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeNever) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002104 tokens_helper(_visitor, &(& _i . bang_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 Tolnay4b4c4b62018-01-06 13:48:05 -08002107pub fn visit_type_param<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParam) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002108 for it in & _i . attrs { _visitor.visit_attribute(it) };
Alex Crichtond261d092018-05-18 13:47:35 -07002109 _visitor.visit_ident(& _i . ident);
David Tolnaycc0f0372017-12-28 19:11:04 -05002110 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
David Tolnay56080682018-01-06 14:01:52 -08002111 for el in Punctuated::pairs(& _i . bounds) { let it = el.value(); _visitor.visit_type_param_bound(it) };
David Tolnaycc0f0372017-12-28 19:11:04 -05002112 if let Some(ref it) = _i . eq_token { tokens_helper(_visitor, &(it).0) };
David Tolnayf0d63bf2017-12-26 12:29:47 -05002113 if let Some(ref it) = _i . default { _visitor.visit_type(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002114}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002115# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002116pub fn visit_type_param_bound<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParamBound) {
Nika Layzell27726662017-10-24 23:16:35 -04002117 match *_i {
David Tolnay40fb8ce2018-01-02 10:53:46 -08002118 TypeParamBound::Trait(ref _binding_0, ) => {
2119 _visitor.visit_trait_bound(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002120 }
David Tolnay40fb8ce2018-01-02 10:53:46 -08002121 TypeParamBound::Lifetime(ref _binding_0, ) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05002122 _visitor.visit_lifetime(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002123 }
2124 }
2125}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002126# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002127pub fn visit_type_paren<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParen) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002128 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05002129 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04002130}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002131# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002132pub fn visit_type_path<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypePath) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002133 if let Some(ref it) = _i . qself { _visitor.visit_qself(it) };
2134 _visitor.visit_path(& _i . path);
Nika Layzell27726662017-10-24 23:16:35 -04002135}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002136# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002137pub fn visit_type_ptr<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypePtr) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002138 tokens_helper(_visitor, &(& _i . star_token).0);
2139 if let Some(ref it) = _i . const_token { tokens_helper(_visitor, &(it).0) };
David Tolnay136aaa32017-12-29 02:37:36 -05002140 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
2141 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04002142}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002143# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002144pub fn visit_type_reference<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeReference) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002145 tokens_helper(_visitor, &(& _i . and_token).0);
David Tolnay4ba63a02017-12-28 15:53:05 -05002146 if let Some(ref it) = _i . lifetime { _visitor.visit_lifetime(it) };
David Tolnay136aaa32017-12-29 02:37:36 -05002147 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
2148 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04002149}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002150# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002151pub fn visit_type_slice<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeSlice) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002152 tokens_helper(_visitor, &(& _i . bracket_token).0);
David Tolnayeadbda32017-12-29 02:33:47 -05002153 _visitor.visit_type(& * _i . elem);
Nika Layzell27726662017-10-24 23:16:35 -04002154}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002155# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002156pub fn visit_type_trait_object<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeTraitObject) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002157 if let Some(ref it) = _i . dyn_token { tokens_helper(_visitor, &(it).0) };
David Tolnay56080682018-01-06 14:01:52 -08002158 for el in Punctuated::pairs(& _i . bounds) { let it = el.value(); _visitor.visit_type_param_bound(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002159}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002160# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002161pub fn visit_type_tuple<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeTuple) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002162 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnay56080682018-01-06 14:01:52 -08002163 for el in Punctuated::pairs(& _i . elems) { let it = el.value(); _visitor.visit_type(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002164}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002165# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002166pub fn visit_type_verbatim<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeVerbatim) {
David Tolnay2ae520a2017-12-29 11:19:50 -05002167 // Skipped field _i . tts;
2168}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002169# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002170pub fn visit_un_op<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UnOp) {
Nika Layzell27726662017-10-24 23:16:35 -04002171 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05002172 UnOp::Deref(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05002173 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04002174 }
David Tolnay6702ade2017-12-30 23:38:15 -05002175 UnOp::Not(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05002176 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04002177 }
David Tolnay6702ade2017-12-30 23:38:15 -05002178 UnOp::Neg(ref _binding_0, ) => {
David Tolnaycc0f0372017-12-28 19:11:04 -05002179 tokens_helper(_visitor, &(_binding_0).0);
Nika Layzell27726662017-10-24 23:16:35 -04002180 }
2181 }
2182}
David Tolnay5f332a92017-12-26 00:42:45 -05002183# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002184pub fn visit_use_glob<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseGlob) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002185 tokens_helper(_visitor, &(& _i . star_token).0);
David Tolnay5f332a92017-12-26 00:42:45 -05002186}
2187# [ cfg ( feature = "full" ) ]
David Tolnayd97a7d22018-03-31 19:17:01 +02002188pub fn visit_use_group<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseGroup) {
David Tolnay1e01f9c2017-12-28 20:16:19 -05002189 tokens_helper(_visitor, &(& _i . brace_token).0);
David Tolnay56080682018-01-06 14:01:52 -08002190 for el in Punctuated::pairs(& _i . items) { let it = el.value(); _visitor.visit_use_tree(it) };
David Tolnay5f332a92017-12-26 00:42:45 -05002191}
2192# [ cfg ( feature = "full" ) ]
David Tolnayd97a7d22018-03-31 19:17:01 +02002193pub fn visit_use_name<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseName) {
Alex Crichtond261d092018-05-18 13:47:35 -07002194 _visitor.visit_ident(& _i . ident);
David Tolnayd97a7d22018-03-31 19:17:01 +02002195}
2196# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002197pub fn visit_use_path<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UsePath) {
Alex Crichtond261d092018-05-18 13:47:35 -07002198 _visitor.visit_ident(& _i . ident);
David Tolnayd97a7d22018-03-31 19:17:01 +02002199 tokens_helper(_visitor, &(& _i . colon2_token).0);
2200 _visitor.visit_use_tree(& * _i . tree);
2201}
2202# [ cfg ( feature = "full" ) ]
2203pub fn visit_use_rename<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseRename) {
Alex Crichtond261d092018-05-18 13:47:35 -07002204 _visitor.visit_ident(& _i . ident);
David Tolnayd97a7d22018-03-31 19:17:01 +02002205 tokens_helper(_visitor, &(& _i . as_token).0);
Alex Crichtond261d092018-05-18 13:47:35 -07002206 _visitor.visit_ident(& _i . rename);
David Tolnay5f332a92017-12-26 00:42:45 -05002207}
2208# [ cfg ( feature = "full" ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002209pub fn visit_use_tree<'ast, V: Visit<'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 Tolnayd97a7d22018-03-31 19:17:01 +02002214 UseTree::Name(ref _binding_0, ) => {
2215 _visitor.visit_use_name(_binding_0);
2216 }
2217 UseTree::Rename(ref _binding_0, ) => {
2218 _visitor.visit_use_rename(_binding_0);
2219 }
David Tolnay6702ade2017-12-30 23:38:15 -05002220 UseTree::Glob(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002221 _visitor.visit_use_glob(_binding_0);
David Tolnay5f332a92017-12-26 00:42:45 -05002222 }
David Tolnayd97a7d22018-03-31 19:17:01 +02002223 UseTree::Group(ref _binding_0, ) => {
2224 _visitor.visit_use_group(_binding_0);
David Tolnay5f332a92017-12-26 00:42:45 -05002225 }
2226 }
2227}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002228# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002229pub fn visit_variant<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Variant) {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002230 for it in & _i . attrs { _visitor.visit_attribute(it) };
Alex Crichtond261d092018-05-18 13:47:35 -07002231 _visitor.visit_ident(& _i . ident);
David Tolnaye3d41b72017-12-31 15:24:00 -05002232 _visitor.visit_fields(& _i . fields);
David Tolnaye67902a2017-12-28 22:12:00 -05002233 if let Some(ref it) = _i . discriminant {
2234 tokens_helper(_visitor, &(& ( it ) . 0).0);
2235 _visitor.visit_expr(& ( it ) . 1);
2236 };
Nika Layzell27726662017-10-24 23:16:35 -04002237}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002238# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002239pub fn visit_vis_crate<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisCrate) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002240 tokens_helper(_visitor, &(& _i . crate_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04002241}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002242# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002243pub fn visit_vis_public<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisPublic) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002244 tokens_helper(_visitor, &(& _i . pub_token).0);
Nika Layzell27726662017-10-24 23:16:35 -04002245}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002246# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002247pub fn visit_vis_restricted<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisRestricted) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002248 tokens_helper(_visitor, &(& _i . pub_token).0);
David Tolnay1e01f9c2017-12-28 20:16:19 -05002249 tokens_helper(_visitor, &(& _i . paren_token).0);
David Tolnaycc0f0372017-12-28 19:11:04 -05002250 if let Some(ref it) = _i . in_token { tokens_helper(_visitor, &(it).0) };
David Tolnay4a918742017-12-28 16:54:41 -05002251 _visitor.visit_path(& * _i . path);
Nika Layzell27726662017-10-24 23:16:35 -04002252}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002253# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002254pub fn visit_visibility<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Visibility) {
Nika Layzell27726662017-10-24 23:16:35 -04002255 match *_i {
David Tolnay6702ade2017-12-30 23:38:15 -05002256 Visibility::Public(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002257 _visitor.visit_vis_public(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002258 }
David Tolnay6702ade2017-12-30 23:38:15 -05002259 Visibility::Crate(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002260 _visitor.visit_vis_crate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002261 }
David Tolnay6702ade2017-12-30 23:38:15 -05002262 Visibility::Restricted(ref _binding_0, ) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002263 _visitor.visit_vis_restricted(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002264 }
David Tolnay6702ade2017-12-30 23:38:15 -05002265 Visibility::Inherited => { }
Nika Layzell27726662017-10-24 23:16:35 -04002266 }
2267}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002268# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002269pub fn visit_where_clause<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WhereClause) {
David Tolnaycc0f0372017-12-28 19:11:04 -05002270 tokens_helper(_visitor, &(& _i . where_token).0);
David Tolnay56080682018-01-06 14:01:52 -08002271 for el in Punctuated::pairs(& _i . predicates) { let it = el.value(); _visitor.visit_where_predicate(it) };
Nika Layzell27726662017-10-24 23:16:35 -04002272}
David Tolnay3cfd1d32018-01-03 00:22:08 -08002273# [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002274pub fn visit_where_predicate<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WherePredicate) {
Nika Layzell27726662017-10-24 23:16:35 -04002275 match *_i {
David Tolnayd4add852018-01-01 20:13:24 -08002276 WherePredicate::Type(ref _binding_0, ) => {
2277 _visitor.visit_predicate_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002278 }
David Tolnayd4add852018-01-01 20:13:24 -08002279 WherePredicate::Lifetime(ref _binding_0, ) => {
2280 _visitor.visit_predicate_lifetime(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002281 }
David Tolnayd4add852018-01-01 20:13:24 -08002282 WherePredicate::Eq(ref _binding_0, ) => {
2283 _visitor.visit_predicate_eq(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002284 }
2285 }
2286}
2287