blob: f0bf8bfb425aa2e562e29cb8c1f88d61481e6e85 [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"))]
164 fn visit_expr_catch(&mut self, i: &'ast ExprCatch) {
165 visit_expr_catch(self, i)
166 }
167 #[cfg(feature = "full")]
168 #[cfg(any(feature = "full", feature = "derive"))]
169 fn visit_expr_closure(&mut self, i: &'ast ExprClosure) {
170 visit_expr_closure(self, i)
171 }
172 #[cfg(feature = "full")]
173 #[cfg(any(feature = "full", feature = "derive"))]
174 fn visit_expr_continue(&mut self, i: &'ast ExprContinue) {
175 visit_expr_continue(self, i)
176 }
177 #[cfg(any(feature = "full", feature = "derive"))]
178 fn visit_expr_field(&mut self, i: &'ast ExprField) {
179 visit_expr_field(self, i)
180 }
181 #[cfg(feature = "full")]
182 #[cfg(any(feature = "full", feature = "derive"))]
183 fn visit_expr_for_loop(&mut self, i: &'ast ExprForLoop) {
184 visit_expr_for_loop(self, i)
185 }
186 #[cfg(feature = "full")]
187 #[cfg(any(feature = "full", feature = "derive"))]
188 fn visit_expr_group(&mut self, i: &'ast ExprGroup) {
189 visit_expr_group(self, i)
190 }
191 #[cfg(feature = "full")]
192 #[cfg(any(feature = "full", feature = "derive"))]
193 fn visit_expr_if(&mut self, i: &'ast ExprIf) {
194 visit_expr_if(self, i)
195 }
196 #[cfg(feature = "full")]
197 #[cfg(any(feature = "full", feature = "derive"))]
198 fn visit_expr_if_let(&mut self, i: &'ast ExprIfLet) {
199 visit_expr_if_let(self, i)
200 }
201 #[cfg(feature = "full")]
202 #[cfg(any(feature = "full", feature = "derive"))]
203 fn visit_expr_in_place(&mut self, i: &'ast ExprInPlace) {
204 visit_expr_in_place(self, i)
205 }
206 #[cfg(any(feature = "full", feature = "derive"))]
207 fn visit_expr_index(&mut self, i: &'ast ExprIndex) {
208 visit_expr_index(self, i)
209 }
210 #[cfg(any(feature = "full", feature = "derive"))]
211 fn visit_expr_lit(&mut self, i: &'ast ExprLit) {
212 visit_expr_lit(self, i)
213 }
214 #[cfg(feature = "full")]
215 #[cfg(any(feature = "full", feature = "derive"))]
216 fn visit_expr_loop(&mut self, i: &'ast ExprLoop) {
217 visit_expr_loop(self, i)
218 }
219 #[cfg(feature = "full")]
220 #[cfg(any(feature = "full", feature = "derive"))]
221 fn visit_expr_macro(&mut self, i: &'ast ExprMacro) {
222 visit_expr_macro(self, i)
223 }
224 #[cfg(feature = "full")]
225 #[cfg(any(feature = "full", feature = "derive"))]
226 fn visit_expr_match(&mut self, i: &'ast ExprMatch) {
227 visit_expr_match(self, i)
228 }
229 #[cfg(feature = "full")]
230 #[cfg(any(feature = "full", feature = "derive"))]
231 fn visit_expr_method_call(&mut self, i: &'ast ExprMethodCall) {
232 visit_expr_method_call(self, i)
233 }
234 #[cfg(any(feature = "full", feature = "derive"))]
235 fn visit_expr_paren(&mut self, i: &'ast ExprParen) {
236 visit_expr_paren(self, i)
237 }
238 #[cfg(any(feature = "full", feature = "derive"))]
239 fn visit_expr_path(&mut self, i: &'ast ExprPath) {
240 visit_expr_path(self, i)
241 }
242 #[cfg(feature = "full")]
243 #[cfg(any(feature = "full", feature = "derive"))]
244 fn visit_expr_range(&mut self, i: &'ast ExprRange) {
245 visit_expr_range(self, i)
246 }
247 #[cfg(feature = "full")]
248 #[cfg(any(feature = "full", feature = "derive"))]
249 fn visit_expr_reference(&mut self, i: &'ast ExprReference) {
250 visit_expr_reference(self, i)
251 }
252 #[cfg(feature = "full")]
253 #[cfg(any(feature = "full", feature = "derive"))]
254 fn visit_expr_repeat(&mut self, i: &'ast ExprRepeat) {
255 visit_expr_repeat(self, i)
256 }
257 #[cfg(feature = "full")]
258 #[cfg(any(feature = "full", feature = "derive"))]
259 fn visit_expr_return(&mut self, i: &'ast ExprReturn) {
260 visit_expr_return(self, i)
261 }
262 #[cfg(feature = "full")]
263 #[cfg(any(feature = "full", feature = "derive"))]
264 fn visit_expr_struct(&mut self, i: &'ast ExprStruct) {
265 visit_expr_struct(self, i)
266 }
267 #[cfg(feature = "full")]
268 #[cfg(any(feature = "full", feature = "derive"))]
269 fn visit_expr_try(&mut self, i: &'ast ExprTry) {
270 visit_expr_try(self, i)
271 }
272 #[cfg(feature = "full")]
273 #[cfg(any(feature = "full", feature = "derive"))]
274 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 Tolnay8c81f622018-07-31 23:34:35 -07001259 Expr::Catch(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001260 full!(_visitor.visit_expr_catch(_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"))]
1368pub fn visit_expr_catch<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprCatch) {
1369 for it in &_i.attrs {
1370 _visitor.visit_attribute(it)
1371 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001372 tokens_helper(_visitor, &_i.do_token.span);
1373 tokens_helper(_visitor, &_i.catch_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001374 _visitor.visit_block(&_i.block);
1375}
1376#[cfg(feature = "full")]
1377#[cfg(any(feature = "full", feature = "derive"))]
1378pub fn visit_expr_closure<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprClosure) {
1379 for it in &_i.attrs {
1380 _visitor.visit_attribute(it)
1381 }
Yusuke Sasaki4e5d9662018-07-21 02:49:47 +09001382 if let Some(ref it) = _i.asyncness {
1383 tokens_helper(_visitor, &it.span)
1384 };
David Tolnay8c81f622018-07-31 23:34:35 -07001385 if let Some(ref it) = _i.movability {
David Tolnay7ac699c2018-08-24 14:00:58 -04001386 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07001387 };
1388 if let Some(ref it) = _i.capture {
David Tolnay7ac699c2018-08-24 14:00:58 -04001389 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07001390 };
David Tolnay7ac699c2018-08-24 14:00:58 -04001391 tokens_helper(_visitor, &_i.or1_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001392 for el in Punctuated::pairs(&_i.inputs) {
1393 let it = el.value();
1394 _visitor.visit_fn_arg(it)
1395 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001396 tokens_helper(_visitor, &_i.or2_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001397 _visitor.visit_return_type(&_i.output);
1398 _visitor.visit_expr(&*_i.body);
1399}
1400#[cfg(feature = "full")]
1401#[cfg(any(feature = "full", feature = "derive"))]
1402pub fn visit_expr_continue<'ast, V: Visit<'ast> + ?Sized>(
1403 _visitor: &mut V,
1404 _i: &'ast ExprContinue,
1405) {
1406 for it in &_i.attrs {
1407 _visitor.visit_attribute(it)
1408 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001409 tokens_helper(_visitor, &_i.continue_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001410 if let Some(ref it) = _i.label {
1411 _visitor.visit_lifetime(it)
1412 };
1413}
1414#[cfg(any(feature = "full", feature = "derive"))]
1415pub fn visit_expr_field<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprField) {
1416 for it in &_i.attrs {
1417 _visitor.visit_attribute(it)
1418 }
1419 _visitor.visit_expr(&*_i.base);
David Tolnay7ac699c2018-08-24 14:00:58 -04001420 tokens_helper(_visitor, &_i.dot_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001421 _visitor.visit_member(&_i.member);
1422}
1423#[cfg(feature = "full")]
1424#[cfg(any(feature = "full", feature = "derive"))]
1425pub fn visit_expr_for_loop<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprForLoop) {
1426 for it in &_i.attrs {
1427 _visitor.visit_attribute(it)
1428 }
1429 if let Some(ref it) = _i.label {
1430 _visitor.visit_label(it)
1431 };
David Tolnay7ac699c2018-08-24 14:00:58 -04001432 tokens_helper(_visitor, &_i.for_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001433 _visitor.visit_pat(&*_i.pat);
David Tolnay7ac699c2018-08-24 14:00:58 -04001434 tokens_helper(_visitor, &_i.in_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001435 _visitor.visit_expr(&*_i.expr);
1436 _visitor.visit_block(&_i.body);
1437}
1438#[cfg(feature = "full")]
1439#[cfg(any(feature = "full", feature = "derive"))]
1440pub fn visit_expr_group<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprGroup) {
1441 for it in &_i.attrs {
1442 _visitor.visit_attribute(it)
1443 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001444 tokens_helper(_visitor, &_i.group_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001445 _visitor.visit_expr(&*_i.expr);
1446}
1447#[cfg(feature = "full")]
1448#[cfg(any(feature = "full", feature = "derive"))]
1449pub fn visit_expr_if<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIf) {
1450 for it in &_i.attrs {
1451 _visitor.visit_attribute(it)
1452 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001453 tokens_helper(_visitor, &_i.if_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001454 _visitor.visit_expr(&*_i.cond);
1455 _visitor.visit_block(&_i.then_branch);
1456 if let Some(ref it) = _i.else_branch {
David Tolnay7ac699c2018-08-24 14:00:58 -04001457 tokens_helper(_visitor, &(it).0.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001458 _visitor.visit_expr(&*(it).1);
1459 };
1460}
1461#[cfg(feature = "full")]
1462#[cfg(any(feature = "full", feature = "derive"))]
1463pub fn visit_expr_if_let<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIfLet) {
1464 for it in &_i.attrs {
1465 _visitor.visit_attribute(it)
1466 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001467 tokens_helper(_visitor, &_i.if_token.span);
1468 tokens_helper(_visitor, &_i.let_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001469 for el in Punctuated::pairs(&_i.pats) {
1470 let it = el.value();
1471 _visitor.visit_pat(it)
1472 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001473 tokens_helper(_visitor, &_i.eq_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001474 _visitor.visit_expr(&*_i.expr);
1475 _visitor.visit_block(&_i.then_branch);
1476 if let Some(ref it) = _i.else_branch {
David Tolnay7ac699c2018-08-24 14:00:58 -04001477 tokens_helper(_visitor, &(it).0.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001478 _visitor.visit_expr(&*(it).1);
1479 };
1480}
1481#[cfg(feature = "full")]
1482#[cfg(any(feature = "full", feature = "derive"))]
1483pub fn visit_expr_in_place<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprInPlace) {
1484 for it in &_i.attrs {
1485 _visitor.visit_attribute(it)
1486 }
1487 _visitor.visit_expr(&*_i.place);
David Tolnay7ac699c2018-08-24 14:00:58 -04001488 tokens_helper(_visitor, &_i.arrow_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001489 _visitor.visit_expr(&*_i.value);
1490}
1491#[cfg(any(feature = "full", feature = "derive"))]
1492pub fn visit_expr_index<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIndex) {
1493 for it in &_i.attrs {
1494 _visitor.visit_attribute(it)
1495 }
1496 _visitor.visit_expr(&*_i.expr);
David Tolnay7ac699c2018-08-24 14:00:58 -04001497 tokens_helper(_visitor, &_i.bracket_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001498 _visitor.visit_expr(&*_i.index);
1499}
1500#[cfg(any(feature = "full", feature = "derive"))]
1501pub fn visit_expr_lit<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprLit) {
1502 for it in &_i.attrs {
1503 _visitor.visit_attribute(it)
1504 }
1505 _visitor.visit_lit(&_i.lit);
1506}
1507#[cfg(feature = "full")]
1508#[cfg(any(feature = "full", feature = "derive"))]
1509pub fn visit_expr_loop<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprLoop) {
1510 for it in &_i.attrs {
1511 _visitor.visit_attribute(it)
1512 }
1513 if let Some(ref it) = _i.label {
1514 _visitor.visit_label(it)
1515 };
David Tolnay7ac699c2018-08-24 14:00:58 -04001516 tokens_helper(_visitor, &_i.loop_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001517 _visitor.visit_block(&_i.body);
1518}
1519#[cfg(feature = "full")]
1520#[cfg(any(feature = "full", feature = "derive"))]
1521pub fn visit_expr_macro<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprMacro) {
1522 for it in &_i.attrs {
1523 _visitor.visit_attribute(it)
1524 }
1525 _visitor.visit_macro(&_i.mac);
1526}
1527#[cfg(feature = "full")]
1528#[cfg(any(feature = "full", feature = "derive"))]
1529pub fn visit_expr_match<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprMatch) {
1530 for it in &_i.attrs {
1531 _visitor.visit_attribute(it)
1532 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001533 tokens_helper(_visitor, &_i.match_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001534 _visitor.visit_expr(&*_i.expr);
David Tolnay7ac699c2018-08-24 14:00:58 -04001535 tokens_helper(_visitor, &_i.brace_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001536 for it in &_i.arms {
1537 _visitor.visit_arm(it)
1538 }
1539}
1540#[cfg(feature = "full")]
1541#[cfg(any(feature = "full", feature = "derive"))]
1542pub fn visit_expr_method_call<'ast, V: Visit<'ast> + ?Sized>(
1543 _visitor: &mut V,
1544 _i: &'ast ExprMethodCall,
1545) {
1546 for it in &_i.attrs {
1547 _visitor.visit_attribute(it)
1548 }
1549 _visitor.visit_expr(&*_i.receiver);
David Tolnay7ac699c2018-08-24 14:00:58 -04001550 tokens_helper(_visitor, &_i.dot_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001551 _visitor.visit_ident(&_i.method);
1552 if let Some(ref it) = _i.turbofish {
1553 _visitor.visit_method_turbofish(it)
1554 };
David Tolnay7ac699c2018-08-24 14:00:58 -04001555 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001556 for el in Punctuated::pairs(&_i.args) {
1557 let it = el.value();
1558 _visitor.visit_expr(it)
1559 }
1560}
1561#[cfg(any(feature = "full", feature = "derive"))]
1562pub fn visit_expr_paren<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprParen) {
1563 for it in &_i.attrs {
1564 _visitor.visit_attribute(it)
1565 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001566 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001567 _visitor.visit_expr(&*_i.expr);
1568}
1569#[cfg(any(feature = "full", feature = "derive"))]
1570pub fn visit_expr_path<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprPath) {
1571 for it in &_i.attrs {
1572 _visitor.visit_attribute(it)
1573 }
1574 if let Some(ref it) = _i.qself {
1575 _visitor.visit_qself(it)
1576 };
1577 _visitor.visit_path(&_i.path);
1578}
1579#[cfg(feature = "full")]
1580#[cfg(any(feature = "full", feature = "derive"))]
1581pub fn visit_expr_range<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprRange) {
1582 for it in &_i.attrs {
1583 _visitor.visit_attribute(it)
1584 }
1585 if let Some(ref it) = _i.from {
1586 _visitor.visit_expr(&**it)
1587 };
1588 _visitor.visit_range_limits(&_i.limits);
1589 if let Some(ref it) = _i.to {
1590 _visitor.visit_expr(&**it)
1591 };
1592}
1593#[cfg(feature = "full")]
1594#[cfg(any(feature = "full", feature = "derive"))]
1595pub fn visit_expr_reference<'ast, V: Visit<'ast> + ?Sized>(
1596 _visitor: &mut V,
1597 _i: &'ast ExprReference,
1598) {
1599 for it in &_i.attrs {
1600 _visitor.visit_attribute(it)
1601 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001602 tokens_helper(_visitor, &_i.and_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001603 if let Some(ref it) = _i.mutability {
David Tolnay7ac699c2018-08-24 14:00:58 -04001604 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07001605 };
1606 _visitor.visit_expr(&*_i.expr);
1607}
1608#[cfg(feature = "full")]
1609#[cfg(any(feature = "full", feature = "derive"))]
1610pub fn visit_expr_repeat<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprRepeat) {
1611 for it in &_i.attrs {
1612 _visitor.visit_attribute(it)
1613 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001614 tokens_helper(_visitor, &_i.bracket_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001615 _visitor.visit_expr(&*_i.expr);
David Tolnay7ac699c2018-08-24 14:00:58 -04001616 tokens_helper(_visitor, &_i.semi_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001617 _visitor.visit_expr(&*_i.len);
1618}
1619#[cfg(feature = "full")]
1620#[cfg(any(feature = "full", feature = "derive"))]
1621pub fn visit_expr_return<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprReturn) {
1622 for it in &_i.attrs {
1623 _visitor.visit_attribute(it)
1624 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001625 tokens_helper(_visitor, &_i.return_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001626 if let Some(ref it) = _i.expr {
1627 _visitor.visit_expr(&**it)
1628 };
1629}
1630#[cfg(feature = "full")]
1631#[cfg(any(feature = "full", feature = "derive"))]
1632pub fn visit_expr_struct<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprStruct) {
1633 for it in &_i.attrs {
1634 _visitor.visit_attribute(it)
1635 }
1636 _visitor.visit_path(&_i.path);
David Tolnay7ac699c2018-08-24 14:00:58 -04001637 tokens_helper(_visitor, &_i.brace_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001638 for el in Punctuated::pairs(&_i.fields) {
1639 let it = el.value();
1640 _visitor.visit_field_value(it)
1641 }
1642 if let Some(ref it) = _i.dot2_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04001643 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07001644 };
1645 if let Some(ref it) = _i.rest {
1646 _visitor.visit_expr(&**it)
1647 };
1648}
1649#[cfg(feature = "full")]
1650#[cfg(any(feature = "full", feature = "derive"))]
1651pub fn visit_expr_try<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprTry) {
1652 for it in &_i.attrs {
1653 _visitor.visit_attribute(it)
1654 }
1655 _visitor.visit_expr(&*_i.expr);
David Tolnay7ac699c2018-08-24 14:00:58 -04001656 tokens_helper(_visitor, &_i.question_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001657}
1658#[cfg(feature = "full")]
1659#[cfg(any(feature = "full", feature = "derive"))]
1660pub fn visit_expr_tuple<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprTuple) {
1661 for it in &_i.attrs {
1662 _visitor.visit_attribute(it)
1663 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001664 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001665 for el in Punctuated::pairs(&_i.elems) {
1666 let it = el.value();
1667 _visitor.visit_expr(it)
1668 }
1669}
1670#[cfg(feature = "full")]
1671#[cfg(any(feature = "full", feature = "derive"))]
1672pub fn visit_expr_type<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprType) {
1673 for it in &_i.attrs {
1674 _visitor.visit_attribute(it)
1675 }
1676 _visitor.visit_expr(&*_i.expr);
David Tolnay7ac699c2018-08-24 14:00:58 -04001677 tokens_helper(_visitor, &_i.colon_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001678 _visitor.visit_type(&*_i.ty);
1679}
1680#[cfg(any(feature = "full", feature = "derive"))]
1681pub fn visit_expr_unary<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprUnary) {
1682 for it in &_i.attrs {
1683 _visitor.visit_attribute(it)
1684 }
1685 _visitor.visit_un_op(&_i.op);
1686 _visitor.visit_expr(&*_i.expr);
1687}
1688#[cfg(feature = "full")]
1689#[cfg(any(feature = "full", feature = "derive"))]
1690pub fn visit_expr_unsafe<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprUnsafe) {
1691 for it in &_i.attrs {
1692 _visitor.visit_attribute(it)
1693 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001694 tokens_helper(_visitor, &_i.unsafe_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001695 _visitor.visit_block(&_i.block);
1696}
1697#[cfg(any(feature = "full", feature = "derive"))]
1698pub fn visit_expr_verbatim<'ast, V: Visit<'ast> + ?Sized>(
1699 _visitor: &mut V,
1700 _i: &'ast ExprVerbatim,
1701) {
David Tolnay6af48992018-08-01 11:16:28 -07001702 skip!(_i.tts);
David Tolnay8c81f622018-07-31 23:34:35 -07001703}
1704#[cfg(feature = "full")]
1705#[cfg(any(feature = "full", feature = "derive"))]
1706pub fn visit_expr_while<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprWhile) {
1707 for it in &_i.attrs {
1708 _visitor.visit_attribute(it)
1709 }
1710 if let Some(ref it) = _i.label {
1711 _visitor.visit_label(it)
1712 };
David Tolnay7ac699c2018-08-24 14:00:58 -04001713 tokens_helper(_visitor, &_i.while_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001714 _visitor.visit_expr(&*_i.cond);
1715 _visitor.visit_block(&_i.body);
1716}
1717#[cfg(feature = "full")]
1718#[cfg(any(feature = "full", feature = "derive"))]
1719pub fn visit_expr_while_let<'ast, V: Visit<'ast> + ?Sized>(
1720 _visitor: &mut V,
1721 _i: &'ast ExprWhileLet,
1722) {
1723 for it in &_i.attrs {
1724 _visitor.visit_attribute(it)
1725 }
1726 if let Some(ref it) = _i.label {
1727 _visitor.visit_label(it)
1728 };
David Tolnay7ac699c2018-08-24 14:00:58 -04001729 tokens_helper(_visitor, &_i.while_token.span);
1730 tokens_helper(_visitor, &_i.let_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001731 for el in Punctuated::pairs(&_i.pats) {
1732 let it = el.value();
1733 _visitor.visit_pat(it)
1734 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001735 tokens_helper(_visitor, &_i.eq_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001736 _visitor.visit_expr(&*_i.expr);
1737 _visitor.visit_block(&_i.body);
1738}
1739#[cfg(feature = "full")]
1740#[cfg(any(feature = "full", feature = "derive"))]
1741pub fn visit_expr_yield<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprYield) {
1742 for it in &_i.attrs {
1743 _visitor.visit_attribute(it)
1744 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001745 tokens_helper(_visitor, &_i.yield_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001746 if let Some(ref it) = _i.expr {
1747 _visitor.visit_expr(&**it)
1748 };
1749}
1750#[cfg(any(feature = "full", feature = "derive"))]
1751pub fn visit_field<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Field) {
1752 for it in &_i.attrs {
1753 _visitor.visit_attribute(it)
1754 }
1755 _visitor.visit_visibility(&_i.vis);
1756 if let Some(ref it) = _i.ident {
1757 _visitor.visit_ident(it)
1758 };
1759 if let Some(ref it) = _i.colon_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04001760 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07001761 };
1762 _visitor.visit_type(&_i.ty);
1763}
1764#[cfg(any(feature = "full", feature = "derive"))]
1765#[cfg(feature = "full")]
1766pub fn visit_field_pat<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldPat) {
1767 for it in &_i.attrs {
1768 _visitor.visit_attribute(it)
1769 }
1770 _visitor.visit_member(&_i.member);
1771 if let Some(ref it) = _i.colon_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04001772 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07001773 };
1774 _visitor.visit_pat(&*_i.pat);
1775}
1776#[cfg(any(feature = "full", feature = "derive"))]
1777#[cfg(feature = "full")]
1778pub fn visit_field_value<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldValue) {
1779 for it in &_i.attrs {
1780 _visitor.visit_attribute(it)
1781 }
1782 _visitor.visit_member(&_i.member);
1783 if let Some(ref it) = _i.colon_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04001784 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07001785 };
1786 _visitor.visit_expr(&_i.expr);
1787}
1788#[cfg(any(feature = "full", feature = "derive"))]
1789pub fn visit_fields<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Fields) {
1790 match *_i {
1791 Fields::Named(ref _binding_0) => {
1792 _visitor.visit_fields_named(_binding_0);
1793 }
1794 Fields::Unnamed(ref _binding_0) => {
1795 _visitor.visit_fields_unnamed(_binding_0);
1796 }
1797 Fields::Unit => {}
1798 }
1799}
1800#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001801pub fn visit_fields_named<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldsNamed) {
David Tolnay7ac699c2018-08-24 14:00:58 -04001802 tokens_helper(_visitor, &_i.brace_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001803 for el in Punctuated::pairs(&_i.named) {
1804 let it = el.value();
1805 _visitor.visit_field(it)
1806 }
David Tolnaye3d41b72017-12-31 15:24:00 -05001807}
David Tolnay8c81f622018-07-31 23:34:35 -07001808#[cfg(any(feature = "full", feature = "derive"))]
1809pub fn visit_fields_unnamed<'ast, V: Visit<'ast> + ?Sized>(
1810 _visitor: &mut V,
1811 _i: &'ast FieldsUnnamed,
1812) {
David Tolnay7ac699c2018-08-24 14:00:58 -04001813 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001814 for el in Punctuated::pairs(&_i.unnamed) {
1815 let it = el.value();
1816 _visitor.visit_field(it)
1817 }
David Tolnaye3d41b72017-12-31 15:24:00 -05001818}
David Tolnay8c81f622018-07-31 23:34:35 -07001819#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001820pub fn visit_file<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast File) {
David Tolnay6af48992018-08-01 11:16:28 -07001821 skip!(_i.shebang);
David Tolnay8c81f622018-07-31 23:34:35 -07001822 for it in &_i.attrs {
1823 _visitor.visit_attribute(it)
1824 }
1825 for it in &_i.items {
1826 _visitor.visit_item(it)
1827 }
Nika Layzell27726662017-10-24 23:16:35 -04001828}
David Tolnay8c81f622018-07-31 23:34:35 -07001829#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001830pub fn visit_fn_arg<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FnArg) {
Nika Layzell27726662017-10-24 23:16:35 -04001831 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07001832 FnArg::SelfRef(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001833 _visitor.visit_arg_self_ref(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001834 }
David Tolnay8c81f622018-07-31 23:34:35 -07001835 FnArg::SelfValue(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001836 _visitor.visit_arg_self(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001837 }
David Tolnay8c81f622018-07-31 23:34:35 -07001838 FnArg::Captured(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001839 _visitor.visit_arg_captured(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001840 }
David Tolnay8c81f622018-07-31 23:34:35 -07001841 FnArg::Inferred(ref _binding_0) => {
David Tolnay80ed55f2017-12-27 22:54:40 -05001842 _visitor.visit_pat(_binding_0);
1843 }
David Tolnay8c81f622018-07-31 23:34:35 -07001844 FnArg::Ignored(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001845 _visitor.visit_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001846 }
1847 }
1848}
David Tolnay8c81f622018-07-31 23:34:35 -07001849#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001850pub fn visit_fn_decl<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FnDecl) {
David Tolnay7ac699c2018-08-24 14:00:58 -04001851 tokens_helper(_visitor, &_i.fn_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001852 _visitor.visit_generics(&_i.generics);
David Tolnay7ac699c2018-08-24 14:00:58 -04001853 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001854 for el in Punctuated::pairs(&_i.inputs) {
1855 let it = el.value();
1856 _visitor.visit_fn_arg(it)
1857 }
1858 if let Some(ref it) = _i.variadic {
David Tolnay7ac699c2018-08-24 14:00:58 -04001859 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07001860 };
1861 _visitor.visit_return_type(&_i.output);
Nika Layzell27726662017-10-24 23:16:35 -04001862}
David Tolnay8c81f622018-07-31 23:34:35 -07001863#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001864pub fn visit_foreign_item<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItem) {
Nika Layzell27726662017-10-24 23:16:35 -04001865 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07001866 ForeignItem::Fn(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001867 _visitor.visit_foreign_item_fn(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001868 }
David Tolnay8c81f622018-07-31 23:34:35 -07001869 ForeignItem::Static(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001870 _visitor.visit_foreign_item_static(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001871 }
David Tolnay8c81f622018-07-31 23:34:35 -07001872 ForeignItem::Type(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001873 _visitor.visit_foreign_item_type(_binding_0);
David Tolnay199bcbb2017-11-12 10:33:52 -08001874 }
David Tolnay435c1782018-08-24 16:15:44 -04001875 ForeignItem::Macro(ref _binding_0) => {
1876 _visitor.visit_foreign_item_macro(_binding_0);
1877 }
David Tolnay8c81f622018-07-31 23:34:35 -07001878 ForeignItem::Verbatim(ref _binding_0) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05001879 _visitor.visit_foreign_item_verbatim(_binding_0);
1880 }
Nika Layzell27726662017-10-24 23:16:35 -04001881 }
1882}
David Tolnay8c81f622018-07-31 23:34:35 -07001883#[cfg(feature = "full")]
1884pub fn visit_foreign_item_fn<'ast, V: Visit<'ast> + ?Sized>(
1885 _visitor: &mut V,
1886 _i: &'ast ForeignItemFn,
1887) {
1888 for it in &_i.attrs {
1889 _visitor.visit_attribute(it)
1890 }
1891 _visitor.visit_visibility(&_i.vis);
1892 _visitor.visit_ident(&_i.ident);
1893 _visitor.visit_fn_decl(&*_i.decl);
David Tolnay7ac699c2018-08-24 14:00:58 -04001894 tokens_helper(_visitor, &_i.semi_token.spans);
David Tolnay8894f602017-11-11 12:11:04 -08001895}
David Tolnay8c81f622018-07-31 23:34:35 -07001896#[cfg(feature = "full")]
David Tolnay435c1782018-08-24 16:15:44 -04001897pub fn visit_foreign_item_macro<'ast, V: Visit<'ast> + ?Sized>(
1898 _visitor: &mut V,
1899 _i: &'ast ForeignItemMacro,
1900) {
1901 for it in &_i.attrs {
1902 _visitor.visit_attribute(it)
1903 }
1904 _visitor.visit_macro(&_i.mac);
1905 if let Some(ref it) = _i.semi_token {
1906 tokens_helper(_visitor, &it.spans)
1907 };
1908}
1909#[cfg(feature = "full")]
David Tolnay8c81f622018-07-31 23:34:35 -07001910pub fn visit_foreign_item_static<'ast, V: Visit<'ast> + ?Sized>(
1911 _visitor: &mut V,
1912 _i: &'ast ForeignItemStatic,
1913) {
1914 for it in &_i.attrs {
1915 _visitor.visit_attribute(it)
1916 }
1917 _visitor.visit_visibility(&_i.vis);
David Tolnay7ac699c2018-08-24 14:00:58 -04001918 tokens_helper(_visitor, &_i.static_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001919 if let Some(ref it) = _i.mutability {
David Tolnay7ac699c2018-08-24 14:00:58 -04001920 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07001921 };
1922 _visitor.visit_ident(&_i.ident);
David Tolnay7ac699c2018-08-24 14:00:58 -04001923 tokens_helper(_visitor, &_i.colon_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001924 _visitor.visit_type(&*_i.ty);
David Tolnay7ac699c2018-08-24 14:00:58 -04001925 tokens_helper(_visitor, &_i.semi_token.spans);
Nika Layzell27726662017-10-24 23:16:35 -04001926}
David Tolnay8c81f622018-07-31 23:34:35 -07001927#[cfg(feature = "full")]
1928pub fn visit_foreign_item_type<'ast, V: Visit<'ast> + ?Sized>(
1929 _visitor: &mut V,
1930 _i: &'ast ForeignItemType,
1931) {
1932 for it in &_i.attrs {
1933 _visitor.visit_attribute(it)
1934 }
1935 _visitor.visit_visibility(&_i.vis);
David Tolnay7ac699c2018-08-24 14:00:58 -04001936 tokens_helper(_visitor, &_i.type_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001937 _visitor.visit_ident(&_i.ident);
David Tolnay7ac699c2018-08-24 14:00:58 -04001938 tokens_helper(_visitor, &_i.semi_token.spans);
David Tolnay199bcbb2017-11-12 10:33:52 -08001939}
David Tolnay8c81f622018-07-31 23:34:35 -07001940#[cfg(feature = "full")]
1941pub fn visit_foreign_item_verbatim<'ast, V: Visit<'ast> + ?Sized>(
1942 _visitor: &mut V,
1943 _i: &'ast ForeignItemVerbatim,
1944) {
David Tolnay6af48992018-08-01 11:16:28 -07001945 skip!(_i.tts);
David Tolnay2ae520a2017-12-29 11:19:50 -05001946}
David Tolnay8c81f622018-07-31 23:34:35 -07001947#[cfg(any(feature = "full", feature = "derive"))]
1948pub fn visit_generic_argument<'ast, V: Visit<'ast> + ?Sized>(
1949 _visitor: &mut V,
1950 _i: &'ast GenericArgument,
1951) {
Nika Layzell357885a2017-12-04 15:47:07 -05001952 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07001953 GenericArgument::Lifetime(ref _binding_0) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05001954 _visitor.visit_lifetime(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001955 }
David Tolnay8c81f622018-07-31 23:34:35 -07001956 GenericArgument::Type(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001957 _visitor.visit_type(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001958 }
David Tolnay8c81f622018-07-31 23:34:35 -07001959 GenericArgument::Binding(ref _binding_0) => {
David Tolnay506e43a2017-12-29 11:34:36 -05001960 _visitor.visit_binding(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001961 }
David Tolnay8c81f622018-07-31 23:34:35 -07001962 GenericArgument::Const(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001963 _visitor.visit_expr(_binding_0);
Nika Layzellc680e612017-12-04 19:07:20 -05001964 }
Nika Layzell357885a2017-12-04 15:47:07 -05001965 }
1966}
David Tolnay8c81f622018-07-31 23:34:35 -07001967#[cfg(any(feature = "full", feature = "derive"))]
1968#[cfg(feature = "full")]
1969pub fn visit_generic_method_argument<'ast, V: Visit<'ast> + ?Sized>(
1970 _visitor: &mut V,
1971 _i: &'ast GenericMethodArgument,
1972) {
David Tolnayd60cfec2017-12-29 00:21:38 -05001973 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07001974 GenericMethodArgument::Type(ref _binding_0) => {
David Tolnayd60cfec2017-12-29 00:21:38 -05001975 _visitor.visit_type(_binding_0);
1976 }
David Tolnay8c81f622018-07-31 23:34:35 -07001977 GenericMethodArgument::Const(ref _binding_0) => {
David Tolnayd60cfec2017-12-29 00:21:38 -05001978 _visitor.visit_expr(_binding_0);
1979 }
1980 }
1981}
David Tolnay8c81f622018-07-31 23:34:35 -07001982#[cfg(any(feature = "full", feature = "derive"))]
1983pub fn visit_generic_param<'ast, V: Visit<'ast> + ?Sized>(
1984 _visitor: &mut V,
1985 _i: &'ast GenericParam,
1986) {
David Tolnayc2f1aba2017-11-12 20:29:22 -08001987 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07001988 GenericParam::Type(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001989 _visitor.visit_type_param(_binding_0);
David Tolnayc2f1aba2017-11-12 20:29:22 -08001990 }
David Tolnay8c81f622018-07-31 23:34:35 -07001991 GenericParam::Lifetime(ref _binding_0) => {
David Tolnay517f3692018-01-01 20:17:23 -08001992 _visitor.visit_lifetime_def(_binding_0);
1993 }
David Tolnay8c81f622018-07-31 23:34:35 -07001994 GenericParam::Const(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001995 _visitor.visit_const_param(_binding_0);
Nika Layzellf1fdc0b2017-12-04 19:58:32 -05001996 }
David Tolnayc2f1aba2017-11-12 20:29:22 -08001997 }
1998}
David Tolnay8c81f622018-07-31 23:34:35 -07001999#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002000pub fn visit_generics<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Generics) {
David Tolnay8c81f622018-07-31 23:34:35 -07002001 if let Some(ref it) = _i.lt_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002002 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002003 };
2004 for el in Punctuated::pairs(&_i.params) {
2005 let it = el.value();
2006 _visitor.visit_generic_param(it)
2007 }
2008 if let Some(ref it) = _i.gt_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002009 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002010 };
2011 if let Some(ref it) = _i.where_clause {
2012 _visitor.visit_where_clause(it)
2013 };
Nika Layzell27726662017-10-24 23:16:35 -04002014}
David Tolnay8c81f622018-07-31 23:34:35 -07002015pub fn visit_ident<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Ident) {}
2016#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002017pub fn visit_impl_item<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItem) {
Nika Layzell27726662017-10-24 23:16:35 -04002018 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002019 ImplItem::Const(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002020 _visitor.visit_impl_item_const(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002021 }
David Tolnay8c81f622018-07-31 23:34:35 -07002022 ImplItem::Method(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002023 _visitor.visit_impl_item_method(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002024 }
David Tolnay8c81f622018-07-31 23:34:35 -07002025 ImplItem::Type(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002026 _visitor.visit_impl_item_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002027 }
David Tolnay8c81f622018-07-31 23:34:35 -07002028 ImplItem::Macro(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002029 _visitor.visit_impl_item_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002030 }
David Tolnay8c81f622018-07-31 23:34:35 -07002031 ImplItem::Verbatim(ref _binding_0) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05002032 _visitor.visit_impl_item_verbatim(_binding_0);
2033 }
Nika Layzell27726662017-10-24 23:16:35 -04002034 }
2035}
David Tolnay8c81f622018-07-31 23:34:35 -07002036#[cfg(feature = "full")]
2037pub fn visit_impl_item_const<'ast, V: Visit<'ast> + ?Sized>(
2038 _visitor: &mut V,
2039 _i: &'ast ImplItemConst,
2040) {
2041 for it in &_i.attrs {
2042 _visitor.visit_attribute(it)
2043 }
2044 _visitor.visit_visibility(&_i.vis);
2045 if let Some(ref it) = _i.defaultness {
David Tolnay7ac699c2018-08-24 14:00:58 -04002046 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002047 };
David Tolnay7ac699c2018-08-24 14:00:58 -04002048 tokens_helper(_visitor, &_i.const_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002049 _visitor.visit_ident(&_i.ident);
David Tolnay7ac699c2018-08-24 14:00:58 -04002050 tokens_helper(_visitor, &_i.colon_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002051 _visitor.visit_type(&_i.ty);
David Tolnay7ac699c2018-08-24 14:00:58 -04002052 tokens_helper(_visitor, &_i.eq_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002053 _visitor.visit_expr(&_i.expr);
David Tolnay7ac699c2018-08-24 14:00:58 -04002054 tokens_helper(_visitor, &_i.semi_token.spans);
David Tolnay857628c2017-11-11 12:25:31 -08002055}
David Tolnay8c81f622018-07-31 23:34:35 -07002056#[cfg(feature = "full")]
2057pub fn visit_impl_item_macro<'ast, V: Visit<'ast> + ?Sized>(
2058 _visitor: &mut V,
2059 _i: &'ast ImplItemMacro,
2060) {
2061 for it in &_i.attrs {
2062 _visitor.visit_attribute(it)
2063 }
2064 _visitor.visit_macro(&_i.mac);
2065 if let Some(ref it) = _i.semi_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002066 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002067 };
David Tolnay857628c2017-11-11 12:25:31 -08002068}
David Tolnay8c81f622018-07-31 23:34:35 -07002069#[cfg(feature = "full")]
2070pub fn visit_impl_item_method<'ast, V: Visit<'ast> + ?Sized>(
2071 _visitor: &mut V,
2072 _i: &'ast ImplItemMethod,
2073) {
2074 for it in &_i.attrs {
2075 _visitor.visit_attribute(it)
2076 }
2077 _visitor.visit_visibility(&_i.vis);
2078 if let Some(ref it) = _i.defaultness {
David Tolnay7ac699c2018-08-24 14:00:58 -04002079 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002080 };
2081 _visitor.visit_method_sig(&_i.sig);
2082 _visitor.visit_block(&_i.block);
Nika Layzell27726662017-10-24 23:16:35 -04002083}
David Tolnay8c81f622018-07-31 23:34:35 -07002084#[cfg(feature = "full")]
2085pub fn visit_impl_item_type<'ast, V: Visit<'ast> + ?Sized>(
2086 _visitor: &mut V,
2087 _i: &'ast ImplItemType,
2088) {
2089 for it in &_i.attrs {
2090 _visitor.visit_attribute(it)
2091 }
2092 _visitor.visit_visibility(&_i.vis);
2093 if let Some(ref it) = _i.defaultness {
David Tolnay7ac699c2018-08-24 14:00:58 -04002094 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002095 };
David Tolnay7ac699c2018-08-24 14:00:58 -04002096 tokens_helper(_visitor, &_i.type_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002097 _visitor.visit_ident(&_i.ident);
2098 _visitor.visit_generics(&_i.generics);
David Tolnay7ac699c2018-08-24 14:00:58 -04002099 tokens_helper(_visitor, &_i.eq_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002100 _visitor.visit_type(&_i.ty);
David Tolnay7ac699c2018-08-24 14:00:58 -04002101 tokens_helper(_visitor, &_i.semi_token.spans);
Nika Layzell27726662017-10-24 23:16:35 -04002102}
David Tolnay8c81f622018-07-31 23:34:35 -07002103#[cfg(feature = "full")]
2104pub fn visit_impl_item_verbatim<'ast, V: Visit<'ast> + ?Sized>(
2105 _visitor: &mut V,
2106 _i: &'ast ImplItemVerbatim,
2107) {
David Tolnay6af48992018-08-01 11:16:28 -07002108 skip!(_i.tts);
David Tolnay2ae520a2017-12-29 11:19:50 -05002109}
David Tolnay8c81f622018-07-31 23:34:35 -07002110#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002111pub fn visit_index<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Index) {
David Tolnay6af48992018-08-01 11:16:28 -07002112 skip!(_i.index);
David Tolnay8c81f622018-07-31 23:34:35 -07002113 _visitor.visit_span(&_i.span);
David Tolnay85b69a42017-12-27 20:43:10 -05002114}
David Tolnay8c81f622018-07-31 23:34:35 -07002115#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002116pub fn visit_item<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Item) {
Nika Layzell27726662017-10-24 23:16:35 -04002117 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002118 Item::ExternCrate(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002119 _visitor.visit_item_extern_crate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002120 }
David Tolnay8c81f622018-07-31 23:34:35 -07002121 Item::Use(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002122 _visitor.visit_item_use(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002123 }
David Tolnay8c81f622018-07-31 23:34:35 -07002124 Item::Static(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002125 _visitor.visit_item_static(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002126 }
David Tolnay8c81f622018-07-31 23:34:35 -07002127 Item::Const(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002128 _visitor.visit_item_const(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002129 }
David Tolnay8c81f622018-07-31 23:34:35 -07002130 Item::Fn(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002131 _visitor.visit_item_fn(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002132 }
David Tolnay8c81f622018-07-31 23:34:35 -07002133 Item::Mod(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002134 _visitor.visit_item_mod(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002135 }
David Tolnay8c81f622018-07-31 23:34:35 -07002136 Item::ForeignMod(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002137 _visitor.visit_item_foreign_mod(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002138 }
David Tolnay8c81f622018-07-31 23:34:35 -07002139 Item::Type(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002140 _visitor.visit_item_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002141 }
David Tolnay8c81f622018-07-31 23:34:35 -07002142 Item::Struct(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002143 _visitor.visit_item_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002144 }
David Tolnay8c81f622018-07-31 23:34:35 -07002145 Item::Enum(ref _binding_0) => {
David Tolnaye3d41b72017-12-31 15:24:00 -05002146 _visitor.visit_item_enum(_binding_0);
2147 }
David Tolnay8c81f622018-07-31 23:34:35 -07002148 Item::Union(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002149 _visitor.visit_item_union(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002150 }
David Tolnay8c81f622018-07-31 23:34:35 -07002151 Item::Trait(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002152 _visitor.visit_item_trait(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002153 }
David Tolnay8c81f622018-07-31 23:34:35 -07002154 Item::Impl(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002155 _visitor.visit_item_impl(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002156 }
David Tolnay8c81f622018-07-31 23:34:35 -07002157 Item::Macro(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002158 _visitor.visit_item_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002159 }
David Tolnay8c81f622018-07-31 23:34:35 -07002160 Item::Macro2(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002161 _visitor.visit_item_macro2(_binding_0);
David Tolnay500d8322017-12-18 00:32:51 -08002162 }
David Tolnay8c81f622018-07-31 23:34:35 -07002163 Item::Verbatim(ref _binding_0) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05002164 _visitor.visit_item_verbatim(_binding_0);
2165 }
Nika Layzell27726662017-10-24 23:16:35 -04002166 }
2167}
David Tolnay8c81f622018-07-31 23:34:35 -07002168#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002169pub fn visit_item_const<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemConst) {
David Tolnay8c81f622018-07-31 23:34:35 -07002170 for it in &_i.attrs {
2171 _visitor.visit_attribute(it)
2172 }
2173 _visitor.visit_visibility(&_i.vis);
David Tolnay7ac699c2018-08-24 14:00:58 -04002174 tokens_helper(_visitor, &_i.const_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002175 _visitor.visit_ident(&_i.ident);
David Tolnay7ac699c2018-08-24 14:00:58 -04002176 tokens_helper(_visitor, &_i.colon_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002177 _visitor.visit_type(&*_i.ty);
David Tolnay7ac699c2018-08-24 14:00:58 -04002178 tokens_helper(_visitor, &_i.eq_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002179 _visitor.visit_expr(&*_i.expr);
David Tolnay7ac699c2018-08-24 14:00:58 -04002180 tokens_helper(_visitor, &_i.semi_token.spans);
David Tolnayc6b55bc2017-11-09 22:48:38 -08002181}
David Tolnay8c81f622018-07-31 23:34:35 -07002182#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002183pub fn visit_item_enum<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemEnum) {
David Tolnay8c81f622018-07-31 23:34:35 -07002184 for it in &_i.attrs {
2185 _visitor.visit_attribute(it)
2186 }
2187 _visitor.visit_visibility(&_i.vis);
David Tolnay7ac699c2018-08-24 14:00:58 -04002188 tokens_helper(_visitor, &_i.enum_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002189 _visitor.visit_ident(&_i.ident);
2190 _visitor.visit_generics(&_i.generics);
David Tolnay7ac699c2018-08-24 14:00:58 -04002191 tokens_helper(_visitor, &_i.brace_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002192 for el in Punctuated::pairs(&_i.variants) {
2193 let it = el.value();
2194 _visitor.visit_variant(it)
2195 }
David Tolnayc6b55bc2017-11-09 22:48:38 -08002196}
David Tolnay8c81f622018-07-31 23:34:35 -07002197#[cfg(feature = "full")]
2198pub fn visit_item_extern_crate<'ast, V: Visit<'ast> + ?Sized>(
2199 _visitor: &mut V,
2200 _i: &'ast ItemExternCrate,
2201) {
2202 for it in &_i.attrs {
2203 _visitor.visit_attribute(it)
2204 }
2205 _visitor.visit_visibility(&_i.vis);
David Tolnay7ac699c2018-08-24 14:00:58 -04002206 tokens_helper(_visitor, &_i.extern_token.span);
2207 tokens_helper(_visitor, &_i.crate_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002208 _visitor.visit_ident(&_i.ident);
2209 if let Some(ref it) = _i.rename {
David Tolnay7ac699c2018-08-24 14:00:58 -04002210 tokens_helper(_visitor, &(it).0.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002211 _visitor.visit_ident(&(it).1);
2212 };
David Tolnay7ac699c2018-08-24 14:00:58 -04002213 tokens_helper(_visitor, &_i.semi_token.spans);
David Tolnayc6b55bc2017-11-09 22:48:38 -08002214}
David Tolnay8c81f622018-07-31 23:34:35 -07002215#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002216pub fn visit_item_fn<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemFn) {
David Tolnay8c81f622018-07-31 23:34:35 -07002217 for it in &_i.attrs {
2218 _visitor.visit_attribute(it)
2219 }
2220 _visitor.visit_visibility(&_i.vis);
2221 if let Some(ref it) = _i.constness {
David Tolnay7ac699c2018-08-24 14:00:58 -04002222 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002223 };
2224 if let Some(ref it) = _i.unsafety {
David Tolnay7ac699c2018-08-24 14:00:58 -04002225 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002226 };
Yusuke Sasakif00a3ef2018-07-20 22:08:42 +09002227 if let Some(ref it) = _i.asyncness {
2228 tokens_helper(_visitor, &it.span)
2229 };
David Tolnay8c81f622018-07-31 23:34:35 -07002230 if let Some(ref it) = _i.abi {
2231 _visitor.visit_abi(it)
2232 };
2233 _visitor.visit_ident(&_i.ident);
2234 _visitor.visit_fn_decl(&*_i.decl);
2235 _visitor.visit_block(&*_i.block);
David Tolnayc6b55bc2017-11-09 22:48:38 -08002236}
David Tolnay8c81f622018-07-31 23:34:35 -07002237#[cfg(feature = "full")]
2238pub fn visit_item_foreign_mod<'ast, V: Visit<'ast> + ?Sized>(
2239 _visitor: &mut V,
2240 _i: &'ast ItemForeignMod,
2241) {
2242 for it in &_i.attrs {
2243 _visitor.visit_attribute(it)
2244 }
2245 _visitor.visit_abi(&_i.abi);
David Tolnay7ac699c2018-08-24 14:00:58 -04002246 tokens_helper(_visitor, &_i.brace_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002247 for it in &_i.items {
2248 _visitor.visit_foreign_item(it)
2249 }
David Tolnayc6b55bc2017-11-09 22:48:38 -08002250}
David Tolnay8c81f622018-07-31 23:34:35 -07002251#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002252pub fn visit_item_impl<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemImpl) {
David Tolnay8c81f622018-07-31 23:34:35 -07002253 for it in &_i.attrs {
2254 _visitor.visit_attribute(it)
2255 }
2256 if let Some(ref it) = _i.defaultness {
David Tolnay7ac699c2018-08-24 14:00:58 -04002257 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002258 };
2259 if let Some(ref it) = _i.unsafety {
David Tolnay7ac699c2018-08-24 14:00:58 -04002260 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002261 };
David Tolnay7ac699c2018-08-24 14:00:58 -04002262 tokens_helper(_visitor, &_i.impl_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002263 _visitor.visit_generics(&_i.generics);
2264 if let Some(ref it) = _i.trait_ {
2265 if let Some(ref it) = (it).0 {
David Tolnay7ac699c2018-08-24 14:00:58 -04002266 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002267 };
2268 _visitor.visit_path(&(it).1);
David Tolnay7ac699c2018-08-24 14:00:58 -04002269 tokens_helper(_visitor, &(it).2.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002270 };
2271 _visitor.visit_type(&*_i.self_ty);
David Tolnay7ac699c2018-08-24 14:00:58 -04002272 tokens_helper(_visitor, &_i.brace_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002273 for it in &_i.items {
2274 _visitor.visit_impl_item(it)
2275 }
David Tolnayc6b55bc2017-11-09 22:48:38 -08002276}
David Tolnay8c81f622018-07-31 23:34:35 -07002277#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002278pub fn visit_item_macro<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMacro) {
David Tolnay8c81f622018-07-31 23:34:35 -07002279 for it in &_i.attrs {
2280 _visitor.visit_attribute(it)
2281 }
2282 if let Some(ref it) = _i.ident {
2283 _visitor.visit_ident(it)
2284 };
2285 _visitor.visit_macro(&_i.mac);
2286 if let Some(ref it) = _i.semi_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002287 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002288 };
David Tolnayc6b55bc2017-11-09 22:48:38 -08002289}
David Tolnay8c81f622018-07-31 23:34:35 -07002290#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002291pub fn visit_item_macro2<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMacro2) {
David Tolnay8c81f622018-07-31 23:34:35 -07002292 for it in &_i.attrs {
2293 _visitor.visit_attribute(it)
2294 }
2295 _visitor.visit_visibility(&_i.vis);
David Tolnay7ac699c2018-08-24 14:00:58 -04002296 tokens_helper(_visitor, &_i.macro_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002297 _visitor.visit_ident(&_i.ident);
David Tolnay7ac699c2018-08-24 14:00:58 -04002298 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay6af48992018-08-01 11:16:28 -07002299 skip!(_i.args);
David Tolnay7ac699c2018-08-24 14:00:58 -04002300 tokens_helper(_visitor, &_i.brace_token.span);
David Tolnay6af48992018-08-01 11:16:28 -07002301 skip!(_i.body);
David Tolnay500d8322017-12-18 00:32:51 -08002302}
David Tolnay8c81f622018-07-31 23:34:35 -07002303#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002304pub fn visit_item_mod<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMod) {
David Tolnay8c81f622018-07-31 23:34:35 -07002305 for it in &_i.attrs {
2306 _visitor.visit_attribute(it)
2307 }
2308 _visitor.visit_visibility(&_i.vis);
David Tolnay7ac699c2018-08-24 14:00:58 -04002309 tokens_helper(_visitor, &_i.mod_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002310 _visitor.visit_ident(&_i.ident);
2311 if let Some(ref it) = _i.content {
David Tolnay7ac699c2018-08-24 14:00:58 -04002312 tokens_helper(_visitor, &(it).0.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002313 for it in &(it).1 {
2314 _visitor.visit_item(it)
2315 }
2316 };
2317 if let Some(ref it) = _i.semi {
David Tolnay7ac699c2018-08-24 14:00:58 -04002318 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002319 };
Nika Layzell27726662017-10-24 23:16:35 -04002320}
David Tolnay8c81f622018-07-31 23:34:35 -07002321#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002322pub fn visit_item_static<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemStatic) {
David Tolnay8c81f622018-07-31 23:34:35 -07002323 for it in &_i.attrs {
2324 _visitor.visit_attribute(it)
2325 }
2326 _visitor.visit_visibility(&_i.vis);
David Tolnay7ac699c2018-08-24 14:00:58 -04002327 tokens_helper(_visitor, &_i.static_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002328 if let Some(ref it) = _i.mutability {
David Tolnay7ac699c2018-08-24 14:00:58 -04002329 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002330 };
2331 _visitor.visit_ident(&_i.ident);
David Tolnay7ac699c2018-08-24 14:00:58 -04002332 tokens_helper(_visitor, &_i.colon_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002333 _visitor.visit_type(&*_i.ty);
David Tolnay7ac699c2018-08-24 14:00:58 -04002334 tokens_helper(_visitor, &_i.eq_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002335 _visitor.visit_expr(&*_i.expr);
David Tolnay7ac699c2018-08-24 14:00:58 -04002336 tokens_helper(_visitor, &_i.semi_token.spans);
Nika Layzell27726662017-10-24 23:16:35 -04002337}
David Tolnay8c81f622018-07-31 23:34:35 -07002338#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002339pub fn visit_item_struct<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemStruct) {
David Tolnay8c81f622018-07-31 23:34:35 -07002340 for it in &_i.attrs {
2341 _visitor.visit_attribute(it)
2342 }
2343 _visitor.visit_visibility(&_i.vis);
David Tolnay7ac699c2018-08-24 14:00:58 -04002344 tokens_helper(_visitor, &_i.struct_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002345 _visitor.visit_ident(&_i.ident);
2346 _visitor.visit_generics(&_i.generics);
2347 _visitor.visit_fields(&_i.fields);
2348 if let Some(ref it) = _i.semi_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002349 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002350 };
Nika Layzell27726662017-10-24 23:16:35 -04002351}
David Tolnay8c81f622018-07-31 23:34:35 -07002352#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002353pub fn visit_item_trait<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemTrait) {
David Tolnay8c81f622018-07-31 23:34:35 -07002354 for it in &_i.attrs {
2355 _visitor.visit_attribute(it)
2356 }
2357 _visitor.visit_visibility(&_i.vis);
2358 if let Some(ref it) = _i.unsafety {
David Tolnay7ac699c2018-08-24 14:00:58 -04002359 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002360 };
2361 if let Some(ref it) = _i.auto_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002362 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002363 };
David Tolnay7ac699c2018-08-24 14:00:58 -04002364 tokens_helper(_visitor, &_i.trait_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002365 _visitor.visit_ident(&_i.ident);
2366 _visitor.visit_generics(&_i.generics);
2367 if let Some(ref it) = _i.colon_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002368 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002369 };
2370 for el in Punctuated::pairs(&_i.supertraits) {
2371 let it = el.value();
2372 _visitor.visit_type_param_bound(it)
2373 }
David Tolnay7ac699c2018-08-24 14:00:58 -04002374 tokens_helper(_visitor, &_i.brace_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002375 for it in &_i.items {
2376 _visitor.visit_trait_item(it)
2377 }
Nika Layzell27726662017-10-24 23:16:35 -04002378}
David Tolnay8c81f622018-07-31 23:34:35 -07002379#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002380pub fn visit_item_type<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemType) {
David Tolnay8c81f622018-07-31 23:34:35 -07002381 for it in &_i.attrs {
2382 _visitor.visit_attribute(it)
2383 }
2384 _visitor.visit_visibility(&_i.vis);
David Tolnay7ac699c2018-08-24 14:00:58 -04002385 tokens_helper(_visitor, &_i.type_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002386 _visitor.visit_ident(&_i.ident);
2387 _visitor.visit_generics(&_i.generics);
David Tolnay7ac699c2018-08-24 14:00:58 -04002388 tokens_helper(_visitor, &_i.eq_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002389 _visitor.visit_type(&*_i.ty);
David Tolnay7ac699c2018-08-24 14:00:58 -04002390 tokens_helper(_visitor, &_i.semi_token.spans);
Nika Layzell27726662017-10-24 23:16:35 -04002391}
David Tolnay8c81f622018-07-31 23:34:35 -07002392#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002393pub fn visit_item_union<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemUnion) {
David Tolnay8c81f622018-07-31 23:34:35 -07002394 for it in &_i.attrs {
2395 _visitor.visit_attribute(it)
2396 }
2397 _visitor.visit_visibility(&_i.vis);
David Tolnay7ac699c2018-08-24 14:00:58 -04002398 tokens_helper(_visitor, &_i.union_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002399 _visitor.visit_ident(&_i.ident);
2400 _visitor.visit_generics(&_i.generics);
2401 _visitor.visit_fields_named(&_i.fields);
Nika Layzell27726662017-10-24 23:16:35 -04002402}
David Tolnay8c81f622018-07-31 23:34:35 -07002403#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002404pub fn visit_item_use<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemUse) {
David Tolnay8c81f622018-07-31 23:34:35 -07002405 for it in &_i.attrs {
2406 _visitor.visit_attribute(it)
2407 }
2408 _visitor.visit_visibility(&_i.vis);
David Tolnay7ac699c2018-08-24 14:00:58 -04002409 tokens_helper(_visitor, &_i.use_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002410 if let Some(ref it) = _i.leading_colon {
David Tolnay7ac699c2018-08-24 14:00:58 -04002411 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002412 };
2413 _visitor.visit_use_tree(&_i.tree);
David Tolnay7ac699c2018-08-24 14:00:58 -04002414 tokens_helper(_visitor, &_i.semi_token.spans);
Nika Layzell27726662017-10-24 23:16:35 -04002415}
David Tolnay8c81f622018-07-31 23:34:35 -07002416#[cfg(feature = "full")]
2417pub fn visit_item_verbatim<'ast, V: Visit<'ast> + ?Sized>(
2418 _visitor: &mut V,
2419 _i: &'ast ItemVerbatim,
2420) {
David Tolnay6af48992018-08-01 11:16:28 -07002421 skip!(_i.tts);
David Tolnay2ae520a2017-12-29 11:19:50 -05002422}
David Tolnay8c81f622018-07-31 23:34:35 -07002423#[cfg(any(feature = "full", feature = "derive"))]
2424#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002425pub fn visit_label<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Label) {
David Tolnay8c81f622018-07-31 23:34:35 -07002426 _visitor.visit_lifetime(&_i.name);
David Tolnay7ac699c2018-08-24 14:00:58 -04002427 tokens_helper(_visitor, &_i.colon_token.spans);
David Tolnaybcd498f2017-12-29 12:02:33 -05002428}
David Tolnay8c81f622018-07-31 23:34:35 -07002429#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002430pub fn visit_lifetime<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Lifetime) {
David Tolnay6af48992018-08-01 11:16:28 -07002431 skip!(_i.apostrophe);
David Tolnay8c81f622018-07-31 23:34:35 -07002432 _visitor.visit_ident(&_i.ident);
David Tolnay4ba63a02017-12-28 15:53:05 -05002433}
David Tolnay8c81f622018-07-31 23:34:35 -07002434#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002435pub fn visit_lifetime_def<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LifetimeDef) {
David Tolnay8c81f622018-07-31 23:34:35 -07002436 for it in &_i.attrs {
2437 _visitor.visit_attribute(it)
2438 }
2439 _visitor.visit_lifetime(&_i.lifetime);
2440 if let Some(ref it) = _i.colon_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002441 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002442 };
2443 for el in Punctuated::pairs(&_i.bounds) {
2444 let it = el.value();
2445 _visitor.visit_lifetime(it)
2446 }
David Tolnay4ba63a02017-12-28 15:53:05 -05002447}
David Tolnay8c81f622018-07-31 23:34:35 -07002448#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002449pub fn visit_lit<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Lit) {
David Tolnay360efd22018-01-04 23:35:26 -08002450 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002451 Lit::Str(ref _binding_0) => {
David Tolnay360efd22018-01-04 23:35:26 -08002452 _visitor.visit_lit_str(_binding_0);
2453 }
David Tolnay8c81f622018-07-31 23:34:35 -07002454 Lit::ByteStr(ref _binding_0) => {
David Tolnay360efd22018-01-04 23:35:26 -08002455 _visitor.visit_lit_byte_str(_binding_0);
2456 }
David Tolnay8c81f622018-07-31 23:34:35 -07002457 Lit::Byte(ref _binding_0) => {
David Tolnay360efd22018-01-04 23:35:26 -08002458 _visitor.visit_lit_byte(_binding_0);
2459 }
David Tolnay8c81f622018-07-31 23:34:35 -07002460 Lit::Char(ref _binding_0) => {
David Tolnay360efd22018-01-04 23:35:26 -08002461 _visitor.visit_lit_char(_binding_0);
2462 }
David Tolnay8c81f622018-07-31 23:34:35 -07002463 Lit::Int(ref _binding_0) => {
David Tolnay360efd22018-01-04 23:35:26 -08002464 _visitor.visit_lit_int(_binding_0);
2465 }
David Tolnay8c81f622018-07-31 23:34:35 -07002466 Lit::Float(ref _binding_0) => {
David Tolnay360efd22018-01-04 23:35:26 -08002467 _visitor.visit_lit_float(_binding_0);
2468 }
David Tolnay8c81f622018-07-31 23:34:35 -07002469 Lit::Bool(ref _binding_0) => {
David Tolnay360efd22018-01-04 23:35:26 -08002470 _visitor.visit_lit_bool(_binding_0);
2471 }
David Tolnay8c81f622018-07-31 23:34:35 -07002472 Lit::Verbatim(ref _binding_0) => {
David Tolnay360efd22018-01-04 23:35:26 -08002473 _visitor.visit_lit_verbatim(_binding_0);
2474 }
2475 }
2476}
David Tolnay8c81f622018-07-31 23:34:35 -07002477#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002478pub fn visit_lit_bool<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitBool) {
David Tolnay6af48992018-08-01 11:16:28 -07002479 skip!(_i.value);
David Tolnay8c81f622018-07-31 23:34:35 -07002480 _visitor.visit_span(&_i.span);
Nika Layzell27726662017-10-24 23:16:35 -04002481}
David Tolnay8c81f622018-07-31 23:34:35 -07002482#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002483pub fn visit_lit_byte<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitByte) {
David Tolnay6af48992018-08-01 11:16:28 -07002484 skip!(_i.token);
David Tolnay360efd22018-01-04 23:35:26 -08002485}
David Tolnay8c81f622018-07-31 23:34:35 -07002486#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002487pub fn visit_lit_byte_str<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitByteStr) {
David Tolnay6af48992018-08-01 11:16:28 -07002488 skip!(_i.token);
David Tolnay360efd22018-01-04 23:35:26 -08002489}
David Tolnay8c81f622018-07-31 23:34:35 -07002490#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002491pub fn visit_lit_char<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitChar) {
David Tolnay6af48992018-08-01 11:16:28 -07002492 skip!(_i.token);
David Tolnay360efd22018-01-04 23:35:26 -08002493}
David Tolnay8c81f622018-07-31 23:34:35 -07002494#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002495pub fn visit_lit_float<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitFloat) {
David Tolnay6af48992018-08-01 11:16:28 -07002496 skip!(_i.token);
David Tolnay360efd22018-01-04 23:35:26 -08002497}
David Tolnay8c81f622018-07-31 23:34:35 -07002498#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002499pub fn visit_lit_int<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitInt) {
David Tolnay6af48992018-08-01 11:16:28 -07002500 skip!(_i.token);
David Tolnay360efd22018-01-04 23:35:26 -08002501}
David Tolnay8c81f622018-07-31 23:34:35 -07002502#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002503pub fn visit_lit_str<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitStr) {
David Tolnay6af48992018-08-01 11:16:28 -07002504 skip!(_i.token);
David Tolnay360efd22018-01-04 23:35:26 -08002505}
David Tolnay8c81f622018-07-31 23:34:35 -07002506#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002507pub fn visit_lit_verbatim<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitVerbatim) {
David Tolnay6af48992018-08-01 11:16:28 -07002508 skip!(_i.token);
David Tolnay360efd22018-01-04 23:35:26 -08002509}
David Tolnay8c81f622018-07-31 23:34:35 -07002510#[cfg(any(feature = "full", feature = "derive"))]
2511#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002512pub fn visit_local<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Local) {
David Tolnay8c81f622018-07-31 23:34:35 -07002513 for it in &_i.attrs {
2514 _visitor.visit_attribute(it)
2515 }
David Tolnay7ac699c2018-08-24 14:00:58 -04002516 tokens_helper(_visitor, &_i.let_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002517 for el in Punctuated::pairs(&_i.pats) {
2518 let it = el.value();
2519 _visitor.visit_pat(it)
2520 }
2521 if let Some(ref it) = _i.ty {
David Tolnay7ac699c2018-08-24 14:00:58 -04002522 tokens_helper(_visitor, &(it).0.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002523 _visitor.visit_type(&*(it).1);
2524 };
2525 if let Some(ref it) = _i.init {
David Tolnay7ac699c2018-08-24 14:00:58 -04002526 tokens_helper(_visitor, &(it).0.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002527 _visitor.visit_expr(&*(it).1);
2528 };
David Tolnay7ac699c2018-08-24 14:00:58 -04002529 tokens_helper(_visitor, &_i.semi_token.spans);
Nika Layzell27726662017-10-24 23:16:35 -04002530}
David Tolnay8c81f622018-07-31 23:34:35 -07002531#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002532pub fn visit_macro<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Macro) {
David Tolnay8c81f622018-07-31 23:34:35 -07002533 _visitor.visit_path(&_i.path);
David Tolnay7ac699c2018-08-24 14:00:58 -04002534 tokens_helper(_visitor, &_i.bang_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002535 _visitor.visit_macro_delimiter(&_i.delimiter);
David Tolnay6af48992018-08-01 11:16:28 -07002536 skip!(_i.tts);
David Tolnayab919512017-12-30 23:31:51 -05002537}
David Tolnay8c81f622018-07-31 23:34:35 -07002538#[cfg(any(feature = "full", feature = "derive"))]
2539pub fn visit_macro_delimiter<'ast, V: Visit<'ast> + ?Sized>(
2540 _visitor: &mut V,
2541 _i: &'ast MacroDelimiter,
2542) {
David Tolnayab919512017-12-30 23:31:51 -05002543 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002544 MacroDelimiter::Paren(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04002545 tokens_helper(_visitor, &_binding_0.span);
David Tolnayab919512017-12-30 23:31:51 -05002546 }
David Tolnay8c81f622018-07-31 23:34:35 -07002547 MacroDelimiter::Brace(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04002548 tokens_helper(_visitor, &_binding_0.span);
David Tolnayab919512017-12-30 23:31:51 -05002549 }
David Tolnay8c81f622018-07-31 23:34:35 -07002550 MacroDelimiter::Bracket(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04002551 tokens_helper(_visitor, &_binding_0.span);
David Tolnayab919512017-12-30 23:31:51 -05002552 }
2553 }
David Tolnaydecf28d2017-11-11 11:56:45 -08002554}
David Tolnay8c81f622018-07-31 23:34:35 -07002555#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002556pub fn visit_member<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Member) {
David Tolnay85b69a42017-12-27 20:43:10 -05002557 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002558 Member::Named(ref _binding_0) => {
Alex Crichtond261d092018-05-18 13:47:35 -07002559 _visitor.visit_ident(_binding_0);
David Tolnay85b69a42017-12-27 20:43:10 -05002560 }
David Tolnay8c81f622018-07-31 23:34:35 -07002561 Member::Unnamed(ref _binding_0) => {
David Tolnay85b69a42017-12-27 20:43:10 -05002562 _visitor.visit_index(_binding_0);
2563 }
2564 }
2565}
David Tolnay8c81f622018-07-31 23:34:35 -07002566#[cfg(any(feature = "full", feature = "derive"))]
David Tolnayaaadd782018-01-06 22:58:13 -08002567pub fn visit_meta<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Meta) {
Nika Layzell27726662017-10-24 23:16:35 -04002568 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002569 Meta::Word(ref _binding_0) => {
Alex Crichtond261d092018-05-18 13:47:35 -07002570 _visitor.visit_ident(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002571 }
David Tolnay8c81f622018-07-31 23:34:35 -07002572 Meta::List(ref _binding_0) => {
David Tolnayaaadd782018-01-06 22:58:13 -08002573 _visitor.visit_meta_list(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002574 }
David Tolnay8c81f622018-07-31 23:34:35 -07002575 Meta::NameValue(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002576 _visitor.visit_meta_name_value(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002577 }
2578 }
2579}
David Tolnay8c81f622018-07-31 23:34:35 -07002580#[cfg(any(feature = "full", feature = "derive"))]
David Tolnayaaadd782018-01-06 22:58:13 -08002581pub fn visit_meta_list<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MetaList) {
David Tolnay8c81f622018-07-31 23:34:35 -07002582 _visitor.visit_ident(&_i.ident);
David Tolnay7ac699c2018-08-24 14:00:58 -04002583 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002584 for el in Punctuated::pairs(&_i.nested) {
2585 let it = el.value();
2586 _visitor.visit_nested_meta(it)
2587 }
Nika Layzell27726662017-10-24 23:16:35 -04002588}
David Tolnay8c81f622018-07-31 23:34:35 -07002589#[cfg(any(feature = "full", feature = "derive"))]
2590pub fn visit_meta_name_value<'ast, V: Visit<'ast> + ?Sized>(
2591 _visitor: &mut V,
2592 _i: &'ast MetaNameValue,
2593) {
2594 _visitor.visit_ident(&_i.ident);
David Tolnay7ac699c2018-08-24 14:00:58 -04002595 tokens_helper(_visitor, &_i.eq_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002596 _visitor.visit_lit(&_i.lit);
Nika Layzell27726662017-10-24 23:16:35 -04002597}
David Tolnay8c81f622018-07-31 23:34:35 -07002598#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002599pub fn visit_method_sig<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MethodSig) {
David Tolnay8c81f622018-07-31 23:34:35 -07002600 if let Some(ref it) = _i.constness {
David Tolnay7ac699c2018-08-24 14:00:58 -04002601 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002602 };
2603 if let Some(ref it) = _i.unsafety {
David Tolnay7ac699c2018-08-24 14:00:58 -04002604 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002605 };
Yusuke Sasakif00a3ef2018-07-20 22:08:42 +09002606 if let Some(ref it) = _i.asyncness {
2607 tokens_helper(_visitor, &it.span)
2608 };
David Tolnay8c81f622018-07-31 23:34:35 -07002609 if let Some(ref it) = _i.abi {
2610 _visitor.visit_abi(it)
2611 };
2612 _visitor.visit_ident(&_i.ident);
2613 _visitor.visit_fn_decl(&_i.decl);
Nika Layzell27726662017-10-24 23:16:35 -04002614}
David Tolnay8c81f622018-07-31 23:34:35 -07002615#[cfg(any(feature = "full", feature = "derive"))]
2616#[cfg(feature = "full")]
2617pub fn visit_method_turbofish<'ast, V: Visit<'ast> + ?Sized>(
2618 _visitor: &mut V,
2619 _i: &'ast MethodTurbofish,
2620) {
David Tolnay7ac699c2018-08-24 14:00:58 -04002621 tokens_helper(_visitor, &_i.colon2_token.spans);
2622 tokens_helper(_visitor, &_i.lt_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002623 for el in Punctuated::pairs(&_i.args) {
2624 let it = el.value();
2625 _visitor.visit_generic_method_argument(it)
2626 }
David Tolnay7ac699c2018-08-24 14:00:58 -04002627 tokens_helper(_visitor, &_i.gt_token.spans);
David Tolnayd60cfec2017-12-29 00:21:38 -05002628}
David Tolnay8c81f622018-07-31 23:34:35 -07002629#[cfg(any(feature = "full", feature = "derive"))]
David Tolnayaaadd782018-01-06 22:58:13 -08002630pub fn visit_nested_meta<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast NestedMeta) {
Nika Layzell27726662017-10-24 23:16:35 -04002631 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002632 NestedMeta::Meta(ref _binding_0) => {
David Tolnayaaadd782018-01-06 22:58:13 -08002633 _visitor.visit_meta(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002634 }
David Tolnay8c81f622018-07-31 23:34:35 -07002635 NestedMeta::Literal(ref _binding_0) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05002636 _visitor.visit_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002637 }
2638 }
2639}
David Tolnay8c81f622018-07-31 23:34:35 -07002640#[cfg(any(feature = "full", feature = "derive"))]
2641pub fn visit_parenthesized_generic_arguments<'ast, V: Visit<'ast> + ?Sized>(
2642 _visitor: &mut V,
2643 _i: &'ast ParenthesizedGenericArguments,
2644) {
David Tolnay7ac699c2018-08-24 14:00:58 -04002645 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002646 for el in Punctuated::pairs(&_i.inputs) {
2647 let it = el.value();
2648 _visitor.visit_type(it)
2649 }
2650 _visitor.visit_return_type(&_i.output);
Nika Layzell27726662017-10-24 23:16:35 -04002651}
David Tolnay8c81f622018-07-31 23:34:35 -07002652#[cfg(any(feature = "full", feature = "derive"))]
2653#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002654pub fn visit_pat<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Pat) {
Nika Layzell27726662017-10-24 23:16:35 -04002655 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002656 Pat::Wild(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002657 _visitor.visit_pat_wild(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002658 }
David Tolnay8c81f622018-07-31 23:34:35 -07002659 Pat::Ident(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002660 _visitor.visit_pat_ident(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002661 }
David Tolnay8c81f622018-07-31 23:34:35 -07002662 Pat::Struct(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002663 _visitor.visit_pat_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002664 }
David Tolnay8c81f622018-07-31 23:34:35 -07002665 Pat::TupleStruct(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002666 _visitor.visit_pat_tuple_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002667 }
David Tolnay8c81f622018-07-31 23:34:35 -07002668 Pat::Path(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002669 _visitor.visit_pat_path(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002670 }
David Tolnay8c81f622018-07-31 23:34:35 -07002671 Pat::Tuple(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002672 _visitor.visit_pat_tuple(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002673 }
David Tolnay8c81f622018-07-31 23:34:35 -07002674 Pat::Box(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002675 _visitor.visit_pat_box(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002676 }
David Tolnay8c81f622018-07-31 23:34:35 -07002677 Pat::Ref(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002678 _visitor.visit_pat_ref(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002679 }
David Tolnay8c81f622018-07-31 23:34:35 -07002680 Pat::Lit(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002681 _visitor.visit_pat_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002682 }
David Tolnay8c81f622018-07-31 23:34:35 -07002683 Pat::Range(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002684 _visitor.visit_pat_range(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002685 }
David Tolnay8c81f622018-07-31 23:34:35 -07002686 Pat::Slice(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002687 _visitor.visit_pat_slice(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002688 }
David Tolnay8c81f622018-07-31 23:34:35 -07002689 Pat::Macro(ref _binding_0) => {
David Tolnay323279a2017-12-29 11:26:32 -05002690 _visitor.visit_pat_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002691 }
David Tolnay8c81f622018-07-31 23:34:35 -07002692 Pat::Verbatim(ref _binding_0) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05002693 _visitor.visit_pat_verbatim(_binding_0);
2694 }
Nika Layzell27726662017-10-24 23:16:35 -04002695 }
2696}
David Tolnay8c81f622018-07-31 23:34:35 -07002697#[cfg(any(feature = "full", feature = "derive"))]
2698#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002699pub fn visit_pat_box<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatBox) {
David Tolnay7ac699c2018-08-24 14:00:58 -04002700 tokens_helper(_visitor, &_i.box_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002701 _visitor.visit_pat(&*_i.pat);
Nika Layzell27726662017-10-24 23:16:35 -04002702}
David Tolnay8c81f622018-07-31 23:34:35 -07002703#[cfg(any(feature = "full", feature = "derive"))]
2704#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002705pub fn visit_pat_ident<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatIdent) {
David Tolnay8c81f622018-07-31 23:34:35 -07002706 if let Some(ref it) = _i.by_ref {
David Tolnay7ac699c2018-08-24 14:00:58 -04002707 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002708 };
2709 if let Some(ref it) = _i.mutability {
David Tolnay7ac699c2018-08-24 14:00:58 -04002710 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002711 };
2712 _visitor.visit_ident(&_i.ident);
2713 if let Some(ref it) = _i.subpat {
David Tolnay7ac699c2018-08-24 14:00:58 -04002714 tokens_helper(_visitor, &(it).0.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002715 _visitor.visit_pat(&*(it).1);
2716 };
Nika Layzell27726662017-10-24 23:16:35 -04002717}
David Tolnay8c81f622018-07-31 23:34:35 -07002718#[cfg(any(feature = "full", feature = "derive"))]
2719#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002720pub fn visit_pat_lit<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatLit) {
David Tolnay8c81f622018-07-31 23:34:35 -07002721 _visitor.visit_expr(&*_i.expr);
Nika Layzell27726662017-10-24 23:16:35 -04002722}
David Tolnay8c81f622018-07-31 23:34:35 -07002723#[cfg(any(feature = "full", feature = "derive"))]
2724#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002725pub fn visit_pat_macro<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatMacro) {
David Tolnay8c81f622018-07-31 23:34:35 -07002726 _visitor.visit_macro(&_i.mac);
David Tolnay323279a2017-12-29 11:26:32 -05002727}
David Tolnay8c81f622018-07-31 23:34:35 -07002728#[cfg(any(feature = "full", feature = "derive"))]
2729#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002730pub fn visit_pat_path<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatPath) {
David Tolnay8c81f622018-07-31 23:34:35 -07002731 if let Some(ref it) = _i.qself {
2732 _visitor.visit_qself(it)
2733 };
2734 _visitor.visit_path(&_i.path);
Nika Layzell27726662017-10-24 23:16:35 -04002735}
David Tolnay8c81f622018-07-31 23:34:35 -07002736#[cfg(any(feature = "full", feature = "derive"))]
2737#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002738pub fn visit_pat_range<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatRange) {
David Tolnay8c81f622018-07-31 23:34:35 -07002739 _visitor.visit_expr(&*_i.lo);
2740 _visitor.visit_range_limits(&_i.limits);
2741 _visitor.visit_expr(&*_i.hi);
Nika Layzell27726662017-10-24 23:16:35 -04002742}
David Tolnay8c81f622018-07-31 23:34:35 -07002743#[cfg(any(feature = "full", feature = "derive"))]
2744#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002745pub fn visit_pat_ref<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatRef) {
David Tolnay7ac699c2018-08-24 14:00:58 -04002746 tokens_helper(_visitor, &_i.and_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002747 if let Some(ref it) = _i.mutability {
David Tolnay7ac699c2018-08-24 14:00:58 -04002748 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002749 };
2750 _visitor.visit_pat(&*_i.pat);
Nika Layzell27726662017-10-24 23:16:35 -04002751}
David Tolnay8c81f622018-07-31 23:34:35 -07002752#[cfg(any(feature = "full", feature = "derive"))]
2753#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002754pub fn visit_pat_slice<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatSlice) {
David Tolnay7ac699c2018-08-24 14:00:58 -04002755 tokens_helper(_visitor, &_i.bracket_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002756 for el in Punctuated::pairs(&_i.front) {
2757 let it = el.value();
2758 _visitor.visit_pat(it)
2759 }
2760 if let Some(ref it) = _i.middle {
2761 _visitor.visit_pat(&**it)
2762 };
2763 if let Some(ref it) = _i.dot2_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002764 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002765 };
2766 if let Some(ref it) = _i.comma_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002767 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002768 };
2769 for el in Punctuated::pairs(&_i.back) {
2770 let it = el.value();
2771 _visitor.visit_pat(it)
2772 }
Nika Layzell27726662017-10-24 23:16:35 -04002773}
David Tolnay8c81f622018-07-31 23:34:35 -07002774#[cfg(any(feature = "full", feature = "derive"))]
2775#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002776pub fn visit_pat_struct<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatStruct) {
David Tolnay8c81f622018-07-31 23:34:35 -07002777 _visitor.visit_path(&_i.path);
David Tolnay7ac699c2018-08-24 14:00:58 -04002778 tokens_helper(_visitor, &_i.brace_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002779 for el in Punctuated::pairs(&_i.fields) {
2780 let it = el.value();
2781 _visitor.visit_field_pat(it)
2782 }
2783 if let Some(ref it) = _i.dot2_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002784 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002785 };
Nika Layzell27726662017-10-24 23:16:35 -04002786}
David Tolnay8c81f622018-07-31 23:34:35 -07002787#[cfg(any(feature = "full", feature = "derive"))]
2788#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002789pub fn visit_pat_tuple<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatTuple) {
David Tolnay7ac699c2018-08-24 14:00:58 -04002790 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002791 for el in Punctuated::pairs(&_i.front) {
2792 let it = el.value();
2793 _visitor.visit_pat(it)
2794 }
2795 if let Some(ref it) = _i.dot2_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002796 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002797 };
2798 if let Some(ref it) = _i.comma_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002799 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002800 };
2801 for el in Punctuated::pairs(&_i.back) {
2802 let it = el.value();
2803 _visitor.visit_pat(it)
2804 }
Nika Layzell27726662017-10-24 23:16:35 -04002805}
David Tolnay8c81f622018-07-31 23:34:35 -07002806#[cfg(any(feature = "full", feature = "derive"))]
2807#[cfg(feature = "full")]
2808pub fn visit_pat_tuple_struct<'ast, V: Visit<'ast> + ?Sized>(
2809 _visitor: &mut V,
2810 _i: &'ast PatTupleStruct,
2811) {
2812 _visitor.visit_path(&_i.path);
2813 _visitor.visit_pat_tuple(&_i.pat);
Nika Layzell27726662017-10-24 23:16:35 -04002814}
David Tolnay8c81f622018-07-31 23:34:35 -07002815#[cfg(any(feature = "full", feature = "derive"))]
2816#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002817pub fn visit_pat_verbatim<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatVerbatim) {
David Tolnay6af48992018-08-01 11:16:28 -07002818 skip!(_i.tts);
David Tolnay2ae520a2017-12-29 11:19:50 -05002819}
David Tolnay8c81f622018-07-31 23:34:35 -07002820#[cfg(any(feature = "full", feature = "derive"))]
2821#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002822pub fn visit_pat_wild<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatWild) {
David Tolnay7ac699c2018-08-24 14:00:58 -04002823 tokens_helper(_visitor, &_i.underscore_token.spans);
Nika Layzell27726662017-10-24 23:16:35 -04002824}
David Tolnay8c81f622018-07-31 23:34:35 -07002825#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002826pub fn visit_path<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Path) {
David Tolnay8c81f622018-07-31 23:34:35 -07002827 if let Some(ref it) = _i.leading_colon {
David Tolnay7ac699c2018-08-24 14:00:58 -04002828 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002829 };
2830 for el in Punctuated::pairs(&_i.segments) {
2831 let it = el.value();
2832 _visitor.visit_path_segment(it)
2833 }
Nika Layzell27726662017-10-24 23:16:35 -04002834}
David Tolnay8c81f622018-07-31 23:34:35 -07002835#[cfg(any(feature = "full", feature = "derive"))]
2836pub fn visit_path_arguments<'ast, V: Visit<'ast> + ?Sized>(
2837 _visitor: &mut V,
2838 _i: &'ast PathArguments,
2839) {
Nika Layzellc08227a2017-12-04 16:30:17 -05002840 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002841 PathArguments::None => {}
2842 PathArguments::AngleBracketed(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002843 _visitor.visit_angle_bracketed_generic_arguments(_binding_0);
Nika Layzellc08227a2017-12-04 16:30:17 -05002844 }
David Tolnay8c81f622018-07-31 23:34:35 -07002845 PathArguments::Parenthesized(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002846 _visitor.visit_parenthesized_generic_arguments(_binding_0);
Nika Layzellc08227a2017-12-04 16:30:17 -05002847 }
2848 }
2849}
David Tolnay8c81f622018-07-31 23:34:35 -07002850#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002851pub fn visit_path_segment<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PathSegment) {
David Tolnay8c81f622018-07-31 23:34:35 -07002852 _visitor.visit_ident(&_i.ident);
2853 _visitor.visit_path_arguments(&_i.arguments);
Nika Layzell27726662017-10-24 23:16:35 -04002854}
David Tolnay8c81f622018-07-31 23:34:35 -07002855#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002856pub fn visit_predicate_eq<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PredicateEq) {
David Tolnay8c81f622018-07-31 23:34:35 -07002857 _visitor.visit_type(&_i.lhs_ty);
David Tolnay7ac699c2018-08-24 14:00:58 -04002858 tokens_helper(_visitor, &_i.eq_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002859 _visitor.visit_type(&_i.rhs_ty);
David Tolnayd4add852018-01-01 20:13:24 -08002860}
David Tolnay8c81f622018-07-31 23:34:35 -07002861#[cfg(any(feature = "full", feature = "derive"))]
2862pub fn visit_predicate_lifetime<'ast, V: Visit<'ast> + ?Sized>(
2863 _visitor: &mut V,
2864 _i: &'ast PredicateLifetime,
2865) {
2866 _visitor.visit_lifetime(&_i.lifetime);
2867 if let Some(ref it) = _i.colon_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002868 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002869 };
2870 for el in Punctuated::pairs(&_i.bounds) {
2871 let it = el.value();
2872 _visitor.visit_lifetime(it)
2873 }
David Tolnayd4add852018-01-01 20:13:24 -08002874}
David Tolnay8c81f622018-07-31 23:34:35 -07002875#[cfg(any(feature = "full", feature = "derive"))]
2876pub fn visit_predicate_type<'ast, V: Visit<'ast> + ?Sized>(
2877 _visitor: &mut V,
2878 _i: &'ast PredicateType,
2879) {
2880 if let Some(ref it) = _i.lifetimes {
2881 _visitor.visit_bound_lifetimes(it)
2882 };
2883 _visitor.visit_type(&_i.bounded_ty);
David Tolnay7ac699c2018-08-24 14:00:58 -04002884 tokens_helper(_visitor, &_i.colon_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002885 for el in Punctuated::pairs(&_i.bounds) {
2886 let it = el.value();
2887 _visitor.visit_type_param_bound(it)
2888 }
David Tolnayd4add852018-01-01 20:13:24 -08002889}
David Tolnay8c81f622018-07-31 23:34:35 -07002890#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002891pub fn visit_qself<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast QSelf) {
David Tolnay7ac699c2018-08-24 14:00:58 -04002892 tokens_helper(_visitor, &_i.lt_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002893 _visitor.visit_type(&*_i.ty);
David Tolnay6af48992018-08-01 11:16:28 -07002894 skip!(_i.position);
David Tolnay8c81f622018-07-31 23:34:35 -07002895 if let Some(ref it) = _i.as_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002896 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002897 };
David Tolnay7ac699c2018-08-24 14:00:58 -04002898 tokens_helper(_visitor, &_i.gt_token.spans);
Nika Layzell27726662017-10-24 23:16:35 -04002899}
David Tolnay8c81f622018-07-31 23:34:35 -07002900#[cfg(any(feature = "full", feature = "derive"))]
2901#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002902pub fn visit_range_limits<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast RangeLimits) {
Nika Layzell27726662017-10-24 23:16:35 -04002903 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002904 RangeLimits::HalfOpen(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04002905 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -04002906 }
David Tolnay8c81f622018-07-31 23:34:35 -07002907 RangeLimits::Closed(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04002908 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -04002909 }
2910 }
2911}
David Tolnay8c81f622018-07-31 23:34:35 -07002912#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002913pub fn visit_return_type<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ReturnType) {
David Tolnayf93b90d2017-11-11 19:21:26 -08002914 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002915 ReturnType::Default => {}
2916 ReturnType::Type(ref _binding_0, ref _binding_1) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04002917 tokens_helper(_visitor, &_binding_0.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002918 _visitor.visit_type(&**_binding_1);
David Tolnayf93b90d2017-11-11 19:21:26 -08002919 }
2920 }
2921}
David Tolnay8c81f622018-07-31 23:34:35 -07002922pub fn visit_span<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Span) {}
2923#[cfg(any(feature = "full", feature = "derive"))]
2924#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002925pub fn visit_stmt<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Stmt) {
Nika Layzell27726662017-10-24 23:16:35 -04002926 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002927 Stmt::Local(ref _binding_0) => {
David Tolnay1f0b7b82018-01-06 16:07:14 -08002928 _visitor.visit_local(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002929 }
David Tolnay8c81f622018-07-31 23:34:35 -07002930 Stmt::Item(ref _binding_0) => {
David Tolnay1f0b7b82018-01-06 16:07:14 -08002931 _visitor.visit_item(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002932 }
David Tolnay8c81f622018-07-31 23:34:35 -07002933 Stmt::Expr(ref _binding_0) => {
David Tolnay1f0b7b82018-01-06 16:07:14 -08002934 _visitor.visit_expr(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002935 }
David Tolnay8c81f622018-07-31 23:34:35 -07002936 Stmt::Semi(ref _binding_0, ref _binding_1) => {
David Tolnay1f0b7b82018-01-06 16:07:14 -08002937 _visitor.visit_expr(_binding_0);
David Tolnay7ac699c2018-08-24 14:00:58 -04002938 tokens_helper(_visitor, &_binding_1.spans);
Nika Layzell27726662017-10-24 23:16:35 -04002939 }
Nika Layzell27726662017-10-24 23:16:35 -04002940 }
2941}
David Tolnay8c81f622018-07-31 23:34:35 -07002942#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002943pub fn visit_trait_bound<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitBound) {
David Tolnay8c81f622018-07-31 23:34:35 -07002944 if let Some(ref it) = _i.paren_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002945 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002946 };
2947 _visitor.visit_trait_bound_modifier(&_i.modifier);
2948 if let Some(ref it) = _i.lifetimes {
2949 _visitor.visit_bound_lifetimes(it)
2950 };
2951 _visitor.visit_path(&_i.path);
David Tolnay40fb8ce2018-01-02 10:53:46 -08002952}
David Tolnay8c81f622018-07-31 23:34:35 -07002953#[cfg(any(feature = "full", feature = "derive"))]
2954pub fn visit_trait_bound_modifier<'ast, V: Visit<'ast> + ?Sized>(
2955 _visitor: &mut V,
2956 _i: &'ast TraitBoundModifier,
2957) {
Nika Layzell27726662017-10-24 23:16:35 -04002958 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002959 TraitBoundModifier::None => {}
2960 TraitBoundModifier::Maybe(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04002961 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -04002962 }
2963 }
2964}
David Tolnay8c81f622018-07-31 23:34:35 -07002965#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002966pub fn visit_trait_item<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItem) {
Nika Layzell27726662017-10-24 23:16:35 -04002967 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002968 TraitItem::Const(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002969 _visitor.visit_trait_item_const(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002970 }
David Tolnay8c81f622018-07-31 23:34:35 -07002971 TraitItem::Method(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002972 _visitor.visit_trait_item_method(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002973 }
David Tolnay8c81f622018-07-31 23:34:35 -07002974 TraitItem::Type(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002975 _visitor.visit_trait_item_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002976 }
David Tolnay8c81f622018-07-31 23:34:35 -07002977 TraitItem::Macro(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002978 _visitor.visit_trait_item_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002979 }
David Tolnay8c81f622018-07-31 23:34:35 -07002980 TraitItem::Verbatim(ref _binding_0) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05002981 _visitor.visit_trait_item_verbatim(_binding_0);
2982 }
Nika Layzell27726662017-10-24 23:16:35 -04002983 }
2984}
David Tolnay8c81f622018-07-31 23:34:35 -07002985#[cfg(feature = "full")]
2986pub fn visit_trait_item_const<'ast, V: Visit<'ast> + ?Sized>(
2987 _visitor: &mut V,
2988 _i: &'ast TraitItemConst,
2989) {
2990 for it in &_i.attrs {
2991 _visitor.visit_attribute(it)
2992 }
David Tolnay7ac699c2018-08-24 14:00:58 -04002993 tokens_helper(_visitor, &_i.const_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002994 _visitor.visit_ident(&_i.ident);
David Tolnay7ac699c2018-08-24 14:00:58 -04002995 tokens_helper(_visitor, &_i.colon_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002996 _visitor.visit_type(&_i.ty);
2997 if let Some(ref it) = _i.default {
David Tolnay7ac699c2018-08-24 14:00:58 -04002998 tokens_helper(_visitor, &(it).0.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002999 _visitor.visit_expr(&(it).1);
3000 };
David Tolnay7ac699c2018-08-24 14:00:58 -04003001 tokens_helper(_visitor, &_i.semi_token.spans);
David Tolnayda705bd2017-11-10 21:58:05 -08003002}
David Tolnay8c81f622018-07-31 23:34:35 -07003003#[cfg(feature = "full")]
3004pub fn visit_trait_item_macro<'ast, V: Visit<'ast> + ?Sized>(
3005 _visitor: &mut V,
3006 _i: &'ast TraitItemMacro,
3007) {
3008 for it in &_i.attrs {
3009 _visitor.visit_attribute(it)
3010 }
3011 _visitor.visit_macro(&_i.mac);
3012 if let Some(ref it) = _i.semi_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04003013 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07003014 };
David Tolnayda705bd2017-11-10 21:58:05 -08003015}
David Tolnay8c81f622018-07-31 23:34:35 -07003016#[cfg(feature = "full")]
3017pub fn visit_trait_item_method<'ast, V: Visit<'ast> + ?Sized>(
3018 _visitor: &mut V,
3019 _i: &'ast TraitItemMethod,
3020) {
3021 for it in &_i.attrs {
3022 _visitor.visit_attribute(it)
3023 }
3024 _visitor.visit_method_sig(&_i.sig);
3025 if let Some(ref it) = _i.default {
3026 _visitor.visit_block(it)
3027 };
3028 if let Some(ref it) = _i.semi_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04003029 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07003030 };
Nika Layzell27726662017-10-24 23:16:35 -04003031}
David Tolnay8c81f622018-07-31 23:34:35 -07003032#[cfg(feature = "full")]
3033pub fn visit_trait_item_type<'ast, V: Visit<'ast> + ?Sized>(
3034 _visitor: &mut V,
3035 _i: &'ast TraitItemType,
3036) {
3037 for it in &_i.attrs {
3038 _visitor.visit_attribute(it)
3039 }
David Tolnay7ac699c2018-08-24 14:00:58 -04003040 tokens_helper(_visitor, &_i.type_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003041 _visitor.visit_ident(&_i.ident);
3042 _visitor.visit_generics(&_i.generics);
3043 if let Some(ref it) = _i.colon_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04003044 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07003045 };
3046 for el in Punctuated::pairs(&_i.bounds) {
3047 let it = el.value();
3048 _visitor.visit_type_param_bound(it)
3049 }
3050 if let Some(ref it) = _i.default {
David Tolnay7ac699c2018-08-24 14:00:58 -04003051 tokens_helper(_visitor, &(it).0.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07003052 _visitor.visit_type(&(it).1);
3053 };
David Tolnay7ac699c2018-08-24 14:00:58 -04003054 tokens_helper(_visitor, &_i.semi_token.spans);
Nika Layzell27726662017-10-24 23:16:35 -04003055}
David Tolnay8c81f622018-07-31 23:34:35 -07003056#[cfg(feature = "full")]
3057pub fn visit_trait_item_verbatim<'ast, V: Visit<'ast> + ?Sized>(
3058 _visitor: &mut V,
3059 _i: &'ast TraitItemVerbatim,
3060) {
David Tolnay6af48992018-08-01 11:16:28 -07003061 skip!(_i.tts);
David Tolnay2ae520a2017-12-29 11:19:50 -05003062}
David Tolnay8c81f622018-07-31 23:34:35 -07003063#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003064pub fn visit_type<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Type) {
Nika Layzell27726662017-10-24 23:16:35 -04003065 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07003066 Type::Slice(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003067 _visitor.visit_type_slice(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003068 }
David Tolnay8c81f622018-07-31 23:34:35 -07003069 Type::Array(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003070 _visitor.visit_type_array(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003071 }
David Tolnay8c81f622018-07-31 23:34:35 -07003072 Type::Ptr(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003073 _visitor.visit_type_ptr(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003074 }
David Tolnay8c81f622018-07-31 23:34:35 -07003075 Type::Reference(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003076 _visitor.visit_type_reference(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003077 }
David Tolnay8c81f622018-07-31 23:34:35 -07003078 Type::BareFn(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003079 _visitor.visit_type_bare_fn(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003080 }
David Tolnay8c81f622018-07-31 23:34:35 -07003081 Type::Never(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003082 _visitor.visit_type_never(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003083 }
David Tolnay8c81f622018-07-31 23:34:35 -07003084 Type::Tuple(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003085 _visitor.visit_type_tuple(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003086 }
David Tolnay8c81f622018-07-31 23:34:35 -07003087 Type::Path(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003088 _visitor.visit_type_path(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003089 }
David Tolnay8c81f622018-07-31 23:34:35 -07003090 Type::TraitObject(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003091 _visitor.visit_type_trait_object(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003092 }
David Tolnay8c81f622018-07-31 23:34:35 -07003093 Type::ImplTrait(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003094 _visitor.visit_type_impl_trait(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003095 }
David Tolnay8c81f622018-07-31 23:34:35 -07003096 Type::Paren(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003097 _visitor.visit_type_paren(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003098 }
David Tolnay8c81f622018-07-31 23:34:35 -07003099 Type::Group(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003100 _visitor.visit_type_group(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003101 }
David Tolnay8c81f622018-07-31 23:34:35 -07003102 Type::Infer(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003103 _visitor.visit_type_infer(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003104 }
David Tolnay8c81f622018-07-31 23:34:35 -07003105 Type::Macro(ref _binding_0) => {
David Tolnay323279a2017-12-29 11:26:32 -05003106 _visitor.visit_type_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003107 }
David Tolnay8c81f622018-07-31 23:34:35 -07003108 Type::Verbatim(ref _binding_0) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05003109 _visitor.visit_type_verbatim(_binding_0);
3110 }
Nika Layzell27726662017-10-24 23:16:35 -04003111 }
3112}
David Tolnay8c81f622018-07-31 23:34:35 -07003113#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003114pub fn visit_type_array<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeArray) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003115 tokens_helper(_visitor, &_i.bracket_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003116 _visitor.visit_type(&*_i.elem);
David Tolnay7ac699c2018-08-24 14:00:58 -04003117 tokens_helper(_visitor, &_i.semi_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07003118 _visitor.visit_expr(&_i.len);
Nika Layzell27726662017-10-24 23:16:35 -04003119}
David Tolnay8c81f622018-07-31 23:34:35 -07003120#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003121pub fn visit_type_bare_fn<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeBareFn) {
David Tolnay8c81f622018-07-31 23:34:35 -07003122 if let Some(ref it) = _i.unsafety {
David Tolnay7ac699c2018-08-24 14:00:58 -04003123 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07003124 };
3125 if let Some(ref it) = _i.abi {
3126 _visitor.visit_abi(it)
3127 };
David Tolnay7ac699c2018-08-24 14:00:58 -04003128 tokens_helper(_visitor, &_i.fn_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003129 if let Some(ref it) = _i.lifetimes {
3130 _visitor.visit_bound_lifetimes(it)
3131 };
David Tolnay7ac699c2018-08-24 14:00:58 -04003132 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003133 for el in Punctuated::pairs(&_i.inputs) {
3134 let it = el.value();
3135 _visitor.visit_bare_fn_arg(it)
3136 }
3137 if let Some(ref it) = _i.variadic {
David Tolnay7ac699c2018-08-24 14:00:58 -04003138 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07003139 };
3140 _visitor.visit_return_type(&_i.output);
Nika Layzell27726662017-10-24 23:16:35 -04003141}
David Tolnay8c81f622018-07-31 23:34:35 -07003142#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003143pub fn visit_type_group<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeGroup) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003144 tokens_helper(_visitor, &_i.group_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003145 _visitor.visit_type(&*_i.elem);
Nika Layzell27726662017-10-24 23:16:35 -04003146}
David Tolnay8c81f622018-07-31 23:34:35 -07003147#[cfg(any(feature = "full", feature = "derive"))]
3148pub fn visit_type_impl_trait<'ast, V: Visit<'ast> + ?Sized>(
3149 _visitor: &mut V,
3150 _i: &'ast TypeImplTrait,
3151) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003152 tokens_helper(_visitor, &_i.impl_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003153 for el in Punctuated::pairs(&_i.bounds) {
3154 let it = el.value();
3155 _visitor.visit_type_param_bound(it)
3156 }
Nika Layzell27726662017-10-24 23:16:35 -04003157}
David Tolnay8c81f622018-07-31 23:34:35 -07003158#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003159pub fn visit_type_infer<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeInfer) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003160 tokens_helper(_visitor, &_i.underscore_token.spans);
Nika Layzell27726662017-10-24 23:16:35 -04003161}
David Tolnay8c81f622018-07-31 23:34:35 -07003162#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003163pub fn visit_type_macro<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeMacro) {
David Tolnay8c81f622018-07-31 23:34:35 -07003164 _visitor.visit_macro(&_i.mac);
David Tolnay323279a2017-12-29 11:26:32 -05003165}
David Tolnay8c81f622018-07-31 23:34:35 -07003166#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003167pub fn visit_type_never<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeNever) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003168 tokens_helper(_visitor, &_i.bang_token.spans);
Nika Layzell27726662017-10-24 23:16:35 -04003169}
David Tolnay8c81f622018-07-31 23:34:35 -07003170#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003171pub fn visit_type_param<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParam) {
David Tolnay8c81f622018-07-31 23:34:35 -07003172 for it in &_i.attrs {
3173 _visitor.visit_attribute(it)
3174 }
3175 _visitor.visit_ident(&_i.ident);
3176 if let Some(ref it) = _i.colon_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04003177 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07003178 };
3179 for el in Punctuated::pairs(&_i.bounds) {
3180 let it = el.value();
3181 _visitor.visit_type_param_bound(it)
3182 }
3183 if let Some(ref it) = _i.eq_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04003184 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07003185 };
3186 if let Some(ref it) = _i.default {
3187 _visitor.visit_type(it)
3188 };
Nika Layzell27726662017-10-24 23:16:35 -04003189}
David Tolnay8c81f622018-07-31 23:34:35 -07003190#[cfg(any(feature = "full", feature = "derive"))]
3191pub fn visit_type_param_bound<'ast, V: Visit<'ast> + ?Sized>(
3192 _visitor: &mut V,
3193 _i: &'ast TypeParamBound,
3194) {
Nika Layzell27726662017-10-24 23:16:35 -04003195 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07003196 TypeParamBound::Trait(ref _binding_0) => {
David Tolnay40fb8ce2018-01-02 10:53:46 -08003197 _visitor.visit_trait_bound(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003198 }
David Tolnay8c81f622018-07-31 23:34:35 -07003199 TypeParamBound::Lifetime(ref _binding_0) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05003200 _visitor.visit_lifetime(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003201 }
3202 }
3203}
David Tolnay8c81f622018-07-31 23:34:35 -07003204#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003205pub fn visit_type_paren<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParen) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003206 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003207 _visitor.visit_type(&*_i.elem);
Nika Layzell27726662017-10-24 23:16:35 -04003208}
David Tolnay8c81f622018-07-31 23:34:35 -07003209#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003210pub fn visit_type_path<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypePath) {
David Tolnay8c81f622018-07-31 23:34:35 -07003211 if let Some(ref it) = _i.qself {
3212 _visitor.visit_qself(it)
3213 };
3214 _visitor.visit_path(&_i.path);
Nika Layzell27726662017-10-24 23:16:35 -04003215}
David Tolnay8c81f622018-07-31 23:34:35 -07003216#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003217pub fn visit_type_ptr<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypePtr) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003218 tokens_helper(_visitor, &_i.star_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07003219 if let Some(ref it) = _i.const_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04003220 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07003221 };
3222 if let Some(ref it) = _i.mutability {
David Tolnay7ac699c2018-08-24 14:00:58 -04003223 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07003224 };
3225 _visitor.visit_type(&*_i.elem);
Nika Layzell27726662017-10-24 23:16:35 -04003226}
David Tolnay8c81f622018-07-31 23:34:35 -07003227#[cfg(any(feature = "full", feature = "derive"))]
3228pub fn visit_type_reference<'ast, V: Visit<'ast> + ?Sized>(
3229 _visitor: &mut V,
3230 _i: &'ast TypeReference,
3231) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003232 tokens_helper(_visitor, &_i.and_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07003233 if let Some(ref it) = _i.lifetime {
3234 _visitor.visit_lifetime(it)
3235 };
3236 if let Some(ref it) = _i.mutability {
David Tolnay7ac699c2018-08-24 14:00:58 -04003237 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07003238 };
3239 _visitor.visit_type(&*_i.elem);
Nika Layzell27726662017-10-24 23:16:35 -04003240}
David Tolnay8c81f622018-07-31 23:34:35 -07003241#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003242pub fn visit_type_slice<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeSlice) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003243 tokens_helper(_visitor, &_i.bracket_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003244 _visitor.visit_type(&*_i.elem);
Nika Layzell27726662017-10-24 23:16:35 -04003245}
David Tolnay8c81f622018-07-31 23:34:35 -07003246#[cfg(any(feature = "full", feature = "derive"))]
3247pub fn visit_type_trait_object<'ast, V: Visit<'ast> + ?Sized>(
3248 _visitor: &mut V,
3249 _i: &'ast TypeTraitObject,
3250) {
3251 if let Some(ref it) = _i.dyn_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04003252 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07003253 };
3254 for el in Punctuated::pairs(&_i.bounds) {
3255 let it = el.value();
3256 _visitor.visit_type_param_bound(it)
3257 }
Nika Layzell27726662017-10-24 23:16:35 -04003258}
David Tolnay8c81f622018-07-31 23:34:35 -07003259#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003260pub fn visit_type_tuple<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeTuple) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003261 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003262 for el in Punctuated::pairs(&_i.elems) {
3263 let it = el.value();
3264 _visitor.visit_type(it)
3265 }
Nika Layzell27726662017-10-24 23:16:35 -04003266}
David Tolnay8c81f622018-07-31 23:34:35 -07003267#[cfg(any(feature = "full", feature = "derive"))]
3268pub fn visit_type_verbatim<'ast, V: Visit<'ast> + ?Sized>(
3269 _visitor: &mut V,
3270 _i: &'ast TypeVerbatim,
3271) {
David Tolnay6af48992018-08-01 11:16:28 -07003272 skip!(_i.tts);
David Tolnay2ae520a2017-12-29 11:19:50 -05003273}
David Tolnay8c81f622018-07-31 23:34:35 -07003274#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003275pub fn visit_un_op<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UnOp) {
Nika Layzell27726662017-10-24 23:16:35 -04003276 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07003277 UnOp::Deref(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04003278 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -04003279 }
David Tolnay8c81f622018-07-31 23:34:35 -07003280 UnOp::Not(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04003281 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -04003282 }
David Tolnay8c81f622018-07-31 23:34:35 -07003283 UnOp::Neg(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04003284 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -04003285 }
3286 }
3287}
David Tolnay8c81f622018-07-31 23:34:35 -07003288#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003289pub fn visit_use_glob<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseGlob) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003290 tokens_helper(_visitor, &_i.star_token.spans);
David Tolnay5f332a92017-12-26 00:42:45 -05003291}
David Tolnay8c81f622018-07-31 23:34:35 -07003292#[cfg(feature = "full")]
David Tolnayd97a7d22018-03-31 19:17:01 +02003293pub fn visit_use_group<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseGroup) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003294 tokens_helper(_visitor, &_i.brace_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003295 for el in Punctuated::pairs(&_i.items) {
3296 let it = el.value();
3297 _visitor.visit_use_tree(it)
3298 }
David Tolnay5f332a92017-12-26 00:42:45 -05003299}
David Tolnay8c81f622018-07-31 23:34:35 -07003300#[cfg(feature = "full")]
David Tolnayd97a7d22018-03-31 19:17:01 +02003301pub fn visit_use_name<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseName) {
David Tolnay8c81f622018-07-31 23:34:35 -07003302 _visitor.visit_ident(&_i.ident);
David Tolnayd97a7d22018-03-31 19:17:01 +02003303}
David Tolnay8c81f622018-07-31 23:34:35 -07003304#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003305pub fn visit_use_path<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UsePath) {
David Tolnay8c81f622018-07-31 23:34:35 -07003306 _visitor.visit_ident(&_i.ident);
David Tolnay7ac699c2018-08-24 14:00:58 -04003307 tokens_helper(_visitor, &_i.colon2_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07003308 _visitor.visit_use_tree(&*_i.tree);
David Tolnayd97a7d22018-03-31 19:17:01 +02003309}
David Tolnay8c81f622018-07-31 23:34:35 -07003310#[cfg(feature = "full")]
David Tolnayd97a7d22018-03-31 19:17:01 +02003311pub fn visit_use_rename<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseRename) {
David Tolnay8c81f622018-07-31 23:34:35 -07003312 _visitor.visit_ident(&_i.ident);
David Tolnay7ac699c2018-08-24 14:00:58 -04003313 tokens_helper(_visitor, &_i.as_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003314 _visitor.visit_ident(&_i.rename);
David Tolnay5f332a92017-12-26 00:42:45 -05003315}
David Tolnay8c81f622018-07-31 23:34:35 -07003316#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003317pub fn visit_use_tree<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseTree) {
David Tolnay5f332a92017-12-26 00:42:45 -05003318 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07003319 UseTree::Path(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003320 _visitor.visit_use_path(_binding_0);
David Tolnay5f332a92017-12-26 00:42:45 -05003321 }
David Tolnay8c81f622018-07-31 23:34:35 -07003322 UseTree::Name(ref _binding_0) => {
David Tolnayd97a7d22018-03-31 19:17:01 +02003323 _visitor.visit_use_name(_binding_0);
3324 }
David Tolnay8c81f622018-07-31 23:34:35 -07003325 UseTree::Rename(ref _binding_0) => {
David Tolnayd97a7d22018-03-31 19:17:01 +02003326 _visitor.visit_use_rename(_binding_0);
3327 }
David Tolnay8c81f622018-07-31 23:34:35 -07003328 UseTree::Glob(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003329 _visitor.visit_use_glob(_binding_0);
David Tolnay5f332a92017-12-26 00:42:45 -05003330 }
David Tolnay8c81f622018-07-31 23:34:35 -07003331 UseTree::Group(ref _binding_0) => {
David Tolnayd97a7d22018-03-31 19:17:01 +02003332 _visitor.visit_use_group(_binding_0);
David Tolnay5f332a92017-12-26 00:42:45 -05003333 }
3334 }
3335}
David Tolnay8c81f622018-07-31 23:34:35 -07003336#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003337pub fn visit_variant<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Variant) {
David Tolnay8c81f622018-07-31 23:34:35 -07003338 for it in &_i.attrs {
3339 _visitor.visit_attribute(it)
3340 }
3341 _visitor.visit_ident(&_i.ident);
3342 _visitor.visit_fields(&_i.fields);
3343 if let Some(ref it) = _i.discriminant {
David Tolnay7ac699c2018-08-24 14:00:58 -04003344 tokens_helper(_visitor, &(it).0.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07003345 _visitor.visit_expr(&(it).1);
3346 };
Nika Layzell27726662017-10-24 23:16:35 -04003347}
David Tolnay8c81f622018-07-31 23:34:35 -07003348#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003349pub fn visit_vis_crate<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisCrate) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003350 tokens_helper(_visitor, &_i.crate_token.span);
Nika Layzell27726662017-10-24 23:16:35 -04003351}
David Tolnay8c81f622018-07-31 23:34:35 -07003352#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003353pub fn visit_vis_public<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisPublic) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003354 tokens_helper(_visitor, &_i.pub_token.span);
Nika Layzell27726662017-10-24 23:16:35 -04003355}
David Tolnay8c81f622018-07-31 23:34:35 -07003356#[cfg(any(feature = "full", feature = "derive"))]
3357pub fn visit_vis_restricted<'ast, V: Visit<'ast> + ?Sized>(
3358 _visitor: &mut V,
3359 _i: &'ast VisRestricted,
3360) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003361 tokens_helper(_visitor, &_i.pub_token.span);
3362 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003363 if let Some(ref it) = _i.in_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04003364 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07003365 };
3366 _visitor.visit_path(&*_i.path);
Nika Layzell27726662017-10-24 23:16:35 -04003367}
David Tolnay8c81f622018-07-31 23:34:35 -07003368#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003369pub fn visit_visibility<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Visibility) {
Nika Layzell27726662017-10-24 23:16:35 -04003370 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07003371 Visibility::Public(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003372 _visitor.visit_vis_public(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003373 }
David Tolnay8c81f622018-07-31 23:34:35 -07003374 Visibility::Crate(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003375 _visitor.visit_vis_crate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003376 }
David Tolnay8c81f622018-07-31 23:34:35 -07003377 Visibility::Restricted(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003378 _visitor.visit_vis_restricted(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003379 }
David Tolnay8c81f622018-07-31 23:34:35 -07003380 Visibility::Inherited => {}
Nika Layzell27726662017-10-24 23:16:35 -04003381 }
3382}
David Tolnay8c81f622018-07-31 23:34:35 -07003383#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003384pub fn visit_where_clause<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WhereClause) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003385 tokens_helper(_visitor, &_i.where_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003386 for el in Punctuated::pairs(&_i.predicates) {
3387 let it = el.value();
3388 _visitor.visit_where_predicate(it)
3389 }
Nika Layzell27726662017-10-24 23:16:35 -04003390}
David Tolnay8c81f622018-07-31 23:34:35 -07003391#[cfg(any(feature = "full", feature = "derive"))]
3392pub fn visit_where_predicate<'ast, V: Visit<'ast> + ?Sized>(
3393 _visitor: &mut V,
3394 _i: &'ast WherePredicate,
3395) {
Nika Layzell27726662017-10-24 23:16:35 -04003396 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07003397 WherePredicate::Type(ref _binding_0) => {
David Tolnayd4add852018-01-01 20:13:24 -08003398 _visitor.visit_predicate_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003399 }
David Tolnay8c81f622018-07-31 23:34:35 -07003400 WherePredicate::Lifetime(ref _binding_0) => {
David Tolnayd4add852018-01-01 20:13:24 -08003401 _visitor.visit_predicate_lifetime(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003402 }
David Tolnay8c81f622018-07-31 23:34:35 -07003403 WherePredicate::Eq(ref _binding_0) => {
David Tolnayd4add852018-01-01 20:13:24 -08003404 _visitor.visit_predicate_eq(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003405 }
3406 }
3407}