]> git.proxmox.com Git - rustc.git/blob - src/vendor/syn-0.12.15/src/gen/visit.rs
New upstream version 1.27.2+dfsg1
[rustc.git] / src / vendor / syn-0.12.15 / src / gen / visit.rs
1 // THIS FILE IS AUTOMATICALLY GENERATED; DO NOT EDIT
2
3 #![cfg_attr(rustfmt, rustfmt_skip)]
4
5 #![cfg_attr(feature = "cargo-clippy", allow(match_same_arms))]
6
7 use *;
8 #[cfg(any(feature = "full", feature = "derive"))]
9 use punctuated::Punctuated;
10 use proc_macro2::Span;
11 #[cfg(any(feature = "full", feature = "derive"))]
12 use gen::helper::visit::*;
13
14
15 #[cfg(feature = "full")]
16 macro_rules! full {
17 ($e:expr) => { $e }
18 }
19
20 #[cfg(all(feature = "derive", not(feature = "full")))]
21 macro_rules! full {
22 ($e:expr) => { unreachable!() }
23 }
24
25
26 /// Syntax tree traversal to walk a shared borrow of a syntax tree.
27 ///
28 /// See the [module documentation] for details.
29 ///
30 /// [module documentation]: index.html
31 ///
32 /// *This trait is available if Syn is built with the `"visit"` feature.*
33 pub trait Visit<'ast> {
34 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
35 fn visit_abi(&mut self, i: &'ast Abi) { visit_abi(self, i) }
36 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
37 fn visit_angle_bracketed_generic_arguments(&mut self, i: &'ast AngleBracketedGenericArguments) { visit_angle_bracketed_generic_arguments(self, i) }
38 # [ cfg ( feature = "full" ) ]
39 fn visit_arg_captured(&mut self, i: &'ast ArgCaptured) { visit_arg_captured(self, i) }
40 # [ cfg ( feature = "full" ) ]
41 fn visit_arg_self(&mut self, i: &'ast ArgSelf) { visit_arg_self(self, i) }
42 # [ cfg ( feature = "full" ) ]
43 fn visit_arg_self_ref(&mut self, i: &'ast ArgSelfRef) { visit_arg_self_ref(self, i) }
44 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
45 fn visit_arm(&mut self, i: &'ast Arm) { visit_arm(self, i) }
46 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
47 fn visit_attr_style(&mut self, i: &'ast AttrStyle) { visit_attr_style(self, i) }
48 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
49 fn visit_attribute(&mut self, i: &'ast Attribute) { visit_attribute(self, i) }
50 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
51 fn visit_bare_fn_arg(&mut self, i: &'ast BareFnArg) { visit_bare_fn_arg(self, i) }
52 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
53 fn visit_bare_fn_arg_name(&mut self, i: &'ast BareFnArgName) { visit_bare_fn_arg_name(self, i) }
54 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
55 fn visit_bin_op(&mut self, i: &'ast BinOp) { visit_bin_op(self, i) }
56 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
57 fn visit_binding(&mut self, i: &'ast Binding) { visit_binding(self, i) }
58 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
59 fn visit_block(&mut self, i: &'ast Block) { visit_block(self, i) }
60 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
61 fn visit_bound_lifetimes(&mut self, i: &'ast BoundLifetimes) { visit_bound_lifetimes(self, i) }
62 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
63 fn visit_const_param(&mut self, i: &'ast ConstParam) { visit_const_param(self, i) }
64 # [ cfg ( feature = "derive" ) ]
65 fn visit_data(&mut self, i: &'ast Data) { visit_data(self, i) }
66 # [ cfg ( feature = "derive" ) ]
67 fn visit_data_enum(&mut self, i: &'ast DataEnum) { visit_data_enum(self, i) }
68 # [ cfg ( feature = "derive" ) ]
69 fn visit_data_struct(&mut self, i: &'ast DataStruct) { visit_data_struct(self, i) }
70 # [ cfg ( feature = "derive" ) ]
71 fn visit_data_union(&mut self, i: &'ast DataUnion) { visit_data_union(self, i) }
72 # [ cfg ( feature = "derive" ) ]
73 fn visit_derive_input(&mut self, i: &'ast DeriveInput) { visit_derive_input(self, i) }
74 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
75 fn visit_expr(&mut self, i: &'ast Expr) { visit_expr(self, i) }
76 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
77 fn visit_expr_addr_of(&mut self, i: &'ast ExprAddrOf) { visit_expr_addr_of(self, i) }
78 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
79 fn visit_expr_array(&mut self, i: &'ast ExprArray) { visit_expr_array(self, i) }
80 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
81 fn visit_expr_assign(&mut self, i: &'ast ExprAssign) { visit_expr_assign(self, i) }
82 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
83 fn visit_expr_assign_op(&mut self, i: &'ast ExprAssignOp) { visit_expr_assign_op(self, i) }
84 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
85 fn visit_expr_binary(&mut self, i: &'ast ExprBinary) { visit_expr_binary(self, i) }
86 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
87 fn visit_expr_block(&mut self, i: &'ast ExprBlock) { visit_expr_block(self, i) }
88 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
89 fn visit_expr_box(&mut self, i: &'ast ExprBox) { visit_expr_box(self, i) }
90 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
91 fn visit_expr_break(&mut self, i: &'ast ExprBreak) { visit_expr_break(self, i) }
92 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
93 fn visit_expr_call(&mut self, i: &'ast ExprCall) { visit_expr_call(self, i) }
94 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
95 fn visit_expr_cast(&mut self, i: &'ast ExprCast) { visit_expr_cast(self, i) }
96 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
97 fn visit_expr_catch(&mut self, i: &'ast ExprCatch) { visit_expr_catch(self, i) }
98 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
99 fn visit_expr_closure(&mut self, i: &'ast ExprClosure) { visit_expr_closure(self, i) }
100 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
101 fn visit_expr_continue(&mut self, i: &'ast ExprContinue) { visit_expr_continue(self, i) }
102 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
103 fn visit_expr_field(&mut self, i: &'ast ExprField) { visit_expr_field(self, i) }
104 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
105 fn visit_expr_for_loop(&mut self, i: &'ast ExprForLoop) { visit_expr_for_loop(self, i) }
106 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
107 fn visit_expr_group(&mut self, i: &'ast ExprGroup) { visit_expr_group(self, i) }
108 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
109 fn visit_expr_if(&mut self, i: &'ast ExprIf) { visit_expr_if(self, i) }
110 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
111 fn visit_expr_if_let(&mut self, i: &'ast ExprIfLet) { visit_expr_if_let(self, i) }
112 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
113 fn visit_expr_in_place(&mut self, i: &'ast ExprInPlace) { visit_expr_in_place(self, i) }
114 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
115 fn visit_expr_index(&mut self, i: &'ast ExprIndex) { visit_expr_index(self, i) }
116 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
117 fn visit_expr_lit(&mut self, i: &'ast ExprLit) { visit_expr_lit(self, i) }
118 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
119 fn visit_expr_loop(&mut self, i: &'ast ExprLoop) { visit_expr_loop(self, i) }
120 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
121 fn visit_expr_macro(&mut self, i: &'ast ExprMacro) { visit_expr_macro(self, i) }
122 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
123 fn visit_expr_match(&mut self, i: &'ast ExprMatch) { visit_expr_match(self, i) }
124 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
125 fn visit_expr_method_call(&mut self, i: &'ast ExprMethodCall) { visit_expr_method_call(self, i) }
126 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
127 fn visit_expr_paren(&mut self, i: &'ast ExprParen) { visit_expr_paren(self, i) }
128 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
129 fn visit_expr_path(&mut self, i: &'ast ExprPath) { visit_expr_path(self, i) }
130 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
131 fn visit_expr_range(&mut self, i: &'ast ExprRange) { visit_expr_range(self, i) }
132 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
133 fn visit_expr_repeat(&mut self, i: &'ast ExprRepeat) { visit_expr_repeat(self, i) }
134 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
135 fn visit_expr_return(&mut self, i: &'ast ExprReturn) { visit_expr_return(self, i) }
136 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
137 fn visit_expr_struct(&mut self, i: &'ast ExprStruct) { visit_expr_struct(self, i) }
138 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
139 fn visit_expr_try(&mut self, i: &'ast ExprTry) { visit_expr_try(self, i) }
140 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
141 fn visit_expr_tuple(&mut self, i: &'ast ExprTuple) { visit_expr_tuple(self, i) }
142 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
143 fn visit_expr_type(&mut self, i: &'ast ExprType) { visit_expr_type(self, i) }
144 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
145 fn visit_expr_unary(&mut self, i: &'ast ExprUnary) { visit_expr_unary(self, i) }
146 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
147 fn visit_expr_unsafe(&mut self, i: &'ast ExprUnsafe) { visit_expr_unsafe(self, i) }
148 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
149 fn visit_expr_verbatim(&mut self, i: &'ast ExprVerbatim) { visit_expr_verbatim(self, i) }
150 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
151 fn visit_expr_while(&mut self, i: &'ast ExprWhile) { visit_expr_while(self, i) }
152 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
153 fn visit_expr_while_let(&mut self, i: &'ast ExprWhileLet) { visit_expr_while_let(self, i) }
154 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
155 fn visit_expr_yield(&mut self, i: &'ast ExprYield) { visit_expr_yield(self, i) }
156 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
157 fn visit_field(&mut self, i: &'ast Field) { visit_field(self, i) }
158 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
159 fn visit_field_pat(&mut self, i: &'ast FieldPat) { visit_field_pat(self, i) }
160 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
161 fn visit_field_value(&mut self, i: &'ast FieldValue) { visit_field_value(self, i) }
162 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
163 fn visit_fields(&mut self, i: &'ast Fields) { visit_fields(self, i) }
164 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
165 fn visit_fields_named(&mut self, i: &'ast FieldsNamed) { visit_fields_named(self, i) }
166 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
167 fn visit_fields_unnamed(&mut self, i: &'ast FieldsUnnamed) { visit_fields_unnamed(self, i) }
168 # [ cfg ( feature = "full" ) ]
169 fn visit_file(&mut self, i: &'ast File) { visit_file(self, i) }
170 # [ cfg ( feature = "full" ) ]
171 fn visit_fn_arg(&mut self, i: &'ast FnArg) { visit_fn_arg(self, i) }
172 # [ cfg ( feature = "full" ) ]
173 fn visit_fn_decl(&mut self, i: &'ast FnDecl) { visit_fn_decl(self, i) }
174 # [ cfg ( feature = "full" ) ]
175 fn visit_foreign_item(&mut self, i: &'ast ForeignItem) { visit_foreign_item(self, i) }
176 # [ cfg ( feature = "full" ) ]
177 fn visit_foreign_item_fn(&mut self, i: &'ast ForeignItemFn) { visit_foreign_item_fn(self, i) }
178 # [ cfg ( feature = "full" ) ]
179 fn visit_foreign_item_static(&mut self, i: &'ast ForeignItemStatic) { visit_foreign_item_static(self, i) }
180 # [ cfg ( feature = "full" ) ]
181 fn visit_foreign_item_type(&mut self, i: &'ast ForeignItemType) { visit_foreign_item_type(self, i) }
182 # [ cfg ( feature = "full" ) ]
183 fn visit_foreign_item_verbatim(&mut self, i: &'ast ForeignItemVerbatim) { visit_foreign_item_verbatim(self, i) }
184 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
185 fn visit_generic_argument(&mut self, i: &'ast GenericArgument) { visit_generic_argument(self, i) }
186 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
187 fn visit_generic_method_argument(&mut self, i: &'ast GenericMethodArgument) { visit_generic_method_argument(self, i) }
188 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
189 fn visit_generic_param(&mut self, i: &'ast GenericParam) { visit_generic_param(self, i) }
190 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
191 fn visit_generics(&mut self, i: &'ast Generics) { visit_generics(self, i) }
192
193 fn visit_ident(&mut self, i: &'ast Ident) { visit_ident(self, i) }
194 # [ cfg ( feature = "full" ) ]
195 fn visit_impl_item(&mut self, i: &'ast ImplItem) { visit_impl_item(self, i) }
196 # [ cfg ( feature = "full" ) ]
197 fn visit_impl_item_const(&mut self, i: &'ast ImplItemConst) { visit_impl_item_const(self, i) }
198 # [ cfg ( feature = "full" ) ]
199 fn visit_impl_item_macro(&mut self, i: &'ast ImplItemMacro) { visit_impl_item_macro(self, i) }
200 # [ cfg ( feature = "full" ) ]
201 fn visit_impl_item_method(&mut self, i: &'ast ImplItemMethod) { visit_impl_item_method(self, i) }
202 # [ cfg ( feature = "full" ) ]
203 fn visit_impl_item_type(&mut self, i: &'ast ImplItemType) { visit_impl_item_type(self, i) }
204 # [ cfg ( feature = "full" ) ]
205 fn visit_impl_item_verbatim(&mut self, i: &'ast ImplItemVerbatim) { visit_impl_item_verbatim(self, i) }
206 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
207 fn visit_index(&mut self, i: &'ast Index) { visit_index(self, i) }
208 # [ cfg ( feature = "full" ) ]
209 fn visit_item(&mut self, i: &'ast Item) { visit_item(self, i) }
210 # [ cfg ( feature = "full" ) ]
211 fn visit_item_const(&mut self, i: &'ast ItemConst) { visit_item_const(self, i) }
212 # [ cfg ( feature = "full" ) ]
213 fn visit_item_enum(&mut self, i: &'ast ItemEnum) { visit_item_enum(self, i) }
214 # [ cfg ( feature = "full" ) ]
215 fn visit_item_extern_crate(&mut self, i: &'ast ItemExternCrate) { visit_item_extern_crate(self, i) }
216 # [ cfg ( feature = "full" ) ]
217 fn visit_item_fn(&mut self, i: &'ast ItemFn) { visit_item_fn(self, i) }
218 # [ cfg ( feature = "full" ) ]
219 fn visit_item_foreign_mod(&mut self, i: &'ast ItemForeignMod) { visit_item_foreign_mod(self, i) }
220 # [ cfg ( feature = "full" ) ]
221 fn visit_item_impl(&mut self, i: &'ast ItemImpl) { visit_item_impl(self, i) }
222 # [ cfg ( feature = "full" ) ]
223 fn visit_item_macro(&mut self, i: &'ast ItemMacro) { visit_item_macro(self, i) }
224 # [ cfg ( feature = "full" ) ]
225 fn visit_item_macro2(&mut self, i: &'ast ItemMacro2) { visit_item_macro2(self, i) }
226 # [ cfg ( feature = "full" ) ]
227 fn visit_item_mod(&mut self, i: &'ast ItemMod) { visit_item_mod(self, i) }
228 # [ cfg ( feature = "full" ) ]
229 fn visit_item_static(&mut self, i: &'ast ItemStatic) { visit_item_static(self, i) }
230 # [ cfg ( feature = "full" ) ]
231 fn visit_item_struct(&mut self, i: &'ast ItemStruct) { visit_item_struct(self, i) }
232 # [ cfg ( feature = "full" ) ]
233 fn visit_item_trait(&mut self, i: &'ast ItemTrait) { visit_item_trait(self, i) }
234 # [ cfg ( feature = "full" ) ]
235 fn visit_item_type(&mut self, i: &'ast ItemType) { visit_item_type(self, i) }
236 # [ cfg ( feature = "full" ) ]
237 fn visit_item_union(&mut self, i: &'ast ItemUnion) { visit_item_union(self, i) }
238 # [ cfg ( feature = "full" ) ]
239 fn visit_item_use(&mut self, i: &'ast ItemUse) { visit_item_use(self, i) }
240 # [ cfg ( feature = "full" ) ]
241 fn visit_item_verbatim(&mut self, i: &'ast ItemVerbatim) { visit_item_verbatim(self, i) }
242 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
243 fn visit_label(&mut self, i: &'ast Label) { visit_label(self, i) }
244 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
245 fn visit_lifetime(&mut self, i: &'ast Lifetime) { visit_lifetime(self, i) }
246 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
247 fn visit_lifetime_def(&mut self, i: &'ast LifetimeDef) { visit_lifetime_def(self, i) }
248 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
249 fn visit_lit(&mut self, i: &'ast Lit) { visit_lit(self, i) }
250 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
251 fn visit_lit_bool(&mut self, i: &'ast LitBool) { visit_lit_bool(self, i) }
252 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
253 fn visit_lit_byte(&mut self, i: &'ast LitByte) { visit_lit_byte(self, i) }
254 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
255 fn visit_lit_byte_str(&mut self, i: &'ast LitByteStr) { visit_lit_byte_str(self, i) }
256 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
257 fn visit_lit_char(&mut self, i: &'ast LitChar) { visit_lit_char(self, i) }
258 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
259 fn visit_lit_float(&mut self, i: &'ast LitFloat) { visit_lit_float(self, i) }
260 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
261 fn visit_lit_int(&mut self, i: &'ast LitInt) { visit_lit_int(self, i) }
262 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
263 fn visit_lit_str(&mut self, i: &'ast LitStr) { visit_lit_str(self, i) }
264 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
265 fn visit_lit_verbatim(&mut self, i: &'ast LitVerbatim) { visit_lit_verbatim(self, i) }
266 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
267 fn visit_local(&mut self, i: &'ast Local) { visit_local(self, i) }
268 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
269 fn visit_macro(&mut self, i: &'ast Macro) { visit_macro(self, i) }
270 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
271 fn visit_macro_delimiter(&mut self, i: &'ast MacroDelimiter) { visit_macro_delimiter(self, i) }
272 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
273 fn visit_member(&mut self, i: &'ast Member) { visit_member(self, i) }
274 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
275 fn visit_meta(&mut self, i: &'ast Meta) { visit_meta(self, i) }
276 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
277 fn visit_meta_list(&mut self, i: &'ast MetaList) { visit_meta_list(self, i) }
278 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
279 fn visit_meta_name_value(&mut self, i: &'ast MetaNameValue) { visit_meta_name_value(self, i) }
280 # [ cfg ( feature = "full" ) ]
281 fn visit_method_sig(&mut self, i: &'ast MethodSig) { visit_method_sig(self, i) }
282 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
283 fn visit_method_turbofish(&mut self, i: &'ast MethodTurbofish) { visit_method_turbofish(self, i) }
284 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
285 fn visit_nested_meta(&mut self, i: &'ast NestedMeta) { visit_nested_meta(self, i) }
286 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
287 fn visit_parenthesized_generic_arguments(&mut self, i: &'ast ParenthesizedGenericArguments) { visit_parenthesized_generic_arguments(self, i) }
288 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
289 fn visit_pat(&mut self, i: &'ast Pat) { visit_pat(self, i) }
290 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
291 fn visit_pat_box(&mut self, i: &'ast PatBox) { visit_pat_box(self, i) }
292 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
293 fn visit_pat_ident(&mut self, i: &'ast PatIdent) { visit_pat_ident(self, i) }
294 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
295 fn visit_pat_lit(&mut self, i: &'ast PatLit) { visit_pat_lit(self, i) }
296 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
297 fn visit_pat_macro(&mut self, i: &'ast PatMacro) { visit_pat_macro(self, i) }
298 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
299 fn visit_pat_path(&mut self, i: &'ast PatPath) { visit_pat_path(self, i) }
300 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
301 fn visit_pat_range(&mut self, i: &'ast PatRange) { visit_pat_range(self, i) }
302 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
303 fn visit_pat_ref(&mut self, i: &'ast PatRef) { visit_pat_ref(self, i) }
304 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
305 fn visit_pat_slice(&mut self, i: &'ast PatSlice) { visit_pat_slice(self, i) }
306 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
307 fn visit_pat_struct(&mut self, i: &'ast PatStruct) { visit_pat_struct(self, i) }
308 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
309 fn visit_pat_tuple(&mut self, i: &'ast PatTuple) { visit_pat_tuple(self, i) }
310 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
311 fn visit_pat_tuple_struct(&mut self, i: &'ast PatTupleStruct) { visit_pat_tuple_struct(self, i) }
312 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
313 fn visit_pat_verbatim(&mut self, i: &'ast PatVerbatim) { visit_pat_verbatim(self, i) }
314 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
315 fn visit_pat_wild(&mut self, i: &'ast PatWild) { visit_pat_wild(self, i) }
316 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
317 fn visit_path(&mut self, i: &'ast Path) { visit_path(self, i) }
318 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
319 fn visit_path_arguments(&mut self, i: &'ast PathArguments) { visit_path_arguments(self, i) }
320 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
321 fn visit_path_segment(&mut self, i: &'ast PathSegment) { visit_path_segment(self, i) }
322 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
323 fn visit_predicate_eq(&mut self, i: &'ast PredicateEq) { visit_predicate_eq(self, i) }
324 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
325 fn visit_predicate_lifetime(&mut self, i: &'ast PredicateLifetime) { visit_predicate_lifetime(self, i) }
326 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
327 fn visit_predicate_type(&mut self, i: &'ast PredicateType) { visit_predicate_type(self, i) }
328 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
329 fn visit_qself(&mut self, i: &'ast QSelf) { visit_qself(self, i) }
330 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
331 fn visit_range_limits(&mut self, i: &'ast RangeLimits) { visit_range_limits(self, i) }
332 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
333 fn visit_return_type(&mut self, i: &'ast ReturnType) { visit_return_type(self, i) }
334
335 fn visit_span(&mut self, i: &'ast Span) { visit_span(self, i) }
336 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
337 fn visit_stmt(&mut self, i: &'ast Stmt) { visit_stmt(self, i) }
338 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
339 fn visit_trait_bound(&mut self, i: &'ast TraitBound) { visit_trait_bound(self, i) }
340 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
341 fn visit_trait_bound_modifier(&mut self, i: &'ast TraitBoundModifier) { visit_trait_bound_modifier(self, i) }
342 # [ cfg ( feature = "full" ) ]
343 fn visit_trait_item(&mut self, i: &'ast TraitItem) { visit_trait_item(self, i) }
344 # [ cfg ( feature = "full" ) ]
345 fn visit_trait_item_const(&mut self, i: &'ast TraitItemConst) { visit_trait_item_const(self, i) }
346 # [ cfg ( feature = "full" ) ]
347 fn visit_trait_item_macro(&mut self, i: &'ast TraitItemMacro) { visit_trait_item_macro(self, i) }
348 # [ cfg ( feature = "full" ) ]
349 fn visit_trait_item_method(&mut self, i: &'ast TraitItemMethod) { visit_trait_item_method(self, i) }
350 # [ cfg ( feature = "full" ) ]
351 fn visit_trait_item_type(&mut self, i: &'ast TraitItemType) { visit_trait_item_type(self, i) }
352 # [ cfg ( feature = "full" ) ]
353 fn visit_trait_item_verbatim(&mut self, i: &'ast TraitItemVerbatim) { visit_trait_item_verbatim(self, i) }
354 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
355 fn visit_type(&mut self, i: &'ast Type) { visit_type(self, i) }
356 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
357 fn visit_type_array(&mut self, i: &'ast TypeArray) { visit_type_array(self, i) }
358 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
359 fn visit_type_bare_fn(&mut self, i: &'ast TypeBareFn) { visit_type_bare_fn(self, i) }
360 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
361 fn visit_type_group(&mut self, i: &'ast TypeGroup) { visit_type_group(self, i) }
362 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
363 fn visit_type_impl_trait(&mut self, i: &'ast TypeImplTrait) { visit_type_impl_trait(self, i) }
364 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
365 fn visit_type_infer(&mut self, i: &'ast TypeInfer) { visit_type_infer(self, i) }
366 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
367 fn visit_type_macro(&mut self, i: &'ast TypeMacro) { visit_type_macro(self, i) }
368 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
369 fn visit_type_never(&mut self, i: &'ast TypeNever) { visit_type_never(self, i) }
370 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
371 fn visit_type_param(&mut self, i: &'ast TypeParam) { visit_type_param(self, i) }
372 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
373 fn visit_type_param_bound(&mut self, i: &'ast TypeParamBound) { visit_type_param_bound(self, i) }
374 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
375 fn visit_type_paren(&mut self, i: &'ast TypeParen) { visit_type_paren(self, i) }
376 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
377 fn visit_type_path(&mut self, i: &'ast TypePath) { visit_type_path(self, i) }
378 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
379 fn visit_type_ptr(&mut self, i: &'ast TypePtr) { visit_type_ptr(self, i) }
380 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
381 fn visit_type_reference(&mut self, i: &'ast TypeReference) { visit_type_reference(self, i) }
382 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
383 fn visit_type_slice(&mut self, i: &'ast TypeSlice) { visit_type_slice(self, i) }
384 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
385 fn visit_type_trait_object(&mut self, i: &'ast TypeTraitObject) { visit_type_trait_object(self, i) }
386 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
387 fn visit_type_tuple(&mut self, i: &'ast TypeTuple) { visit_type_tuple(self, i) }
388 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
389 fn visit_type_verbatim(&mut self, i: &'ast TypeVerbatim) { visit_type_verbatim(self, i) }
390 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
391 fn visit_un_op(&mut self, i: &'ast UnOp) { visit_un_op(self, i) }
392 # [ cfg ( feature = "full" ) ]
393 fn visit_use_glob(&mut self, i: &'ast UseGlob) { visit_use_glob(self, i) }
394 # [ cfg ( feature = "full" ) ]
395 fn visit_use_list(&mut self, i: &'ast UseList) { visit_use_list(self, i) }
396 # [ cfg ( feature = "full" ) ]
397 fn visit_use_path(&mut self, i: &'ast UsePath) { visit_use_path(self, i) }
398 # [ cfg ( feature = "full" ) ]
399 fn visit_use_tree(&mut self, i: &'ast UseTree) { visit_use_tree(self, i) }
400 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
401 fn visit_variant(&mut self, i: &'ast Variant) { visit_variant(self, i) }
402 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
403 fn visit_vis_crate(&mut self, i: &'ast VisCrate) { visit_vis_crate(self, i) }
404 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
405 fn visit_vis_public(&mut self, i: &'ast VisPublic) { visit_vis_public(self, i) }
406 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
407 fn visit_vis_restricted(&mut self, i: &'ast VisRestricted) { visit_vis_restricted(self, i) }
408 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
409 fn visit_visibility(&mut self, i: &'ast Visibility) { visit_visibility(self, i) }
410 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
411 fn visit_where_clause(&mut self, i: &'ast WhereClause) { visit_where_clause(self, i) }
412 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
413 fn visit_where_predicate(&mut self, i: &'ast WherePredicate) { visit_where_predicate(self, i) }
414
415 }
416
417 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
418 pub fn visit_abi<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Abi) {
419 tokens_helper(_visitor, &(& _i . extern_token).0);
420 if let Some(ref it) = _i . name { _visitor.visit_lit_str(it) };
421 }
422 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
423 pub fn visit_angle_bracketed_generic_arguments<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast AngleBracketedGenericArguments) {
424 if let Some(ref it) = _i . colon2_token { tokens_helper(_visitor, &(it).0) };
425 tokens_helper(_visitor, &(& _i . lt_token).0);
426 for el in Punctuated::pairs(& _i . args) { let it = el.value(); _visitor.visit_generic_argument(it) };
427 tokens_helper(_visitor, &(& _i . gt_token).0);
428 }
429 # [ cfg ( feature = "full" ) ]
430 pub fn visit_arg_captured<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ArgCaptured) {
431 _visitor.visit_pat(& _i . pat);
432 tokens_helper(_visitor, &(& _i . colon_token).0);
433 _visitor.visit_type(& _i . ty);
434 }
435 # [ cfg ( feature = "full" ) ]
436 pub fn visit_arg_self<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ArgSelf) {
437 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
438 tokens_helper(_visitor, &(& _i . self_token).0);
439 }
440 # [ cfg ( feature = "full" ) ]
441 pub fn visit_arg_self_ref<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ArgSelfRef) {
442 tokens_helper(_visitor, &(& _i . and_token).0);
443 if let Some(ref it) = _i . lifetime { _visitor.visit_lifetime(it) };
444 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
445 tokens_helper(_visitor, &(& _i . self_token).0);
446 }
447 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
448 pub fn visit_arm<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Arm) {
449 for it in & _i . attrs { _visitor.visit_attribute(it) };
450 for el in Punctuated::pairs(& _i . pats) { let it = el.value(); _visitor.visit_pat(it) };
451 if let Some(ref it) = _i . guard {
452 tokens_helper(_visitor, &(& ( it ) . 0).0);
453 _visitor.visit_expr(& * ( it ) . 1);
454 };
455 tokens_helper(_visitor, &(& _i . rocket_token).0);
456 _visitor.visit_expr(& * _i . body);
457 if let Some(ref it) = _i . comma { tokens_helper(_visitor, &(it).0) };
458 }
459 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
460 pub fn visit_attr_style<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast AttrStyle) {
461 match *_i {
462 AttrStyle::Outer => { }
463 AttrStyle::Inner(ref _binding_0, ) => {
464 tokens_helper(_visitor, &(_binding_0).0);
465 }
466 }
467 }
468 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
469 pub fn visit_attribute<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Attribute) {
470 tokens_helper(_visitor, &(& _i . pound_token).0);
471 _visitor.visit_attr_style(& _i . style);
472 tokens_helper(_visitor, &(& _i . bracket_token).0);
473 _visitor.visit_path(& _i . path);
474 // Skipped field _i . tts;
475 // Skipped field _i . is_sugared_doc;
476 }
477 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
478 pub fn visit_bare_fn_arg<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BareFnArg) {
479 if let Some(ref it) = _i . name {
480 _visitor.visit_bare_fn_arg_name(& ( it ) . 0);
481 tokens_helper(_visitor, &(& ( it ) . 1).0);
482 };
483 _visitor.visit_type(& _i . ty);
484 }
485 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
486 pub fn visit_bare_fn_arg_name<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BareFnArgName) {
487 match *_i {
488 BareFnArgName::Named(ref _binding_0, ) => {
489 _visitor.visit_ident(_binding_0);
490 }
491 BareFnArgName::Wild(ref _binding_0, ) => {
492 tokens_helper(_visitor, &(_binding_0).0);
493 }
494 }
495 }
496 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
497 pub fn visit_bin_op<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BinOp) {
498 match *_i {
499 BinOp::Add(ref _binding_0, ) => {
500 tokens_helper(_visitor, &(_binding_0).0);
501 }
502 BinOp::Sub(ref _binding_0, ) => {
503 tokens_helper(_visitor, &(_binding_0).0);
504 }
505 BinOp::Mul(ref _binding_0, ) => {
506 tokens_helper(_visitor, &(_binding_0).0);
507 }
508 BinOp::Div(ref _binding_0, ) => {
509 tokens_helper(_visitor, &(_binding_0).0);
510 }
511 BinOp::Rem(ref _binding_0, ) => {
512 tokens_helper(_visitor, &(_binding_0).0);
513 }
514 BinOp::And(ref _binding_0, ) => {
515 tokens_helper(_visitor, &(_binding_0).0);
516 }
517 BinOp::Or(ref _binding_0, ) => {
518 tokens_helper(_visitor, &(_binding_0).0);
519 }
520 BinOp::BitXor(ref _binding_0, ) => {
521 tokens_helper(_visitor, &(_binding_0).0);
522 }
523 BinOp::BitAnd(ref _binding_0, ) => {
524 tokens_helper(_visitor, &(_binding_0).0);
525 }
526 BinOp::BitOr(ref _binding_0, ) => {
527 tokens_helper(_visitor, &(_binding_0).0);
528 }
529 BinOp::Shl(ref _binding_0, ) => {
530 tokens_helper(_visitor, &(_binding_0).0);
531 }
532 BinOp::Shr(ref _binding_0, ) => {
533 tokens_helper(_visitor, &(_binding_0).0);
534 }
535 BinOp::Eq(ref _binding_0, ) => {
536 tokens_helper(_visitor, &(_binding_0).0);
537 }
538 BinOp::Lt(ref _binding_0, ) => {
539 tokens_helper(_visitor, &(_binding_0).0);
540 }
541 BinOp::Le(ref _binding_0, ) => {
542 tokens_helper(_visitor, &(_binding_0).0);
543 }
544 BinOp::Ne(ref _binding_0, ) => {
545 tokens_helper(_visitor, &(_binding_0).0);
546 }
547 BinOp::Ge(ref _binding_0, ) => {
548 tokens_helper(_visitor, &(_binding_0).0);
549 }
550 BinOp::Gt(ref _binding_0, ) => {
551 tokens_helper(_visitor, &(_binding_0).0);
552 }
553 BinOp::AddEq(ref _binding_0, ) => {
554 tokens_helper(_visitor, &(_binding_0).0);
555 }
556 BinOp::SubEq(ref _binding_0, ) => {
557 tokens_helper(_visitor, &(_binding_0).0);
558 }
559 BinOp::MulEq(ref _binding_0, ) => {
560 tokens_helper(_visitor, &(_binding_0).0);
561 }
562 BinOp::DivEq(ref _binding_0, ) => {
563 tokens_helper(_visitor, &(_binding_0).0);
564 }
565 BinOp::RemEq(ref _binding_0, ) => {
566 tokens_helper(_visitor, &(_binding_0).0);
567 }
568 BinOp::BitXorEq(ref _binding_0, ) => {
569 tokens_helper(_visitor, &(_binding_0).0);
570 }
571 BinOp::BitAndEq(ref _binding_0, ) => {
572 tokens_helper(_visitor, &(_binding_0).0);
573 }
574 BinOp::BitOrEq(ref _binding_0, ) => {
575 tokens_helper(_visitor, &(_binding_0).0);
576 }
577 BinOp::ShlEq(ref _binding_0, ) => {
578 tokens_helper(_visitor, &(_binding_0).0);
579 }
580 BinOp::ShrEq(ref _binding_0, ) => {
581 tokens_helper(_visitor, &(_binding_0).0);
582 }
583 }
584 }
585 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
586 pub fn visit_binding<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Binding) {
587 _visitor.visit_ident(& _i . ident);
588 tokens_helper(_visitor, &(& _i . eq_token).0);
589 _visitor.visit_type(& _i . ty);
590 }
591 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
592 pub fn visit_block<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Block) {
593 tokens_helper(_visitor, &(& _i . brace_token).0);
594 for it in & _i . stmts { _visitor.visit_stmt(it) };
595 }
596 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
597 pub fn visit_bound_lifetimes<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BoundLifetimes) {
598 tokens_helper(_visitor, &(& _i . for_token).0);
599 tokens_helper(_visitor, &(& _i . lt_token).0);
600 for el in Punctuated::pairs(& _i . lifetimes) { let it = el.value(); _visitor.visit_lifetime_def(it) };
601 tokens_helper(_visitor, &(& _i . gt_token).0);
602 }
603 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
604 pub fn visit_const_param<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ConstParam) {
605 for it in & _i . attrs { _visitor.visit_attribute(it) };
606 tokens_helper(_visitor, &(& _i . const_token).0);
607 _visitor.visit_ident(& _i . ident);
608 tokens_helper(_visitor, &(& _i . colon_token).0);
609 _visitor.visit_type(& _i . ty);
610 if let Some(ref it) = _i . eq_token { tokens_helper(_visitor, &(it).0) };
611 if let Some(ref it) = _i . default { _visitor.visit_expr(it) };
612 }
613 # [ cfg ( feature = "derive" ) ]
614 pub fn visit_data<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Data) {
615 match *_i {
616 Data::Struct(ref _binding_0, ) => {
617 _visitor.visit_data_struct(_binding_0);
618 }
619 Data::Enum(ref _binding_0, ) => {
620 _visitor.visit_data_enum(_binding_0);
621 }
622 Data::Union(ref _binding_0, ) => {
623 _visitor.visit_data_union(_binding_0);
624 }
625 }
626 }
627 # [ cfg ( feature = "derive" ) ]
628 pub fn visit_data_enum<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast DataEnum) {
629 tokens_helper(_visitor, &(& _i . enum_token).0);
630 tokens_helper(_visitor, &(& _i . brace_token).0);
631 for el in Punctuated::pairs(& _i . variants) { let it = el.value(); _visitor.visit_variant(it) };
632 }
633 # [ cfg ( feature = "derive" ) ]
634 pub fn visit_data_struct<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast DataStruct) {
635 tokens_helper(_visitor, &(& _i . struct_token).0);
636 _visitor.visit_fields(& _i . fields);
637 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
638 }
639 # [ cfg ( feature = "derive" ) ]
640 pub fn visit_data_union<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast DataUnion) {
641 tokens_helper(_visitor, &(& _i . union_token).0);
642 _visitor.visit_fields_named(& _i . fields);
643 }
644 # [ cfg ( feature = "derive" ) ]
645 pub fn visit_derive_input<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast DeriveInput) {
646 for it in & _i . attrs { _visitor.visit_attribute(it) };
647 _visitor.visit_visibility(& _i . vis);
648 _visitor.visit_ident(& _i . ident);
649 _visitor.visit_generics(& _i . generics);
650 _visitor.visit_data(& _i . data);
651 }
652 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
653 pub fn visit_expr<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Expr) {
654 match *_i {
655 Expr::Box(ref _binding_0, ) => {
656 full!(_visitor.visit_expr_box(_binding_0));
657 }
658 Expr::InPlace(ref _binding_0, ) => {
659 full!(_visitor.visit_expr_in_place(_binding_0));
660 }
661 Expr::Array(ref _binding_0, ) => {
662 full!(_visitor.visit_expr_array(_binding_0));
663 }
664 Expr::Call(ref _binding_0, ) => {
665 _visitor.visit_expr_call(_binding_0);
666 }
667 Expr::MethodCall(ref _binding_0, ) => {
668 full!(_visitor.visit_expr_method_call(_binding_0));
669 }
670 Expr::Tuple(ref _binding_0, ) => {
671 full!(_visitor.visit_expr_tuple(_binding_0));
672 }
673 Expr::Binary(ref _binding_0, ) => {
674 _visitor.visit_expr_binary(_binding_0);
675 }
676 Expr::Unary(ref _binding_0, ) => {
677 _visitor.visit_expr_unary(_binding_0);
678 }
679 Expr::Lit(ref _binding_0, ) => {
680 _visitor.visit_expr_lit(_binding_0);
681 }
682 Expr::Cast(ref _binding_0, ) => {
683 _visitor.visit_expr_cast(_binding_0);
684 }
685 Expr::Type(ref _binding_0, ) => {
686 full!(_visitor.visit_expr_type(_binding_0));
687 }
688 Expr::If(ref _binding_0, ) => {
689 full!(_visitor.visit_expr_if(_binding_0));
690 }
691 Expr::IfLet(ref _binding_0, ) => {
692 full!(_visitor.visit_expr_if_let(_binding_0));
693 }
694 Expr::While(ref _binding_0, ) => {
695 full!(_visitor.visit_expr_while(_binding_0));
696 }
697 Expr::WhileLet(ref _binding_0, ) => {
698 full!(_visitor.visit_expr_while_let(_binding_0));
699 }
700 Expr::ForLoop(ref _binding_0, ) => {
701 full!(_visitor.visit_expr_for_loop(_binding_0));
702 }
703 Expr::Loop(ref _binding_0, ) => {
704 full!(_visitor.visit_expr_loop(_binding_0));
705 }
706 Expr::Match(ref _binding_0, ) => {
707 full!(_visitor.visit_expr_match(_binding_0));
708 }
709 Expr::Closure(ref _binding_0, ) => {
710 full!(_visitor.visit_expr_closure(_binding_0));
711 }
712 Expr::Unsafe(ref _binding_0, ) => {
713 full!(_visitor.visit_expr_unsafe(_binding_0));
714 }
715 Expr::Block(ref _binding_0, ) => {
716 full!(_visitor.visit_expr_block(_binding_0));
717 }
718 Expr::Assign(ref _binding_0, ) => {
719 full!(_visitor.visit_expr_assign(_binding_0));
720 }
721 Expr::AssignOp(ref _binding_0, ) => {
722 full!(_visitor.visit_expr_assign_op(_binding_0));
723 }
724 Expr::Field(ref _binding_0, ) => {
725 full!(_visitor.visit_expr_field(_binding_0));
726 }
727 Expr::Index(ref _binding_0, ) => {
728 _visitor.visit_expr_index(_binding_0);
729 }
730 Expr::Range(ref _binding_0, ) => {
731 full!(_visitor.visit_expr_range(_binding_0));
732 }
733 Expr::Path(ref _binding_0, ) => {
734 _visitor.visit_expr_path(_binding_0);
735 }
736 Expr::AddrOf(ref _binding_0, ) => {
737 full!(_visitor.visit_expr_addr_of(_binding_0));
738 }
739 Expr::Break(ref _binding_0, ) => {
740 full!(_visitor.visit_expr_break(_binding_0));
741 }
742 Expr::Continue(ref _binding_0, ) => {
743 full!(_visitor.visit_expr_continue(_binding_0));
744 }
745 Expr::Return(ref _binding_0, ) => {
746 full!(_visitor.visit_expr_return(_binding_0));
747 }
748 Expr::Macro(ref _binding_0, ) => {
749 full!(_visitor.visit_expr_macro(_binding_0));
750 }
751 Expr::Struct(ref _binding_0, ) => {
752 full!(_visitor.visit_expr_struct(_binding_0));
753 }
754 Expr::Repeat(ref _binding_0, ) => {
755 full!(_visitor.visit_expr_repeat(_binding_0));
756 }
757 Expr::Paren(ref _binding_0, ) => {
758 _visitor.visit_expr_paren(_binding_0);
759 }
760 Expr::Group(ref _binding_0, ) => {
761 full!(_visitor.visit_expr_group(_binding_0));
762 }
763 Expr::Try(ref _binding_0, ) => {
764 full!(_visitor.visit_expr_try(_binding_0));
765 }
766 Expr::Catch(ref _binding_0, ) => {
767 full!(_visitor.visit_expr_catch(_binding_0));
768 }
769 Expr::Yield(ref _binding_0, ) => {
770 full!(_visitor.visit_expr_yield(_binding_0));
771 }
772 Expr::Verbatim(ref _binding_0, ) => {
773 _visitor.visit_expr_verbatim(_binding_0);
774 }
775 }
776 }
777 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
778 pub fn visit_expr_addr_of<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprAddrOf) {
779 for it in & _i . attrs { _visitor.visit_attribute(it) };
780 tokens_helper(_visitor, &(& _i . and_token).0);
781 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
782 _visitor.visit_expr(& * _i . expr);
783 }
784 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
785 pub fn visit_expr_array<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprArray) {
786 for it in & _i . attrs { _visitor.visit_attribute(it) };
787 tokens_helper(_visitor, &(& _i . bracket_token).0);
788 for el in Punctuated::pairs(& _i . elems) { let it = el.value(); _visitor.visit_expr(it) };
789 }
790 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
791 pub fn visit_expr_assign<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprAssign) {
792 for it in & _i . attrs { _visitor.visit_attribute(it) };
793 _visitor.visit_expr(& * _i . left);
794 tokens_helper(_visitor, &(& _i . eq_token).0);
795 _visitor.visit_expr(& * _i . right);
796 }
797 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
798 pub fn visit_expr_assign_op<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprAssignOp) {
799 for it in & _i . attrs { _visitor.visit_attribute(it) };
800 _visitor.visit_expr(& * _i . left);
801 _visitor.visit_bin_op(& _i . op);
802 _visitor.visit_expr(& * _i . right);
803 }
804 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
805 pub fn visit_expr_binary<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBinary) {
806 for it in & _i . attrs { _visitor.visit_attribute(it) };
807 _visitor.visit_expr(& * _i . left);
808 _visitor.visit_bin_op(& _i . op);
809 _visitor.visit_expr(& * _i . right);
810 }
811 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
812 pub fn visit_expr_block<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBlock) {
813 for it in & _i . attrs { _visitor.visit_attribute(it) };
814 _visitor.visit_block(& _i . block);
815 }
816 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
817 pub fn visit_expr_box<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBox) {
818 for it in & _i . attrs { _visitor.visit_attribute(it) };
819 tokens_helper(_visitor, &(& _i . box_token).0);
820 _visitor.visit_expr(& * _i . expr);
821 }
822 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
823 pub fn visit_expr_break<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBreak) {
824 for it in & _i . attrs { _visitor.visit_attribute(it) };
825 tokens_helper(_visitor, &(& _i . break_token).0);
826 if let Some(ref it) = _i . label { _visitor.visit_lifetime(it) };
827 if let Some(ref it) = _i . expr { _visitor.visit_expr(& * * it) };
828 }
829 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
830 pub fn visit_expr_call<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprCall) {
831 for it in & _i . attrs { _visitor.visit_attribute(it) };
832 _visitor.visit_expr(& * _i . func);
833 tokens_helper(_visitor, &(& _i . paren_token).0);
834 for el in Punctuated::pairs(& _i . args) { let it = el.value(); _visitor.visit_expr(it) };
835 }
836 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
837 pub fn visit_expr_cast<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprCast) {
838 for it in & _i . attrs { _visitor.visit_attribute(it) };
839 _visitor.visit_expr(& * _i . expr);
840 tokens_helper(_visitor, &(& _i . as_token).0);
841 _visitor.visit_type(& * _i . ty);
842 }
843 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
844 pub fn visit_expr_catch<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprCatch) {
845 for it in & _i . attrs { _visitor.visit_attribute(it) };
846 tokens_helper(_visitor, &(& _i . do_token).0);
847 tokens_helper(_visitor, &(& _i . catch_token).0);
848 _visitor.visit_block(& _i . block);
849 }
850 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
851 pub fn visit_expr_closure<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprClosure) {
852 for it in & _i . attrs { _visitor.visit_attribute(it) };
853 if let Some(ref it) = _i . capture { tokens_helper(_visitor, &(it).0) };
854 tokens_helper(_visitor, &(& _i . or1_token).0);
855 for el in Punctuated::pairs(& _i . inputs) { let it = el.value(); _visitor.visit_fn_arg(it) };
856 tokens_helper(_visitor, &(& _i . or2_token).0);
857 _visitor.visit_return_type(& _i . output);
858 _visitor.visit_expr(& * _i . body);
859 }
860 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
861 pub fn visit_expr_continue<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprContinue) {
862 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 }
866 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
867 pub fn visit_expr_field<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprField) {
868 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 }
873 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
874 pub fn visit_expr_for_loop<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprForLoop) {
875 for it in & _i . attrs { _visitor.visit_attribute(it) };
876 if let Some(ref it) = _i . label { _visitor.visit_label(it) };
877 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 }
883 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
884 pub fn visit_expr_group<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprGroup) {
885 for it in & _i . attrs { _visitor.visit_attribute(it) };
886 tokens_helper(_visitor, &(& _i . group_token).0);
887 _visitor.visit_expr(& * _i . expr);
888 }
889 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
890 pub fn visit_expr_if<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIf) {
891 for it in & _i . attrs { _visitor.visit_attribute(it) };
892 tokens_helper(_visitor, &(& _i . if_token).0);
893 _visitor.visit_expr(& * _i . cond);
894 _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 };
899 }
900 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
901 pub fn visit_expr_if_let<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIfLet) {
902 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);
905 _visitor.visit_pat(& * _i . pat);
906 tokens_helper(_visitor, &(& _i . eq_token).0);
907 _visitor.visit_expr(& * _i . expr);
908 _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 };
913 }
914 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
915 pub fn visit_expr_in_place<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprInPlace) {
916 for it in & _i . attrs { _visitor.visit_attribute(it) };
917 _visitor.visit_expr(& * _i . place);
918 tokens_helper(_visitor, &(& _i . arrow_token).0);
919 _visitor.visit_expr(& * _i . value);
920 }
921 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
922 pub fn visit_expr_index<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIndex) {
923 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 }
928 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
929 pub fn visit_expr_lit<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprLit) {
930 for it in & _i . attrs { _visitor.visit_attribute(it) };
931 _visitor.visit_lit(& _i . lit);
932 }
933 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
934 pub fn visit_expr_loop<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprLoop) {
935 for it in & _i . attrs { _visitor.visit_attribute(it) };
936 if let Some(ref it) = _i . label { _visitor.visit_label(it) };
937 tokens_helper(_visitor, &(& _i . loop_token).0);
938 _visitor.visit_block(& _i . body);
939 }
940 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
941 pub fn visit_expr_macro<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprMacro) {
942 for it in & _i . attrs { _visitor.visit_attribute(it) };
943 _visitor.visit_macro(& _i . mac);
944 }
945 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
946 pub fn visit_expr_match<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprMatch) {
947 for it in & _i . attrs { _visitor.visit_attribute(it) };
948 tokens_helper(_visitor, &(& _i . match_token).0);
949 _visitor.visit_expr(& * _i . expr);
950 tokens_helper(_visitor, &(& _i . brace_token).0);
951 for it in & _i . arms { _visitor.visit_arm(it) };
952 }
953 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
954 pub fn visit_expr_method_call<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprMethodCall) {
955 for it in & _i . attrs { _visitor.visit_attribute(it) };
956 _visitor.visit_expr(& * _i . receiver);
957 tokens_helper(_visitor, &(& _i . dot_token).0);
958 _visitor.visit_ident(& _i . method);
959 if let Some(ref it) = _i . turbofish { _visitor.visit_method_turbofish(it) };
960 tokens_helper(_visitor, &(& _i . paren_token).0);
961 for el in Punctuated::pairs(& _i . args) { let it = el.value(); _visitor.visit_expr(it) };
962 }
963 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
964 pub fn visit_expr_paren<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprParen) {
965 for it in & _i . attrs { _visitor.visit_attribute(it) };
966 tokens_helper(_visitor, &(& _i . paren_token).0);
967 _visitor.visit_expr(& * _i . expr);
968 }
969 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
970 pub fn visit_expr_path<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprPath) {
971 for it in & _i . attrs { _visitor.visit_attribute(it) };
972 if let Some(ref it) = _i . qself { _visitor.visit_qself(it) };
973 _visitor.visit_path(& _i . path);
974 }
975 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
976 pub fn visit_expr_range<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprRange) {
977 for it in & _i . attrs { _visitor.visit_attribute(it) };
978 if let Some(ref it) = _i . from { _visitor.visit_expr(& * * it) };
979 _visitor.visit_range_limits(& _i . limits);
980 if let Some(ref it) = _i . to { _visitor.visit_expr(& * * it) };
981 }
982 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
983 pub fn visit_expr_repeat<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprRepeat) {
984 for it in & _i . attrs { _visitor.visit_attribute(it) };
985 tokens_helper(_visitor, &(& _i . bracket_token).0);
986 _visitor.visit_expr(& * _i . expr);
987 tokens_helper(_visitor, &(& _i . semi_token).0);
988 _visitor.visit_expr(& * _i . len);
989 }
990 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
991 pub fn visit_expr_return<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprReturn) {
992 for it in & _i . attrs { _visitor.visit_attribute(it) };
993 tokens_helper(_visitor, &(& _i . return_token).0);
994 if let Some(ref it) = _i . expr { _visitor.visit_expr(& * * it) };
995 }
996 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
997 pub fn visit_expr_struct<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprStruct) {
998 for it in & _i . attrs { _visitor.visit_attribute(it) };
999 _visitor.visit_path(& _i . path);
1000 tokens_helper(_visitor, &(& _i . brace_token).0);
1001 for el in Punctuated::pairs(& _i . fields) { let it = el.value(); _visitor.visit_field_value(it) };
1002 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
1003 if let Some(ref it) = _i . rest { _visitor.visit_expr(& * * it) };
1004 }
1005 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1006 pub fn visit_expr_try<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprTry) {
1007 for it in & _i . attrs { _visitor.visit_attribute(it) };
1008 _visitor.visit_expr(& * _i . expr);
1009 tokens_helper(_visitor, &(& _i . question_token).0);
1010 }
1011 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1012 pub fn visit_expr_tuple<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprTuple) {
1013 for it in & _i . attrs { _visitor.visit_attribute(it) };
1014 tokens_helper(_visitor, &(& _i . paren_token).0);
1015 for el in Punctuated::pairs(& _i . elems) { let it = el.value(); _visitor.visit_expr(it) };
1016 }
1017 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1018 pub fn visit_expr_type<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprType) {
1019 for it in & _i . attrs { _visitor.visit_attribute(it) };
1020 _visitor.visit_expr(& * _i . expr);
1021 tokens_helper(_visitor, &(& _i . colon_token).0);
1022 _visitor.visit_type(& * _i . ty);
1023 }
1024 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1025 pub fn visit_expr_unary<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprUnary) {
1026 for it in & _i . attrs { _visitor.visit_attribute(it) };
1027 _visitor.visit_un_op(& _i . op);
1028 _visitor.visit_expr(& * _i . expr);
1029 }
1030 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1031 pub fn visit_expr_unsafe<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprUnsafe) {
1032 for it in & _i . attrs { _visitor.visit_attribute(it) };
1033 tokens_helper(_visitor, &(& _i . unsafe_token).0);
1034 _visitor.visit_block(& _i . block);
1035 }
1036 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1037 pub fn visit_expr_verbatim<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprVerbatim) {
1038 // Skipped field _i . tts;
1039 }
1040 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1041 pub fn visit_expr_while<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprWhile) {
1042 for it in & _i . attrs { _visitor.visit_attribute(it) };
1043 if let Some(ref it) = _i . label { _visitor.visit_label(it) };
1044 tokens_helper(_visitor, &(& _i . while_token).0);
1045 _visitor.visit_expr(& * _i . cond);
1046 _visitor.visit_block(& _i . body);
1047 }
1048 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1049 pub fn visit_expr_while_let<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprWhileLet) {
1050 for it in & _i . attrs { _visitor.visit_attribute(it) };
1051 if let Some(ref it) = _i . label { _visitor.visit_label(it) };
1052 tokens_helper(_visitor, &(& _i . while_token).0);
1053 tokens_helper(_visitor, &(& _i . let_token).0);
1054 _visitor.visit_pat(& * _i . pat);
1055 tokens_helper(_visitor, &(& _i . eq_token).0);
1056 _visitor.visit_expr(& * _i . expr);
1057 _visitor.visit_block(& _i . body);
1058 }
1059 # [ cfg ( feature = "full" ) ] # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1060 pub fn visit_expr_yield<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprYield) {
1061 for it in & _i . attrs { _visitor.visit_attribute(it) };
1062 tokens_helper(_visitor, &(& _i . yield_token).0);
1063 if let Some(ref it) = _i . expr { _visitor.visit_expr(& * * it) };
1064 }
1065 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1066 pub fn visit_field<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Field) {
1067 for it in & _i . attrs { _visitor.visit_attribute(it) };
1068 _visitor.visit_visibility(& _i . vis);
1069 if let Some(ref it) = _i . ident { _visitor.visit_ident(it) };
1070 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
1071 _visitor.visit_type(& _i . ty);
1072 }
1073 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
1074 pub fn visit_field_pat<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldPat) {
1075 for it in & _i . attrs { _visitor.visit_attribute(it) };
1076 _visitor.visit_member(& _i . member);
1077 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
1078 _visitor.visit_pat(& * _i . pat);
1079 }
1080 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
1081 pub fn visit_field_value<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldValue) {
1082 for it in & _i . attrs { _visitor.visit_attribute(it) };
1083 _visitor.visit_member(& _i . member);
1084 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
1085 _visitor.visit_expr(& _i . expr);
1086 }
1087 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1088 pub fn visit_fields<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Fields) {
1089 match *_i {
1090 Fields::Named(ref _binding_0, ) => {
1091 _visitor.visit_fields_named(_binding_0);
1092 }
1093 Fields::Unnamed(ref _binding_0, ) => {
1094 _visitor.visit_fields_unnamed(_binding_0);
1095 }
1096 Fields::Unit => { }
1097 }
1098 }
1099 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1100 pub fn visit_fields_named<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldsNamed) {
1101 tokens_helper(_visitor, &(& _i . brace_token).0);
1102 for el in Punctuated::pairs(& _i . named) { let it = el.value(); _visitor.visit_field(it) };
1103 }
1104 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1105 pub fn visit_fields_unnamed<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldsUnnamed) {
1106 tokens_helper(_visitor, &(& _i . paren_token).0);
1107 for el in Punctuated::pairs(& _i . unnamed) { let it = el.value(); _visitor.visit_field(it) };
1108 }
1109 # [ cfg ( feature = "full" ) ]
1110 pub fn visit_file<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast File) {
1111 // Skipped field _i . shebang;
1112 for it in & _i . attrs { _visitor.visit_attribute(it) };
1113 for it in & _i . items { _visitor.visit_item(it) };
1114 }
1115 # [ cfg ( feature = "full" ) ]
1116 pub fn visit_fn_arg<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FnArg) {
1117 match *_i {
1118 FnArg::SelfRef(ref _binding_0, ) => {
1119 _visitor.visit_arg_self_ref(_binding_0);
1120 }
1121 FnArg::SelfValue(ref _binding_0, ) => {
1122 _visitor.visit_arg_self(_binding_0);
1123 }
1124 FnArg::Captured(ref _binding_0, ) => {
1125 _visitor.visit_arg_captured(_binding_0);
1126 }
1127 FnArg::Inferred(ref _binding_0, ) => {
1128 _visitor.visit_pat(_binding_0);
1129 }
1130 FnArg::Ignored(ref _binding_0, ) => {
1131 _visitor.visit_type(_binding_0);
1132 }
1133 }
1134 }
1135 # [ cfg ( feature = "full" ) ]
1136 pub fn visit_fn_decl<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FnDecl) {
1137 tokens_helper(_visitor, &(& _i . fn_token).0);
1138 _visitor.visit_generics(& _i . generics);
1139 tokens_helper(_visitor, &(& _i . paren_token).0);
1140 for el in Punctuated::pairs(& _i . inputs) { let it = el.value(); _visitor.visit_fn_arg(it) };
1141 if let Some(ref it) = _i . variadic { tokens_helper(_visitor, &(it).0) };
1142 _visitor.visit_return_type(& _i . output);
1143 }
1144 # [ cfg ( feature = "full" ) ]
1145 pub fn visit_foreign_item<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItem) {
1146 match *_i {
1147 ForeignItem::Fn(ref _binding_0, ) => {
1148 _visitor.visit_foreign_item_fn(_binding_0);
1149 }
1150 ForeignItem::Static(ref _binding_0, ) => {
1151 _visitor.visit_foreign_item_static(_binding_0);
1152 }
1153 ForeignItem::Type(ref _binding_0, ) => {
1154 _visitor.visit_foreign_item_type(_binding_0);
1155 }
1156 ForeignItem::Verbatim(ref _binding_0, ) => {
1157 _visitor.visit_foreign_item_verbatim(_binding_0);
1158 }
1159 }
1160 }
1161 # [ cfg ( feature = "full" ) ]
1162 pub fn visit_foreign_item_fn<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemFn) {
1163 for it in & _i . attrs { _visitor.visit_attribute(it) };
1164 _visitor.visit_visibility(& _i . vis);
1165 _visitor.visit_ident(& _i . ident);
1166 _visitor.visit_fn_decl(& * _i . decl);
1167 tokens_helper(_visitor, &(& _i . semi_token).0);
1168 }
1169 # [ cfg ( feature = "full" ) ]
1170 pub fn visit_foreign_item_static<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemStatic) {
1171 for it in & _i . attrs { _visitor.visit_attribute(it) };
1172 _visitor.visit_visibility(& _i . vis);
1173 tokens_helper(_visitor, &(& _i . static_token).0);
1174 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
1175 _visitor.visit_ident(& _i . ident);
1176 tokens_helper(_visitor, &(& _i . colon_token).0);
1177 _visitor.visit_type(& * _i . ty);
1178 tokens_helper(_visitor, &(& _i . semi_token).0);
1179 }
1180 # [ cfg ( feature = "full" ) ]
1181 pub fn visit_foreign_item_type<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemType) {
1182 for it in & _i . attrs { _visitor.visit_attribute(it) };
1183 _visitor.visit_visibility(& _i . vis);
1184 tokens_helper(_visitor, &(& _i . type_token).0);
1185 _visitor.visit_ident(& _i . ident);
1186 tokens_helper(_visitor, &(& _i . semi_token).0);
1187 }
1188 # [ cfg ( feature = "full" ) ]
1189 pub fn visit_foreign_item_verbatim<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItemVerbatim) {
1190 // Skipped field _i . tts;
1191 }
1192 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1193 pub fn visit_generic_argument<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast GenericArgument) {
1194 match *_i {
1195 GenericArgument::Lifetime(ref _binding_0, ) => {
1196 _visitor.visit_lifetime(_binding_0);
1197 }
1198 GenericArgument::Type(ref _binding_0, ) => {
1199 _visitor.visit_type(_binding_0);
1200 }
1201 GenericArgument::Binding(ref _binding_0, ) => {
1202 _visitor.visit_binding(_binding_0);
1203 }
1204 GenericArgument::Const(ref _binding_0, ) => {
1205 _visitor.visit_expr(_binding_0);
1206 }
1207 }
1208 }
1209 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
1210 pub fn visit_generic_method_argument<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast GenericMethodArgument) {
1211 match *_i {
1212 GenericMethodArgument::Type(ref _binding_0, ) => {
1213 _visitor.visit_type(_binding_0);
1214 }
1215 GenericMethodArgument::Const(ref _binding_0, ) => {
1216 _visitor.visit_expr(_binding_0);
1217 }
1218 }
1219 }
1220 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1221 pub fn visit_generic_param<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast GenericParam) {
1222 match *_i {
1223 GenericParam::Type(ref _binding_0, ) => {
1224 _visitor.visit_type_param(_binding_0);
1225 }
1226 GenericParam::Lifetime(ref _binding_0, ) => {
1227 _visitor.visit_lifetime_def(_binding_0);
1228 }
1229 GenericParam::Const(ref _binding_0, ) => {
1230 _visitor.visit_const_param(_binding_0);
1231 }
1232 }
1233 }
1234 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1235 pub fn visit_generics<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Generics) {
1236 if let Some(ref it) = _i . lt_token { tokens_helper(_visitor, &(it).0) };
1237 for el in Punctuated::pairs(& _i . params) { let it = el.value(); _visitor.visit_generic_param(it) };
1238 if let Some(ref it) = _i . gt_token { tokens_helper(_visitor, &(it).0) };
1239 if let Some(ref it) = _i . where_clause { _visitor.visit_where_clause(it) };
1240 }
1241
1242 pub fn visit_ident<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Ident) {
1243 // Skipped field _i . term;
1244 _visitor.visit_span(& _i . span);
1245 }
1246 # [ cfg ( feature = "full" ) ]
1247 pub fn visit_impl_item<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItem) {
1248 match *_i {
1249 ImplItem::Const(ref _binding_0, ) => {
1250 _visitor.visit_impl_item_const(_binding_0);
1251 }
1252 ImplItem::Method(ref _binding_0, ) => {
1253 _visitor.visit_impl_item_method(_binding_0);
1254 }
1255 ImplItem::Type(ref _binding_0, ) => {
1256 _visitor.visit_impl_item_type(_binding_0);
1257 }
1258 ImplItem::Macro(ref _binding_0, ) => {
1259 _visitor.visit_impl_item_macro(_binding_0);
1260 }
1261 ImplItem::Verbatim(ref _binding_0, ) => {
1262 _visitor.visit_impl_item_verbatim(_binding_0);
1263 }
1264 }
1265 }
1266 # [ cfg ( feature = "full" ) ]
1267 pub fn visit_impl_item_const<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemConst) {
1268 for it in & _i . attrs { _visitor.visit_attribute(it) };
1269 _visitor.visit_visibility(& _i . vis);
1270 if let Some(ref it) = _i . defaultness { tokens_helper(_visitor, &(it).0) };
1271 tokens_helper(_visitor, &(& _i . const_token).0);
1272 _visitor.visit_ident(& _i . ident);
1273 tokens_helper(_visitor, &(& _i . colon_token).0);
1274 _visitor.visit_type(& _i . ty);
1275 tokens_helper(_visitor, &(& _i . eq_token).0);
1276 _visitor.visit_expr(& _i . expr);
1277 tokens_helper(_visitor, &(& _i . semi_token).0);
1278 }
1279 # [ cfg ( feature = "full" ) ]
1280 pub fn visit_impl_item_macro<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemMacro) {
1281 for it in & _i . attrs { _visitor.visit_attribute(it) };
1282 _visitor.visit_macro(& _i . mac);
1283 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
1284 }
1285 # [ cfg ( feature = "full" ) ]
1286 pub fn visit_impl_item_method<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemMethod) {
1287 for it in & _i . attrs { _visitor.visit_attribute(it) };
1288 _visitor.visit_visibility(& _i . vis);
1289 if let Some(ref it) = _i . defaultness { tokens_helper(_visitor, &(it).0) };
1290 _visitor.visit_method_sig(& _i . sig);
1291 _visitor.visit_block(& _i . block);
1292 }
1293 # [ cfg ( feature = "full" ) ]
1294 pub fn visit_impl_item_type<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemType) {
1295 for it in & _i . attrs { _visitor.visit_attribute(it) };
1296 _visitor.visit_visibility(& _i . vis);
1297 if let Some(ref it) = _i . defaultness { tokens_helper(_visitor, &(it).0) };
1298 tokens_helper(_visitor, &(& _i . type_token).0);
1299 _visitor.visit_ident(& _i . ident);
1300 _visitor.visit_generics(& _i . generics);
1301 tokens_helper(_visitor, &(& _i . eq_token).0);
1302 _visitor.visit_type(& _i . ty);
1303 tokens_helper(_visitor, &(& _i . semi_token).0);
1304 }
1305 # [ cfg ( feature = "full" ) ]
1306 pub fn visit_impl_item_verbatim<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItemVerbatim) {
1307 // Skipped field _i . tts;
1308 }
1309 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1310 pub fn visit_index<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Index) {
1311 // Skipped field _i . index;
1312 _visitor.visit_span(& _i . span);
1313 }
1314 # [ cfg ( feature = "full" ) ]
1315 pub fn visit_item<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Item) {
1316 match *_i {
1317 Item::ExternCrate(ref _binding_0, ) => {
1318 _visitor.visit_item_extern_crate(_binding_0);
1319 }
1320 Item::Use(ref _binding_0, ) => {
1321 _visitor.visit_item_use(_binding_0);
1322 }
1323 Item::Static(ref _binding_0, ) => {
1324 _visitor.visit_item_static(_binding_0);
1325 }
1326 Item::Const(ref _binding_0, ) => {
1327 _visitor.visit_item_const(_binding_0);
1328 }
1329 Item::Fn(ref _binding_0, ) => {
1330 _visitor.visit_item_fn(_binding_0);
1331 }
1332 Item::Mod(ref _binding_0, ) => {
1333 _visitor.visit_item_mod(_binding_0);
1334 }
1335 Item::ForeignMod(ref _binding_0, ) => {
1336 _visitor.visit_item_foreign_mod(_binding_0);
1337 }
1338 Item::Type(ref _binding_0, ) => {
1339 _visitor.visit_item_type(_binding_0);
1340 }
1341 Item::Struct(ref _binding_0, ) => {
1342 _visitor.visit_item_struct(_binding_0);
1343 }
1344 Item::Enum(ref _binding_0, ) => {
1345 _visitor.visit_item_enum(_binding_0);
1346 }
1347 Item::Union(ref _binding_0, ) => {
1348 _visitor.visit_item_union(_binding_0);
1349 }
1350 Item::Trait(ref _binding_0, ) => {
1351 _visitor.visit_item_trait(_binding_0);
1352 }
1353 Item::Impl(ref _binding_0, ) => {
1354 _visitor.visit_item_impl(_binding_0);
1355 }
1356 Item::Macro(ref _binding_0, ) => {
1357 _visitor.visit_item_macro(_binding_0);
1358 }
1359 Item::Macro2(ref _binding_0, ) => {
1360 _visitor.visit_item_macro2(_binding_0);
1361 }
1362 Item::Verbatim(ref _binding_0, ) => {
1363 _visitor.visit_item_verbatim(_binding_0);
1364 }
1365 }
1366 }
1367 # [ cfg ( feature = "full" ) ]
1368 pub fn visit_item_const<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemConst) {
1369 for it in & _i . attrs { _visitor.visit_attribute(it) };
1370 _visitor.visit_visibility(& _i . vis);
1371 tokens_helper(_visitor, &(& _i . const_token).0);
1372 _visitor.visit_ident(& _i . ident);
1373 tokens_helper(_visitor, &(& _i . colon_token).0);
1374 _visitor.visit_type(& * _i . ty);
1375 tokens_helper(_visitor, &(& _i . eq_token).0);
1376 _visitor.visit_expr(& * _i . expr);
1377 tokens_helper(_visitor, &(& _i . semi_token).0);
1378 }
1379 # [ cfg ( feature = "full" ) ]
1380 pub fn visit_item_enum<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemEnum) {
1381 for it in & _i . attrs { _visitor.visit_attribute(it) };
1382 _visitor.visit_visibility(& _i . vis);
1383 tokens_helper(_visitor, &(& _i . enum_token).0);
1384 _visitor.visit_ident(& _i . ident);
1385 _visitor.visit_generics(& _i . generics);
1386 tokens_helper(_visitor, &(& _i . brace_token).0);
1387 for el in Punctuated::pairs(& _i . variants) { let it = el.value(); _visitor.visit_variant(it) };
1388 }
1389 # [ cfg ( feature = "full" ) ]
1390 pub fn visit_item_extern_crate<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemExternCrate) {
1391 for it in & _i . attrs { _visitor.visit_attribute(it) };
1392 _visitor.visit_visibility(& _i . vis);
1393 tokens_helper(_visitor, &(& _i . extern_token).0);
1394 tokens_helper(_visitor, &(& _i . crate_token).0);
1395 _visitor.visit_ident(& _i . ident);
1396 if let Some(ref it) = _i . rename {
1397 tokens_helper(_visitor, &(& ( it ) . 0).0);
1398 _visitor.visit_ident(& ( it ) . 1);
1399 };
1400 tokens_helper(_visitor, &(& _i . semi_token).0);
1401 }
1402 # [ cfg ( feature = "full" ) ]
1403 pub fn visit_item_fn<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemFn) {
1404 for it in & _i . attrs { _visitor.visit_attribute(it) };
1405 _visitor.visit_visibility(& _i . vis);
1406 if let Some(ref it) = _i . constness { tokens_helper(_visitor, &(it).0) };
1407 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
1408 if let Some(ref it) = _i . abi { _visitor.visit_abi(it) };
1409 _visitor.visit_ident(& _i . ident);
1410 _visitor.visit_fn_decl(& * _i . decl);
1411 _visitor.visit_block(& * _i . block);
1412 }
1413 # [ cfg ( feature = "full" ) ]
1414 pub fn visit_item_foreign_mod<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemForeignMod) {
1415 for it in & _i . attrs { _visitor.visit_attribute(it) };
1416 _visitor.visit_abi(& _i . abi);
1417 tokens_helper(_visitor, &(& _i . brace_token).0);
1418 for it in & _i . items { _visitor.visit_foreign_item(it) };
1419 }
1420 # [ cfg ( feature = "full" ) ]
1421 pub fn visit_item_impl<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemImpl) {
1422 for it in & _i . attrs { _visitor.visit_attribute(it) };
1423 if let Some(ref it) = _i . defaultness { tokens_helper(_visitor, &(it).0) };
1424 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
1425 tokens_helper(_visitor, &(& _i . impl_token).0);
1426 _visitor.visit_generics(& _i . generics);
1427 if let Some(ref it) = _i . trait_ {
1428 if let Some(ref it) = ( it ) . 0 { tokens_helper(_visitor, &(it).0) };
1429 _visitor.visit_path(& ( it ) . 1);
1430 tokens_helper(_visitor, &(& ( it ) . 2).0);
1431 };
1432 _visitor.visit_type(& * _i . self_ty);
1433 tokens_helper(_visitor, &(& _i . brace_token).0);
1434 for it in & _i . items { _visitor.visit_impl_item(it) };
1435 }
1436 # [ cfg ( feature = "full" ) ]
1437 pub fn visit_item_macro<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMacro) {
1438 for it in & _i . attrs { _visitor.visit_attribute(it) };
1439 if let Some(ref it) = _i . ident { _visitor.visit_ident(it) };
1440 _visitor.visit_macro(& _i . mac);
1441 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
1442 }
1443 # [ cfg ( feature = "full" ) ]
1444 pub fn visit_item_macro2<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMacro2) {
1445 for it in & _i . attrs { _visitor.visit_attribute(it) };
1446 _visitor.visit_visibility(& _i . vis);
1447 tokens_helper(_visitor, &(& _i . macro_token).0);
1448 _visitor.visit_ident(& _i . ident);
1449 tokens_helper(_visitor, &(& _i . paren_token).0);
1450 // Skipped field _i . args;
1451 tokens_helper(_visitor, &(& _i . brace_token).0);
1452 // Skipped field _i . body;
1453 }
1454 # [ cfg ( feature = "full" ) ]
1455 pub fn visit_item_mod<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMod) {
1456 for it in & _i . attrs { _visitor.visit_attribute(it) };
1457 _visitor.visit_visibility(& _i . vis);
1458 tokens_helper(_visitor, &(& _i . mod_token).0);
1459 _visitor.visit_ident(& _i . ident);
1460 if let Some(ref it) = _i . content {
1461 tokens_helper(_visitor, &(& ( it ) . 0).0);
1462 for it in & ( it ) . 1 { _visitor.visit_item(it) };
1463 };
1464 if let Some(ref it) = _i . semi { tokens_helper(_visitor, &(it).0) };
1465 }
1466 # [ cfg ( feature = "full" ) ]
1467 pub fn visit_item_static<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemStatic) {
1468 for it in & _i . attrs { _visitor.visit_attribute(it) };
1469 _visitor.visit_visibility(& _i . vis);
1470 tokens_helper(_visitor, &(& _i . static_token).0);
1471 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
1472 _visitor.visit_ident(& _i . ident);
1473 tokens_helper(_visitor, &(& _i . colon_token).0);
1474 _visitor.visit_type(& * _i . ty);
1475 tokens_helper(_visitor, &(& _i . eq_token).0);
1476 _visitor.visit_expr(& * _i . expr);
1477 tokens_helper(_visitor, &(& _i . semi_token).0);
1478 }
1479 # [ cfg ( feature = "full" ) ]
1480 pub fn visit_item_struct<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemStruct) {
1481 for it in & _i . attrs { _visitor.visit_attribute(it) };
1482 _visitor.visit_visibility(& _i . vis);
1483 tokens_helper(_visitor, &(& _i . struct_token).0);
1484 _visitor.visit_ident(& _i . ident);
1485 _visitor.visit_generics(& _i . generics);
1486 _visitor.visit_fields(& _i . fields);
1487 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
1488 }
1489 # [ cfg ( feature = "full" ) ]
1490 pub fn visit_item_trait<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemTrait) {
1491 for it in & _i . attrs { _visitor.visit_attribute(it) };
1492 _visitor.visit_visibility(& _i . vis);
1493 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
1494 if let Some(ref it) = _i . auto_token { tokens_helper(_visitor, &(it).0) };
1495 tokens_helper(_visitor, &(& _i . trait_token).0);
1496 _visitor.visit_ident(& _i . ident);
1497 _visitor.visit_generics(& _i . generics);
1498 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
1499 for el in Punctuated::pairs(& _i . supertraits) { let it = el.value(); _visitor.visit_type_param_bound(it) };
1500 tokens_helper(_visitor, &(& _i . brace_token).0);
1501 for it in & _i . items { _visitor.visit_trait_item(it) };
1502 }
1503 # [ cfg ( feature = "full" ) ]
1504 pub fn visit_item_type<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemType) {
1505 for it in & _i . attrs { _visitor.visit_attribute(it) };
1506 _visitor.visit_visibility(& _i . vis);
1507 tokens_helper(_visitor, &(& _i . type_token).0);
1508 _visitor.visit_ident(& _i . ident);
1509 _visitor.visit_generics(& _i . generics);
1510 tokens_helper(_visitor, &(& _i . eq_token).0);
1511 _visitor.visit_type(& * _i . ty);
1512 tokens_helper(_visitor, &(& _i . semi_token).0);
1513 }
1514 # [ cfg ( feature = "full" ) ]
1515 pub fn visit_item_union<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemUnion) {
1516 for it in & _i . attrs { _visitor.visit_attribute(it) };
1517 _visitor.visit_visibility(& _i . vis);
1518 tokens_helper(_visitor, &(& _i . union_token).0);
1519 _visitor.visit_ident(& _i . ident);
1520 _visitor.visit_generics(& _i . generics);
1521 _visitor.visit_fields_named(& _i . fields);
1522 }
1523 # [ cfg ( feature = "full" ) ]
1524 pub fn visit_item_use<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemUse) {
1525 for it in & _i . attrs { _visitor.visit_attribute(it) };
1526 _visitor.visit_visibility(& _i . vis);
1527 tokens_helper(_visitor, &(& _i . use_token).0);
1528 if let Some(ref it) = _i . leading_colon { tokens_helper(_visitor, &(it).0) };
1529 for el in Punctuated::pairs(& _i . prefix) { let it = el.value(); _visitor.visit_ident(it) };
1530 _visitor.visit_use_tree(& _i . tree);
1531 tokens_helper(_visitor, &(& _i . semi_token).0);
1532 }
1533 # [ cfg ( feature = "full" ) ]
1534 pub fn visit_item_verbatim<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemVerbatim) {
1535 // Skipped field _i . tts;
1536 }
1537 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
1538 pub fn visit_label<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Label) {
1539 _visitor.visit_lifetime(& _i . name);
1540 tokens_helper(_visitor, &(& _i . colon_token).0);
1541 }
1542 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1543 pub fn visit_lifetime<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Lifetime) {
1544 // Skipped field _i . term;
1545 _visitor.visit_span(& _i . span);
1546 }
1547 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1548 pub fn visit_lifetime_def<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LifetimeDef) {
1549 for it in & _i . attrs { _visitor.visit_attribute(it) };
1550 _visitor.visit_lifetime(& _i . lifetime);
1551 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
1552 for el in Punctuated::pairs(& _i . bounds) { let it = el.value(); _visitor.visit_lifetime(it) };
1553 }
1554 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1555 pub fn visit_lit<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Lit) {
1556 match *_i {
1557 Lit::Str(ref _binding_0, ) => {
1558 _visitor.visit_lit_str(_binding_0);
1559 }
1560 Lit::ByteStr(ref _binding_0, ) => {
1561 _visitor.visit_lit_byte_str(_binding_0);
1562 }
1563 Lit::Byte(ref _binding_0, ) => {
1564 _visitor.visit_lit_byte(_binding_0);
1565 }
1566 Lit::Char(ref _binding_0, ) => {
1567 _visitor.visit_lit_char(_binding_0);
1568 }
1569 Lit::Int(ref _binding_0, ) => {
1570 _visitor.visit_lit_int(_binding_0);
1571 }
1572 Lit::Float(ref _binding_0, ) => {
1573 _visitor.visit_lit_float(_binding_0);
1574 }
1575 Lit::Bool(ref _binding_0, ) => {
1576 _visitor.visit_lit_bool(_binding_0);
1577 }
1578 Lit::Verbatim(ref _binding_0, ) => {
1579 _visitor.visit_lit_verbatim(_binding_0);
1580 }
1581 }
1582 }
1583 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1584 pub fn visit_lit_bool<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitBool) {
1585 // Skipped field _i . value;
1586 _visitor.visit_span(& _i . span);
1587 }
1588 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1589 pub fn visit_lit_byte<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitByte) {
1590 // Skipped field _i . token;
1591 _visitor.visit_span(& _i . span);
1592 }
1593 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1594 pub fn visit_lit_byte_str<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitByteStr) {
1595 // Skipped field _i . token;
1596 _visitor.visit_span(& _i . span);
1597 }
1598 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1599 pub fn visit_lit_char<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitChar) {
1600 // Skipped field _i . token;
1601 _visitor.visit_span(& _i . span);
1602 }
1603 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1604 pub fn visit_lit_float<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitFloat) {
1605 // Skipped field _i . token;
1606 _visitor.visit_span(& _i . span);
1607 }
1608 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1609 pub fn visit_lit_int<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitInt) {
1610 // Skipped field _i . token;
1611 _visitor.visit_span(& _i . span);
1612 }
1613 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1614 pub fn visit_lit_str<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitStr) {
1615 // Skipped field _i . token;
1616 _visitor.visit_span(& _i . span);
1617 }
1618 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1619 pub fn visit_lit_verbatim<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitVerbatim) {
1620 // Skipped field _i . token;
1621 _visitor.visit_span(& _i . span);
1622 }
1623 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
1624 pub fn visit_local<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Local) {
1625 for it in & _i . attrs { _visitor.visit_attribute(it) };
1626 tokens_helper(_visitor, &(& _i . let_token).0);
1627 _visitor.visit_pat(& * _i . pat);
1628 if let Some(ref it) = _i . ty {
1629 tokens_helper(_visitor, &(& ( it ) . 0).0);
1630 _visitor.visit_type(& * ( it ) . 1);
1631 };
1632 if let Some(ref it) = _i . init {
1633 tokens_helper(_visitor, &(& ( it ) . 0).0);
1634 _visitor.visit_expr(& * ( it ) . 1);
1635 };
1636 tokens_helper(_visitor, &(& _i . semi_token).0);
1637 }
1638 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1639 pub fn visit_macro<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Macro) {
1640 _visitor.visit_path(& _i . path);
1641 tokens_helper(_visitor, &(& _i . bang_token).0);
1642 _visitor.visit_macro_delimiter(& _i . delimiter);
1643 // Skipped field _i . tts;
1644 }
1645 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1646 pub fn visit_macro_delimiter<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MacroDelimiter) {
1647 match *_i {
1648 MacroDelimiter::Paren(ref _binding_0, ) => {
1649 tokens_helper(_visitor, &(_binding_0).0);
1650 }
1651 MacroDelimiter::Brace(ref _binding_0, ) => {
1652 tokens_helper(_visitor, &(_binding_0).0);
1653 }
1654 MacroDelimiter::Bracket(ref _binding_0, ) => {
1655 tokens_helper(_visitor, &(_binding_0).0);
1656 }
1657 }
1658 }
1659 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1660 pub fn visit_member<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Member) {
1661 match *_i {
1662 Member::Named(ref _binding_0, ) => {
1663 _visitor.visit_ident(_binding_0);
1664 }
1665 Member::Unnamed(ref _binding_0, ) => {
1666 _visitor.visit_index(_binding_0);
1667 }
1668 }
1669 }
1670 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1671 pub fn visit_meta<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Meta) {
1672 match *_i {
1673 Meta::Word(ref _binding_0, ) => {
1674 _visitor.visit_ident(_binding_0);
1675 }
1676 Meta::List(ref _binding_0, ) => {
1677 _visitor.visit_meta_list(_binding_0);
1678 }
1679 Meta::NameValue(ref _binding_0, ) => {
1680 _visitor.visit_meta_name_value(_binding_0);
1681 }
1682 }
1683 }
1684 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1685 pub fn visit_meta_list<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MetaList) {
1686 _visitor.visit_ident(& _i . ident);
1687 tokens_helper(_visitor, &(& _i . paren_token).0);
1688 for el in Punctuated::pairs(& _i . nested) { let it = el.value(); _visitor.visit_nested_meta(it) };
1689 }
1690 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1691 pub fn visit_meta_name_value<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MetaNameValue) {
1692 _visitor.visit_ident(& _i . ident);
1693 tokens_helper(_visitor, &(& _i . eq_token).0);
1694 _visitor.visit_lit(& _i . lit);
1695 }
1696 # [ cfg ( feature = "full" ) ]
1697 pub fn visit_method_sig<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MethodSig) {
1698 if let Some(ref it) = _i . constness { tokens_helper(_visitor, &(it).0) };
1699 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
1700 if let Some(ref it) = _i . abi { _visitor.visit_abi(it) };
1701 _visitor.visit_ident(& _i . ident);
1702 _visitor.visit_fn_decl(& _i . decl);
1703 }
1704 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
1705 pub fn visit_method_turbofish<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MethodTurbofish) {
1706 tokens_helper(_visitor, &(& _i . colon2_token).0);
1707 tokens_helper(_visitor, &(& _i . lt_token).0);
1708 for el in Punctuated::pairs(& _i . args) { let it = el.value(); _visitor.visit_generic_method_argument(it) };
1709 tokens_helper(_visitor, &(& _i . gt_token).0);
1710 }
1711 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1712 pub fn visit_nested_meta<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast NestedMeta) {
1713 match *_i {
1714 NestedMeta::Meta(ref _binding_0, ) => {
1715 _visitor.visit_meta(_binding_0);
1716 }
1717 NestedMeta::Literal(ref _binding_0, ) => {
1718 _visitor.visit_lit(_binding_0);
1719 }
1720 }
1721 }
1722 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1723 pub fn visit_parenthesized_generic_arguments<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ParenthesizedGenericArguments) {
1724 tokens_helper(_visitor, &(& _i . paren_token).0);
1725 for el in Punctuated::pairs(& _i . inputs) { let it = el.value(); _visitor.visit_type(it) };
1726 _visitor.visit_return_type(& _i . output);
1727 }
1728 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
1729 pub fn visit_pat<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Pat) {
1730 match *_i {
1731 Pat::Wild(ref _binding_0, ) => {
1732 _visitor.visit_pat_wild(_binding_0);
1733 }
1734 Pat::Ident(ref _binding_0, ) => {
1735 _visitor.visit_pat_ident(_binding_0);
1736 }
1737 Pat::Struct(ref _binding_0, ) => {
1738 _visitor.visit_pat_struct(_binding_0);
1739 }
1740 Pat::TupleStruct(ref _binding_0, ) => {
1741 _visitor.visit_pat_tuple_struct(_binding_0);
1742 }
1743 Pat::Path(ref _binding_0, ) => {
1744 _visitor.visit_pat_path(_binding_0);
1745 }
1746 Pat::Tuple(ref _binding_0, ) => {
1747 _visitor.visit_pat_tuple(_binding_0);
1748 }
1749 Pat::Box(ref _binding_0, ) => {
1750 _visitor.visit_pat_box(_binding_0);
1751 }
1752 Pat::Ref(ref _binding_0, ) => {
1753 _visitor.visit_pat_ref(_binding_0);
1754 }
1755 Pat::Lit(ref _binding_0, ) => {
1756 _visitor.visit_pat_lit(_binding_0);
1757 }
1758 Pat::Range(ref _binding_0, ) => {
1759 _visitor.visit_pat_range(_binding_0);
1760 }
1761 Pat::Slice(ref _binding_0, ) => {
1762 _visitor.visit_pat_slice(_binding_0);
1763 }
1764 Pat::Macro(ref _binding_0, ) => {
1765 _visitor.visit_pat_macro(_binding_0);
1766 }
1767 Pat::Verbatim(ref _binding_0, ) => {
1768 _visitor.visit_pat_verbatim(_binding_0);
1769 }
1770 }
1771 }
1772 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
1773 pub fn visit_pat_box<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatBox) {
1774 tokens_helper(_visitor, &(& _i . box_token).0);
1775 _visitor.visit_pat(& * _i . pat);
1776 }
1777 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
1778 pub fn visit_pat_ident<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatIdent) {
1779 if let Some(ref it) = _i . by_ref { tokens_helper(_visitor, &(it).0) };
1780 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
1781 _visitor.visit_ident(& _i . ident);
1782 if let Some(ref it) = _i . subpat {
1783 tokens_helper(_visitor, &(& ( it ) . 0).0);
1784 _visitor.visit_pat(& * ( it ) . 1);
1785 };
1786 }
1787 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
1788 pub fn visit_pat_lit<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatLit) {
1789 _visitor.visit_expr(& * _i . expr);
1790 }
1791 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
1792 pub fn visit_pat_macro<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatMacro) {
1793 _visitor.visit_macro(& _i . mac);
1794 }
1795 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
1796 pub fn visit_pat_path<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatPath) {
1797 if let Some(ref it) = _i . qself { _visitor.visit_qself(it) };
1798 _visitor.visit_path(& _i . path);
1799 }
1800 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
1801 pub fn visit_pat_range<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatRange) {
1802 _visitor.visit_expr(& * _i . lo);
1803 _visitor.visit_range_limits(& _i . limits);
1804 _visitor.visit_expr(& * _i . hi);
1805 }
1806 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
1807 pub fn visit_pat_ref<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatRef) {
1808 tokens_helper(_visitor, &(& _i . and_token).0);
1809 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
1810 _visitor.visit_pat(& * _i . pat);
1811 }
1812 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
1813 pub fn visit_pat_slice<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatSlice) {
1814 tokens_helper(_visitor, &(& _i . bracket_token).0);
1815 for el in Punctuated::pairs(& _i . front) { let it = el.value(); _visitor.visit_pat(it) };
1816 if let Some(ref it) = _i . middle { _visitor.visit_pat(& * * it) };
1817 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
1818 if let Some(ref it) = _i . comma_token { tokens_helper(_visitor, &(it).0) };
1819 for el in Punctuated::pairs(& _i . back) { let it = el.value(); _visitor.visit_pat(it) };
1820 }
1821 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
1822 pub fn visit_pat_struct<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatStruct) {
1823 _visitor.visit_path(& _i . path);
1824 tokens_helper(_visitor, &(& _i . brace_token).0);
1825 for el in Punctuated::pairs(& _i . fields) { let it = el.value(); _visitor.visit_field_pat(it) };
1826 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
1827 }
1828 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
1829 pub fn visit_pat_tuple<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatTuple) {
1830 tokens_helper(_visitor, &(& _i . paren_token).0);
1831 for el in Punctuated::pairs(& _i . front) { let it = el.value(); _visitor.visit_pat(it) };
1832 if let Some(ref it) = _i . dot2_token { tokens_helper(_visitor, &(it).0) };
1833 if let Some(ref it) = _i . comma_token { tokens_helper(_visitor, &(it).0) };
1834 for el in Punctuated::pairs(& _i . back) { let it = el.value(); _visitor.visit_pat(it) };
1835 }
1836 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
1837 pub fn visit_pat_tuple_struct<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatTupleStruct) {
1838 _visitor.visit_path(& _i . path);
1839 _visitor.visit_pat_tuple(& _i . pat);
1840 }
1841 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
1842 pub fn visit_pat_verbatim<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatVerbatim) {
1843 // Skipped field _i . tts;
1844 }
1845 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
1846 pub fn visit_pat_wild<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatWild) {
1847 tokens_helper(_visitor, &(& _i . underscore_token).0);
1848 }
1849 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1850 pub fn visit_path<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Path) {
1851 if let Some(ref it) = _i . leading_colon { tokens_helper(_visitor, &(it).0) };
1852 for el in Punctuated::pairs(& _i . segments) { let it = el.value(); _visitor.visit_path_segment(it) };
1853 }
1854 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1855 pub fn visit_path_arguments<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PathArguments) {
1856 match *_i {
1857 PathArguments::None => { }
1858 PathArguments::AngleBracketed(ref _binding_0, ) => {
1859 _visitor.visit_angle_bracketed_generic_arguments(_binding_0);
1860 }
1861 PathArguments::Parenthesized(ref _binding_0, ) => {
1862 _visitor.visit_parenthesized_generic_arguments(_binding_0);
1863 }
1864 }
1865 }
1866 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1867 pub fn visit_path_segment<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PathSegment) {
1868 _visitor.visit_ident(& _i . ident);
1869 _visitor.visit_path_arguments(& _i . arguments);
1870 }
1871 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1872 pub fn visit_predicate_eq<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PredicateEq) {
1873 _visitor.visit_type(& _i . lhs_ty);
1874 tokens_helper(_visitor, &(& _i . eq_token).0);
1875 _visitor.visit_type(& _i . rhs_ty);
1876 }
1877 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1878 pub fn visit_predicate_lifetime<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PredicateLifetime) {
1879 _visitor.visit_lifetime(& _i . lifetime);
1880 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
1881 for el in Punctuated::pairs(& _i . bounds) { let it = el.value(); _visitor.visit_lifetime(it) };
1882 }
1883 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1884 pub fn visit_predicate_type<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PredicateType) {
1885 if let Some(ref it) = _i . lifetimes { _visitor.visit_bound_lifetimes(it) };
1886 _visitor.visit_type(& _i . bounded_ty);
1887 tokens_helper(_visitor, &(& _i . colon_token).0);
1888 for el in Punctuated::pairs(& _i . bounds) { let it = el.value(); _visitor.visit_type_param_bound(it) };
1889 }
1890 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1891 pub fn visit_qself<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast QSelf) {
1892 tokens_helper(_visitor, &(& _i . lt_token).0);
1893 _visitor.visit_type(& * _i . ty);
1894 // Skipped field _i . position;
1895 if let Some(ref it) = _i . as_token { tokens_helper(_visitor, &(it).0) };
1896 tokens_helper(_visitor, &(& _i . gt_token).0);
1897 }
1898 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
1899 pub fn visit_range_limits<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast RangeLimits) {
1900 match *_i {
1901 RangeLimits::HalfOpen(ref _binding_0, ) => {
1902 tokens_helper(_visitor, &(_binding_0).0);
1903 }
1904 RangeLimits::Closed(ref _binding_0, ) => {
1905 tokens_helper(_visitor, &(_binding_0).0);
1906 }
1907 }
1908 }
1909 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1910 pub fn visit_return_type<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ReturnType) {
1911 match *_i {
1912 ReturnType::Default => { }
1913 ReturnType::Type(ref _binding_0, ref _binding_1, ) => {
1914 tokens_helper(_visitor, &(_binding_0).0);
1915 _visitor.visit_type(& * * _binding_1);
1916 }
1917 }
1918 }
1919
1920 pub fn visit_span<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Span) {
1921 }
1922 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ] # [ cfg ( feature = "full" ) ]
1923 pub fn visit_stmt<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Stmt) {
1924 match *_i {
1925 Stmt::Local(ref _binding_0, ) => {
1926 _visitor.visit_local(_binding_0);
1927 }
1928 Stmt::Item(ref _binding_0, ) => {
1929 _visitor.visit_item(_binding_0);
1930 }
1931 Stmt::Expr(ref _binding_0, ) => {
1932 _visitor.visit_expr(_binding_0);
1933 }
1934 Stmt::Semi(ref _binding_0, ref _binding_1, ) => {
1935 _visitor.visit_expr(_binding_0);
1936 tokens_helper(_visitor, &(_binding_1).0);
1937 }
1938 }
1939 }
1940 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1941 pub fn visit_trait_bound<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitBound) {
1942 _visitor.visit_trait_bound_modifier(& _i . modifier);
1943 if let Some(ref it) = _i . lifetimes { _visitor.visit_bound_lifetimes(it) };
1944 _visitor.visit_path(& _i . path);
1945 }
1946 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
1947 pub fn visit_trait_bound_modifier<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitBoundModifier) {
1948 match *_i {
1949 TraitBoundModifier::None => { }
1950 TraitBoundModifier::Maybe(ref _binding_0, ) => {
1951 tokens_helper(_visitor, &(_binding_0).0);
1952 }
1953 }
1954 }
1955 # [ cfg ( feature = "full" ) ]
1956 pub fn visit_trait_item<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItem) {
1957 match *_i {
1958 TraitItem::Const(ref _binding_0, ) => {
1959 _visitor.visit_trait_item_const(_binding_0);
1960 }
1961 TraitItem::Method(ref _binding_0, ) => {
1962 _visitor.visit_trait_item_method(_binding_0);
1963 }
1964 TraitItem::Type(ref _binding_0, ) => {
1965 _visitor.visit_trait_item_type(_binding_0);
1966 }
1967 TraitItem::Macro(ref _binding_0, ) => {
1968 _visitor.visit_trait_item_macro(_binding_0);
1969 }
1970 TraitItem::Verbatim(ref _binding_0, ) => {
1971 _visitor.visit_trait_item_verbatim(_binding_0);
1972 }
1973 }
1974 }
1975 # [ cfg ( feature = "full" ) ]
1976 pub fn visit_trait_item_const<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemConst) {
1977 for it in & _i . attrs { _visitor.visit_attribute(it) };
1978 tokens_helper(_visitor, &(& _i . const_token).0);
1979 _visitor.visit_ident(& _i . ident);
1980 tokens_helper(_visitor, &(& _i . colon_token).0);
1981 _visitor.visit_type(& _i . ty);
1982 if let Some(ref it) = _i . default {
1983 tokens_helper(_visitor, &(& ( it ) . 0).0);
1984 _visitor.visit_expr(& ( it ) . 1);
1985 };
1986 tokens_helper(_visitor, &(& _i . semi_token).0);
1987 }
1988 # [ cfg ( feature = "full" ) ]
1989 pub fn visit_trait_item_macro<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemMacro) {
1990 for it in & _i . attrs { _visitor.visit_attribute(it) };
1991 _visitor.visit_macro(& _i . mac);
1992 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
1993 }
1994 # [ cfg ( feature = "full" ) ]
1995 pub fn visit_trait_item_method<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemMethod) {
1996 for it in & _i . attrs { _visitor.visit_attribute(it) };
1997 _visitor.visit_method_sig(& _i . sig);
1998 if let Some(ref it) = _i . default { _visitor.visit_block(it) };
1999 if let Some(ref it) = _i . semi_token { tokens_helper(_visitor, &(it).0) };
2000 }
2001 # [ cfg ( feature = "full" ) ]
2002 pub fn visit_trait_item_type<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemType) {
2003 for it in & _i . attrs { _visitor.visit_attribute(it) };
2004 tokens_helper(_visitor, &(& _i . type_token).0);
2005 _visitor.visit_ident(& _i . ident);
2006 _visitor.visit_generics(& _i . generics);
2007 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
2008 for el in Punctuated::pairs(& _i . bounds) { let it = el.value(); _visitor.visit_type_param_bound(it) };
2009 if let Some(ref it) = _i . default {
2010 tokens_helper(_visitor, &(& ( it ) . 0).0);
2011 _visitor.visit_type(& ( it ) . 1);
2012 };
2013 tokens_helper(_visitor, &(& _i . semi_token).0);
2014 }
2015 # [ cfg ( feature = "full" ) ]
2016 pub fn visit_trait_item_verbatim<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItemVerbatim) {
2017 // Skipped field _i . tts;
2018 }
2019 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2020 pub fn visit_type<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Type) {
2021 match *_i {
2022 Type::Slice(ref _binding_0, ) => {
2023 _visitor.visit_type_slice(_binding_0);
2024 }
2025 Type::Array(ref _binding_0, ) => {
2026 _visitor.visit_type_array(_binding_0);
2027 }
2028 Type::Ptr(ref _binding_0, ) => {
2029 _visitor.visit_type_ptr(_binding_0);
2030 }
2031 Type::Reference(ref _binding_0, ) => {
2032 _visitor.visit_type_reference(_binding_0);
2033 }
2034 Type::BareFn(ref _binding_0, ) => {
2035 _visitor.visit_type_bare_fn(_binding_0);
2036 }
2037 Type::Never(ref _binding_0, ) => {
2038 _visitor.visit_type_never(_binding_0);
2039 }
2040 Type::Tuple(ref _binding_0, ) => {
2041 _visitor.visit_type_tuple(_binding_0);
2042 }
2043 Type::Path(ref _binding_0, ) => {
2044 _visitor.visit_type_path(_binding_0);
2045 }
2046 Type::TraitObject(ref _binding_0, ) => {
2047 _visitor.visit_type_trait_object(_binding_0);
2048 }
2049 Type::ImplTrait(ref _binding_0, ) => {
2050 _visitor.visit_type_impl_trait(_binding_0);
2051 }
2052 Type::Paren(ref _binding_0, ) => {
2053 _visitor.visit_type_paren(_binding_0);
2054 }
2055 Type::Group(ref _binding_0, ) => {
2056 _visitor.visit_type_group(_binding_0);
2057 }
2058 Type::Infer(ref _binding_0, ) => {
2059 _visitor.visit_type_infer(_binding_0);
2060 }
2061 Type::Macro(ref _binding_0, ) => {
2062 _visitor.visit_type_macro(_binding_0);
2063 }
2064 Type::Verbatim(ref _binding_0, ) => {
2065 _visitor.visit_type_verbatim(_binding_0);
2066 }
2067 }
2068 }
2069 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2070 pub fn visit_type_array<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeArray) {
2071 tokens_helper(_visitor, &(& _i . bracket_token).0);
2072 _visitor.visit_type(& * _i . elem);
2073 tokens_helper(_visitor, &(& _i . semi_token).0);
2074 _visitor.visit_expr(& _i . len);
2075 }
2076 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2077 pub fn visit_type_bare_fn<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeBareFn) {
2078 if let Some(ref it) = _i . unsafety { tokens_helper(_visitor, &(it).0) };
2079 if let Some(ref it) = _i . abi { _visitor.visit_abi(it) };
2080 tokens_helper(_visitor, &(& _i . fn_token).0);
2081 if let Some(ref it) = _i . lifetimes { _visitor.visit_bound_lifetimes(it) };
2082 tokens_helper(_visitor, &(& _i . paren_token).0);
2083 for el in Punctuated::pairs(& _i . inputs) { let it = el.value(); _visitor.visit_bare_fn_arg(it) };
2084 if let Some(ref it) = _i . variadic { tokens_helper(_visitor, &(it).0) };
2085 _visitor.visit_return_type(& _i . output);
2086 }
2087 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2088 pub fn visit_type_group<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeGroup) {
2089 tokens_helper(_visitor, &(& _i . group_token).0);
2090 _visitor.visit_type(& * _i . elem);
2091 }
2092 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2093 pub fn visit_type_impl_trait<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeImplTrait) {
2094 tokens_helper(_visitor, &(& _i . impl_token).0);
2095 for el in Punctuated::pairs(& _i . bounds) { let it = el.value(); _visitor.visit_type_param_bound(it) };
2096 }
2097 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2098 pub fn visit_type_infer<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeInfer) {
2099 tokens_helper(_visitor, &(& _i . underscore_token).0);
2100 }
2101 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2102 pub fn visit_type_macro<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeMacro) {
2103 _visitor.visit_macro(& _i . mac);
2104 }
2105 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2106 pub fn visit_type_never<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeNever) {
2107 tokens_helper(_visitor, &(& _i . bang_token).0);
2108 }
2109 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2110 pub fn visit_type_param<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParam) {
2111 for it in & _i . attrs { _visitor.visit_attribute(it) };
2112 _visitor.visit_ident(& _i . ident);
2113 if let Some(ref it) = _i . colon_token { tokens_helper(_visitor, &(it).0) };
2114 for el in Punctuated::pairs(& _i . bounds) { let it = el.value(); _visitor.visit_type_param_bound(it) };
2115 if let Some(ref it) = _i . eq_token { tokens_helper(_visitor, &(it).0) };
2116 if let Some(ref it) = _i . default { _visitor.visit_type(it) };
2117 }
2118 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2119 pub fn visit_type_param_bound<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParamBound) {
2120 match *_i {
2121 TypeParamBound::Trait(ref _binding_0, ) => {
2122 _visitor.visit_trait_bound(_binding_0);
2123 }
2124 TypeParamBound::Lifetime(ref _binding_0, ) => {
2125 _visitor.visit_lifetime(_binding_0);
2126 }
2127 }
2128 }
2129 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2130 pub fn visit_type_paren<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParen) {
2131 tokens_helper(_visitor, &(& _i . paren_token).0);
2132 _visitor.visit_type(& * _i . elem);
2133 }
2134 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2135 pub fn visit_type_path<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypePath) {
2136 if let Some(ref it) = _i . qself { _visitor.visit_qself(it) };
2137 _visitor.visit_path(& _i . path);
2138 }
2139 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2140 pub fn visit_type_ptr<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypePtr) {
2141 tokens_helper(_visitor, &(& _i . star_token).0);
2142 if let Some(ref it) = _i . const_token { tokens_helper(_visitor, &(it).0) };
2143 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
2144 _visitor.visit_type(& * _i . elem);
2145 }
2146 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2147 pub fn visit_type_reference<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeReference) {
2148 tokens_helper(_visitor, &(& _i . and_token).0);
2149 if let Some(ref it) = _i . lifetime { _visitor.visit_lifetime(it) };
2150 if let Some(ref it) = _i . mutability { tokens_helper(_visitor, &(it).0) };
2151 _visitor.visit_type(& * _i . elem);
2152 }
2153 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2154 pub fn visit_type_slice<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeSlice) {
2155 tokens_helper(_visitor, &(& _i . bracket_token).0);
2156 _visitor.visit_type(& * _i . elem);
2157 }
2158 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2159 pub fn visit_type_trait_object<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeTraitObject) {
2160 if let Some(ref it) = _i . dyn_token { tokens_helper(_visitor, &(it).0) };
2161 for el in Punctuated::pairs(& _i . bounds) { let it = el.value(); _visitor.visit_type_param_bound(it) };
2162 }
2163 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2164 pub fn visit_type_tuple<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeTuple) {
2165 tokens_helper(_visitor, &(& _i . paren_token).0);
2166 for el in Punctuated::pairs(& _i . elems) { let it = el.value(); _visitor.visit_type(it) };
2167 }
2168 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2169 pub fn visit_type_verbatim<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeVerbatim) {
2170 // Skipped field _i . tts;
2171 }
2172 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2173 pub fn visit_un_op<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UnOp) {
2174 match *_i {
2175 UnOp::Deref(ref _binding_0, ) => {
2176 tokens_helper(_visitor, &(_binding_0).0);
2177 }
2178 UnOp::Not(ref _binding_0, ) => {
2179 tokens_helper(_visitor, &(_binding_0).0);
2180 }
2181 UnOp::Neg(ref _binding_0, ) => {
2182 tokens_helper(_visitor, &(_binding_0).0);
2183 }
2184 }
2185 }
2186 # [ cfg ( feature = "full" ) ]
2187 pub fn visit_use_glob<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseGlob) {
2188 tokens_helper(_visitor, &(& _i . star_token).0);
2189 }
2190 # [ cfg ( feature = "full" ) ]
2191 pub fn visit_use_list<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseList) {
2192 tokens_helper(_visitor, &(& _i . brace_token).0);
2193 for el in Punctuated::pairs(& _i . items) { let it = el.value(); _visitor.visit_use_tree(it) };
2194 }
2195 # [ cfg ( feature = "full" ) ]
2196 pub fn visit_use_path<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UsePath) {
2197 _visitor.visit_ident(& _i . ident);
2198 if let Some(ref it) = _i . rename {
2199 tokens_helper(_visitor, &(& ( it ) . 0).0);
2200 _visitor.visit_ident(& ( it ) . 1);
2201 };
2202 }
2203 # [ cfg ( feature = "full" ) ]
2204 pub fn visit_use_tree<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseTree) {
2205 match *_i {
2206 UseTree::Path(ref _binding_0, ) => {
2207 _visitor.visit_use_path(_binding_0);
2208 }
2209 UseTree::Glob(ref _binding_0, ) => {
2210 _visitor.visit_use_glob(_binding_0);
2211 }
2212 UseTree::List(ref _binding_0, ) => {
2213 _visitor.visit_use_list(_binding_0);
2214 }
2215 }
2216 }
2217 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2218 pub fn visit_variant<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Variant) {
2219 for it in & _i . attrs { _visitor.visit_attribute(it) };
2220 _visitor.visit_ident(& _i . ident);
2221 _visitor.visit_fields(& _i . fields);
2222 if let Some(ref it) = _i . discriminant {
2223 tokens_helper(_visitor, &(& ( it ) . 0).0);
2224 _visitor.visit_expr(& ( it ) . 1);
2225 };
2226 }
2227 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2228 pub fn visit_vis_crate<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisCrate) {
2229 tokens_helper(_visitor, &(& _i . pub_token).0);
2230 tokens_helper(_visitor, &(& _i . paren_token).0);
2231 tokens_helper(_visitor, &(& _i . crate_token).0);
2232 }
2233 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2234 pub fn visit_vis_public<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisPublic) {
2235 tokens_helper(_visitor, &(& _i . pub_token).0);
2236 }
2237 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2238 pub fn visit_vis_restricted<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisRestricted) {
2239 tokens_helper(_visitor, &(& _i . pub_token).0);
2240 tokens_helper(_visitor, &(& _i . paren_token).0);
2241 if let Some(ref it) = _i . in_token { tokens_helper(_visitor, &(it).0) };
2242 _visitor.visit_path(& * _i . path);
2243 }
2244 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2245 pub fn visit_visibility<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Visibility) {
2246 match *_i {
2247 Visibility::Public(ref _binding_0, ) => {
2248 _visitor.visit_vis_public(_binding_0);
2249 }
2250 Visibility::Crate(ref _binding_0, ) => {
2251 _visitor.visit_vis_crate(_binding_0);
2252 }
2253 Visibility::Restricted(ref _binding_0, ) => {
2254 _visitor.visit_vis_restricted(_binding_0);
2255 }
2256 Visibility::Inherited => { }
2257 }
2258 }
2259 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2260 pub fn visit_where_clause<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WhereClause) {
2261 tokens_helper(_visitor, &(& _i . where_token).0);
2262 for el in Punctuated::pairs(& _i . predicates) { let it = el.value(); _visitor.visit_where_predicate(it) };
2263 }
2264 # [ cfg ( any ( feature = "full" , feature = "derive" ) ) ]
2265 pub fn visit_where_predicate<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WherePredicate) {
2266 match *_i {
2267 WherePredicate::Type(ref _binding_0, ) => {
2268 _visitor.visit_predicate_type(_binding_0);
2269 }
2270 WherePredicate::Lifetime(ref _binding_0, ) => {
2271 _visitor.visit_predicate_lifetime(_binding_0);
2272 }
2273 WherePredicate::Eq(ref _binding_0, ) => {
2274 _visitor.visit_predicate_eq(_binding_0);
2275 }
2276 }
2277 }
2278