blob: 596bd3ed5433f071398cd4eea16a3b3130197dab [file] [log] [blame]
Nika Layzell27726662017-10-24 23:16:35 -04001// THIS FILE IS AUTOMATICALLY GENERATED; DO NOT EDIT
2
David Tolnayf0d63bf2017-12-26 12:29:47 -05003#![cfg_attr(feature = "cargo-clippy", allow(match_same_arms))]
David Tolnay0a0d78c2018-01-05 15:24:01 -08004#[cfg(any(feature = "full", feature = "derive"))]
David Tolnaycc0f0372017-12-28 19:11:04 -05005use gen::helper::visit::*;
David Tolnay8c81f622018-07-31 23:34:35 -07006use proc_macro2::Span;
7#[cfg(any(feature = "full", feature = "derive"))]
8use punctuated::Punctuated;
9use *;
Nika Layzell4ab8d6e2017-10-26 09:45:49 -040010#[cfg(feature = "full")]
11macro_rules! full {
David Tolnay280202f2018-08-02 00:29:54 -070012 ($e:expr) => {
David Tolnay8c81f622018-07-31 23:34:35 -070013 $e
14 };
Nika Layzell4ab8d6e2017-10-26 09:45:49 -040015}
David Tolnay0a0d78c2018-01-05 15:24:01 -080016#[cfg(all(feature = "derive", not(feature = "full")))]
Nika Layzell4ab8d6e2017-10-26 09:45:49 -040017macro_rules! full {
David Tolnay280202f2018-08-02 00:29:54 -070018 ($e:expr) => {
David Tolnay8c81f622018-07-31 23:34:35 -070019 unreachable!()
20 };
Nika Layzell4ab8d6e2017-10-26 09:45:49 -040021}
David Tolnay6af48992018-08-01 11:16:28 -070022#[cfg(any(feature = "full", feature = "derive"))]
23macro_rules! skip {
David Tolnay280202f2018-08-02 00:29:54 -070024 ($($tt:tt)*) => {};
David Tolnay6af48992018-08-01 11:16:28 -070025}
26#[doc = r" Syntax tree traversal to walk a shared borrow of a syntax tree."]
27#[doc = r""]
28#[doc = r" See the [module documentation] for details."]
29#[doc = r""]
30#[doc = r" [module documentation]: index.html"]
31#[doc = r""]
32#[doc = r#" *This trait is available if Syn is built with the `"visit"` feature.*"#]
David Tolnay4b4c4b62018-01-06 13:48:05 -080033pub trait Visit<'ast> {
David Tolnay8c81f622018-07-31 23:34:35 -070034 #[cfg(any(feature = "full", feature = "derive"))]
35 fn visit_abi(&mut self, i: &'ast Abi) {
36 visit_abi(self, i)
37 }
38 #[cfg(any(feature = "full", feature = "derive"))]
39 fn visit_angle_bracketed_generic_arguments(&mut self, i: &'ast AngleBracketedGenericArguments) {
40 visit_angle_bracketed_generic_arguments(self, i)
41 }
42 #[cfg(feature = "full")]
43 fn visit_arg_captured(&mut self, i: &'ast ArgCaptured) {
44 visit_arg_captured(self, i)
45 }
46 #[cfg(feature = "full")]
47 fn visit_arg_self(&mut self, i: &'ast ArgSelf) {
48 visit_arg_self(self, i)
49 }
50 #[cfg(feature = "full")]
51 fn visit_arg_self_ref(&mut self, i: &'ast ArgSelfRef) {
52 visit_arg_self_ref(self, i)
53 }
54 #[cfg(any(feature = "full", feature = "derive"))]
55 #[cfg(feature = "full")]
56 fn visit_arm(&mut self, i: &'ast Arm) {
57 visit_arm(self, i)
58 }
59 #[cfg(any(feature = "full", feature = "derive"))]
60 fn visit_attr_style(&mut self, i: &'ast AttrStyle) {
61 visit_attr_style(self, i)
62 }
63 #[cfg(any(feature = "full", feature = "derive"))]
64 fn visit_attribute(&mut self, i: &'ast Attribute) {
65 visit_attribute(self, i)
66 }
67 #[cfg(any(feature = "full", feature = "derive"))]
68 fn visit_bare_fn_arg(&mut self, i: &'ast BareFnArg) {
69 visit_bare_fn_arg(self, i)
70 }
71 #[cfg(any(feature = "full", feature = "derive"))]
72 fn visit_bare_fn_arg_name(&mut self, i: &'ast BareFnArgName) {
73 visit_bare_fn_arg_name(self, i)
74 }
75 #[cfg(any(feature = "full", feature = "derive"))]
76 fn visit_bin_op(&mut self, i: &'ast BinOp) {
77 visit_bin_op(self, i)
78 }
79 #[cfg(any(feature = "full", feature = "derive"))]
80 fn visit_binding(&mut self, i: &'ast Binding) {
81 visit_binding(self, i)
82 }
83 #[cfg(any(feature = "full", feature = "derive"))]
84 #[cfg(feature = "full")]
85 fn visit_block(&mut self, i: &'ast Block) {
86 visit_block(self, i)
87 }
88 #[cfg(any(feature = "full", feature = "derive"))]
89 fn visit_bound_lifetimes(&mut self, i: &'ast BoundLifetimes) {
90 visit_bound_lifetimes(self, i)
91 }
92 #[cfg(any(feature = "full", feature = "derive"))]
93 fn visit_const_param(&mut self, i: &'ast ConstParam) {
94 visit_const_param(self, i)
95 }
96 #[cfg(feature = "derive")]
97 fn visit_data(&mut self, i: &'ast Data) {
98 visit_data(self, i)
99 }
100 #[cfg(feature = "derive")]
101 fn visit_data_enum(&mut self, i: &'ast DataEnum) {
102 visit_data_enum(self, i)
103 }
104 #[cfg(feature = "derive")]
105 fn visit_data_struct(&mut self, i: &'ast DataStruct) {
106 visit_data_struct(self, i)
107 }
108 #[cfg(feature = "derive")]
109 fn visit_data_union(&mut self, i: &'ast DataUnion) {
110 visit_data_union(self, i)
111 }
112 #[cfg(feature = "derive")]
113 fn visit_derive_input(&mut self, i: &'ast DeriveInput) {
114 visit_derive_input(self, i)
115 }
116 #[cfg(any(feature = "full", feature = "derive"))]
117 fn visit_expr(&mut self, i: &'ast Expr) {
118 visit_expr(self, i)
119 }
120 #[cfg(feature = "full")]
121 #[cfg(any(feature = "full", feature = "derive"))]
122 fn visit_expr_array(&mut self, i: &'ast ExprArray) {
123 visit_expr_array(self, i)
124 }
125 #[cfg(feature = "full")]
126 #[cfg(any(feature = "full", feature = "derive"))]
127 fn visit_expr_assign(&mut self, i: &'ast ExprAssign) {
128 visit_expr_assign(self, i)
129 }
130 #[cfg(feature = "full")]
131 #[cfg(any(feature = "full", feature = "derive"))]
132 fn visit_expr_assign_op(&mut self, i: &'ast ExprAssignOp) {
133 visit_expr_assign_op(self, i)
134 }
135 #[cfg(any(feature = "full", feature = "derive"))]
136 fn visit_expr_binary(&mut self, i: &'ast ExprBinary) {
137 visit_expr_binary(self, i)
138 }
139 #[cfg(feature = "full")]
140 #[cfg(any(feature = "full", feature = "derive"))]
141 fn visit_expr_block(&mut self, i: &'ast ExprBlock) {
142 visit_expr_block(self, i)
143 }
144 #[cfg(feature = "full")]
145 #[cfg(any(feature = "full", feature = "derive"))]
146 fn visit_expr_box(&mut self, i: &'ast ExprBox) {
147 visit_expr_box(self, i)
148 }
149 #[cfg(feature = "full")]
150 #[cfg(any(feature = "full", feature = "derive"))]
151 fn visit_expr_break(&mut self, i: &'ast ExprBreak) {
152 visit_expr_break(self, i)
153 }
154 #[cfg(any(feature = "full", feature = "derive"))]
155 fn visit_expr_call(&mut self, i: &'ast ExprCall) {
156 visit_expr_call(self, i)
157 }
158 #[cfg(any(feature = "full", feature = "derive"))]
159 fn visit_expr_cast(&mut self, i: &'ast ExprCast) {
160 visit_expr_cast(self, i)
161 }
162 #[cfg(feature = "full")]
163 #[cfg(any(feature = "full", feature = "derive"))]
David Tolnay8c81f622018-07-31 23:34:35 -0700164 fn visit_expr_closure(&mut self, i: &'ast ExprClosure) {
165 visit_expr_closure(self, i)
166 }
167 #[cfg(feature = "full")]
168 #[cfg(any(feature = "full", feature = "derive"))]
169 fn visit_expr_continue(&mut self, i: &'ast ExprContinue) {
170 visit_expr_continue(self, i)
171 }
172 #[cfg(any(feature = "full", feature = "derive"))]
173 fn visit_expr_field(&mut self, i: &'ast ExprField) {
174 visit_expr_field(self, i)
175 }
176 #[cfg(feature = "full")]
177 #[cfg(any(feature = "full", feature = "derive"))]
178 fn visit_expr_for_loop(&mut self, i: &'ast ExprForLoop) {
179 visit_expr_for_loop(self, i)
180 }
181 #[cfg(feature = "full")]
182 #[cfg(any(feature = "full", feature = "derive"))]
183 fn visit_expr_group(&mut self, i: &'ast ExprGroup) {
184 visit_expr_group(self, i)
185 }
186 #[cfg(feature = "full")]
187 #[cfg(any(feature = "full", feature = "derive"))]
188 fn visit_expr_if(&mut self, i: &'ast ExprIf) {
189 visit_expr_if(self, i)
190 }
191 #[cfg(feature = "full")]
192 #[cfg(any(feature = "full", feature = "derive"))]
193 fn visit_expr_if_let(&mut self, i: &'ast ExprIfLet) {
194 visit_expr_if_let(self, i)
195 }
196 #[cfg(feature = "full")]
197 #[cfg(any(feature = "full", feature = "derive"))]
198 fn visit_expr_in_place(&mut self, i: &'ast ExprInPlace) {
199 visit_expr_in_place(self, i)
200 }
201 #[cfg(any(feature = "full", feature = "derive"))]
202 fn visit_expr_index(&mut self, i: &'ast ExprIndex) {
203 visit_expr_index(self, i)
204 }
205 #[cfg(any(feature = "full", feature = "derive"))]
206 fn visit_expr_lit(&mut self, i: &'ast ExprLit) {
207 visit_expr_lit(self, i)
208 }
209 #[cfg(feature = "full")]
210 #[cfg(any(feature = "full", feature = "derive"))]
211 fn visit_expr_loop(&mut self, i: &'ast ExprLoop) {
212 visit_expr_loop(self, i)
213 }
214 #[cfg(feature = "full")]
215 #[cfg(any(feature = "full", feature = "derive"))]
216 fn visit_expr_macro(&mut self, i: &'ast ExprMacro) {
217 visit_expr_macro(self, i)
218 }
219 #[cfg(feature = "full")]
220 #[cfg(any(feature = "full", feature = "derive"))]
221 fn visit_expr_match(&mut self, i: &'ast ExprMatch) {
222 visit_expr_match(self, i)
223 }
224 #[cfg(feature = "full")]
225 #[cfg(any(feature = "full", feature = "derive"))]
226 fn visit_expr_method_call(&mut self, i: &'ast ExprMethodCall) {
227 visit_expr_method_call(self, i)
228 }
229 #[cfg(any(feature = "full", feature = "derive"))]
230 fn visit_expr_paren(&mut self, i: &'ast ExprParen) {
231 visit_expr_paren(self, i)
232 }
233 #[cfg(any(feature = "full", feature = "derive"))]
234 fn visit_expr_path(&mut self, i: &'ast ExprPath) {
235 visit_expr_path(self, i)
236 }
237 #[cfg(feature = "full")]
238 #[cfg(any(feature = "full", feature = "derive"))]
239 fn visit_expr_range(&mut self, i: &'ast ExprRange) {
240 visit_expr_range(self, i)
241 }
242 #[cfg(feature = "full")]
243 #[cfg(any(feature = "full", feature = "derive"))]
244 fn visit_expr_reference(&mut self, i: &'ast ExprReference) {
245 visit_expr_reference(self, i)
246 }
247 #[cfg(feature = "full")]
248 #[cfg(any(feature = "full", feature = "derive"))]
249 fn visit_expr_repeat(&mut self, i: &'ast ExprRepeat) {
250 visit_expr_repeat(self, i)
251 }
252 #[cfg(feature = "full")]
253 #[cfg(any(feature = "full", feature = "derive"))]
254 fn visit_expr_return(&mut self, i: &'ast ExprReturn) {
255 visit_expr_return(self, i)
256 }
257 #[cfg(feature = "full")]
258 #[cfg(any(feature = "full", feature = "derive"))]
259 fn visit_expr_struct(&mut self, i: &'ast ExprStruct) {
260 visit_expr_struct(self, i)
261 }
262 #[cfg(feature = "full")]
263 #[cfg(any(feature = "full", feature = "derive"))]
264 fn visit_expr_try(&mut self, i: &'ast ExprTry) {
265 visit_expr_try(self, i)
266 }
267 #[cfg(feature = "full")]
268 #[cfg(any(feature = "full", feature = "derive"))]
David Tolnayfb2dd4b2018-08-24 16:45:34 -0400269 fn visit_expr_try_block(&mut self, i: &'ast ExprTryBlock) {
270 visit_expr_try_block(self, i)
271 }
272 #[cfg(feature = "full")]
273 #[cfg(any(feature = "full", feature = "derive"))]
David Tolnay8c81f622018-07-31 23:34:35 -0700274 fn visit_expr_tuple(&mut self, i: &'ast ExprTuple) {
275 visit_expr_tuple(self, i)
276 }
277 #[cfg(feature = "full")]
278 #[cfg(any(feature = "full", feature = "derive"))]
279 fn visit_expr_type(&mut self, i: &'ast ExprType) {
280 visit_expr_type(self, i)
281 }
282 #[cfg(any(feature = "full", feature = "derive"))]
283 fn visit_expr_unary(&mut self, i: &'ast ExprUnary) {
284 visit_expr_unary(self, i)
285 }
286 #[cfg(feature = "full")]
287 #[cfg(any(feature = "full", feature = "derive"))]
288 fn visit_expr_unsafe(&mut self, i: &'ast ExprUnsafe) {
289 visit_expr_unsafe(self, i)
290 }
291 #[cfg(any(feature = "full", feature = "derive"))]
292 fn visit_expr_verbatim(&mut self, i: &'ast ExprVerbatim) {
293 visit_expr_verbatim(self, i)
294 }
295 #[cfg(feature = "full")]
296 #[cfg(any(feature = "full", feature = "derive"))]
297 fn visit_expr_while(&mut self, i: &'ast ExprWhile) {
298 visit_expr_while(self, i)
299 }
300 #[cfg(feature = "full")]
301 #[cfg(any(feature = "full", feature = "derive"))]
302 fn visit_expr_while_let(&mut self, i: &'ast ExprWhileLet) {
303 visit_expr_while_let(self, i)
304 }
305 #[cfg(feature = "full")]
306 #[cfg(any(feature = "full", feature = "derive"))]
307 fn visit_expr_yield(&mut self, i: &'ast ExprYield) {
308 visit_expr_yield(self, i)
309 }
310 #[cfg(any(feature = "full", feature = "derive"))]
311 fn visit_field(&mut self, i: &'ast Field) {
312 visit_field(self, i)
313 }
314 #[cfg(any(feature = "full", feature = "derive"))]
315 #[cfg(feature = "full")]
316 fn visit_field_pat(&mut self, i: &'ast FieldPat) {
317 visit_field_pat(self, i)
318 }
319 #[cfg(any(feature = "full", feature = "derive"))]
320 #[cfg(feature = "full")]
321 fn visit_field_value(&mut self, i: &'ast FieldValue) {
322 visit_field_value(self, i)
323 }
324 #[cfg(any(feature = "full", feature = "derive"))]
325 fn visit_fields(&mut self, i: &'ast Fields) {
326 visit_fields(self, i)
327 }
328 #[cfg(any(feature = "full", feature = "derive"))]
329 fn visit_fields_named(&mut self, i: &'ast FieldsNamed) {
330 visit_fields_named(self, i)
331 }
332 #[cfg(any(feature = "full", feature = "derive"))]
333 fn visit_fields_unnamed(&mut self, i: &'ast FieldsUnnamed) {
334 visit_fields_unnamed(self, i)
335 }
336 #[cfg(feature = "full")]
337 fn visit_file(&mut self, i: &'ast File) {
338 visit_file(self, i)
339 }
340 #[cfg(feature = "full")]
341 fn visit_fn_arg(&mut self, i: &'ast FnArg) {
342 visit_fn_arg(self, i)
343 }
344 #[cfg(feature = "full")]
345 fn visit_fn_decl(&mut self, i: &'ast FnDecl) {
346 visit_fn_decl(self, i)
347 }
348 #[cfg(feature = "full")]
349 fn visit_foreign_item(&mut self, i: &'ast ForeignItem) {
350 visit_foreign_item(self, i)
351 }
352 #[cfg(feature = "full")]
353 fn visit_foreign_item_fn(&mut self, i: &'ast ForeignItemFn) {
354 visit_foreign_item_fn(self, i)
355 }
356 #[cfg(feature = "full")]
David Tolnay435c1782018-08-24 16:15:44 -0400357 fn visit_foreign_item_macro(&mut self, i: &'ast ForeignItemMacro) {
358 visit_foreign_item_macro(self, i)
359 }
360 #[cfg(feature = "full")]
David Tolnay8c81f622018-07-31 23:34:35 -0700361 fn visit_foreign_item_static(&mut self, i: &'ast ForeignItemStatic) {
362 visit_foreign_item_static(self, i)
363 }
364 #[cfg(feature = "full")]
365 fn visit_foreign_item_type(&mut self, i: &'ast ForeignItemType) {
366 visit_foreign_item_type(self, i)
367 }
368 #[cfg(feature = "full")]
369 fn visit_foreign_item_verbatim(&mut self, i: &'ast ForeignItemVerbatim) {
370 visit_foreign_item_verbatim(self, i)
371 }
372 #[cfg(any(feature = "full", feature = "derive"))]
373 fn visit_generic_argument(&mut self, i: &'ast GenericArgument) {
374 visit_generic_argument(self, i)
375 }
376 #[cfg(any(feature = "full", feature = "derive"))]
377 #[cfg(feature = "full")]
378 fn visit_generic_method_argument(&mut self, i: &'ast GenericMethodArgument) {
379 visit_generic_method_argument(self, i)
380 }
381 #[cfg(any(feature = "full", feature = "derive"))]
382 fn visit_generic_param(&mut self, i: &'ast GenericParam) {
383 visit_generic_param(self, i)
384 }
385 #[cfg(any(feature = "full", feature = "derive"))]
386 fn visit_generics(&mut self, i: &'ast Generics) {
387 visit_generics(self, i)
388 }
David Tolnay8c81f622018-07-31 23:34:35 -0700389 fn visit_ident(&mut self, i: &'ast Ident) {
390 visit_ident(self, i)
391 }
392 #[cfg(feature = "full")]
393 fn visit_impl_item(&mut self, i: &'ast ImplItem) {
394 visit_impl_item(self, i)
395 }
396 #[cfg(feature = "full")]
397 fn visit_impl_item_const(&mut self, i: &'ast ImplItemConst) {
398 visit_impl_item_const(self, i)
399 }
400 #[cfg(feature = "full")]
401 fn visit_impl_item_macro(&mut self, i: &'ast ImplItemMacro) {
402 visit_impl_item_macro(self, i)
403 }
404 #[cfg(feature = "full")]
405 fn visit_impl_item_method(&mut self, i: &'ast ImplItemMethod) {
406 visit_impl_item_method(self, i)
407 }
408 #[cfg(feature = "full")]
409 fn visit_impl_item_type(&mut self, i: &'ast ImplItemType) {
410 visit_impl_item_type(self, i)
411 }
412 #[cfg(feature = "full")]
413 fn visit_impl_item_verbatim(&mut self, i: &'ast ImplItemVerbatim) {
414 visit_impl_item_verbatim(self, i)
415 }
416 #[cfg(any(feature = "full", feature = "derive"))]
417 fn visit_index(&mut self, i: &'ast Index) {
418 visit_index(self, i)
419 }
420 #[cfg(feature = "full")]
421 fn visit_item(&mut self, i: &'ast Item) {
422 visit_item(self, i)
423 }
424 #[cfg(feature = "full")]
425 fn visit_item_const(&mut self, i: &'ast ItemConst) {
426 visit_item_const(self, i)
427 }
428 #[cfg(feature = "full")]
429 fn visit_item_enum(&mut self, i: &'ast ItemEnum) {
430 visit_item_enum(self, i)
431 }
432 #[cfg(feature = "full")]
433 fn visit_item_extern_crate(&mut self, i: &'ast ItemExternCrate) {
434 visit_item_extern_crate(self, i)
435 }
436 #[cfg(feature = "full")]
437 fn visit_item_fn(&mut self, i: &'ast ItemFn) {
438 visit_item_fn(self, i)
439 }
440 #[cfg(feature = "full")]
441 fn visit_item_foreign_mod(&mut self, i: &'ast ItemForeignMod) {
442 visit_item_foreign_mod(self, i)
443 }
444 #[cfg(feature = "full")]
445 fn visit_item_impl(&mut self, i: &'ast ItemImpl) {
446 visit_item_impl(self, i)
447 }
448 #[cfg(feature = "full")]
449 fn visit_item_macro(&mut self, i: &'ast ItemMacro) {
450 visit_item_macro(self, i)
451 }
452 #[cfg(feature = "full")]
453 fn visit_item_macro2(&mut self, i: &'ast ItemMacro2) {
454 visit_item_macro2(self, i)
455 }
456 #[cfg(feature = "full")]
457 fn visit_item_mod(&mut self, i: &'ast ItemMod) {
458 visit_item_mod(self, i)
459 }
460 #[cfg(feature = "full")]
461 fn visit_item_static(&mut self, i: &'ast ItemStatic) {
462 visit_item_static(self, i)
463 }
464 #[cfg(feature = "full")]
465 fn visit_item_struct(&mut self, i: &'ast ItemStruct) {
466 visit_item_struct(self, i)
467 }
468 #[cfg(feature = "full")]
469 fn visit_item_trait(&mut self, i: &'ast ItemTrait) {
470 visit_item_trait(self, i)
471 }
472 #[cfg(feature = "full")]
473 fn visit_item_type(&mut self, i: &'ast ItemType) {
474 visit_item_type(self, i)
475 }
476 #[cfg(feature = "full")]
477 fn visit_item_union(&mut self, i: &'ast ItemUnion) {
478 visit_item_union(self, i)
479 }
480 #[cfg(feature = "full")]
481 fn visit_item_use(&mut self, i: &'ast ItemUse) {
482 visit_item_use(self, i)
483 }
484 #[cfg(feature = "full")]
485 fn visit_item_verbatim(&mut self, i: &'ast ItemVerbatim) {
486 visit_item_verbatim(self, i)
487 }
488 #[cfg(any(feature = "full", feature = "derive"))]
489 #[cfg(feature = "full")]
490 fn visit_label(&mut self, i: &'ast Label) {
491 visit_label(self, i)
492 }
493 #[cfg(any(feature = "full", feature = "derive"))]
494 fn visit_lifetime(&mut self, i: &'ast Lifetime) {
495 visit_lifetime(self, i)
496 }
497 #[cfg(any(feature = "full", feature = "derive"))]
498 fn visit_lifetime_def(&mut self, i: &'ast LifetimeDef) {
499 visit_lifetime_def(self, i)
500 }
501 #[cfg(any(feature = "full", feature = "derive"))]
502 fn visit_lit(&mut self, i: &'ast Lit) {
503 visit_lit(self, i)
504 }
505 #[cfg(any(feature = "full", feature = "derive"))]
506 fn visit_lit_bool(&mut self, i: &'ast LitBool) {
507 visit_lit_bool(self, i)
508 }
509 #[cfg(any(feature = "full", feature = "derive"))]
510 fn visit_lit_byte(&mut self, i: &'ast LitByte) {
511 visit_lit_byte(self, i)
512 }
513 #[cfg(any(feature = "full", feature = "derive"))]
514 fn visit_lit_byte_str(&mut self, i: &'ast LitByteStr) {
515 visit_lit_byte_str(self, i)
516 }
517 #[cfg(any(feature = "full", feature = "derive"))]
518 fn visit_lit_char(&mut self, i: &'ast LitChar) {
519 visit_lit_char(self, i)
520 }
521 #[cfg(any(feature = "full", feature = "derive"))]
522 fn visit_lit_float(&mut self, i: &'ast LitFloat) {
523 visit_lit_float(self, i)
524 }
525 #[cfg(any(feature = "full", feature = "derive"))]
526 fn visit_lit_int(&mut self, i: &'ast LitInt) {
527 visit_lit_int(self, i)
528 }
529 #[cfg(any(feature = "full", feature = "derive"))]
530 fn visit_lit_str(&mut self, i: &'ast LitStr) {
531 visit_lit_str(self, i)
532 }
533 #[cfg(any(feature = "full", feature = "derive"))]
534 fn visit_lit_verbatim(&mut self, i: &'ast LitVerbatim) {
535 visit_lit_verbatim(self, i)
536 }
537 #[cfg(any(feature = "full", feature = "derive"))]
538 #[cfg(feature = "full")]
539 fn visit_local(&mut self, i: &'ast Local) {
540 visit_local(self, i)
541 }
542 #[cfg(any(feature = "full", feature = "derive"))]
543 fn visit_macro(&mut self, i: &'ast Macro) {
544 visit_macro(self, i)
545 }
546 #[cfg(any(feature = "full", feature = "derive"))]
547 fn visit_macro_delimiter(&mut self, i: &'ast MacroDelimiter) {
548 visit_macro_delimiter(self, i)
549 }
550 #[cfg(any(feature = "full", feature = "derive"))]
551 fn visit_member(&mut self, i: &'ast Member) {
552 visit_member(self, i)
553 }
554 #[cfg(any(feature = "full", feature = "derive"))]
555 fn visit_meta(&mut self, i: &'ast Meta) {
556 visit_meta(self, i)
557 }
558 #[cfg(any(feature = "full", feature = "derive"))]
559 fn visit_meta_list(&mut self, i: &'ast MetaList) {
560 visit_meta_list(self, i)
561 }
562 #[cfg(any(feature = "full", feature = "derive"))]
563 fn visit_meta_name_value(&mut self, i: &'ast MetaNameValue) {
564 visit_meta_name_value(self, i)
565 }
566 #[cfg(feature = "full")]
567 fn visit_method_sig(&mut self, i: &'ast MethodSig) {
568 visit_method_sig(self, i)
569 }
570 #[cfg(any(feature = "full", feature = "derive"))]
571 #[cfg(feature = "full")]
572 fn visit_method_turbofish(&mut self, i: &'ast MethodTurbofish) {
573 visit_method_turbofish(self, i)
574 }
575 #[cfg(any(feature = "full", feature = "derive"))]
576 fn visit_nested_meta(&mut self, i: &'ast NestedMeta) {
577 visit_nested_meta(self, i)
578 }
579 #[cfg(any(feature = "full", feature = "derive"))]
580 fn visit_parenthesized_generic_arguments(&mut self, i: &'ast ParenthesizedGenericArguments) {
581 visit_parenthesized_generic_arguments(self, i)
582 }
583 #[cfg(any(feature = "full", feature = "derive"))]
584 #[cfg(feature = "full")]
585 fn visit_pat(&mut self, i: &'ast Pat) {
586 visit_pat(self, i)
587 }
588 #[cfg(any(feature = "full", feature = "derive"))]
589 #[cfg(feature = "full")]
590 fn visit_pat_box(&mut self, i: &'ast PatBox) {
591 visit_pat_box(self, i)
592 }
593 #[cfg(any(feature = "full", feature = "derive"))]
594 #[cfg(feature = "full")]
595 fn visit_pat_ident(&mut self, i: &'ast PatIdent) {
596 visit_pat_ident(self, i)
597 }
598 #[cfg(any(feature = "full", feature = "derive"))]
599 #[cfg(feature = "full")]
600 fn visit_pat_lit(&mut self, i: &'ast PatLit) {
601 visit_pat_lit(self, i)
602 }
603 #[cfg(any(feature = "full", feature = "derive"))]
604 #[cfg(feature = "full")]
605 fn visit_pat_macro(&mut self, i: &'ast PatMacro) {
606 visit_pat_macro(self, i)
607 }
608 #[cfg(any(feature = "full", feature = "derive"))]
609 #[cfg(feature = "full")]
610 fn visit_pat_path(&mut self, i: &'ast PatPath) {
611 visit_pat_path(self, i)
612 }
613 #[cfg(any(feature = "full", feature = "derive"))]
614 #[cfg(feature = "full")]
615 fn visit_pat_range(&mut self, i: &'ast PatRange) {
616 visit_pat_range(self, i)
617 }
618 #[cfg(any(feature = "full", feature = "derive"))]
619 #[cfg(feature = "full")]
620 fn visit_pat_ref(&mut self, i: &'ast PatRef) {
621 visit_pat_ref(self, i)
622 }
623 #[cfg(any(feature = "full", feature = "derive"))]
624 #[cfg(feature = "full")]
625 fn visit_pat_slice(&mut self, i: &'ast PatSlice) {
626 visit_pat_slice(self, i)
627 }
628 #[cfg(any(feature = "full", feature = "derive"))]
629 #[cfg(feature = "full")]
630 fn visit_pat_struct(&mut self, i: &'ast PatStruct) {
631 visit_pat_struct(self, i)
632 }
633 #[cfg(any(feature = "full", feature = "derive"))]
634 #[cfg(feature = "full")]
635 fn visit_pat_tuple(&mut self, i: &'ast PatTuple) {
636 visit_pat_tuple(self, i)
637 }
638 #[cfg(any(feature = "full", feature = "derive"))]
639 #[cfg(feature = "full")]
640 fn visit_pat_tuple_struct(&mut self, i: &'ast PatTupleStruct) {
641 visit_pat_tuple_struct(self, i)
642 }
643 #[cfg(any(feature = "full", feature = "derive"))]
644 #[cfg(feature = "full")]
645 fn visit_pat_verbatim(&mut self, i: &'ast PatVerbatim) {
646 visit_pat_verbatim(self, i)
647 }
648 #[cfg(any(feature = "full", feature = "derive"))]
649 #[cfg(feature = "full")]
650 fn visit_pat_wild(&mut self, i: &'ast PatWild) {
651 visit_pat_wild(self, i)
652 }
653 #[cfg(any(feature = "full", feature = "derive"))]
654 fn visit_path(&mut self, i: &'ast Path) {
655 visit_path(self, i)
656 }
657 #[cfg(any(feature = "full", feature = "derive"))]
658 fn visit_path_arguments(&mut self, i: &'ast PathArguments) {
659 visit_path_arguments(self, i)
660 }
661 #[cfg(any(feature = "full", feature = "derive"))]
662 fn visit_path_segment(&mut self, i: &'ast PathSegment) {
663 visit_path_segment(self, i)
664 }
665 #[cfg(any(feature = "full", feature = "derive"))]
666 fn visit_predicate_eq(&mut self, i: &'ast PredicateEq) {
667 visit_predicate_eq(self, i)
668 }
669 #[cfg(any(feature = "full", feature = "derive"))]
670 fn visit_predicate_lifetime(&mut self, i: &'ast PredicateLifetime) {
671 visit_predicate_lifetime(self, i)
672 }
673 #[cfg(any(feature = "full", feature = "derive"))]
674 fn visit_predicate_type(&mut self, i: &'ast PredicateType) {
675 visit_predicate_type(self, i)
676 }
677 #[cfg(any(feature = "full", feature = "derive"))]
678 fn visit_qself(&mut self, i: &'ast QSelf) {
679 visit_qself(self, i)
680 }
681 #[cfg(any(feature = "full", feature = "derive"))]
682 #[cfg(feature = "full")]
683 fn visit_range_limits(&mut self, i: &'ast RangeLimits) {
684 visit_range_limits(self, i)
685 }
686 #[cfg(any(feature = "full", feature = "derive"))]
687 fn visit_return_type(&mut self, i: &'ast ReturnType) {
688 visit_return_type(self, i)
689 }
David Tolnay8c81f622018-07-31 23:34:35 -0700690 fn visit_span(&mut self, i: &'ast Span) {
691 visit_span(self, i)
692 }
693 #[cfg(any(feature = "full", feature = "derive"))]
694 #[cfg(feature = "full")]
695 fn visit_stmt(&mut self, i: &'ast Stmt) {
696 visit_stmt(self, i)
697 }
698 #[cfg(any(feature = "full", feature = "derive"))]
699 fn visit_trait_bound(&mut self, i: &'ast TraitBound) {
700 visit_trait_bound(self, i)
701 }
702 #[cfg(any(feature = "full", feature = "derive"))]
703 fn visit_trait_bound_modifier(&mut self, i: &'ast TraitBoundModifier) {
704 visit_trait_bound_modifier(self, i)
705 }
706 #[cfg(feature = "full")]
707 fn visit_trait_item(&mut self, i: &'ast TraitItem) {
708 visit_trait_item(self, i)
709 }
710 #[cfg(feature = "full")]
711 fn visit_trait_item_const(&mut self, i: &'ast TraitItemConst) {
712 visit_trait_item_const(self, i)
713 }
714 #[cfg(feature = "full")]
715 fn visit_trait_item_macro(&mut self, i: &'ast TraitItemMacro) {
716 visit_trait_item_macro(self, i)
717 }
718 #[cfg(feature = "full")]
719 fn visit_trait_item_method(&mut self, i: &'ast TraitItemMethod) {
720 visit_trait_item_method(self, i)
721 }
722 #[cfg(feature = "full")]
723 fn visit_trait_item_type(&mut self, i: &'ast TraitItemType) {
724 visit_trait_item_type(self, i)
725 }
726 #[cfg(feature = "full")]
727 fn visit_trait_item_verbatim(&mut self, i: &'ast TraitItemVerbatim) {
728 visit_trait_item_verbatim(self, i)
729 }
730 #[cfg(any(feature = "full", feature = "derive"))]
731 fn visit_type(&mut self, i: &'ast Type) {
732 visit_type(self, i)
733 }
734 #[cfg(any(feature = "full", feature = "derive"))]
735 fn visit_type_array(&mut self, i: &'ast TypeArray) {
736 visit_type_array(self, i)
737 }
738 #[cfg(any(feature = "full", feature = "derive"))]
739 fn visit_type_bare_fn(&mut self, i: &'ast TypeBareFn) {
740 visit_type_bare_fn(self, i)
741 }
742 #[cfg(any(feature = "full", feature = "derive"))]
743 fn visit_type_group(&mut self, i: &'ast TypeGroup) {
744 visit_type_group(self, i)
745 }
746 #[cfg(any(feature = "full", feature = "derive"))]
747 fn visit_type_impl_trait(&mut self, i: &'ast TypeImplTrait) {
748 visit_type_impl_trait(self, i)
749 }
750 #[cfg(any(feature = "full", feature = "derive"))]
751 fn visit_type_infer(&mut self, i: &'ast TypeInfer) {
752 visit_type_infer(self, i)
753 }
754 #[cfg(any(feature = "full", feature = "derive"))]
755 fn visit_type_macro(&mut self, i: &'ast TypeMacro) {
756 visit_type_macro(self, i)
757 }
758 #[cfg(any(feature = "full", feature = "derive"))]
759 fn visit_type_never(&mut self, i: &'ast TypeNever) {
760 visit_type_never(self, i)
761 }
762 #[cfg(any(feature = "full", feature = "derive"))]
763 fn visit_type_param(&mut self, i: &'ast TypeParam) {
764 visit_type_param(self, i)
765 }
766 #[cfg(any(feature = "full", feature = "derive"))]
767 fn visit_type_param_bound(&mut self, i: &'ast TypeParamBound) {
768 visit_type_param_bound(self, i)
769 }
770 #[cfg(any(feature = "full", feature = "derive"))]
771 fn visit_type_paren(&mut self, i: &'ast TypeParen) {
772 visit_type_paren(self, i)
773 }
774 #[cfg(any(feature = "full", feature = "derive"))]
775 fn visit_type_path(&mut self, i: &'ast TypePath) {
776 visit_type_path(self, i)
777 }
778 #[cfg(any(feature = "full", feature = "derive"))]
779 fn visit_type_ptr(&mut self, i: &'ast TypePtr) {
780 visit_type_ptr(self, i)
781 }
782 #[cfg(any(feature = "full", feature = "derive"))]
783 fn visit_type_reference(&mut self, i: &'ast TypeReference) {
784 visit_type_reference(self, i)
785 }
786 #[cfg(any(feature = "full", feature = "derive"))]
787 fn visit_type_slice(&mut self, i: &'ast TypeSlice) {
788 visit_type_slice(self, i)
789 }
790 #[cfg(any(feature = "full", feature = "derive"))]
791 fn visit_type_trait_object(&mut self, i: &'ast TypeTraitObject) {
792 visit_type_trait_object(self, i)
793 }
794 #[cfg(any(feature = "full", feature = "derive"))]
795 fn visit_type_tuple(&mut self, i: &'ast TypeTuple) {
796 visit_type_tuple(self, i)
797 }
798 #[cfg(any(feature = "full", feature = "derive"))]
799 fn visit_type_verbatim(&mut self, i: &'ast TypeVerbatim) {
800 visit_type_verbatim(self, i)
801 }
802 #[cfg(any(feature = "full", feature = "derive"))]
803 fn visit_un_op(&mut self, i: &'ast UnOp) {
804 visit_un_op(self, i)
805 }
806 #[cfg(feature = "full")]
807 fn visit_use_glob(&mut self, i: &'ast UseGlob) {
808 visit_use_glob(self, i)
809 }
810 #[cfg(feature = "full")]
811 fn visit_use_group(&mut self, i: &'ast UseGroup) {
812 visit_use_group(self, i)
813 }
814 #[cfg(feature = "full")]
815 fn visit_use_name(&mut self, i: &'ast UseName) {
816 visit_use_name(self, i)
817 }
818 #[cfg(feature = "full")]
819 fn visit_use_path(&mut self, i: &'ast UsePath) {
820 visit_use_path(self, i)
821 }
822 #[cfg(feature = "full")]
823 fn visit_use_rename(&mut self, i: &'ast UseRename) {
824 visit_use_rename(self, i)
825 }
826 #[cfg(feature = "full")]
827 fn visit_use_tree(&mut self, i: &'ast UseTree) {
828 visit_use_tree(self, i)
829 }
830 #[cfg(any(feature = "full", feature = "derive"))]
831 fn visit_variant(&mut self, i: &'ast Variant) {
832 visit_variant(self, i)
833 }
834 #[cfg(any(feature = "full", feature = "derive"))]
835 fn visit_vis_crate(&mut self, i: &'ast VisCrate) {
836 visit_vis_crate(self, i)
837 }
838 #[cfg(any(feature = "full", feature = "derive"))]
839 fn visit_vis_public(&mut self, i: &'ast VisPublic) {
840 visit_vis_public(self, i)
841 }
842 #[cfg(any(feature = "full", feature = "derive"))]
843 fn visit_vis_restricted(&mut self, i: &'ast VisRestricted) {
844 visit_vis_restricted(self, i)
845 }
846 #[cfg(any(feature = "full", feature = "derive"))]
847 fn visit_visibility(&mut self, i: &'ast Visibility) {
848 visit_visibility(self, i)
849 }
850 #[cfg(any(feature = "full", feature = "derive"))]
851 fn visit_where_clause(&mut self, i: &'ast WhereClause) {
852 visit_where_clause(self, i)
853 }
854 #[cfg(any(feature = "full", feature = "derive"))]
855 fn visit_where_predicate(&mut self, i: &'ast WherePredicate) {
856 visit_where_predicate(self, i)
857 }
Nika Layzell27726662017-10-24 23:16:35 -0400858}
David Tolnay8c81f622018-07-31 23:34:35 -0700859#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800860pub fn visit_abi<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Abi) {
David Tolnay7ac699c2018-08-24 14:00:58 -0400861 tokens_helper(_visitor, &_i.extern_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -0700862 if let Some(ref it) = _i.name {
863 _visitor.visit_lit_str(it)
864 };
Nika Layzell27726662017-10-24 23:16:35 -0400865}
David Tolnay8c81f622018-07-31 23:34:35 -0700866#[cfg(any(feature = "full", feature = "derive"))]
867pub fn visit_angle_bracketed_generic_arguments<'ast, V: Visit<'ast> + ?Sized>(
868 _visitor: &mut V,
869 _i: &'ast AngleBracketedGenericArguments,
870) {
871 if let Some(ref it) = _i.colon2_token {
David Tolnay7ac699c2018-08-24 14:00:58 -0400872 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -0700873 };
David Tolnay7ac699c2018-08-24 14:00:58 -0400874 tokens_helper(_visitor, &_i.lt_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -0700875 for el in Punctuated::pairs(&_i.args) {
876 let it = el.value();
877 _visitor.visit_generic_argument(it)
878 }
David Tolnay7ac699c2018-08-24 14:00:58 -0400879 tokens_helper(_visitor, &_i.gt_token.spans);
Nika Layzell27726662017-10-24 23:16:35 -0400880}
David Tolnay8c81f622018-07-31 23:34:35 -0700881#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800882pub fn visit_arg_captured<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ArgCaptured) {
David Tolnay8c81f622018-07-31 23:34:35 -0700883 _visitor.visit_pat(&_i.pat);
David Tolnay7ac699c2018-08-24 14:00:58 -0400884 tokens_helper(_visitor, &_i.colon_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -0700885 _visitor.visit_type(&_i.ty);
Nika Layzell27726662017-10-24 23:16:35 -0400886}
David Tolnay8c81f622018-07-31 23:34:35 -0700887#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800888pub fn visit_arg_self<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ArgSelf) {
David Tolnay8c81f622018-07-31 23:34:35 -0700889 if let Some(ref it) = _i.mutability {
David Tolnay7ac699c2018-08-24 14:00:58 -0400890 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -0700891 };
David Tolnay7ac699c2018-08-24 14:00:58 -0400892 tokens_helper(_visitor, &_i.self_token.span);
Nika Layzell27726662017-10-24 23:16:35 -0400893}
David Tolnay8c81f622018-07-31 23:34:35 -0700894#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800895pub fn visit_arg_self_ref<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ArgSelfRef) {
David Tolnay7ac699c2018-08-24 14:00:58 -0400896 tokens_helper(_visitor, &_i.and_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -0700897 if let Some(ref it) = _i.lifetime {
898 _visitor.visit_lifetime(it)
899 };
900 if let Some(ref it) = _i.mutability {
David Tolnay7ac699c2018-08-24 14:00:58 -0400901 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -0700902 };
David Tolnay7ac699c2018-08-24 14:00:58 -0400903 tokens_helper(_visitor, &_i.self_token.span);
Nika Layzell27726662017-10-24 23:16:35 -0400904}
David Tolnay8c81f622018-07-31 23:34:35 -0700905#[cfg(any(feature = "full", feature = "derive"))]
906#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800907pub fn visit_arm<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Arm) {
David Tolnay8c81f622018-07-31 23:34:35 -0700908 for it in &_i.attrs {
909 _visitor.visit_attribute(it)
910 }
911 if let Some(ref it) = _i.leading_vert {
David Tolnay7ac699c2018-08-24 14:00:58 -0400912 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -0700913 };
914 for el in Punctuated::pairs(&_i.pats) {
915 let it = el.value();
916 _visitor.visit_pat(it)
917 }
918 if let Some(ref it) = _i.guard {
David Tolnay7ac699c2018-08-24 14:00:58 -0400919 tokens_helper(_visitor, &(it).0.span);
David Tolnay8c81f622018-07-31 23:34:35 -0700920 _visitor.visit_expr(&*(it).1);
921 };
David Tolnay7ac699c2018-08-24 14:00:58 -0400922 tokens_helper(_visitor, &_i.fat_arrow_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -0700923 _visitor.visit_expr(&*_i.body);
924 if let Some(ref it) = _i.comma {
David Tolnay7ac699c2018-08-24 14:00:58 -0400925 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -0700926 };
Nika Layzell27726662017-10-24 23:16:35 -0400927}
David Tolnay8c81f622018-07-31 23:34:35 -0700928#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800929pub fn visit_attr_style<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast AttrStyle) {
Nika Layzell27726662017-10-24 23:16:35 -0400930 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -0700931 AttrStyle::Outer => {}
932 AttrStyle::Inner(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -0400933 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -0400934 }
935 }
936}
David Tolnay8c81f622018-07-31 23:34:35 -0700937#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800938pub fn visit_attribute<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Attribute) {
David Tolnay7ac699c2018-08-24 14:00:58 -0400939 tokens_helper(_visitor, &_i.pound_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -0700940 _visitor.visit_attr_style(&_i.style);
David Tolnay7ac699c2018-08-24 14:00:58 -0400941 tokens_helper(_visitor, &_i.bracket_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -0700942 _visitor.visit_path(&_i.path);
David Tolnay6af48992018-08-01 11:16:28 -0700943 skip!(_i.tts);
Nika Layzell27726662017-10-24 23:16:35 -0400944}
David Tolnay8c81f622018-07-31 23:34:35 -0700945#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800946pub fn visit_bare_fn_arg<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BareFnArg) {
David Tolnay8c81f622018-07-31 23:34:35 -0700947 if let Some(ref it) = _i.name {
948 _visitor.visit_bare_fn_arg_name(&(it).0);
David Tolnay7ac699c2018-08-24 14:00:58 -0400949 tokens_helper(_visitor, &(it).1.spans);
David Tolnay8c81f622018-07-31 23:34:35 -0700950 };
951 _visitor.visit_type(&_i.ty);
Nika Layzell27726662017-10-24 23:16:35 -0400952}
David Tolnay8c81f622018-07-31 23:34:35 -0700953#[cfg(any(feature = "full", feature = "derive"))]
954pub fn visit_bare_fn_arg_name<'ast, V: Visit<'ast> + ?Sized>(
955 _visitor: &mut V,
956 _i: &'ast BareFnArgName,
957) {
Nika Layzell27726662017-10-24 23:16:35 -0400958 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -0700959 BareFnArgName::Named(ref _binding_0) => {
Alex Crichtond261d092018-05-18 13:47:35 -0700960 _visitor.visit_ident(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -0400961 }
David Tolnay8c81f622018-07-31 23:34:35 -0700962 BareFnArgName::Wild(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -0400963 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -0400964 }
965 }
966}
David Tolnay8c81f622018-07-31 23:34:35 -0700967#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -0800968pub fn visit_bin_op<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast BinOp) {
Nika Layzell27726662017-10-24 23:16:35 -0400969 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -0700970 BinOp::Add(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -0400971 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -0400972 }
David Tolnay8c81f622018-07-31 23:34:35 -0700973 BinOp::Sub(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -0400974 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -0400975 }
David Tolnay8c81f622018-07-31 23:34:35 -0700976 BinOp::Mul(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -0400977 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -0400978 }
David Tolnay8c81f622018-07-31 23:34:35 -0700979 BinOp::Div(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -0400980 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -0400981 }
David Tolnay8c81f622018-07-31 23:34:35 -0700982 BinOp::Rem(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -0400983 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -0400984 }
David Tolnay8c81f622018-07-31 23:34:35 -0700985 BinOp::And(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -0400986 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -0400987 }
David Tolnay8c81f622018-07-31 23:34:35 -0700988 BinOp::Or(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -0400989 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -0400990 }
David Tolnay8c81f622018-07-31 23:34:35 -0700991 BinOp::BitXor(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -0400992 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -0400993 }
David Tolnay8c81f622018-07-31 23:34:35 -0700994 BinOp::BitAnd(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -0400995 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -0400996 }
David Tolnay8c81f622018-07-31 23:34:35 -0700997 BinOp::BitOr(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -0400998 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -0400999 }
David Tolnay8c81f622018-07-31 23:34:35 -07001000 BinOp::Shl(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04001001 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -04001002 }
David Tolnay8c81f622018-07-31 23:34:35 -07001003 BinOp::Shr(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04001004 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -04001005 }
David Tolnay8c81f622018-07-31 23:34:35 -07001006 BinOp::Eq(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04001007 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -04001008 }
David Tolnay8c81f622018-07-31 23:34:35 -07001009 BinOp::Lt(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04001010 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -04001011 }
David Tolnay8c81f622018-07-31 23:34:35 -07001012 BinOp::Le(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04001013 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -04001014 }
David Tolnay8c81f622018-07-31 23:34:35 -07001015 BinOp::Ne(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04001016 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -04001017 }
David Tolnay8c81f622018-07-31 23:34:35 -07001018 BinOp::Ge(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04001019 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -04001020 }
David Tolnay8c81f622018-07-31 23:34:35 -07001021 BinOp::Gt(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04001022 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -04001023 }
David Tolnay8c81f622018-07-31 23:34:35 -07001024 BinOp::AddEq(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04001025 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -04001026 }
David Tolnay8c81f622018-07-31 23:34:35 -07001027 BinOp::SubEq(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04001028 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -04001029 }
David Tolnay8c81f622018-07-31 23:34:35 -07001030 BinOp::MulEq(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04001031 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -04001032 }
David Tolnay8c81f622018-07-31 23:34:35 -07001033 BinOp::DivEq(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04001034 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -04001035 }
David Tolnay8c81f622018-07-31 23:34:35 -07001036 BinOp::RemEq(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04001037 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -04001038 }
David Tolnay8c81f622018-07-31 23:34:35 -07001039 BinOp::BitXorEq(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04001040 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -04001041 }
David Tolnay8c81f622018-07-31 23:34:35 -07001042 BinOp::BitAndEq(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04001043 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -04001044 }
David Tolnay8c81f622018-07-31 23:34:35 -07001045 BinOp::BitOrEq(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04001046 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -04001047 }
David Tolnay8c81f622018-07-31 23:34:35 -07001048 BinOp::ShlEq(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04001049 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -04001050 }
David Tolnay8c81f622018-07-31 23:34:35 -07001051 BinOp::ShrEq(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04001052 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -04001053 }
1054 }
1055}
David Tolnay8c81f622018-07-31 23:34:35 -07001056#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001057pub fn visit_binding<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Binding) {
David Tolnay8c81f622018-07-31 23:34:35 -07001058 _visitor.visit_ident(&_i.ident);
David Tolnay7ac699c2018-08-24 14:00:58 -04001059 tokens_helper(_visitor, &_i.eq_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001060 _visitor.visit_type(&_i.ty);
David Tolnay506e43a2017-12-29 11:34:36 -05001061}
David Tolnay8c81f622018-07-31 23:34:35 -07001062#[cfg(any(feature = "full", feature = "derive"))]
1063#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001064pub fn visit_block<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Block) {
David Tolnay7ac699c2018-08-24 14:00:58 -04001065 tokens_helper(_visitor, &_i.brace_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001066 for it in &_i.stmts {
1067 _visitor.visit_stmt(it)
1068 }
Nika Layzell27726662017-10-24 23:16:35 -04001069}
David Tolnay8c81f622018-07-31 23:34:35 -07001070#[cfg(any(feature = "full", feature = "derive"))]
1071pub fn visit_bound_lifetimes<'ast, V: Visit<'ast> + ?Sized>(
1072 _visitor: &mut V,
1073 _i: &'ast BoundLifetimes,
1074) {
David Tolnay7ac699c2018-08-24 14:00:58 -04001075 tokens_helper(_visitor, &_i.for_token.span);
1076 tokens_helper(_visitor, &_i.lt_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001077 for el in Punctuated::pairs(&_i.lifetimes) {
1078 let it = el.value();
1079 _visitor.visit_lifetime_def(it)
1080 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001081 tokens_helper(_visitor, &_i.gt_token.spans);
Nika Layzell27726662017-10-24 23:16:35 -04001082}
David Tolnay8c81f622018-07-31 23:34:35 -07001083#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001084pub fn visit_const_param<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ConstParam) {
David Tolnay8c81f622018-07-31 23:34:35 -07001085 for it in &_i.attrs {
1086 _visitor.visit_attribute(it)
1087 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001088 tokens_helper(_visitor, &_i.const_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001089 _visitor.visit_ident(&_i.ident);
David Tolnay7ac699c2018-08-24 14:00:58 -04001090 tokens_helper(_visitor, &_i.colon_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001091 _visitor.visit_type(&_i.ty);
1092 if let Some(ref it) = _i.eq_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04001093 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07001094 };
1095 if let Some(ref it) = _i.default {
1096 _visitor.visit_expr(it)
1097 };
Nika Layzellf1fdc0b2017-12-04 19:58:32 -05001098}
David Tolnay8c81f622018-07-31 23:34:35 -07001099#[cfg(feature = "derive")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001100pub fn visit_data<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Data) {
David Tolnaye3d41b72017-12-31 15:24:00 -05001101 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07001102 Data::Struct(ref _binding_0) => {
David Tolnaye3d41b72017-12-31 15:24:00 -05001103 _visitor.visit_data_struct(_binding_0);
1104 }
David Tolnay8c81f622018-07-31 23:34:35 -07001105 Data::Enum(ref _binding_0) => {
David Tolnaye3d41b72017-12-31 15:24:00 -05001106 _visitor.visit_data_enum(_binding_0);
1107 }
David Tolnay8c81f622018-07-31 23:34:35 -07001108 Data::Union(ref _binding_0) => {
David Tolnaye3d41b72017-12-31 15:24:00 -05001109 _visitor.visit_data_union(_binding_0);
1110 }
1111 }
1112}
David Tolnay8c81f622018-07-31 23:34:35 -07001113#[cfg(feature = "derive")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001114pub fn visit_data_enum<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast DataEnum) {
David Tolnay7ac699c2018-08-24 14:00:58 -04001115 tokens_helper(_visitor, &_i.enum_token.span);
1116 tokens_helper(_visitor, &_i.brace_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001117 for el in Punctuated::pairs(&_i.variants) {
1118 let it = el.value();
1119 _visitor.visit_variant(it)
1120 }
David Tolnaye3d41b72017-12-31 15:24:00 -05001121}
David Tolnay8c81f622018-07-31 23:34:35 -07001122#[cfg(feature = "derive")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001123pub fn visit_data_struct<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast DataStruct) {
David Tolnay7ac699c2018-08-24 14:00:58 -04001124 tokens_helper(_visitor, &_i.struct_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001125 _visitor.visit_fields(&_i.fields);
1126 if let Some(ref it) = _i.semi_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04001127 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07001128 };
David Tolnaye3d41b72017-12-31 15:24:00 -05001129}
David Tolnay8c81f622018-07-31 23:34:35 -07001130#[cfg(feature = "derive")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001131pub fn visit_data_union<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast DataUnion) {
David Tolnay7ac699c2018-08-24 14:00:58 -04001132 tokens_helper(_visitor, &_i.union_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001133 _visitor.visit_fields_named(&_i.fields);
David Tolnaye3d41b72017-12-31 15:24:00 -05001134}
David Tolnay8c81f622018-07-31 23:34:35 -07001135#[cfg(feature = "derive")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001136pub fn visit_derive_input<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast DeriveInput) {
David Tolnay8c81f622018-07-31 23:34:35 -07001137 for it in &_i.attrs {
1138 _visitor.visit_attribute(it)
1139 }
1140 _visitor.visit_visibility(&_i.vis);
1141 _visitor.visit_ident(&_i.ident);
1142 _visitor.visit_generics(&_i.generics);
1143 _visitor.visit_data(&_i.data);
Nika Layzell27726662017-10-24 23:16:35 -04001144}
David Tolnay8c81f622018-07-31 23:34:35 -07001145#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001146pub fn visit_expr<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Expr) {
Nika Layzell27726662017-10-24 23:16:35 -04001147 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07001148 Expr::Box(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001149 full!(_visitor.visit_expr_box(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -04001150 }
David Tolnay8c81f622018-07-31 23:34:35 -07001151 Expr::InPlace(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001152 full!(_visitor.visit_expr_in_place(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -04001153 }
David Tolnay8c81f622018-07-31 23:34:35 -07001154 Expr::Array(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001155 full!(_visitor.visit_expr_array(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -04001156 }
David Tolnay8c81f622018-07-31 23:34:35 -07001157 Expr::Call(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001158 _visitor.visit_expr_call(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001159 }
David Tolnay8c81f622018-07-31 23:34:35 -07001160 Expr::MethodCall(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001161 full!(_visitor.visit_expr_method_call(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -04001162 }
David Tolnay8c81f622018-07-31 23:34:35 -07001163 Expr::Tuple(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001164 full!(_visitor.visit_expr_tuple(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -04001165 }
David Tolnay8c81f622018-07-31 23:34:35 -07001166 Expr::Binary(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001167 _visitor.visit_expr_binary(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001168 }
David Tolnay8c81f622018-07-31 23:34:35 -07001169 Expr::Unary(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001170 _visitor.visit_expr_unary(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001171 }
David Tolnay8c81f622018-07-31 23:34:35 -07001172 Expr::Lit(ref _binding_0) => {
David Tolnay8c91b882017-12-28 23:04:32 -05001173 _visitor.visit_expr_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001174 }
David Tolnay8c81f622018-07-31 23:34:35 -07001175 Expr::Cast(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001176 _visitor.visit_expr_cast(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001177 }
David Tolnay8c81f622018-07-31 23:34:35 -07001178 Expr::Type(ref _binding_0) => {
David Tolnay0cf94f22017-12-28 23:46:26 -05001179 full!(_visitor.visit_expr_type(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -04001180 }
David Tolnay8c81f622018-07-31 23:34:35 -07001181 Expr::If(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001182 full!(_visitor.visit_expr_if(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -04001183 }
David Tolnay8c81f622018-07-31 23:34:35 -07001184 Expr::IfLet(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001185 full!(_visitor.visit_expr_if_let(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -04001186 }
David Tolnay8c81f622018-07-31 23:34:35 -07001187 Expr::While(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001188 full!(_visitor.visit_expr_while(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -04001189 }
David Tolnay8c81f622018-07-31 23:34:35 -07001190 Expr::WhileLet(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001191 full!(_visitor.visit_expr_while_let(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -04001192 }
David Tolnay8c81f622018-07-31 23:34:35 -07001193 Expr::ForLoop(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001194 full!(_visitor.visit_expr_for_loop(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -04001195 }
David Tolnay8c81f622018-07-31 23:34:35 -07001196 Expr::Loop(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001197 full!(_visitor.visit_expr_loop(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -04001198 }
David Tolnay8c81f622018-07-31 23:34:35 -07001199 Expr::Match(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001200 full!(_visitor.visit_expr_match(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -04001201 }
David Tolnay8c81f622018-07-31 23:34:35 -07001202 Expr::Closure(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001203 full!(_visitor.visit_expr_closure(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -04001204 }
David Tolnay8c81f622018-07-31 23:34:35 -07001205 Expr::Unsafe(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001206 full!(_visitor.visit_expr_unsafe(_binding_0));
Nika Layzell640832a2017-12-04 13:37:09 -05001207 }
David Tolnay8c81f622018-07-31 23:34:35 -07001208 Expr::Block(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001209 full!(_visitor.visit_expr_block(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -04001210 }
David Tolnay8c81f622018-07-31 23:34:35 -07001211 Expr::Assign(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001212 full!(_visitor.visit_expr_assign(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -04001213 }
David Tolnay8c81f622018-07-31 23:34:35 -07001214 Expr::AssignOp(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001215 full!(_visitor.visit_expr_assign_op(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -04001216 }
David Tolnay8c81f622018-07-31 23:34:35 -07001217 Expr::Field(ref _binding_0) => {
David Tolnayd093fa92018-06-30 10:23:25 -07001218 _visitor.visit_expr_field(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001219 }
David Tolnay8c81f622018-07-31 23:34:35 -07001220 Expr::Index(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001221 _visitor.visit_expr_index(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001222 }
David Tolnay8c81f622018-07-31 23:34:35 -07001223 Expr::Range(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001224 full!(_visitor.visit_expr_range(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -04001225 }
David Tolnay8c81f622018-07-31 23:34:35 -07001226 Expr::Path(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001227 _visitor.visit_expr_path(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001228 }
David Tolnay8c81f622018-07-31 23:34:35 -07001229 Expr::Reference(ref _binding_0) => {
David Tolnay00674ba2018-03-31 18:14:11 +02001230 full!(_visitor.visit_expr_reference(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -04001231 }
David Tolnay8c81f622018-07-31 23:34:35 -07001232 Expr::Break(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001233 full!(_visitor.visit_expr_break(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -04001234 }
David Tolnay8c81f622018-07-31 23:34:35 -07001235 Expr::Continue(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001236 full!(_visitor.visit_expr_continue(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -04001237 }
David Tolnay8c81f622018-07-31 23:34:35 -07001238 Expr::Return(ref _binding_0) => {
David Tolnayc246cd32017-12-28 23:14:32 -05001239 full!(_visitor.visit_expr_return(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -04001240 }
David Tolnay8c81f622018-07-31 23:34:35 -07001241 Expr::Macro(ref _binding_0) => {
David Tolnay8c91b882017-12-28 23:04:32 -05001242 full!(_visitor.visit_expr_macro(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -04001243 }
David Tolnay8c81f622018-07-31 23:34:35 -07001244 Expr::Struct(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001245 full!(_visitor.visit_expr_struct(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -04001246 }
David Tolnay8c81f622018-07-31 23:34:35 -07001247 Expr::Repeat(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001248 full!(_visitor.visit_expr_repeat(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -04001249 }
David Tolnay8c81f622018-07-31 23:34:35 -07001250 Expr::Paren(ref _binding_0) => {
David Tolnay81ab4f62018-01-27 19:02:51 -08001251 _visitor.visit_expr_paren(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001252 }
David Tolnay8c81f622018-07-31 23:34:35 -07001253 Expr::Group(ref _binding_0) => {
David Tolnaye98775f2017-12-28 23:17:00 -05001254 full!(_visitor.visit_expr_group(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -04001255 }
David Tolnay8c81f622018-07-31 23:34:35 -07001256 Expr::Try(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001257 full!(_visitor.visit_expr_try(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -04001258 }
David Tolnayfb2dd4b2018-08-24 16:45:34 -04001259 Expr::TryBlock(ref _binding_0) => {
1260 full!(_visitor.visit_expr_try_block(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -04001261 }
David Tolnay8c81f622018-07-31 23:34:35 -07001262 Expr::Yield(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001263 full!(_visitor.visit_expr_yield(_binding_0));
Nika Layzell27726662017-10-24 23:16:35 -04001264 }
David Tolnay8c81f622018-07-31 23:34:35 -07001265 Expr::Verbatim(ref _binding_0) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05001266 _visitor.visit_expr_verbatim(_binding_0);
1267 }
Nika Layzell27726662017-10-24 23:16:35 -04001268 }
1269}
David Tolnay8c81f622018-07-31 23:34:35 -07001270#[cfg(feature = "full")]
1271#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001272pub fn visit_expr_array<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprArray) {
David Tolnay8c81f622018-07-31 23:34:35 -07001273 for it in &_i.attrs {
1274 _visitor.visit_attribute(it)
1275 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001276 tokens_helper(_visitor, &_i.bracket_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001277 for el in Punctuated::pairs(&_i.elems) {
1278 let it = el.value();
1279 _visitor.visit_expr(it)
David Tolnaye3d41b72017-12-31 15:24:00 -05001280 }
1281}
David Tolnay8c81f622018-07-31 23:34:35 -07001282#[cfg(feature = "full")]
1283#[cfg(any(feature = "full", feature = "derive"))]
1284pub fn visit_expr_assign<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprAssign) {
1285 for it in &_i.attrs {
1286 _visitor.visit_attribute(it)
1287 }
1288 _visitor.visit_expr(&*_i.left);
David Tolnay7ac699c2018-08-24 14:00:58 -04001289 tokens_helper(_visitor, &_i.eq_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001290 _visitor.visit_expr(&*_i.right);
1291}
1292#[cfg(feature = "full")]
1293#[cfg(any(feature = "full", feature = "derive"))]
1294pub fn visit_expr_assign_op<'ast, V: Visit<'ast> + ?Sized>(
1295 _visitor: &mut V,
1296 _i: &'ast ExprAssignOp,
1297) {
1298 for it in &_i.attrs {
1299 _visitor.visit_attribute(it)
1300 }
1301 _visitor.visit_expr(&*_i.left);
1302 _visitor.visit_bin_op(&_i.op);
1303 _visitor.visit_expr(&*_i.right);
1304}
1305#[cfg(any(feature = "full", feature = "derive"))]
1306pub fn visit_expr_binary<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBinary) {
1307 for it in &_i.attrs {
1308 _visitor.visit_attribute(it)
1309 }
1310 _visitor.visit_expr(&*_i.left);
1311 _visitor.visit_bin_op(&_i.op);
1312 _visitor.visit_expr(&*_i.right);
1313}
1314#[cfg(feature = "full")]
1315#[cfg(any(feature = "full", feature = "derive"))]
1316pub fn visit_expr_block<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBlock) {
1317 for it in &_i.attrs {
1318 _visitor.visit_attribute(it)
1319 }
1320 _visitor.visit_block(&_i.block);
1321}
1322#[cfg(feature = "full")]
1323#[cfg(any(feature = "full", feature = "derive"))]
1324pub fn visit_expr_box<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBox) {
1325 for it in &_i.attrs {
1326 _visitor.visit_attribute(it)
1327 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001328 tokens_helper(_visitor, &_i.box_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001329 _visitor.visit_expr(&*_i.expr);
1330}
1331#[cfg(feature = "full")]
1332#[cfg(any(feature = "full", feature = "derive"))]
1333pub fn visit_expr_break<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprBreak) {
1334 for it in &_i.attrs {
1335 _visitor.visit_attribute(it)
1336 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001337 tokens_helper(_visitor, &_i.break_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001338 if let Some(ref it) = _i.label {
1339 _visitor.visit_lifetime(it)
1340 };
1341 if let Some(ref it) = _i.expr {
1342 _visitor.visit_expr(&**it)
1343 };
1344}
1345#[cfg(any(feature = "full", feature = "derive"))]
1346pub fn visit_expr_call<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprCall) {
1347 for it in &_i.attrs {
1348 _visitor.visit_attribute(it)
1349 }
1350 _visitor.visit_expr(&*_i.func);
David Tolnay7ac699c2018-08-24 14:00:58 -04001351 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001352 for el in Punctuated::pairs(&_i.args) {
1353 let it = el.value();
1354 _visitor.visit_expr(it)
1355 }
1356}
1357#[cfg(any(feature = "full", feature = "derive"))]
1358pub fn visit_expr_cast<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprCast) {
1359 for it in &_i.attrs {
1360 _visitor.visit_attribute(it)
1361 }
1362 _visitor.visit_expr(&*_i.expr);
David Tolnay7ac699c2018-08-24 14:00:58 -04001363 tokens_helper(_visitor, &_i.as_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001364 _visitor.visit_type(&*_i.ty);
1365}
1366#[cfg(feature = "full")]
1367#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay8c81f622018-07-31 23:34:35 -07001368pub fn visit_expr_closure<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprClosure) {
1369 for it in &_i.attrs {
1370 _visitor.visit_attribute(it)
1371 }
Yusuke Sasaki4e5d9662018-07-21 02:49:47 +09001372 if let Some(ref it) = _i.asyncness {
1373 tokens_helper(_visitor, &it.span)
1374 };
David Tolnay8c81f622018-07-31 23:34:35 -07001375 if let Some(ref it) = _i.movability {
David Tolnay7ac699c2018-08-24 14:00:58 -04001376 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07001377 };
1378 if let Some(ref it) = _i.capture {
David Tolnay7ac699c2018-08-24 14:00:58 -04001379 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07001380 };
David Tolnay7ac699c2018-08-24 14:00:58 -04001381 tokens_helper(_visitor, &_i.or1_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001382 for el in Punctuated::pairs(&_i.inputs) {
1383 let it = el.value();
1384 _visitor.visit_fn_arg(it)
1385 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001386 tokens_helper(_visitor, &_i.or2_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001387 _visitor.visit_return_type(&_i.output);
1388 _visitor.visit_expr(&*_i.body);
1389}
1390#[cfg(feature = "full")]
1391#[cfg(any(feature = "full", feature = "derive"))]
1392pub fn visit_expr_continue<'ast, V: Visit<'ast> + ?Sized>(
1393 _visitor: &mut V,
1394 _i: &'ast ExprContinue,
1395) {
1396 for it in &_i.attrs {
1397 _visitor.visit_attribute(it)
1398 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001399 tokens_helper(_visitor, &_i.continue_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001400 if let Some(ref it) = _i.label {
1401 _visitor.visit_lifetime(it)
1402 };
1403}
1404#[cfg(any(feature = "full", feature = "derive"))]
1405pub fn visit_expr_field<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprField) {
1406 for it in &_i.attrs {
1407 _visitor.visit_attribute(it)
1408 }
1409 _visitor.visit_expr(&*_i.base);
David Tolnay7ac699c2018-08-24 14:00:58 -04001410 tokens_helper(_visitor, &_i.dot_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001411 _visitor.visit_member(&_i.member);
1412}
1413#[cfg(feature = "full")]
1414#[cfg(any(feature = "full", feature = "derive"))]
1415pub fn visit_expr_for_loop<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprForLoop) {
1416 for it in &_i.attrs {
1417 _visitor.visit_attribute(it)
1418 }
1419 if let Some(ref it) = _i.label {
1420 _visitor.visit_label(it)
1421 };
David Tolnay7ac699c2018-08-24 14:00:58 -04001422 tokens_helper(_visitor, &_i.for_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001423 _visitor.visit_pat(&*_i.pat);
David Tolnay7ac699c2018-08-24 14:00:58 -04001424 tokens_helper(_visitor, &_i.in_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001425 _visitor.visit_expr(&*_i.expr);
1426 _visitor.visit_block(&_i.body);
1427}
1428#[cfg(feature = "full")]
1429#[cfg(any(feature = "full", feature = "derive"))]
1430pub fn visit_expr_group<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprGroup) {
1431 for it in &_i.attrs {
1432 _visitor.visit_attribute(it)
1433 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001434 tokens_helper(_visitor, &_i.group_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001435 _visitor.visit_expr(&*_i.expr);
1436}
1437#[cfg(feature = "full")]
1438#[cfg(any(feature = "full", feature = "derive"))]
1439pub fn visit_expr_if<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIf) {
1440 for it in &_i.attrs {
1441 _visitor.visit_attribute(it)
1442 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001443 tokens_helper(_visitor, &_i.if_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001444 _visitor.visit_expr(&*_i.cond);
1445 _visitor.visit_block(&_i.then_branch);
1446 if let Some(ref it) = _i.else_branch {
David Tolnay7ac699c2018-08-24 14:00:58 -04001447 tokens_helper(_visitor, &(it).0.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001448 _visitor.visit_expr(&*(it).1);
1449 };
1450}
1451#[cfg(feature = "full")]
1452#[cfg(any(feature = "full", feature = "derive"))]
1453pub fn visit_expr_if_let<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIfLet) {
1454 for it in &_i.attrs {
1455 _visitor.visit_attribute(it)
1456 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001457 tokens_helper(_visitor, &_i.if_token.span);
1458 tokens_helper(_visitor, &_i.let_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001459 for el in Punctuated::pairs(&_i.pats) {
1460 let it = el.value();
1461 _visitor.visit_pat(it)
1462 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001463 tokens_helper(_visitor, &_i.eq_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001464 _visitor.visit_expr(&*_i.expr);
1465 _visitor.visit_block(&_i.then_branch);
1466 if let Some(ref it) = _i.else_branch {
David Tolnay7ac699c2018-08-24 14:00:58 -04001467 tokens_helper(_visitor, &(it).0.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001468 _visitor.visit_expr(&*(it).1);
1469 };
1470}
1471#[cfg(feature = "full")]
1472#[cfg(any(feature = "full", feature = "derive"))]
1473pub fn visit_expr_in_place<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprInPlace) {
1474 for it in &_i.attrs {
1475 _visitor.visit_attribute(it)
1476 }
1477 _visitor.visit_expr(&*_i.place);
David Tolnay7ac699c2018-08-24 14:00:58 -04001478 tokens_helper(_visitor, &_i.arrow_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001479 _visitor.visit_expr(&*_i.value);
1480}
1481#[cfg(any(feature = "full", feature = "derive"))]
1482pub fn visit_expr_index<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIndex) {
1483 for it in &_i.attrs {
1484 _visitor.visit_attribute(it)
1485 }
1486 _visitor.visit_expr(&*_i.expr);
David Tolnay7ac699c2018-08-24 14:00:58 -04001487 tokens_helper(_visitor, &_i.bracket_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001488 _visitor.visit_expr(&*_i.index);
1489}
1490#[cfg(any(feature = "full", feature = "derive"))]
1491pub fn visit_expr_lit<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprLit) {
1492 for it in &_i.attrs {
1493 _visitor.visit_attribute(it)
1494 }
1495 _visitor.visit_lit(&_i.lit);
1496}
1497#[cfg(feature = "full")]
1498#[cfg(any(feature = "full", feature = "derive"))]
1499pub fn visit_expr_loop<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprLoop) {
1500 for it in &_i.attrs {
1501 _visitor.visit_attribute(it)
1502 }
1503 if let Some(ref it) = _i.label {
1504 _visitor.visit_label(it)
1505 };
David Tolnay7ac699c2018-08-24 14:00:58 -04001506 tokens_helper(_visitor, &_i.loop_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001507 _visitor.visit_block(&_i.body);
1508}
1509#[cfg(feature = "full")]
1510#[cfg(any(feature = "full", feature = "derive"))]
1511pub fn visit_expr_macro<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprMacro) {
1512 for it in &_i.attrs {
1513 _visitor.visit_attribute(it)
1514 }
1515 _visitor.visit_macro(&_i.mac);
1516}
1517#[cfg(feature = "full")]
1518#[cfg(any(feature = "full", feature = "derive"))]
1519pub fn visit_expr_match<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprMatch) {
1520 for it in &_i.attrs {
1521 _visitor.visit_attribute(it)
1522 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001523 tokens_helper(_visitor, &_i.match_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001524 _visitor.visit_expr(&*_i.expr);
David Tolnay7ac699c2018-08-24 14:00:58 -04001525 tokens_helper(_visitor, &_i.brace_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001526 for it in &_i.arms {
1527 _visitor.visit_arm(it)
1528 }
1529}
1530#[cfg(feature = "full")]
1531#[cfg(any(feature = "full", feature = "derive"))]
1532pub fn visit_expr_method_call<'ast, V: Visit<'ast> + ?Sized>(
1533 _visitor: &mut V,
1534 _i: &'ast ExprMethodCall,
1535) {
1536 for it in &_i.attrs {
1537 _visitor.visit_attribute(it)
1538 }
1539 _visitor.visit_expr(&*_i.receiver);
David Tolnay7ac699c2018-08-24 14:00:58 -04001540 tokens_helper(_visitor, &_i.dot_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001541 _visitor.visit_ident(&_i.method);
1542 if let Some(ref it) = _i.turbofish {
1543 _visitor.visit_method_turbofish(it)
1544 };
David Tolnay7ac699c2018-08-24 14:00:58 -04001545 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001546 for el in Punctuated::pairs(&_i.args) {
1547 let it = el.value();
1548 _visitor.visit_expr(it)
1549 }
1550}
1551#[cfg(any(feature = "full", feature = "derive"))]
1552pub fn visit_expr_paren<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprParen) {
1553 for it in &_i.attrs {
1554 _visitor.visit_attribute(it)
1555 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001556 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001557 _visitor.visit_expr(&*_i.expr);
1558}
1559#[cfg(any(feature = "full", feature = "derive"))]
1560pub fn visit_expr_path<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprPath) {
1561 for it in &_i.attrs {
1562 _visitor.visit_attribute(it)
1563 }
1564 if let Some(ref it) = _i.qself {
1565 _visitor.visit_qself(it)
1566 };
1567 _visitor.visit_path(&_i.path);
1568}
1569#[cfg(feature = "full")]
1570#[cfg(any(feature = "full", feature = "derive"))]
1571pub fn visit_expr_range<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprRange) {
1572 for it in &_i.attrs {
1573 _visitor.visit_attribute(it)
1574 }
1575 if let Some(ref it) = _i.from {
1576 _visitor.visit_expr(&**it)
1577 };
1578 _visitor.visit_range_limits(&_i.limits);
1579 if let Some(ref it) = _i.to {
1580 _visitor.visit_expr(&**it)
1581 };
1582}
1583#[cfg(feature = "full")]
1584#[cfg(any(feature = "full", feature = "derive"))]
1585pub fn visit_expr_reference<'ast, V: Visit<'ast> + ?Sized>(
1586 _visitor: &mut V,
1587 _i: &'ast ExprReference,
1588) {
1589 for it in &_i.attrs {
1590 _visitor.visit_attribute(it)
1591 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001592 tokens_helper(_visitor, &_i.and_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001593 if let Some(ref it) = _i.mutability {
David Tolnay7ac699c2018-08-24 14:00:58 -04001594 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07001595 };
1596 _visitor.visit_expr(&*_i.expr);
1597}
1598#[cfg(feature = "full")]
1599#[cfg(any(feature = "full", feature = "derive"))]
1600pub fn visit_expr_repeat<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprRepeat) {
1601 for it in &_i.attrs {
1602 _visitor.visit_attribute(it)
1603 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001604 tokens_helper(_visitor, &_i.bracket_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001605 _visitor.visit_expr(&*_i.expr);
David Tolnay7ac699c2018-08-24 14:00:58 -04001606 tokens_helper(_visitor, &_i.semi_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001607 _visitor.visit_expr(&*_i.len);
1608}
1609#[cfg(feature = "full")]
1610#[cfg(any(feature = "full", feature = "derive"))]
1611pub fn visit_expr_return<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprReturn) {
1612 for it in &_i.attrs {
1613 _visitor.visit_attribute(it)
1614 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001615 tokens_helper(_visitor, &_i.return_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001616 if let Some(ref it) = _i.expr {
1617 _visitor.visit_expr(&**it)
1618 };
1619}
1620#[cfg(feature = "full")]
1621#[cfg(any(feature = "full", feature = "derive"))]
1622pub fn visit_expr_struct<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprStruct) {
1623 for it in &_i.attrs {
1624 _visitor.visit_attribute(it)
1625 }
1626 _visitor.visit_path(&_i.path);
David Tolnay7ac699c2018-08-24 14:00:58 -04001627 tokens_helper(_visitor, &_i.brace_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001628 for el in Punctuated::pairs(&_i.fields) {
1629 let it = el.value();
1630 _visitor.visit_field_value(it)
1631 }
1632 if let Some(ref it) = _i.dot2_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04001633 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07001634 };
1635 if let Some(ref it) = _i.rest {
1636 _visitor.visit_expr(&**it)
1637 };
1638}
1639#[cfg(feature = "full")]
1640#[cfg(any(feature = "full", feature = "derive"))]
1641pub fn visit_expr_try<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprTry) {
1642 for it in &_i.attrs {
1643 _visitor.visit_attribute(it)
1644 }
1645 _visitor.visit_expr(&*_i.expr);
David Tolnay7ac699c2018-08-24 14:00:58 -04001646 tokens_helper(_visitor, &_i.question_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001647}
1648#[cfg(feature = "full")]
1649#[cfg(any(feature = "full", feature = "derive"))]
David Tolnayfb2dd4b2018-08-24 16:45:34 -04001650pub fn visit_expr_try_block<'ast, V: Visit<'ast> + ?Sized>(
1651 _visitor: &mut V,
1652 _i: &'ast ExprTryBlock,
1653) {
1654 for it in &_i.attrs {
1655 _visitor.visit_attribute(it)
1656 }
1657 tokens_helper(_visitor, &_i.try_token.span);
1658 _visitor.visit_block(&_i.block);
1659}
1660#[cfg(feature = "full")]
1661#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay8c81f622018-07-31 23:34:35 -07001662pub fn visit_expr_tuple<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprTuple) {
1663 for it in &_i.attrs {
1664 _visitor.visit_attribute(it)
1665 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001666 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001667 for el in Punctuated::pairs(&_i.elems) {
1668 let it = el.value();
1669 _visitor.visit_expr(it)
1670 }
1671}
1672#[cfg(feature = "full")]
1673#[cfg(any(feature = "full", feature = "derive"))]
1674pub fn visit_expr_type<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprType) {
1675 for it in &_i.attrs {
1676 _visitor.visit_attribute(it)
1677 }
1678 _visitor.visit_expr(&*_i.expr);
David Tolnay7ac699c2018-08-24 14:00:58 -04001679 tokens_helper(_visitor, &_i.colon_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001680 _visitor.visit_type(&*_i.ty);
1681}
1682#[cfg(any(feature = "full", feature = "derive"))]
1683pub fn visit_expr_unary<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprUnary) {
1684 for it in &_i.attrs {
1685 _visitor.visit_attribute(it)
1686 }
1687 _visitor.visit_un_op(&_i.op);
1688 _visitor.visit_expr(&*_i.expr);
1689}
1690#[cfg(feature = "full")]
1691#[cfg(any(feature = "full", feature = "derive"))]
1692pub fn visit_expr_unsafe<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprUnsafe) {
1693 for it in &_i.attrs {
1694 _visitor.visit_attribute(it)
1695 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001696 tokens_helper(_visitor, &_i.unsafe_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001697 _visitor.visit_block(&_i.block);
1698}
1699#[cfg(any(feature = "full", feature = "derive"))]
1700pub fn visit_expr_verbatim<'ast, V: Visit<'ast> + ?Sized>(
1701 _visitor: &mut V,
1702 _i: &'ast ExprVerbatim,
1703) {
David Tolnay6af48992018-08-01 11:16:28 -07001704 skip!(_i.tts);
David Tolnay8c81f622018-07-31 23:34:35 -07001705}
1706#[cfg(feature = "full")]
1707#[cfg(any(feature = "full", feature = "derive"))]
1708pub fn visit_expr_while<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprWhile) {
1709 for it in &_i.attrs {
1710 _visitor.visit_attribute(it)
1711 }
1712 if let Some(ref it) = _i.label {
1713 _visitor.visit_label(it)
1714 };
David Tolnay7ac699c2018-08-24 14:00:58 -04001715 tokens_helper(_visitor, &_i.while_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001716 _visitor.visit_expr(&*_i.cond);
1717 _visitor.visit_block(&_i.body);
1718}
1719#[cfg(feature = "full")]
1720#[cfg(any(feature = "full", feature = "derive"))]
1721pub fn visit_expr_while_let<'ast, V: Visit<'ast> + ?Sized>(
1722 _visitor: &mut V,
1723 _i: &'ast ExprWhileLet,
1724) {
1725 for it in &_i.attrs {
1726 _visitor.visit_attribute(it)
1727 }
1728 if let Some(ref it) = _i.label {
1729 _visitor.visit_label(it)
1730 };
David Tolnay7ac699c2018-08-24 14:00:58 -04001731 tokens_helper(_visitor, &_i.while_token.span);
1732 tokens_helper(_visitor, &_i.let_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001733 for el in Punctuated::pairs(&_i.pats) {
1734 let it = el.value();
1735 _visitor.visit_pat(it)
1736 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001737 tokens_helper(_visitor, &_i.eq_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001738 _visitor.visit_expr(&*_i.expr);
1739 _visitor.visit_block(&_i.body);
1740}
1741#[cfg(feature = "full")]
1742#[cfg(any(feature = "full", feature = "derive"))]
1743pub fn visit_expr_yield<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprYield) {
1744 for it in &_i.attrs {
1745 _visitor.visit_attribute(it)
1746 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001747 tokens_helper(_visitor, &_i.yield_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001748 if let Some(ref it) = _i.expr {
1749 _visitor.visit_expr(&**it)
1750 };
1751}
1752#[cfg(any(feature = "full", feature = "derive"))]
1753pub fn visit_field<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Field) {
1754 for it in &_i.attrs {
1755 _visitor.visit_attribute(it)
1756 }
1757 _visitor.visit_visibility(&_i.vis);
1758 if let Some(ref it) = _i.ident {
1759 _visitor.visit_ident(it)
1760 };
1761 if let Some(ref it) = _i.colon_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04001762 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07001763 };
1764 _visitor.visit_type(&_i.ty);
1765}
1766#[cfg(any(feature = "full", feature = "derive"))]
1767#[cfg(feature = "full")]
1768pub fn visit_field_pat<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldPat) {
1769 for it in &_i.attrs {
1770 _visitor.visit_attribute(it)
1771 }
1772 _visitor.visit_member(&_i.member);
1773 if let Some(ref it) = _i.colon_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04001774 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07001775 };
1776 _visitor.visit_pat(&*_i.pat);
1777}
1778#[cfg(any(feature = "full", feature = "derive"))]
1779#[cfg(feature = "full")]
1780pub fn visit_field_value<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldValue) {
1781 for it in &_i.attrs {
1782 _visitor.visit_attribute(it)
1783 }
1784 _visitor.visit_member(&_i.member);
1785 if let Some(ref it) = _i.colon_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04001786 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07001787 };
1788 _visitor.visit_expr(&_i.expr);
1789}
1790#[cfg(any(feature = "full", feature = "derive"))]
1791pub fn visit_fields<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Fields) {
1792 match *_i {
1793 Fields::Named(ref _binding_0) => {
1794 _visitor.visit_fields_named(_binding_0);
1795 }
1796 Fields::Unnamed(ref _binding_0) => {
1797 _visitor.visit_fields_unnamed(_binding_0);
1798 }
1799 Fields::Unit => {}
1800 }
1801}
1802#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001803pub fn visit_fields_named<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldsNamed) {
David Tolnay7ac699c2018-08-24 14:00:58 -04001804 tokens_helper(_visitor, &_i.brace_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001805 for el in Punctuated::pairs(&_i.named) {
1806 let it = el.value();
1807 _visitor.visit_field(it)
1808 }
David Tolnaye3d41b72017-12-31 15:24:00 -05001809}
David Tolnay8c81f622018-07-31 23:34:35 -07001810#[cfg(any(feature = "full", feature = "derive"))]
1811pub fn visit_fields_unnamed<'ast, V: Visit<'ast> + ?Sized>(
1812 _visitor: &mut V,
1813 _i: &'ast FieldsUnnamed,
1814) {
David Tolnay7ac699c2018-08-24 14:00:58 -04001815 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001816 for el in Punctuated::pairs(&_i.unnamed) {
1817 let it = el.value();
1818 _visitor.visit_field(it)
1819 }
David Tolnaye3d41b72017-12-31 15:24:00 -05001820}
David Tolnay8c81f622018-07-31 23:34:35 -07001821#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001822pub fn visit_file<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast File) {
David Tolnay6af48992018-08-01 11:16:28 -07001823 skip!(_i.shebang);
David Tolnay8c81f622018-07-31 23:34:35 -07001824 for it in &_i.attrs {
1825 _visitor.visit_attribute(it)
1826 }
1827 for it in &_i.items {
1828 _visitor.visit_item(it)
1829 }
Nika Layzell27726662017-10-24 23:16:35 -04001830}
David Tolnay8c81f622018-07-31 23:34:35 -07001831#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001832pub fn visit_fn_arg<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FnArg) {
Nika Layzell27726662017-10-24 23:16:35 -04001833 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07001834 FnArg::SelfRef(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001835 _visitor.visit_arg_self_ref(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001836 }
David Tolnay8c81f622018-07-31 23:34:35 -07001837 FnArg::SelfValue(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001838 _visitor.visit_arg_self(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001839 }
David Tolnay8c81f622018-07-31 23:34:35 -07001840 FnArg::Captured(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001841 _visitor.visit_arg_captured(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001842 }
David Tolnay8c81f622018-07-31 23:34:35 -07001843 FnArg::Inferred(ref _binding_0) => {
David Tolnay80ed55f2017-12-27 22:54:40 -05001844 _visitor.visit_pat(_binding_0);
1845 }
David Tolnay8c81f622018-07-31 23:34:35 -07001846 FnArg::Ignored(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001847 _visitor.visit_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001848 }
1849 }
1850}
David Tolnay8c81f622018-07-31 23:34:35 -07001851#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001852pub fn visit_fn_decl<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FnDecl) {
David Tolnay7ac699c2018-08-24 14:00:58 -04001853 tokens_helper(_visitor, &_i.fn_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001854 _visitor.visit_generics(&_i.generics);
David Tolnay7ac699c2018-08-24 14:00:58 -04001855 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001856 for el in Punctuated::pairs(&_i.inputs) {
1857 let it = el.value();
1858 _visitor.visit_fn_arg(it)
1859 }
1860 if let Some(ref it) = _i.variadic {
David Tolnay7ac699c2018-08-24 14:00:58 -04001861 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07001862 };
1863 _visitor.visit_return_type(&_i.output);
Nika Layzell27726662017-10-24 23:16:35 -04001864}
David Tolnay8c81f622018-07-31 23:34:35 -07001865#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001866pub fn visit_foreign_item<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItem) {
Nika Layzell27726662017-10-24 23:16:35 -04001867 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07001868 ForeignItem::Fn(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001869 _visitor.visit_foreign_item_fn(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001870 }
David Tolnay8c81f622018-07-31 23:34:35 -07001871 ForeignItem::Static(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001872 _visitor.visit_foreign_item_static(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001873 }
David Tolnay8c81f622018-07-31 23:34:35 -07001874 ForeignItem::Type(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001875 _visitor.visit_foreign_item_type(_binding_0);
David Tolnay199bcbb2017-11-12 10:33:52 -08001876 }
David Tolnay435c1782018-08-24 16:15:44 -04001877 ForeignItem::Macro(ref _binding_0) => {
1878 _visitor.visit_foreign_item_macro(_binding_0);
1879 }
David Tolnay8c81f622018-07-31 23:34:35 -07001880 ForeignItem::Verbatim(ref _binding_0) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05001881 _visitor.visit_foreign_item_verbatim(_binding_0);
1882 }
Nika Layzell27726662017-10-24 23:16:35 -04001883 }
1884}
David Tolnay8c81f622018-07-31 23:34:35 -07001885#[cfg(feature = "full")]
1886pub fn visit_foreign_item_fn<'ast, V: Visit<'ast> + ?Sized>(
1887 _visitor: &mut V,
1888 _i: &'ast ForeignItemFn,
1889) {
1890 for it in &_i.attrs {
1891 _visitor.visit_attribute(it)
1892 }
1893 _visitor.visit_visibility(&_i.vis);
1894 _visitor.visit_ident(&_i.ident);
1895 _visitor.visit_fn_decl(&*_i.decl);
David Tolnay7ac699c2018-08-24 14:00:58 -04001896 tokens_helper(_visitor, &_i.semi_token.spans);
David Tolnay8894f602017-11-11 12:11:04 -08001897}
David Tolnay8c81f622018-07-31 23:34:35 -07001898#[cfg(feature = "full")]
David Tolnay435c1782018-08-24 16:15:44 -04001899pub fn visit_foreign_item_macro<'ast, V: Visit<'ast> + ?Sized>(
1900 _visitor: &mut V,
1901 _i: &'ast ForeignItemMacro,
1902) {
1903 for it in &_i.attrs {
1904 _visitor.visit_attribute(it)
1905 }
1906 _visitor.visit_macro(&_i.mac);
1907 if let Some(ref it) = _i.semi_token {
1908 tokens_helper(_visitor, &it.spans)
1909 };
1910}
1911#[cfg(feature = "full")]
David Tolnay8c81f622018-07-31 23:34:35 -07001912pub fn visit_foreign_item_static<'ast, V: Visit<'ast> + ?Sized>(
1913 _visitor: &mut V,
1914 _i: &'ast ForeignItemStatic,
1915) {
1916 for it in &_i.attrs {
1917 _visitor.visit_attribute(it)
1918 }
1919 _visitor.visit_visibility(&_i.vis);
David Tolnay7ac699c2018-08-24 14:00:58 -04001920 tokens_helper(_visitor, &_i.static_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001921 if let Some(ref it) = _i.mutability {
David Tolnay7ac699c2018-08-24 14:00:58 -04001922 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07001923 };
1924 _visitor.visit_ident(&_i.ident);
David Tolnay7ac699c2018-08-24 14:00:58 -04001925 tokens_helper(_visitor, &_i.colon_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001926 _visitor.visit_type(&*_i.ty);
David Tolnay7ac699c2018-08-24 14:00:58 -04001927 tokens_helper(_visitor, &_i.semi_token.spans);
Nika Layzell27726662017-10-24 23:16:35 -04001928}
David Tolnay8c81f622018-07-31 23:34:35 -07001929#[cfg(feature = "full")]
1930pub fn visit_foreign_item_type<'ast, V: Visit<'ast> + ?Sized>(
1931 _visitor: &mut V,
1932 _i: &'ast ForeignItemType,
1933) {
1934 for it in &_i.attrs {
1935 _visitor.visit_attribute(it)
1936 }
1937 _visitor.visit_visibility(&_i.vis);
David Tolnay7ac699c2018-08-24 14:00:58 -04001938 tokens_helper(_visitor, &_i.type_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001939 _visitor.visit_ident(&_i.ident);
David Tolnay7ac699c2018-08-24 14:00:58 -04001940 tokens_helper(_visitor, &_i.semi_token.spans);
David Tolnay199bcbb2017-11-12 10:33:52 -08001941}
David Tolnay8c81f622018-07-31 23:34:35 -07001942#[cfg(feature = "full")]
1943pub fn visit_foreign_item_verbatim<'ast, V: Visit<'ast> + ?Sized>(
1944 _visitor: &mut V,
1945 _i: &'ast ForeignItemVerbatim,
1946) {
David Tolnay6af48992018-08-01 11:16:28 -07001947 skip!(_i.tts);
David Tolnay2ae520a2017-12-29 11:19:50 -05001948}
David Tolnay8c81f622018-07-31 23:34:35 -07001949#[cfg(any(feature = "full", feature = "derive"))]
1950pub fn visit_generic_argument<'ast, V: Visit<'ast> + ?Sized>(
1951 _visitor: &mut V,
1952 _i: &'ast GenericArgument,
1953) {
Nika Layzell357885a2017-12-04 15:47:07 -05001954 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07001955 GenericArgument::Lifetime(ref _binding_0) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05001956 _visitor.visit_lifetime(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001957 }
David Tolnay8c81f622018-07-31 23:34:35 -07001958 GenericArgument::Type(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001959 _visitor.visit_type(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001960 }
David Tolnay8c81f622018-07-31 23:34:35 -07001961 GenericArgument::Binding(ref _binding_0) => {
David Tolnay506e43a2017-12-29 11:34:36 -05001962 _visitor.visit_binding(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001963 }
David Tolnay8c81f622018-07-31 23:34:35 -07001964 GenericArgument::Const(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001965 _visitor.visit_expr(_binding_0);
Nika Layzellc680e612017-12-04 19:07:20 -05001966 }
Nika Layzell357885a2017-12-04 15:47:07 -05001967 }
1968}
David Tolnay8c81f622018-07-31 23:34:35 -07001969#[cfg(any(feature = "full", feature = "derive"))]
1970#[cfg(feature = "full")]
1971pub fn visit_generic_method_argument<'ast, V: Visit<'ast> + ?Sized>(
1972 _visitor: &mut V,
1973 _i: &'ast GenericMethodArgument,
1974) {
David Tolnayd60cfec2017-12-29 00:21:38 -05001975 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07001976 GenericMethodArgument::Type(ref _binding_0) => {
David Tolnayd60cfec2017-12-29 00:21:38 -05001977 _visitor.visit_type(_binding_0);
1978 }
David Tolnay8c81f622018-07-31 23:34:35 -07001979 GenericMethodArgument::Const(ref _binding_0) => {
David Tolnayd60cfec2017-12-29 00:21:38 -05001980 _visitor.visit_expr(_binding_0);
1981 }
1982 }
1983}
David Tolnay8c81f622018-07-31 23:34:35 -07001984#[cfg(any(feature = "full", feature = "derive"))]
1985pub fn visit_generic_param<'ast, V: Visit<'ast> + ?Sized>(
1986 _visitor: &mut V,
1987 _i: &'ast GenericParam,
1988) {
David Tolnayc2f1aba2017-11-12 20:29:22 -08001989 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07001990 GenericParam::Type(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001991 _visitor.visit_type_param(_binding_0);
David Tolnayc2f1aba2017-11-12 20:29:22 -08001992 }
David Tolnay8c81f622018-07-31 23:34:35 -07001993 GenericParam::Lifetime(ref _binding_0) => {
David Tolnay517f3692018-01-01 20:17:23 -08001994 _visitor.visit_lifetime_def(_binding_0);
1995 }
David Tolnay8c81f622018-07-31 23:34:35 -07001996 GenericParam::Const(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001997 _visitor.visit_const_param(_binding_0);
Nika Layzellf1fdc0b2017-12-04 19:58:32 -05001998 }
David Tolnayc2f1aba2017-11-12 20:29:22 -08001999 }
2000}
David Tolnay8c81f622018-07-31 23:34:35 -07002001#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002002pub fn visit_generics<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Generics) {
David Tolnay8c81f622018-07-31 23:34:35 -07002003 if let Some(ref it) = _i.lt_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002004 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002005 };
2006 for el in Punctuated::pairs(&_i.params) {
2007 let it = el.value();
2008 _visitor.visit_generic_param(it)
2009 }
2010 if let Some(ref it) = _i.gt_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002011 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002012 };
2013 if let Some(ref it) = _i.where_clause {
2014 _visitor.visit_where_clause(it)
2015 };
Nika Layzell27726662017-10-24 23:16:35 -04002016}
David Tolnay8c81f622018-07-31 23:34:35 -07002017pub fn visit_ident<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Ident) {}
2018#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002019pub fn visit_impl_item<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItem) {
Nika Layzell27726662017-10-24 23:16:35 -04002020 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002021 ImplItem::Const(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002022 _visitor.visit_impl_item_const(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002023 }
David Tolnay8c81f622018-07-31 23:34:35 -07002024 ImplItem::Method(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002025 _visitor.visit_impl_item_method(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002026 }
David Tolnay8c81f622018-07-31 23:34:35 -07002027 ImplItem::Type(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002028 _visitor.visit_impl_item_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002029 }
David Tolnay8c81f622018-07-31 23:34:35 -07002030 ImplItem::Macro(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002031 _visitor.visit_impl_item_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002032 }
David Tolnay8c81f622018-07-31 23:34:35 -07002033 ImplItem::Verbatim(ref _binding_0) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05002034 _visitor.visit_impl_item_verbatim(_binding_0);
2035 }
Nika Layzell27726662017-10-24 23:16:35 -04002036 }
2037}
David Tolnay8c81f622018-07-31 23:34:35 -07002038#[cfg(feature = "full")]
2039pub fn visit_impl_item_const<'ast, V: Visit<'ast> + ?Sized>(
2040 _visitor: &mut V,
2041 _i: &'ast ImplItemConst,
2042) {
2043 for it in &_i.attrs {
2044 _visitor.visit_attribute(it)
2045 }
2046 _visitor.visit_visibility(&_i.vis);
2047 if let Some(ref it) = _i.defaultness {
David Tolnay7ac699c2018-08-24 14:00:58 -04002048 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002049 };
David Tolnay7ac699c2018-08-24 14:00:58 -04002050 tokens_helper(_visitor, &_i.const_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002051 _visitor.visit_ident(&_i.ident);
David Tolnay7ac699c2018-08-24 14:00:58 -04002052 tokens_helper(_visitor, &_i.colon_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002053 _visitor.visit_type(&_i.ty);
David Tolnay7ac699c2018-08-24 14:00:58 -04002054 tokens_helper(_visitor, &_i.eq_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002055 _visitor.visit_expr(&_i.expr);
David Tolnay7ac699c2018-08-24 14:00:58 -04002056 tokens_helper(_visitor, &_i.semi_token.spans);
David Tolnay857628c2017-11-11 12:25:31 -08002057}
David Tolnay8c81f622018-07-31 23:34:35 -07002058#[cfg(feature = "full")]
2059pub fn visit_impl_item_macro<'ast, V: Visit<'ast> + ?Sized>(
2060 _visitor: &mut V,
2061 _i: &'ast ImplItemMacro,
2062) {
2063 for it in &_i.attrs {
2064 _visitor.visit_attribute(it)
2065 }
2066 _visitor.visit_macro(&_i.mac);
2067 if let Some(ref it) = _i.semi_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002068 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002069 };
David Tolnay857628c2017-11-11 12:25:31 -08002070}
David Tolnay8c81f622018-07-31 23:34:35 -07002071#[cfg(feature = "full")]
2072pub fn visit_impl_item_method<'ast, V: Visit<'ast> + ?Sized>(
2073 _visitor: &mut V,
2074 _i: &'ast ImplItemMethod,
2075) {
2076 for it in &_i.attrs {
2077 _visitor.visit_attribute(it)
2078 }
2079 _visitor.visit_visibility(&_i.vis);
2080 if let Some(ref it) = _i.defaultness {
David Tolnay7ac699c2018-08-24 14:00:58 -04002081 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002082 };
2083 _visitor.visit_method_sig(&_i.sig);
2084 _visitor.visit_block(&_i.block);
Nika Layzell27726662017-10-24 23:16:35 -04002085}
David Tolnay8c81f622018-07-31 23:34:35 -07002086#[cfg(feature = "full")]
2087pub fn visit_impl_item_type<'ast, V: Visit<'ast> + ?Sized>(
2088 _visitor: &mut V,
2089 _i: &'ast ImplItemType,
2090) {
2091 for it in &_i.attrs {
2092 _visitor.visit_attribute(it)
2093 }
2094 _visitor.visit_visibility(&_i.vis);
2095 if let Some(ref it) = _i.defaultness {
David Tolnay7ac699c2018-08-24 14:00:58 -04002096 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002097 };
David Tolnay7ac699c2018-08-24 14:00:58 -04002098 tokens_helper(_visitor, &_i.type_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002099 _visitor.visit_ident(&_i.ident);
2100 _visitor.visit_generics(&_i.generics);
David Tolnay7ac699c2018-08-24 14:00:58 -04002101 tokens_helper(_visitor, &_i.eq_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002102 _visitor.visit_type(&_i.ty);
David Tolnay7ac699c2018-08-24 14:00:58 -04002103 tokens_helper(_visitor, &_i.semi_token.spans);
Nika Layzell27726662017-10-24 23:16:35 -04002104}
David Tolnay8c81f622018-07-31 23:34:35 -07002105#[cfg(feature = "full")]
2106pub fn visit_impl_item_verbatim<'ast, V: Visit<'ast> + ?Sized>(
2107 _visitor: &mut V,
2108 _i: &'ast ImplItemVerbatim,
2109) {
David Tolnay6af48992018-08-01 11:16:28 -07002110 skip!(_i.tts);
David Tolnay2ae520a2017-12-29 11:19:50 -05002111}
David Tolnay8c81f622018-07-31 23:34:35 -07002112#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002113pub fn visit_index<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Index) {
David Tolnay6af48992018-08-01 11:16:28 -07002114 skip!(_i.index);
David Tolnay8c81f622018-07-31 23:34:35 -07002115 _visitor.visit_span(&_i.span);
David Tolnay85b69a42017-12-27 20:43:10 -05002116}
David Tolnay8c81f622018-07-31 23:34:35 -07002117#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002118pub fn visit_item<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Item) {
Nika Layzell27726662017-10-24 23:16:35 -04002119 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002120 Item::ExternCrate(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002121 _visitor.visit_item_extern_crate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002122 }
David Tolnay8c81f622018-07-31 23:34:35 -07002123 Item::Use(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002124 _visitor.visit_item_use(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002125 }
David Tolnay8c81f622018-07-31 23:34:35 -07002126 Item::Static(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002127 _visitor.visit_item_static(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002128 }
David Tolnay8c81f622018-07-31 23:34:35 -07002129 Item::Const(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002130 _visitor.visit_item_const(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002131 }
David Tolnay8c81f622018-07-31 23:34:35 -07002132 Item::Fn(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002133 _visitor.visit_item_fn(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002134 }
David Tolnay8c81f622018-07-31 23:34:35 -07002135 Item::Mod(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002136 _visitor.visit_item_mod(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002137 }
David Tolnay8c81f622018-07-31 23:34:35 -07002138 Item::ForeignMod(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002139 _visitor.visit_item_foreign_mod(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002140 }
David Tolnay8c81f622018-07-31 23:34:35 -07002141 Item::Type(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002142 _visitor.visit_item_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002143 }
David Tolnay8c81f622018-07-31 23:34:35 -07002144 Item::Struct(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002145 _visitor.visit_item_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002146 }
David Tolnay8c81f622018-07-31 23:34:35 -07002147 Item::Enum(ref _binding_0) => {
David Tolnaye3d41b72017-12-31 15:24:00 -05002148 _visitor.visit_item_enum(_binding_0);
2149 }
David Tolnay8c81f622018-07-31 23:34:35 -07002150 Item::Union(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002151 _visitor.visit_item_union(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002152 }
David Tolnay8c81f622018-07-31 23:34:35 -07002153 Item::Trait(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002154 _visitor.visit_item_trait(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002155 }
David Tolnay8c81f622018-07-31 23:34:35 -07002156 Item::Impl(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002157 _visitor.visit_item_impl(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002158 }
David Tolnay8c81f622018-07-31 23:34:35 -07002159 Item::Macro(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002160 _visitor.visit_item_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002161 }
David Tolnay8c81f622018-07-31 23:34:35 -07002162 Item::Macro2(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002163 _visitor.visit_item_macro2(_binding_0);
David Tolnay500d8322017-12-18 00:32:51 -08002164 }
David Tolnay8c81f622018-07-31 23:34:35 -07002165 Item::Verbatim(ref _binding_0) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05002166 _visitor.visit_item_verbatim(_binding_0);
2167 }
Nika Layzell27726662017-10-24 23:16:35 -04002168 }
2169}
David Tolnay8c81f622018-07-31 23:34:35 -07002170#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002171pub fn visit_item_const<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemConst) {
David Tolnay8c81f622018-07-31 23:34:35 -07002172 for it in &_i.attrs {
2173 _visitor.visit_attribute(it)
2174 }
2175 _visitor.visit_visibility(&_i.vis);
David Tolnay7ac699c2018-08-24 14:00:58 -04002176 tokens_helper(_visitor, &_i.const_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002177 _visitor.visit_ident(&_i.ident);
David Tolnay7ac699c2018-08-24 14:00:58 -04002178 tokens_helper(_visitor, &_i.colon_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002179 _visitor.visit_type(&*_i.ty);
David Tolnay7ac699c2018-08-24 14:00:58 -04002180 tokens_helper(_visitor, &_i.eq_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002181 _visitor.visit_expr(&*_i.expr);
David Tolnay7ac699c2018-08-24 14:00:58 -04002182 tokens_helper(_visitor, &_i.semi_token.spans);
David Tolnayc6b55bc2017-11-09 22:48:38 -08002183}
David Tolnay8c81f622018-07-31 23:34:35 -07002184#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002185pub fn visit_item_enum<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemEnum) {
David Tolnay8c81f622018-07-31 23:34:35 -07002186 for it in &_i.attrs {
2187 _visitor.visit_attribute(it)
2188 }
2189 _visitor.visit_visibility(&_i.vis);
David Tolnay7ac699c2018-08-24 14:00:58 -04002190 tokens_helper(_visitor, &_i.enum_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002191 _visitor.visit_ident(&_i.ident);
2192 _visitor.visit_generics(&_i.generics);
David Tolnay7ac699c2018-08-24 14:00:58 -04002193 tokens_helper(_visitor, &_i.brace_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002194 for el in Punctuated::pairs(&_i.variants) {
2195 let it = el.value();
2196 _visitor.visit_variant(it)
2197 }
David Tolnayc6b55bc2017-11-09 22:48:38 -08002198}
David Tolnay8c81f622018-07-31 23:34:35 -07002199#[cfg(feature = "full")]
2200pub fn visit_item_extern_crate<'ast, V: Visit<'ast> + ?Sized>(
2201 _visitor: &mut V,
2202 _i: &'ast ItemExternCrate,
2203) {
2204 for it in &_i.attrs {
2205 _visitor.visit_attribute(it)
2206 }
2207 _visitor.visit_visibility(&_i.vis);
David Tolnay7ac699c2018-08-24 14:00:58 -04002208 tokens_helper(_visitor, &_i.extern_token.span);
2209 tokens_helper(_visitor, &_i.crate_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002210 _visitor.visit_ident(&_i.ident);
2211 if let Some(ref it) = _i.rename {
David Tolnay7ac699c2018-08-24 14:00:58 -04002212 tokens_helper(_visitor, &(it).0.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002213 _visitor.visit_ident(&(it).1);
2214 };
David Tolnay7ac699c2018-08-24 14:00:58 -04002215 tokens_helper(_visitor, &_i.semi_token.spans);
David Tolnayc6b55bc2017-11-09 22:48:38 -08002216}
David Tolnay8c81f622018-07-31 23:34:35 -07002217#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002218pub fn visit_item_fn<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemFn) {
David Tolnay8c81f622018-07-31 23:34:35 -07002219 for it in &_i.attrs {
2220 _visitor.visit_attribute(it)
2221 }
2222 _visitor.visit_visibility(&_i.vis);
2223 if let Some(ref it) = _i.constness {
David Tolnay7ac699c2018-08-24 14:00:58 -04002224 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002225 };
2226 if let Some(ref it) = _i.unsafety {
David Tolnay7ac699c2018-08-24 14:00:58 -04002227 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002228 };
Yusuke Sasakif00a3ef2018-07-20 22:08:42 +09002229 if let Some(ref it) = _i.asyncness {
2230 tokens_helper(_visitor, &it.span)
2231 };
David Tolnay8c81f622018-07-31 23:34:35 -07002232 if let Some(ref it) = _i.abi {
2233 _visitor.visit_abi(it)
2234 };
2235 _visitor.visit_ident(&_i.ident);
2236 _visitor.visit_fn_decl(&*_i.decl);
2237 _visitor.visit_block(&*_i.block);
David Tolnayc6b55bc2017-11-09 22:48:38 -08002238}
David Tolnay8c81f622018-07-31 23:34:35 -07002239#[cfg(feature = "full")]
2240pub fn visit_item_foreign_mod<'ast, V: Visit<'ast> + ?Sized>(
2241 _visitor: &mut V,
2242 _i: &'ast ItemForeignMod,
2243) {
2244 for it in &_i.attrs {
2245 _visitor.visit_attribute(it)
2246 }
2247 _visitor.visit_abi(&_i.abi);
David Tolnay7ac699c2018-08-24 14:00:58 -04002248 tokens_helper(_visitor, &_i.brace_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002249 for it in &_i.items {
2250 _visitor.visit_foreign_item(it)
2251 }
David Tolnayc6b55bc2017-11-09 22:48:38 -08002252}
David Tolnay8c81f622018-07-31 23:34:35 -07002253#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002254pub fn visit_item_impl<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemImpl) {
David Tolnay8c81f622018-07-31 23:34:35 -07002255 for it in &_i.attrs {
2256 _visitor.visit_attribute(it)
2257 }
2258 if let Some(ref it) = _i.defaultness {
David Tolnay7ac699c2018-08-24 14:00:58 -04002259 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002260 };
2261 if let Some(ref it) = _i.unsafety {
David Tolnay7ac699c2018-08-24 14:00:58 -04002262 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002263 };
David Tolnay7ac699c2018-08-24 14:00:58 -04002264 tokens_helper(_visitor, &_i.impl_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002265 _visitor.visit_generics(&_i.generics);
2266 if let Some(ref it) = _i.trait_ {
2267 if let Some(ref it) = (it).0 {
David Tolnay7ac699c2018-08-24 14:00:58 -04002268 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002269 };
2270 _visitor.visit_path(&(it).1);
David Tolnay7ac699c2018-08-24 14:00:58 -04002271 tokens_helper(_visitor, &(it).2.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002272 };
2273 _visitor.visit_type(&*_i.self_ty);
David Tolnay7ac699c2018-08-24 14:00:58 -04002274 tokens_helper(_visitor, &_i.brace_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002275 for it in &_i.items {
2276 _visitor.visit_impl_item(it)
2277 }
David Tolnayc6b55bc2017-11-09 22:48:38 -08002278}
David Tolnay8c81f622018-07-31 23:34:35 -07002279#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002280pub fn visit_item_macro<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMacro) {
David Tolnay8c81f622018-07-31 23:34:35 -07002281 for it in &_i.attrs {
2282 _visitor.visit_attribute(it)
2283 }
2284 if let Some(ref it) = _i.ident {
2285 _visitor.visit_ident(it)
2286 };
2287 _visitor.visit_macro(&_i.mac);
2288 if let Some(ref it) = _i.semi_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002289 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002290 };
David Tolnayc6b55bc2017-11-09 22:48:38 -08002291}
David Tolnay8c81f622018-07-31 23:34:35 -07002292#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002293pub fn visit_item_macro2<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMacro2) {
David Tolnay8c81f622018-07-31 23:34:35 -07002294 for it in &_i.attrs {
2295 _visitor.visit_attribute(it)
2296 }
2297 _visitor.visit_visibility(&_i.vis);
David Tolnay7ac699c2018-08-24 14:00:58 -04002298 tokens_helper(_visitor, &_i.macro_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002299 _visitor.visit_ident(&_i.ident);
David Tolnay7ac699c2018-08-24 14:00:58 -04002300 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay6af48992018-08-01 11:16:28 -07002301 skip!(_i.args);
David Tolnay7ac699c2018-08-24 14:00:58 -04002302 tokens_helper(_visitor, &_i.brace_token.span);
David Tolnay6af48992018-08-01 11:16:28 -07002303 skip!(_i.body);
David Tolnay500d8322017-12-18 00:32:51 -08002304}
David Tolnay8c81f622018-07-31 23:34:35 -07002305#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002306pub fn visit_item_mod<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMod) {
David Tolnay8c81f622018-07-31 23:34:35 -07002307 for it in &_i.attrs {
2308 _visitor.visit_attribute(it)
2309 }
2310 _visitor.visit_visibility(&_i.vis);
David Tolnay7ac699c2018-08-24 14:00:58 -04002311 tokens_helper(_visitor, &_i.mod_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002312 _visitor.visit_ident(&_i.ident);
2313 if let Some(ref it) = _i.content {
David Tolnay7ac699c2018-08-24 14:00:58 -04002314 tokens_helper(_visitor, &(it).0.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002315 for it in &(it).1 {
2316 _visitor.visit_item(it)
2317 }
2318 };
2319 if let Some(ref it) = _i.semi {
David Tolnay7ac699c2018-08-24 14:00:58 -04002320 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002321 };
Nika Layzell27726662017-10-24 23:16:35 -04002322}
David Tolnay8c81f622018-07-31 23:34:35 -07002323#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002324pub fn visit_item_static<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemStatic) {
David Tolnay8c81f622018-07-31 23:34:35 -07002325 for it in &_i.attrs {
2326 _visitor.visit_attribute(it)
2327 }
2328 _visitor.visit_visibility(&_i.vis);
David Tolnay7ac699c2018-08-24 14:00:58 -04002329 tokens_helper(_visitor, &_i.static_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002330 if let Some(ref it) = _i.mutability {
David Tolnay7ac699c2018-08-24 14:00:58 -04002331 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002332 };
2333 _visitor.visit_ident(&_i.ident);
David Tolnay7ac699c2018-08-24 14:00:58 -04002334 tokens_helper(_visitor, &_i.colon_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002335 _visitor.visit_type(&*_i.ty);
David Tolnay7ac699c2018-08-24 14:00:58 -04002336 tokens_helper(_visitor, &_i.eq_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002337 _visitor.visit_expr(&*_i.expr);
David Tolnay7ac699c2018-08-24 14:00:58 -04002338 tokens_helper(_visitor, &_i.semi_token.spans);
Nika Layzell27726662017-10-24 23:16:35 -04002339}
David Tolnay8c81f622018-07-31 23:34:35 -07002340#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002341pub fn visit_item_struct<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemStruct) {
David Tolnay8c81f622018-07-31 23:34:35 -07002342 for it in &_i.attrs {
2343 _visitor.visit_attribute(it)
2344 }
2345 _visitor.visit_visibility(&_i.vis);
David Tolnay7ac699c2018-08-24 14:00:58 -04002346 tokens_helper(_visitor, &_i.struct_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002347 _visitor.visit_ident(&_i.ident);
2348 _visitor.visit_generics(&_i.generics);
2349 _visitor.visit_fields(&_i.fields);
2350 if let Some(ref it) = _i.semi_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002351 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002352 };
Nika Layzell27726662017-10-24 23:16:35 -04002353}
David Tolnay8c81f622018-07-31 23:34:35 -07002354#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002355pub fn visit_item_trait<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemTrait) {
David Tolnay8c81f622018-07-31 23:34:35 -07002356 for it in &_i.attrs {
2357 _visitor.visit_attribute(it)
2358 }
2359 _visitor.visit_visibility(&_i.vis);
2360 if let Some(ref it) = _i.unsafety {
David Tolnay7ac699c2018-08-24 14:00:58 -04002361 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002362 };
2363 if let Some(ref it) = _i.auto_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002364 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002365 };
David Tolnay7ac699c2018-08-24 14:00:58 -04002366 tokens_helper(_visitor, &_i.trait_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002367 _visitor.visit_ident(&_i.ident);
2368 _visitor.visit_generics(&_i.generics);
2369 if let Some(ref it) = _i.colon_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002370 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002371 };
2372 for el in Punctuated::pairs(&_i.supertraits) {
2373 let it = el.value();
2374 _visitor.visit_type_param_bound(it)
2375 }
David Tolnay7ac699c2018-08-24 14:00:58 -04002376 tokens_helper(_visitor, &_i.brace_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002377 for it in &_i.items {
2378 _visitor.visit_trait_item(it)
2379 }
Nika Layzell27726662017-10-24 23:16:35 -04002380}
David Tolnay8c81f622018-07-31 23:34:35 -07002381#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002382pub fn visit_item_type<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemType) {
David Tolnay8c81f622018-07-31 23:34:35 -07002383 for it in &_i.attrs {
2384 _visitor.visit_attribute(it)
2385 }
2386 _visitor.visit_visibility(&_i.vis);
David Tolnay7ac699c2018-08-24 14:00:58 -04002387 tokens_helper(_visitor, &_i.type_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002388 _visitor.visit_ident(&_i.ident);
2389 _visitor.visit_generics(&_i.generics);
David Tolnay7ac699c2018-08-24 14:00:58 -04002390 tokens_helper(_visitor, &_i.eq_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002391 _visitor.visit_type(&*_i.ty);
David Tolnay7ac699c2018-08-24 14:00:58 -04002392 tokens_helper(_visitor, &_i.semi_token.spans);
Nika Layzell27726662017-10-24 23:16:35 -04002393}
David Tolnay8c81f622018-07-31 23:34:35 -07002394#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002395pub fn visit_item_union<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemUnion) {
David Tolnay8c81f622018-07-31 23:34:35 -07002396 for it in &_i.attrs {
2397 _visitor.visit_attribute(it)
2398 }
2399 _visitor.visit_visibility(&_i.vis);
David Tolnay7ac699c2018-08-24 14:00:58 -04002400 tokens_helper(_visitor, &_i.union_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002401 _visitor.visit_ident(&_i.ident);
2402 _visitor.visit_generics(&_i.generics);
2403 _visitor.visit_fields_named(&_i.fields);
Nika Layzell27726662017-10-24 23:16:35 -04002404}
David Tolnay8c81f622018-07-31 23:34:35 -07002405#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002406pub fn visit_item_use<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemUse) {
David Tolnay8c81f622018-07-31 23:34:35 -07002407 for it in &_i.attrs {
2408 _visitor.visit_attribute(it)
2409 }
2410 _visitor.visit_visibility(&_i.vis);
David Tolnay7ac699c2018-08-24 14:00:58 -04002411 tokens_helper(_visitor, &_i.use_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002412 if let Some(ref it) = _i.leading_colon {
David Tolnay7ac699c2018-08-24 14:00:58 -04002413 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002414 };
2415 _visitor.visit_use_tree(&_i.tree);
David Tolnay7ac699c2018-08-24 14:00:58 -04002416 tokens_helper(_visitor, &_i.semi_token.spans);
Nika Layzell27726662017-10-24 23:16:35 -04002417}
David Tolnay8c81f622018-07-31 23:34:35 -07002418#[cfg(feature = "full")]
2419pub fn visit_item_verbatim<'ast, V: Visit<'ast> + ?Sized>(
2420 _visitor: &mut V,
2421 _i: &'ast ItemVerbatim,
2422) {
David Tolnay6af48992018-08-01 11:16:28 -07002423 skip!(_i.tts);
David Tolnay2ae520a2017-12-29 11:19:50 -05002424}
David Tolnay8c81f622018-07-31 23:34:35 -07002425#[cfg(any(feature = "full", feature = "derive"))]
2426#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002427pub fn visit_label<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Label) {
David Tolnay8c81f622018-07-31 23:34:35 -07002428 _visitor.visit_lifetime(&_i.name);
David Tolnay7ac699c2018-08-24 14:00:58 -04002429 tokens_helper(_visitor, &_i.colon_token.spans);
David Tolnaybcd498f2017-12-29 12:02:33 -05002430}
David Tolnay8c81f622018-07-31 23:34:35 -07002431#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002432pub fn visit_lifetime<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Lifetime) {
David Tolnay6af48992018-08-01 11:16:28 -07002433 skip!(_i.apostrophe);
David Tolnay8c81f622018-07-31 23:34:35 -07002434 _visitor.visit_ident(&_i.ident);
David Tolnay4ba63a02017-12-28 15:53:05 -05002435}
David Tolnay8c81f622018-07-31 23:34:35 -07002436#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002437pub fn visit_lifetime_def<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LifetimeDef) {
David Tolnay8c81f622018-07-31 23:34:35 -07002438 for it in &_i.attrs {
2439 _visitor.visit_attribute(it)
2440 }
2441 _visitor.visit_lifetime(&_i.lifetime);
2442 if let Some(ref it) = _i.colon_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002443 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002444 };
2445 for el in Punctuated::pairs(&_i.bounds) {
2446 let it = el.value();
2447 _visitor.visit_lifetime(it)
2448 }
David Tolnay4ba63a02017-12-28 15:53:05 -05002449}
David Tolnay8c81f622018-07-31 23:34:35 -07002450#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002451pub fn visit_lit<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Lit) {
David Tolnay360efd22018-01-04 23:35:26 -08002452 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002453 Lit::Str(ref _binding_0) => {
David Tolnay360efd22018-01-04 23:35:26 -08002454 _visitor.visit_lit_str(_binding_0);
2455 }
David Tolnay8c81f622018-07-31 23:34:35 -07002456 Lit::ByteStr(ref _binding_0) => {
David Tolnay360efd22018-01-04 23:35:26 -08002457 _visitor.visit_lit_byte_str(_binding_0);
2458 }
David Tolnay8c81f622018-07-31 23:34:35 -07002459 Lit::Byte(ref _binding_0) => {
David Tolnay360efd22018-01-04 23:35:26 -08002460 _visitor.visit_lit_byte(_binding_0);
2461 }
David Tolnay8c81f622018-07-31 23:34:35 -07002462 Lit::Char(ref _binding_0) => {
David Tolnay360efd22018-01-04 23:35:26 -08002463 _visitor.visit_lit_char(_binding_0);
2464 }
David Tolnay8c81f622018-07-31 23:34:35 -07002465 Lit::Int(ref _binding_0) => {
David Tolnay360efd22018-01-04 23:35:26 -08002466 _visitor.visit_lit_int(_binding_0);
2467 }
David Tolnay8c81f622018-07-31 23:34:35 -07002468 Lit::Float(ref _binding_0) => {
David Tolnay360efd22018-01-04 23:35:26 -08002469 _visitor.visit_lit_float(_binding_0);
2470 }
David Tolnay8c81f622018-07-31 23:34:35 -07002471 Lit::Bool(ref _binding_0) => {
David Tolnay360efd22018-01-04 23:35:26 -08002472 _visitor.visit_lit_bool(_binding_0);
2473 }
David Tolnay8c81f622018-07-31 23:34:35 -07002474 Lit::Verbatim(ref _binding_0) => {
David Tolnay360efd22018-01-04 23:35:26 -08002475 _visitor.visit_lit_verbatim(_binding_0);
2476 }
2477 }
2478}
David Tolnay8c81f622018-07-31 23:34:35 -07002479#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002480pub fn visit_lit_bool<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitBool) {
David Tolnay6af48992018-08-01 11:16:28 -07002481 skip!(_i.value);
David Tolnay8c81f622018-07-31 23:34:35 -07002482 _visitor.visit_span(&_i.span);
Nika Layzell27726662017-10-24 23:16:35 -04002483}
David Tolnay8c81f622018-07-31 23:34:35 -07002484#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002485pub fn visit_lit_byte<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitByte) {
David Tolnay6af48992018-08-01 11:16:28 -07002486 skip!(_i.token);
David Tolnay360efd22018-01-04 23:35:26 -08002487}
David Tolnay8c81f622018-07-31 23:34:35 -07002488#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002489pub fn visit_lit_byte_str<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitByteStr) {
David Tolnay6af48992018-08-01 11:16:28 -07002490 skip!(_i.token);
David Tolnay360efd22018-01-04 23:35:26 -08002491}
David Tolnay8c81f622018-07-31 23:34:35 -07002492#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002493pub fn visit_lit_char<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitChar) {
David Tolnay6af48992018-08-01 11:16:28 -07002494 skip!(_i.token);
David Tolnay360efd22018-01-04 23:35:26 -08002495}
David Tolnay8c81f622018-07-31 23:34:35 -07002496#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002497pub fn visit_lit_float<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitFloat) {
David Tolnay6af48992018-08-01 11:16:28 -07002498 skip!(_i.token);
David Tolnay360efd22018-01-04 23:35:26 -08002499}
David Tolnay8c81f622018-07-31 23:34:35 -07002500#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002501pub fn visit_lit_int<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitInt) {
David Tolnay6af48992018-08-01 11:16:28 -07002502 skip!(_i.token);
David Tolnay360efd22018-01-04 23:35:26 -08002503}
David Tolnay8c81f622018-07-31 23:34:35 -07002504#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002505pub fn visit_lit_str<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitStr) {
David Tolnay6af48992018-08-01 11:16:28 -07002506 skip!(_i.token);
David Tolnay360efd22018-01-04 23:35:26 -08002507}
David Tolnay8c81f622018-07-31 23:34:35 -07002508#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002509pub fn visit_lit_verbatim<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitVerbatim) {
David Tolnay6af48992018-08-01 11:16:28 -07002510 skip!(_i.token);
David Tolnay360efd22018-01-04 23:35:26 -08002511}
David Tolnay8c81f622018-07-31 23:34:35 -07002512#[cfg(any(feature = "full", feature = "derive"))]
2513#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002514pub fn visit_local<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Local) {
David Tolnay8c81f622018-07-31 23:34:35 -07002515 for it in &_i.attrs {
2516 _visitor.visit_attribute(it)
2517 }
David Tolnay7ac699c2018-08-24 14:00:58 -04002518 tokens_helper(_visitor, &_i.let_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002519 for el in Punctuated::pairs(&_i.pats) {
2520 let it = el.value();
2521 _visitor.visit_pat(it)
2522 }
2523 if let Some(ref it) = _i.ty {
David Tolnay7ac699c2018-08-24 14:00:58 -04002524 tokens_helper(_visitor, &(it).0.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002525 _visitor.visit_type(&*(it).1);
2526 };
2527 if let Some(ref it) = _i.init {
David Tolnay7ac699c2018-08-24 14:00:58 -04002528 tokens_helper(_visitor, &(it).0.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002529 _visitor.visit_expr(&*(it).1);
2530 };
David Tolnay7ac699c2018-08-24 14:00:58 -04002531 tokens_helper(_visitor, &_i.semi_token.spans);
Nika Layzell27726662017-10-24 23:16:35 -04002532}
David Tolnay8c81f622018-07-31 23:34:35 -07002533#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002534pub fn visit_macro<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Macro) {
David Tolnay8c81f622018-07-31 23:34:35 -07002535 _visitor.visit_path(&_i.path);
David Tolnay7ac699c2018-08-24 14:00:58 -04002536 tokens_helper(_visitor, &_i.bang_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002537 _visitor.visit_macro_delimiter(&_i.delimiter);
David Tolnay6af48992018-08-01 11:16:28 -07002538 skip!(_i.tts);
David Tolnayab919512017-12-30 23:31:51 -05002539}
David Tolnay8c81f622018-07-31 23:34:35 -07002540#[cfg(any(feature = "full", feature = "derive"))]
2541pub fn visit_macro_delimiter<'ast, V: Visit<'ast> + ?Sized>(
2542 _visitor: &mut V,
2543 _i: &'ast MacroDelimiter,
2544) {
David Tolnayab919512017-12-30 23:31:51 -05002545 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002546 MacroDelimiter::Paren(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04002547 tokens_helper(_visitor, &_binding_0.span);
David Tolnayab919512017-12-30 23:31:51 -05002548 }
David Tolnay8c81f622018-07-31 23:34:35 -07002549 MacroDelimiter::Brace(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04002550 tokens_helper(_visitor, &_binding_0.span);
David Tolnayab919512017-12-30 23:31:51 -05002551 }
David Tolnay8c81f622018-07-31 23:34:35 -07002552 MacroDelimiter::Bracket(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04002553 tokens_helper(_visitor, &_binding_0.span);
David Tolnayab919512017-12-30 23:31:51 -05002554 }
2555 }
David Tolnaydecf28d2017-11-11 11:56:45 -08002556}
David Tolnay8c81f622018-07-31 23:34:35 -07002557#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002558pub fn visit_member<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Member) {
David Tolnay85b69a42017-12-27 20:43:10 -05002559 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002560 Member::Named(ref _binding_0) => {
Alex Crichtond261d092018-05-18 13:47:35 -07002561 _visitor.visit_ident(_binding_0);
David Tolnay85b69a42017-12-27 20:43:10 -05002562 }
David Tolnay8c81f622018-07-31 23:34:35 -07002563 Member::Unnamed(ref _binding_0) => {
David Tolnay85b69a42017-12-27 20:43:10 -05002564 _visitor.visit_index(_binding_0);
2565 }
2566 }
2567}
David Tolnay8c81f622018-07-31 23:34:35 -07002568#[cfg(any(feature = "full", feature = "derive"))]
David Tolnayaaadd782018-01-06 22:58:13 -08002569pub fn visit_meta<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Meta) {
Nika Layzell27726662017-10-24 23:16:35 -04002570 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002571 Meta::Word(ref _binding_0) => {
Alex Crichtond261d092018-05-18 13:47:35 -07002572 _visitor.visit_ident(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002573 }
David Tolnay8c81f622018-07-31 23:34:35 -07002574 Meta::List(ref _binding_0) => {
David Tolnayaaadd782018-01-06 22:58:13 -08002575 _visitor.visit_meta_list(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002576 }
David Tolnay8c81f622018-07-31 23:34:35 -07002577 Meta::NameValue(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002578 _visitor.visit_meta_name_value(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002579 }
2580 }
2581}
David Tolnay8c81f622018-07-31 23:34:35 -07002582#[cfg(any(feature = "full", feature = "derive"))]
David Tolnayaaadd782018-01-06 22:58:13 -08002583pub fn visit_meta_list<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MetaList) {
David Tolnay8c81f622018-07-31 23:34:35 -07002584 _visitor.visit_ident(&_i.ident);
David Tolnay7ac699c2018-08-24 14:00:58 -04002585 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002586 for el in Punctuated::pairs(&_i.nested) {
2587 let it = el.value();
2588 _visitor.visit_nested_meta(it)
2589 }
Nika Layzell27726662017-10-24 23:16:35 -04002590}
David Tolnay8c81f622018-07-31 23:34:35 -07002591#[cfg(any(feature = "full", feature = "derive"))]
2592pub fn visit_meta_name_value<'ast, V: Visit<'ast> + ?Sized>(
2593 _visitor: &mut V,
2594 _i: &'ast MetaNameValue,
2595) {
2596 _visitor.visit_ident(&_i.ident);
David Tolnay7ac699c2018-08-24 14:00:58 -04002597 tokens_helper(_visitor, &_i.eq_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002598 _visitor.visit_lit(&_i.lit);
Nika Layzell27726662017-10-24 23:16:35 -04002599}
David Tolnay8c81f622018-07-31 23:34:35 -07002600#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002601pub fn visit_method_sig<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MethodSig) {
David Tolnay8c81f622018-07-31 23:34:35 -07002602 if let Some(ref it) = _i.constness {
David Tolnay7ac699c2018-08-24 14:00:58 -04002603 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002604 };
2605 if let Some(ref it) = _i.unsafety {
David Tolnay7ac699c2018-08-24 14:00:58 -04002606 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002607 };
Yusuke Sasakif00a3ef2018-07-20 22:08:42 +09002608 if let Some(ref it) = _i.asyncness {
2609 tokens_helper(_visitor, &it.span)
2610 };
David Tolnay8c81f622018-07-31 23:34:35 -07002611 if let Some(ref it) = _i.abi {
2612 _visitor.visit_abi(it)
2613 };
2614 _visitor.visit_ident(&_i.ident);
2615 _visitor.visit_fn_decl(&_i.decl);
Nika Layzell27726662017-10-24 23:16:35 -04002616}
David Tolnay8c81f622018-07-31 23:34:35 -07002617#[cfg(any(feature = "full", feature = "derive"))]
2618#[cfg(feature = "full")]
2619pub fn visit_method_turbofish<'ast, V: Visit<'ast> + ?Sized>(
2620 _visitor: &mut V,
2621 _i: &'ast MethodTurbofish,
2622) {
David Tolnay7ac699c2018-08-24 14:00:58 -04002623 tokens_helper(_visitor, &_i.colon2_token.spans);
2624 tokens_helper(_visitor, &_i.lt_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002625 for el in Punctuated::pairs(&_i.args) {
2626 let it = el.value();
2627 _visitor.visit_generic_method_argument(it)
2628 }
David Tolnay7ac699c2018-08-24 14:00:58 -04002629 tokens_helper(_visitor, &_i.gt_token.spans);
David Tolnayd60cfec2017-12-29 00:21:38 -05002630}
David Tolnay8c81f622018-07-31 23:34:35 -07002631#[cfg(any(feature = "full", feature = "derive"))]
David Tolnayaaadd782018-01-06 22:58:13 -08002632pub fn visit_nested_meta<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast NestedMeta) {
Nika Layzell27726662017-10-24 23:16:35 -04002633 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002634 NestedMeta::Meta(ref _binding_0) => {
David Tolnayaaadd782018-01-06 22:58:13 -08002635 _visitor.visit_meta(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002636 }
David Tolnay8c81f622018-07-31 23:34:35 -07002637 NestedMeta::Literal(ref _binding_0) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05002638 _visitor.visit_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002639 }
2640 }
2641}
David Tolnay8c81f622018-07-31 23:34:35 -07002642#[cfg(any(feature = "full", feature = "derive"))]
2643pub fn visit_parenthesized_generic_arguments<'ast, V: Visit<'ast> + ?Sized>(
2644 _visitor: &mut V,
2645 _i: &'ast ParenthesizedGenericArguments,
2646) {
David Tolnay7ac699c2018-08-24 14:00:58 -04002647 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002648 for el in Punctuated::pairs(&_i.inputs) {
2649 let it = el.value();
2650 _visitor.visit_type(it)
2651 }
2652 _visitor.visit_return_type(&_i.output);
Nika Layzell27726662017-10-24 23:16:35 -04002653}
David Tolnay8c81f622018-07-31 23:34:35 -07002654#[cfg(any(feature = "full", feature = "derive"))]
2655#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002656pub fn visit_pat<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Pat) {
Nika Layzell27726662017-10-24 23:16:35 -04002657 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002658 Pat::Wild(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002659 _visitor.visit_pat_wild(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002660 }
David Tolnay8c81f622018-07-31 23:34:35 -07002661 Pat::Ident(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002662 _visitor.visit_pat_ident(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002663 }
David Tolnay8c81f622018-07-31 23:34:35 -07002664 Pat::Struct(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002665 _visitor.visit_pat_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002666 }
David Tolnay8c81f622018-07-31 23:34:35 -07002667 Pat::TupleStruct(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002668 _visitor.visit_pat_tuple_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002669 }
David Tolnay8c81f622018-07-31 23:34:35 -07002670 Pat::Path(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002671 _visitor.visit_pat_path(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002672 }
David Tolnay8c81f622018-07-31 23:34:35 -07002673 Pat::Tuple(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002674 _visitor.visit_pat_tuple(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002675 }
David Tolnay8c81f622018-07-31 23:34:35 -07002676 Pat::Box(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002677 _visitor.visit_pat_box(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002678 }
David Tolnay8c81f622018-07-31 23:34:35 -07002679 Pat::Ref(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002680 _visitor.visit_pat_ref(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002681 }
David Tolnay8c81f622018-07-31 23:34:35 -07002682 Pat::Lit(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002683 _visitor.visit_pat_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002684 }
David Tolnay8c81f622018-07-31 23:34:35 -07002685 Pat::Range(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002686 _visitor.visit_pat_range(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002687 }
David Tolnay8c81f622018-07-31 23:34:35 -07002688 Pat::Slice(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002689 _visitor.visit_pat_slice(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002690 }
David Tolnay8c81f622018-07-31 23:34:35 -07002691 Pat::Macro(ref _binding_0) => {
David Tolnay323279a2017-12-29 11:26:32 -05002692 _visitor.visit_pat_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002693 }
David Tolnay8c81f622018-07-31 23:34:35 -07002694 Pat::Verbatim(ref _binding_0) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05002695 _visitor.visit_pat_verbatim(_binding_0);
2696 }
Nika Layzell27726662017-10-24 23:16:35 -04002697 }
2698}
David Tolnay8c81f622018-07-31 23:34:35 -07002699#[cfg(any(feature = "full", feature = "derive"))]
2700#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002701pub fn visit_pat_box<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatBox) {
David Tolnay7ac699c2018-08-24 14:00:58 -04002702 tokens_helper(_visitor, &_i.box_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002703 _visitor.visit_pat(&*_i.pat);
Nika Layzell27726662017-10-24 23:16:35 -04002704}
David Tolnay8c81f622018-07-31 23:34:35 -07002705#[cfg(any(feature = "full", feature = "derive"))]
2706#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002707pub fn visit_pat_ident<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatIdent) {
David Tolnay8c81f622018-07-31 23:34:35 -07002708 if let Some(ref it) = _i.by_ref {
David Tolnay7ac699c2018-08-24 14:00:58 -04002709 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002710 };
2711 if let Some(ref it) = _i.mutability {
David Tolnay7ac699c2018-08-24 14:00:58 -04002712 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002713 };
2714 _visitor.visit_ident(&_i.ident);
2715 if let Some(ref it) = _i.subpat {
David Tolnay7ac699c2018-08-24 14:00:58 -04002716 tokens_helper(_visitor, &(it).0.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002717 _visitor.visit_pat(&*(it).1);
2718 };
Nika Layzell27726662017-10-24 23:16:35 -04002719}
David Tolnay8c81f622018-07-31 23:34:35 -07002720#[cfg(any(feature = "full", feature = "derive"))]
2721#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002722pub fn visit_pat_lit<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatLit) {
David Tolnay8c81f622018-07-31 23:34:35 -07002723 _visitor.visit_expr(&*_i.expr);
Nika Layzell27726662017-10-24 23:16:35 -04002724}
David Tolnay8c81f622018-07-31 23:34:35 -07002725#[cfg(any(feature = "full", feature = "derive"))]
2726#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002727pub fn visit_pat_macro<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatMacro) {
David Tolnay8c81f622018-07-31 23:34:35 -07002728 _visitor.visit_macro(&_i.mac);
David Tolnay323279a2017-12-29 11:26:32 -05002729}
David Tolnay8c81f622018-07-31 23:34:35 -07002730#[cfg(any(feature = "full", feature = "derive"))]
2731#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002732pub fn visit_pat_path<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatPath) {
David Tolnay8c81f622018-07-31 23:34:35 -07002733 if let Some(ref it) = _i.qself {
2734 _visitor.visit_qself(it)
2735 };
2736 _visitor.visit_path(&_i.path);
Nika Layzell27726662017-10-24 23:16:35 -04002737}
David Tolnay8c81f622018-07-31 23:34:35 -07002738#[cfg(any(feature = "full", feature = "derive"))]
2739#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002740pub fn visit_pat_range<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatRange) {
David Tolnay8c81f622018-07-31 23:34:35 -07002741 _visitor.visit_expr(&*_i.lo);
2742 _visitor.visit_range_limits(&_i.limits);
2743 _visitor.visit_expr(&*_i.hi);
Nika Layzell27726662017-10-24 23:16:35 -04002744}
David Tolnay8c81f622018-07-31 23:34:35 -07002745#[cfg(any(feature = "full", feature = "derive"))]
2746#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002747pub fn visit_pat_ref<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatRef) {
David Tolnay7ac699c2018-08-24 14:00:58 -04002748 tokens_helper(_visitor, &_i.and_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002749 if let Some(ref it) = _i.mutability {
David Tolnay7ac699c2018-08-24 14:00:58 -04002750 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002751 };
2752 _visitor.visit_pat(&*_i.pat);
Nika Layzell27726662017-10-24 23:16:35 -04002753}
David Tolnay8c81f622018-07-31 23:34:35 -07002754#[cfg(any(feature = "full", feature = "derive"))]
2755#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002756pub fn visit_pat_slice<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatSlice) {
David Tolnay7ac699c2018-08-24 14:00:58 -04002757 tokens_helper(_visitor, &_i.bracket_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002758 for el in Punctuated::pairs(&_i.front) {
2759 let it = el.value();
2760 _visitor.visit_pat(it)
2761 }
2762 if let Some(ref it) = _i.middle {
2763 _visitor.visit_pat(&**it)
2764 };
2765 if let Some(ref it) = _i.dot2_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002766 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002767 };
2768 if let Some(ref it) = _i.comma_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002769 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002770 };
2771 for el in Punctuated::pairs(&_i.back) {
2772 let it = el.value();
2773 _visitor.visit_pat(it)
2774 }
Nika Layzell27726662017-10-24 23:16:35 -04002775}
David Tolnay8c81f622018-07-31 23:34:35 -07002776#[cfg(any(feature = "full", feature = "derive"))]
2777#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002778pub fn visit_pat_struct<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatStruct) {
David Tolnay8c81f622018-07-31 23:34:35 -07002779 _visitor.visit_path(&_i.path);
David Tolnay7ac699c2018-08-24 14:00:58 -04002780 tokens_helper(_visitor, &_i.brace_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002781 for el in Punctuated::pairs(&_i.fields) {
2782 let it = el.value();
2783 _visitor.visit_field_pat(it)
2784 }
2785 if let Some(ref it) = _i.dot2_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002786 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002787 };
Nika Layzell27726662017-10-24 23:16:35 -04002788}
David Tolnay8c81f622018-07-31 23:34:35 -07002789#[cfg(any(feature = "full", feature = "derive"))]
2790#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002791pub fn visit_pat_tuple<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatTuple) {
David Tolnay7ac699c2018-08-24 14:00:58 -04002792 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002793 for el in Punctuated::pairs(&_i.front) {
2794 let it = el.value();
2795 _visitor.visit_pat(it)
2796 }
2797 if let Some(ref it) = _i.dot2_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002798 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002799 };
2800 if let Some(ref it) = _i.comma_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002801 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002802 };
2803 for el in Punctuated::pairs(&_i.back) {
2804 let it = el.value();
2805 _visitor.visit_pat(it)
2806 }
Nika Layzell27726662017-10-24 23:16:35 -04002807}
David Tolnay8c81f622018-07-31 23:34:35 -07002808#[cfg(any(feature = "full", feature = "derive"))]
2809#[cfg(feature = "full")]
2810pub fn visit_pat_tuple_struct<'ast, V: Visit<'ast> + ?Sized>(
2811 _visitor: &mut V,
2812 _i: &'ast PatTupleStruct,
2813) {
2814 _visitor.visit_path(&_i.path);
2815 _visitor.visit_pat_tuple(&_i.pat);
Nika Layzell27726662017-10-24 23:16:35 -04002816}
David Tolnay8c81f622018-07-31 23:34:35 -07002817#[cfg(any(feature = "full", feature = "derive"))]
2818#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002819pub fn visit_pat_verbatim<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatVerbatim) {
David Tolnay6af48992018-08-01 11:16:28 -07002820 skip!(_i.tts);
David Tolnay2ae520a2017-12-29 11:19:50 -05002821}
David Tolnay8c81f622018-07-31 23:34:35 -07002822#[cfg(any(feature = "full", feature = "derive"))]
2823#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002824pub fn visit_pat_wild<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatWild) {
David Tolnay7ac699c2018-08-24 14:00:58 -04002825 tokens_helper(_visitor, &_i.underscore_token.spans);
Nika Layzell27726662017-10-24 23:16:35 -04002826}
David Tolnay8c81f622018-07-31 23:34:35 -07002827#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002828pub fn visit_path<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Path) {
David Tolnay8c81f622018-07-31 23:34:35 -07002829 if let Some(ref it) = _i.leading_colon {
David Tolnay7ac699c2018-08-24 14:00:58 -04002830 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002831 };
2832 for el in Punctuated::pairs(&_i.segments) {
2833 let it = el.value();
2834 _visitor.visit_path_segment(it)
2835 }
Nika Layzell27726662017-10-24 23:16:35 -04002836}
David Tolnay8c81f622018-07-31 23:34:35 -07002837#[cfg(any(feature = "full", feature = "derive"))]
2838pub fn visit_path_arguments<'ast, V: Visit<'ast> + ?Sized>(
2839 _visitor: &mut V,
2840 _i: &'ast PathArguments,
2841) {
Nika Layzellc08227a2017-12-04 16:30:17 -05002842 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002843 PathArguments::None => {}
2844 PathArguments::AngleBracketed(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002845 _visitor.visit_angle_bracketed_generic_arguments(_binding_0);
Nika Layzellc08227a2017-12-04 16:30:17 -05002846 }
David Tolnay8c81f622018-07-31 23:34:35 -07002847 PathArguments::Parenthesized(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002848 _visitor.visit_parenthesized_generic_arguments(_binding_0);
Nika Layzellc08227a2017-12-04 16:30:17 -05002849 }
2850 }
2851}
David Tolnay8c81f622018-07-31 23:34:35 -07002852#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002853pub fn visit_path_segment<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PathSegment) {
David Tolnay8c81f622018-07-31 23:34:35 -07002854 _visitor.visit_ident(&_i.ident);
2855 _visitor.visit_path_arguments(&_i.arguments);
Nika Layzell27726662017-10-24 23:16:35 -04002856}
David Tolnay8c81f622018-07-31 23:34:35 -07002857#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002858pub fn visit_predicate_eq<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PredicateEq) {
David Tolnay8c81f622018-07-31 23:34:35 -07002859 _visitor.visit_type(&_i.lhs_ty);
David Tolnay7ac699c2018-08-24 14:00:58 -04002860 tokens_helper(_visitor, &_i.eq_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002861 _visitor.visit_type(&_i.rhs_ty);
David Tolnayd4add852018-01-01 20:13:24 -08002862}
David Tolnay8c81f622018-07-31 23:34:35 -07002863#[cfg(any(feature = "full", feature = "derive"))]
2864pub fn visit_predicate_lifetime<'ast, V: Visit<'ast> + ?Sized>(
2865 _visitor: &mut V,
2866 _i: &'ast PredicateLifetime,
2867) {
2868 _visitor.visit_lifetime(&_i.lifetime);
2869 if let Some(ref it) = _i.colon_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002870 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002871 };
2872 for el in Punctuated::pairs(&_i.bounds) {
2873 let it = el.value();
2874 _visitor.visit_lifetime(it)
2875 }
David Tolnayd4add852018-01-01 20:13:24 -08002876}
David Tolnay8c81f622018-07-31 23:34:35 -07002877#[cfg(any(feature = "full", feature = "derive"))]
2878pub fn visit_predicate_type<'ast, V: Visit<'ast> + ?Sized>(
2879 _visitor: &mut V,
2880 _i: &'ast PredicateType,
2881) {
2882 if let Some(ref it) = _i.lifetimes {
2883 _visitor.visit_bound_lifetimes(it)
2884 };
2885 _visitor.visit_type(&_i.bounded_ty);
David Tolnay7ac699c2018-08-24 14:00:58 -04002886 tokens_helper(_visitor, &_i.colon_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002887 for el in Punctuated::pairs(&_i.bounds) {
2888 let it = el.value();
2889 _visitor.visit_type_param_bound(it)
2890 }
David Tolnayd4add852018-01-01 20:13:24 -08002891}
David Tolnay8c81f622018-07-31 23:34:35 -07002892#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002893pub fn visit_qself<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast QSelf) {
David Tolnay7ac699c2018-08-24 14:00:58 -04002894 tokens_helper(_visitor, &_i.lt_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002895 _visitor.visit_type(&*_i.ty);
David Tolnay6af48992018-08-01 11:16:28 -07002896 skip!(_i.position);
David Tolnay8c81f622018-07-31 23:34:35 -07002897 if let Some(ref it) = _i.as_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002898 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002899 };
David Tolnay7ac699c2018-08-24 14:00:58 -04002900 tokens_helper(_visitor, &_i.gt_token.spans);
Nika Layzell27726662017-10-24 23:16:35 -04002901}
David Tolnay8c81f622018-07-31 23:34:35 -07002902#[cfg(any(feature = "full", feature = "derive"))]
2903#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002904pub fn visit_range_limits<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast RangeLimits) {
Nika Layzell27726662017-10-24 23:16:35 -04002905 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002906 RangeLimits::HalfOpen(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04002907 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -04002908 }
David Tolnay8c81f622018-07-31 23:34:35 -07002909 RangeLimits::Closed(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04002910 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -04002911 }
2912 }
2913}
David Tolnay8c81f622018-07-31 23:34:35 -07002914#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002915pub fn visit_return_type<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ReturnType) {
David Tolnayf93b90d2017-11-11 19:21:26 -08002916 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002917 ReturnType::Default => {}
2918 ReturnType::Type(ref _binding_0, ref _binding_1) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04002919 tokens_helper(_visitor, &_binding_0.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002920 _visitor.visit_type(&**_binding_1);
David Tolnayf93b90d2017-11-11 19:21:26 -08002921 }
2922 }
2923}
David Tolnay8c81f622018-07-31 23:34:35 -07002924pub fn visit_span<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Span) {}
2925#[cfg(any(feature = "full", feature = "derive"))]
2926#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002927pub fn visit_stmt<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Stmt) {
Nika Layzell27726662017-10-24 23:16:35 -04002928 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002929 Stmt::Local(ref _binding_0) => {
David Tolnay1f0b7b82018-01-06 16:07:14 -08002930 _visitor.visit_local(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002931 }
David Tolnay8c81f622018-07-31 23:34:35 -07002932 Stmt::Item(ref _binding_0) => {
David Tolnay1f0b7b82018-01-06 16:07:14 -08002933 _visitor.visit_item(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002934 }
David Tolnay8c81f622018-07-31 23:34:35 -07002935 Stmt::Expr(ref _binding_0) => {
David Tolnay1f0b7b82018-01-06 16:07:14 -08002936 _visitor.visit_expr(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002937 }
David Tolnay8c81f622018-07-31 23:34:35 -07002938 Stmt::Semi(ref _binding_0, ref _binding_1) => {
David Tolnay1f0b7b82018-01-06 16:07:14 -08002939 _visitor.visit_expr(_binding_0);
David Tolnay7ac699c2018-08-24 14:00:58 -04002940 tokens_helper(_visitor, &_binding_1.spans);
Nika Layzell27726662017-10-24 23:16:35 -04002941 }
Nika Layzell27726662017-10-24 23:16:35 -04002942 }
2943}
David Tolnay8c81f622018-07-31 23:34:35 -07002944#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002945pub fn visit_trait_bound<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitBound) {
David Tolnay8c81f622018-07-31 23:34:35 -07002946 if let Some(ref it) = _i.paren_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002947 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002948 };
2949 _visitor.visit_trait_bound_modifier(&_i.modifier);
2950 if let Some(ref it) = _i.lifetimes {
2951 _visitor.visit_bound_lifetimes(it)
2952 };
2953 _visitor.visit_path(&_i.path);
David Tolnay40fb8ce2018-01-02 10:53:46 -08002954}
David Tolnay8c81f622018-07-31 23:34:35 -07002955#[cfg(any(feature = "full", feature = "derive"))]
2956pub fn visit_trait_bound_modifier<'ast, V: Visit<'ast> + ?Sized>(
2957 _visitor: &mut V,
2958 _i: &'ast TraitBoundModifier,
2959) {
Nika Layzell27726662017-10-24 23:16:35 -04002960 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002961 TraitBoundModifier::None => {}
2962 TraitBoundModifier::Maybe(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04002963 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -04002964 }
2965 }
2966}
David Tolnay8c81f622018-07-31 23:34:35 -07002967#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002968pub fn visit_trait_item<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItem) {
Nika Layzell27726662017-10-24 23:16:35 -04002969 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002970 TraitItem::Const(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002971 _visitor.visit_trait_item_const(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002972 }
David Tolnay8c81f622018-07-31 23:34:35 -07002973 TraitItem::Method(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002974 _visitor.visit_trait_item_method(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002975 }
David Tolnay8c81f622018-07-31 23:34:35 -07002976 TraitItem::Type(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002977 _visitor.visit_trait_item_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002978 }
David Tolnay8c81f622018-07-31 23:34:35 -07002979 TraitItem::Macro(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002980 _visitor.visit_trait_item_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002981 }
David Tolnay8c81f622018-07-31 23:34:35 -07002982 TraitItem::Verbatim(ref _binding_0) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05002983 _visitor.visit_trait_item_verbatim(_binding_0);
2984 }
Nika Layzell27726662017-10-24 23:16:35 -04002985 }
2986}
David Tolnay8c81f622018-07-31 23:34:35 -07002987#[cfg(feature = "full")]
2988pub fn visit_trait_item_const<'ast, V: Visit<'ast> + ?Sized>(
2989 _visitor: &mut V,
2990 _i: &'ast TraitItemConst,
2991) {
2992 for it in &_i.attrs {
2993 _visitor.visit_attribute(it)
2994 }
David Tolnay7ac699c2018-08-24 14:00:58 -04002995 tokens_helper(_visitor, &_i.const_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002996 _visitor.visit_ident(&_i.ident);
David Tolnay7ac699c2018-08-24 14:00:58 -04002997 tokens_helper(_visitor, &_i.colon_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002998 _visitor.visit_type(&_i.ty);
2999 if let Some(ref it) = _i.default {
David Tolnay7ac699c2018-08-24 14:00:58 -04003000 tokens_helper(_visitor, &(it).0.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07003001 _visitor.visit_expr(&(it).1);
3002 };
David Tolnay7ac699c2018-08-24 14:00:58 -04003003 tokens_helper(_visitor, &_i.semi_token.spans);
David Tolnayda705bd2017-11-10 21:58:05 -08003004}
David Tolnay8c81f622018-07-31 23:34:35 -07003005#[cfg(feature = "full")]
3006pub fn visit_trait_item_macro<'ast, V: Visit<'ast> + ?Sized>(
3007 _visitor: &mut V,
3008 _i: &'ast TraitItemMacro,
3009) {
3010 for it in &_i.attrs {
3011 _visitor.visit_attribute(it)
3012 }
3013 _visitor.visit_macro(&_i.mac);
3014 if let Some(ref it) = _i.semi_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04003015 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07003016 };
David Tolnayda705bd2017-11-10 21:58:05 -08003017}
David Tolnay8c81f622018-07-31 23:34:35 -07003018#[cfg(feature = "full")]
3019pub fn visit_trait_item_method<'ast, V: Visit<'ast> + ?Sized>(
3020 _visitor: &mut V,
3021 _i: &'ast TraitItemMethod,
3022) {
3023 for it in &_i.attrs {
3024 _visitor.visit_attribute(it)
3025 }
3026 _visitor.visit_method_sig(&_i.sig);
3027 if let Some(ref it) = _i.default {
3028 _visitor.visit_block(it)
3029 };
3030 if let Some(ref it) = _i.semi_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04003031 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07003032 };
Nika Layzell27726662017-10-24 23:16:35 -04003033}
David Tolnay8c81f622018-07-31 23:34:35 -07003034#[cfg(feature = "full")]
3035pub fn visit_trait_item_type<'ast, V: Visit<'ast> + ?Sized>(
3036 _visitor: &mut V,
3037 _i: &'ast TraitItemType,
3038) {
3039 for it in &_i.attrs {
3040 _visitor.visit_attribute(it)
3041 }
David Tolnay7ac699c2018-08-24 14:00:58 -04003042 tokens_helper(_visitor, &_i.type_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003043 _visitor.visit_ident(&_i.ident);
3044 _visitor.visit_generics(&_i.generics);
3045 if let Some(ref it) = _i.colon_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04003046 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07003047 };
3048 for el in Punctuated::pairs(&_i.bounds) {
3049 let it = el.value();
3050 _visitor.visit_type_param_bound(it)
3051 }
3052 if let Some(ref it) = _i.default {
David Tolnay7ac699c2018-08-24 14:00:58 -04003053 tokens_helper(_visitor, &(it).0.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07003054 _visitor.visit_type(&(it).1);
3055 };
David Tolnay7ac699c2018-08-24 14:00:58 -04003056 tokens_helper(_visitor, &_i.semi_token.spans);
Nika Layzell27726662017-10-24 23:16:35 -04003057}
David Tolnay8c81f622018-07-31 23:34:35 -07003058#[cfg(feature = "full")]
3059pub fn visit_trait_item_verbatim<'ast, V: Visit<'ast> + ?Sized>(
3060 _visitor: &mut V,
3061 _i: &'ast TraitItemVerbatim,
3062) {
David Tolnay6af48992018-08-01 11:16:28 -07003063 skip!(_i.tts);
David Tolnay2ae520a2017-12-29 11:19:50 -05003064}
David Tolnay8c81f622018-07-31 23:34:35 -07003065#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003066pub fn visit_type<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Type) {
Nika Layzell27726662017-10-24 23:16:35 -04003067 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07003068 Type::Slice(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003069 _visitor.visit_type_slice(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003070 }
David Tolnay8c81f622018-07-31 23:34:35 -07003071 Type::Array(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003072 _visitor.visit_type_array(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003073 }
David Tolnay8c81f622018-07-31 23:34:35 -07003074 Type::Ptr(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003075 _visitor.visit_type_ptr(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003076 }
David Tolnay8c81f622018-07-31 23:34:35 -07003077 Type::Reference(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003078 _visitor.visit_type_reference(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003079 }
David Tolnay8c81f622018-07-31 23:34:35 -07003080 Type::BareFn(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003081 _visitor.visit_type_bare_fn(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003082 }
David Tolnay8c81f622018-07-31 23:34:35 -07003083 Type::Never(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003084 _visitor.visit_type_never(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003085 }
David Tolnay8c81f622018-07-31 23:34:35 -07003086 Type::Tuple(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003087 _visitor.visit_type_tuple(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003088 }
David Tolnay8c81f622018-07-31 23:34:35 -07003089 Type::Path(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003090 _visitor.visit_type_path(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003091 }
David Tolnay8c81f622018-07-31 23:34:35 -07003092 Type::TraitObject(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003093 _visitor.visit_type_trait_object(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003094 }
David Tolnay8c81f622018-07-31 23:34:35 -07003095 Type::ImplTrait(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003096 _visitor.visit_type_impl_trait(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003097 }
David Tolnay8c81f622018-07-31 23:34:35 -07003098 Type::Paren(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003099 _visitor.visit_type_paren(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003100 }
David Tolnay8c81f622018-07-31 23:34:35 -07003101 Type::Group(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003102 _visitor.visit_type_group(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003103 }
David Tolnay8c81f622018-07-31 23:34:35 -07003104 Type::Infer(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003105 _visitor.visit_type_infer(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003106 }
David Tolnay8c81f622018-07-31 23:34:35 -07003107 Type::Macro(ref _binding_0) => {
David Tolnay323279a2017-12-29 11:26:32 -05003108 _visitor.visit_type_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003109 }
David Tolnay8c81f622018-07-31 23:34:35 -07003110 Type::Verbatim(ref _binding_0) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05003111 _visitor.visit_type_verbatim(_binding_0);
3112 }
Nika Layzell27726662017-10-24 23:16:35 -04003113 }
3114}
David Tolnay8c81f622018-07-31 23:34:35 -07003115#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003116pub fn visit_type_array<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeArray) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003117 tokens_helper(_visitor, &_i.bracket_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003118 _visitor.visit_type(&*_i.elem);
David Tolnay7ac699c2018-08-24 14:00:58 -04003119 tokens_helper(_visitor, &_i.semi_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07003120 _visitor.visit_expr(&_i.len);
Nika Layzell27726662017-10-24 23:16:35 -04003121}
David Tolnay8c81f622018-07-31 23:34:35 -07003122#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003123pub fn visit_type_bare_fn<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeBareFn) {
David Tolnay8c81f622018-07-31 23:34:35 -07003124 if let Some(ref it) = _i.unsafety {
David Tolnay7ac699c2018-08-24 14:00:58 -04003125 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07003126 };
3127 if let Some(ref it) = _i.abi {
3128 _visitor.visit_abi(it)
3129 };
David Tolnay7ac699c2018-08-24 14:00:58 -04003130 tokens_helper(_visitor, &_i.fn_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003131 if let Some(ref it) = _i.lifetimes {
3132 _visitor.visit_bound_lifetimes(it)
3133 };
David Tolnay7ac699c2018-08-24 14:00:58 -04003134 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003135 for el in Punctuated::pairs(&_i.inputs) {
3136 let it = el.value();
3137 _visitor.visit_bare_fn_arg(it)
3138 }
3139 if let Some(ref it) = _i.variadic {
David Tolnay7ac699c2018-08-24 14:00:58 -04003140 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07003141 };
3142 _visitor.visit_return_type(&_i.output);
Nika Layzell27726662017-10-24 23:16:35 -04003143}
David Tolnay8c81f622018-07-31 23:34:35 -07003144#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003145pub fn visit_type_group<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeGroup) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003146 tokens_helper(_visitor, &_i.group_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003147 _visitor.visit_type(&*_i.elem);
Nika Layzell27726662017-10-24 23:16:35 -04003148}
David Tolnay8c81f622018-07-31 23:34:35 -07003149#[cfg(any(feature = "full", feature = "derive"))]
3150pub fn visit_type_impl_trait<'ast, V: Visit<'ast> + ?Sized>(
3151 _visitor: &mut V,
3152 _i: &'ast TypeImplTrait,
3153) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003154 tokens_helper(_visitor, &_i.impl_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003155 for el in Punctuated::pairs(&_i.bounds) {
3156 let it = el.value();
3157 _visitor.visit_type_param_bound(it)
3158 }
Nika Layzell27726662017-10-24 23:16:35 -04003159}
David Tolnay8c81f622018-07-31 23:34:35 -07003160#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003161pub fn visit_type_infer<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeInfer) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003162 tokens_helper(_visitor, &_i.underscore_token.spans);
Nika Layzell27726662017-10-24 23:16:35 -04003163}
David Tolnay8c81f622018-07-31 23:34:35 -07003164#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003165pub fn visit_type_macro<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeMacro) {
David Tolnay8c81f622018-07-31 23:34:35 -07003166 _visitor.visit_macro(&_i.mac);
David Tolnay323279a2017-12-29 11:26:32 -05003167}
David Tolnay8c81f622018-07-31 23:34:35 -07003168#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003169pub fn visit_type_never<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeNever) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003170 tokens_helper(_visitor, &_i.bang_token.spans);
Nika Layzell27726662017-10-24 23:16:35 -04003171}
David Tolnay8c81f622018-07-31 23:34:35 -07003172#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003173pub fn visit_type_param<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParam) {
David Tolnay8c81f622018-07-31 23:34:35 -07003174 for it in &_i.attrs {
3175 _visitor.visit_attribute(it)
3176 }
3177 _visitor.visit_ident(&_i.ident);
3178 if let Some(ref it) = _i.colon_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04003179 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07003180 };
3181 for el in Punctuated::pairs(&_i.bounds) {
3182 let it = el.value();
3183 _visitor.visit_type_param_bound(it)
3184 }
3185 if let Some(ref it) = _i.eq_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04003186 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07003187 };
3188 if let Some(ref it) = _i.default {
3189 _visitor.visit_type(it)
3190 };
Nika Layzell27726662017-10-24 23:16:35 -04003191}
David Tolnay8c81f622018-07-31 23:34:35 -07003192#[cfg(any(feature = "full", feature = "derive"))]
3193pub fn visit_type_param_bound<'ast, V: Visit<'ast> + ?Sized>(
3194 _visitor: &mut V,
3195 _i: &'ast TypeParamBound,
3196) {
Nika Layzell27726662017-10-24 23:16:35 -04003197 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07003198 TypeParamBound::Trait(ref _binding_0) => {
David Tolnay40fb8ce2018-01-02 10:53:46 -08003199 _visitor.visit_trait_bound(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003200 }
David Tolnay8c81f622018-07-31 23:34:35 -07003201 TypeParamBound::Lifetime(ref _binding_0) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05003202 _visitor.visit_lifetime(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003203 }
3204 }
3205}
David Tolnay8c81f622018-07-31 23:34:35 -07003206#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003207pub fn visit_type_paren<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParen) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003208 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003209 _visitor.visit_type(&*_i.elem);
Nika Layzell27726662017-10-24 23:16:35 -04003210}
David Tolnay8c81f622018-07-31 23:34:35 -07003211#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003212pub fn visit_type_path<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypePath) {
David Tolnay8c81f622018-07-31 23:34:35 -07003213 if let Some(ref it) = _i.qself {
3214 _visitor.visit_qself(it)
3215 };
3216 _visitor.visit_path(&_i.path);
Nika Layzell27726662017-10-24 23:16:35 -04003217}
David Tolnay8c81f622018-07-31 23:34:35 -07003218#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003219pub fn visit_type_ptr<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypePtr) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003220 tokens_helper(_visitor, &_i.star_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07003221 if let Some(ref it) = _i.const_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04003222 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07003223 };
3224 if let Some(ref it) = _i.mutability {
David Tolnay7ac699c2018-08-24 14:00:58 -04003225 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07003226 };
3227 _visitor.visit_type(&*_i.elem);
Nika Layzell27726662017-10-24 23:16:35 -04003228}
David Tolnay8c81f622018-07-31 23:34:35 -07003229#[cfg(any(feature = "full", feature = "derive"))]
3230pub fn visit_type_reference<'ast, V: Visit<'ast> + ?Sized>(
3231 _visitor: &mut V,
3232 _i: &'ast TypeReference,
3233) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003234 tokens_helper(_visitor, &_i.and_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07003235 if let Some(ref it) = _i.lifetime {
3236 _visitor.visit_lifetime(it)
3237 };
3238 if let Some(ref it) = _i.mutability {
David Tolnay7ac699c2018-08-24 14:00:58 -04003239 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07003240 };
3241 _visitor.visit_type(&*_i.elem);
Nika Layzell27726662017-10-24 23:16:35 -04003242}
David Tolnay8c81f622018-07-31 23:34:35 -07003243#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003244pub fn visit_type_slice<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeSlice) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003245 tokens_helper(_visitor, &_i.bracket_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003246 _visitor.visit_type(&*_i.elem);
Nika Layzell27726662017-10-24 23:16:35 -04003247}
David Tolnay8c81f622018-07-31 23:34:35 -07003248#[cfg(any(feature = "full", feature = "derive"))]
3249pub fn visit_type_trait_object<'ast, V: Visit<'ast> + ?Sized>(
3250 _visitor: &mut V,
3251 _i: &'ast TypeTraitObject,
3252) {
3253 if let Some(ref it) = _i.dyn_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04003254 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07003255 };
3256 for el in Punctuated::pairs(&_i.bounds) {
3257 let it = el.value();
3258 _visitor.visit_type_param_bound(it)
3259 }
Nika Layzell27726662017-10-24 23:16:35 -04003260}
David Tolnay8c81f622018-07-31 23:34:35 -07003261#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003262pub fn visit_type_tuple<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeTuple) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003263 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003264 for el in Punctuated::pairs(&_i.elems) {
3265 let it = el.value();
3266 _visitor.visit_type(it)
3267 }
Nika Layzell27726662017-10-24 23:16:35 -04003268}
David Tolnay8c81f622018-07-31 23:34:35 -07003269#[cfg(any(feature = "full", feature = "derive"))]
3270pub fn visit_type_verbatim<'ast, V: Visit<'ast> + ?Sized>(
3271 _visitor: &mut V,
3272 _i: &'ast TypeVerbatim,
3273) {
David Tolnay6af48992018-08-01 11:16:28 -07003274 skip!(_i.tts);
David Tolnay2ae520a2017-12-29 11:19:50 -05003275}
David Tolnay8c81f622018-07-31 23:34:35 -07003276#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003277pub fn visit_un_op<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UnOp) {
Nika Layzell27726662017-10-24 23:16:35 -04003278 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07003279 UnOp::Deref(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04003280 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -04003281 }
David Tolnay8c81f622018-07-31 23:34:35 -07003282 UnOp::Not(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04003283 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -04003284 }
David Tolnay8c81f622018-07-31 23:34:35 -07003285 UnOp::Neg(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04003286 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -04003287 }
3288 }
3289}
David Tolnay8c81f622018-07-31 23:34:35 -07003290#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003291pub fn visit_use_glob<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseGlob) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003292 tokens_helper(_visitor, &_i.star_token.spans);
David Tolnay5f332a92017-12-26 00:42:45 -05003293}
David Tolnay8c81f622018-07-31 23:34:35 -07003294#[cfg(feature = "full")]
David Tolnayd97a7d22018-03-31 19:17:01 +02003295pub fn visit_use_group<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseGroup) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003296 tokens_helper(_visitor, &_i.brace_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003297 for el in Punctuated::pairs(&_i.items) {
3298 let it = el.value();
3299 _visitor.visit_use_tree(it)
3300 }
David Tolnay5f332a92017-12-26 00:42:45 -05003301}
David Tolnay8c81f622018-07-31 23:34:35 -07003302#[cfg(feature = "full")]
David Tolnayd97a7d22018-03-31 19:17:01 +02003303pub fn visit_use_name<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseName) {
David Tolnay8c81f622018-07-31 23:34:35 -07003304 _visitor.visit_ident(&_i.ident);
David Tolnayd97a7d22018-03-31 19:17:01 +02003305}
David Tolnay8c81f622018-07-31 23:34:35 -07003306#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003307pub fn visit_use_path<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UsePath) {
David Tolnay8c81f622018-07-31 23:34:35 -07003308 _visitor.visit_ident(&_i.ident);
David Tolnay7ac699c2018-08-24 14:00:58 -04003309 tokens_helper(_visitor, &_i.colon2_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07003310 _visitor.visit_use_tree(&*_i.tree);
David Tolnayd97a7d22018-03-31 19:17:01 +02003311}
David Tolnay8c81f622018-07-31 23:34:35 -07003312#[cfg(feature = "full")]
David Tolnayd97a7d22018-03-31 19:17:01 +02003313pub fn visit_use_rename<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseRename) {
David Tolnay8c81f622018-07-31 23:34:35 -07003314 _visitor.visit_ident(&_i.ident);
David Tolnay7ac699c2018-08-24 14:00:58 -04003315 tokens_helper(_visitor, &_i.as_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003316 _visitor.visit_ident(&_i.rename);
David Tolnay5f332a92017-12-26 00:42:45 -05003317}
David Tolnay8c81f622018-07-31 23:34:35 -07003318#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003319pub fn visit_use_tree<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseTree) {
David Tolnay5f332a92017-12-26 00:42:45 -05003320 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07003321 UseTree::Path(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003322 _visitor.visit_use_path(_binding_0);
David Tolnay5f332a92017-12-26 00:42:45 -05003323 }
David Tolnay8c81f622018-07-31 23:34:35 -07003324 UseTree::Name(ref _binding_0) => {
David Tolnayd97a7d22018-03-31 19:17:01 +02003325 _visitor.visit_use_name(_binding_0);
3326 }
David Tolnay8c81f622018-07-31 23:34:35 -07003327 UseTree::Rename(ref _binding_0) => {
David Tolnayd97a7d22018-03-31 19:17:01 +02003328 _visitor.visit_use_rename(_binding_0);
3329 }
David Tolnay8c81f622018-07-31 23:34:35 -07003330 UseTree::Glob(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003331 _visitor.visit_use_glob(_binding_0);
David Tolnay5f332a92017-12-26 00:42:45 -05003332 }
David Tolnay8c81f622018-07-31 23:34:35 -07003333 UseTree::Group(ref _binding_0) => {
David Tolnayd97a7d22018-03-31 19:17:01 +02003334 _visitor.visit_use_group(_binding_0);
David Tolnay5f332a92017-12-26 00:42:45 -05003335 }
3336 }
3337}
David Tolnay8c81f622018-07-31 23:34:35 -07003338#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003339pub fn visit_variant<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Variant) {
David Tolnay8c81f622018-07-31 23:34:35 -07003340 for it in &_i.attrs {
3341 _visitor.visit_attribute(it)
3342 }
3343 _visitor.visit_ident(&_i.ident);
3344 _visitor.visit_fields(&_i.fields);
3345 if let Some(ref it) = _i.discriminant {
David Tolnay7ac699c2018-08-24 14:00:58 -04003346 tokens_helper(_visitor, &(it).0.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07003347 _visitor.visit_expr(&(it).1);
3348 };
Nika Layzell27726662017-10-24 23:16:35 -04003349}
David Tolnay8c81f622018-07-31 23:34:35 -07003350#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003351pub fn visit_vis_crate<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisCrate) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003352 tokens_helper(_visitor, &_i.crate_token.span);
Nika Layzell27726662017-10-24 23:16:35 -04003353}
David Tolnay8c81f622018-07-31 23:34:35 -07003354#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003355pub fn visit_vis_public<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisPublic) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003356 tokens_helper(_visitor, &_i.pub_token.span);
Nika Layzell27726662017-10-24 23:16:35 -04003357}
David Tolnay8c81f622018-07-31 23:34:35 -07003358#[cfg(any(feature = "full", feature = "derive"))]
3359pub fn visit_vis_restricted<'ast, V: Visit<'ast> + ?Sized>(
3360 _visitor: &mut V,
3361 _i: &'ast VisRestricted,
3362) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003363 tokens_helper(_visitor, &_i.pub_token.span);
3364 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003365 if let Some(ref it) = _i.in_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04003366 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07003367 };
3368 _visitor.visit_path(&*_i.path);
Nika Layzell27726662017-10-24 23:16:35 -04003369}
David Tolnay8c81f622018-07-31 23:34:35 -07003370#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003371pub fn visit_visibility<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Visibility) {
Nika Layzell27726662017-10-24 23:16:35 -04003372 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07003373 Visibility::Public(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003374 _visitor.visit_vis_public(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003375 }
David Tolnay8c81f622018-07-31 23:34:35 -07003376 Visibility::Crate(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003377 _visitor.visit_vis_crate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003378 }
David Tolnay8c81f622018-07-31 23:34:35 -07003379 Visibility::Restricted(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003380 _visitor.visit_vis_restricted(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003381 }
David Tolnay8c81f622018-07-31 23:34:35 -07003382 Visibility::Inherited => {}
Nika Layzell27726662017-10-24 23:16:35 -04003383 }
3384}
David Tolnay8c81f622018-07-31 23:34:35 -07003385#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003386pub fn visit_where_clause<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WhereClause) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003387 tokens_helper(_visitor, &_i.where_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003388 for el in Punctuated::pairs(&_i.predicates) {
3389 let it = el.value();
3390 _visitor.visit_where_predicate(it)
3391 }
Nika Layzell27726662017-10-24 23:16:35 -04003392}
David Tolnay8c81f622018-07-31 23:34:35 -07003393#[cfg(any(feature = "full", feature = "derive"))]
3394pub fn visit_where_predicate<'ast, V: Visit<'ast> + ?Sized>(
3395 _visitor: &mut V,
3396 _i: &'ast WherePredicate,
3397) {
Nika Layzell27726662017-10-24 23:16:35 -04003398 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07003399 WherePredicate::Type(ref _binding_0) => {
David Tolnayd4add852018-01-01 20:13:24 -08003400 _visitor.visit_predicate_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003401 }
David Tolnay8c81f622018-07-31 23:34:35 -07003402 WherePredicate::Lifetime(ref _binding_0) => {
David Tolnayd4add852018-01-01 20:13:24 -08003403 _visitor.visit_predicate_lifetime(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003404 }
David Tolnay8c81f622018-07-31 23:34:35 -07003405 WherePredicate::Eq(ref _binding_0) => {
David Tolnayd4add852018-01-01 20:13:24 -08003406 _visitor.visit_predicate_eq(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003407 }
3408 }
3409}