blob: e2b2ba0e54f98fa66d1a34fded1f01e59c6713ee [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 }
1382 if let Some(ref it) = _i.movability {
David Tolnay7ac699c2018-08-24 14:00:58 -04001383 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07001384 };
1385 if let Some(ref it) = _i.capture {
David Tolnay7ac699c2018-08-24 14:00:58 -04001386 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07001387 };
David Tolnay7ac699c2018-08-24 14:00:58 -04001388 tokens_helper(_visitor, &_i.or1_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001389 for el in Punctuated::pairs(&_i.inputs) {
1390 let it = el.value();
1391 _visitor.visit_fn_arg(it)
1392 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001393 tokens_helper(_visitor, &_i.or2_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001394 _visitor.visit_return_type(&_i.output);
1395 _visitor.visit_expr(&*_i.body);
1396}
1397#[cfg(feature = "full")]
1398#[cfg(any(feature = "full", feature = "derive"))]
1399pub fn visit_expr_continue<'ast, V: Visit<'ast> + ?Sized>(
1400 _visitor: &mut V,
1401 _i: &'ast ExprContinue,
1402) {
1403 for it in &_i.attrs {
1404 _visitor.visit_attribute(it)
1405 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001406 tokens_helper(_visitor, &_i.continue_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001407 if let Some(ref it) = _i.label {
1408 _visitor.visit_lifetime(it)
1409 };
1410}
1411#[cfg(any(feature = "full", feature = "derive"))]
1412pub fn visit_expr_field<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprField) {
1413 for it in &_i.attrs {
1414 _visitor.visit_attribute(it)
1415 }
1416 _visitor.visit_expr(&*_i.base);
David Tolnay7ac699c2018-08-24 14:00:58 -04001417 tokens_helper(_visitor, &_i.dot_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001418 _visitor.visit_member(&_i.member);
1419}
1420#[cfg(feature = "full")]
1421#[cfg(any(feature = "full", feature = "derive"))]
1422pub fn visit_expr_for_loop<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprForLoop) {
1423 for it in &_i.attrs {
1424 _visitor.visit_attribute(it)
1425 }
1426 if let Some(ref it) = _i.label {
1427 _visitor.visit_label(it)
1428 };
David Tolnay7ac699c2018-08-24 14:00:58 -04001429 tokens_helper(_visitor, &_i.for_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001430 _visitor.visit_pat(&*_i.pat);
David Tolnay7ac699c2018-08-24 14:00:58 -04001431 tokens_helper(_visitor, &_i.in_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001432 _visitor.visit_expr(&*_i.expr);
1433 _visitor.visit_block(&_i.body);
1434}
1435#[cfg(feature = "full")]
1436#[cfg(any(feature = "full", feature = "derive"))]
1437pub fn visit_expr_group<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprGroup) {
1438 for it in &_i.attrs {
1439 _visitor.visit_attribute(it)
1440 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001441 tokens_helper(_visitor, &_i.group_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001442 _visitor.visit_expr(&*_i.expr);
1443}
1444#[cfg(feature = "full")]
1445#[cfg(any(feature = "full", feature = "derive"))]
1446pub fn visit_expr_if<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIf) {
1447 for it in &_i.attrs {
1448 _visitor.visit_attribute(it)
1449 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001450 tokens_helper(_visitor, &_i.if_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001451 _visitor.visit_expr(&*_i.cond);
1452 _visitor.visit_block(&_i.then_branch);
1453 if let Some(ref it) = _i.else_branch {
David Tolnay7ac699c2018-08-24 14:00:58 -04001454 tokens_helper(_visitor, &(it).0.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001455 _visitor.visit_expr(&*(it).1);
1456 };
1457}
1458#[cfg(feature = "full")]
1459#[cfg(any(feature = "full", feature = "derive"))]
1460pub fn visit_expr_if_let<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIfLet) {
1461 for it in &_i.attrs {
1462 _visitor.visit_attribute(it)
1463 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001464 tokens_helper(_visitor, &_i.if_token.span);
1465 tokens_helper(_visitor, &_i.let_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001466 for el in Punctuated::pairs(&_i.pats) {
1467 let it = el.value();
1468 _visitor.visit_pat(it)
1469 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001470 tokens_helper(_visitor, &_i.eq_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001471 _visitor.visit_expr(&*_i.expr);
1472 _visitor.visit_block(&_i.then_branch);
1473 if let Some(ref it) = _i.else_branch {
David Tolnay7ac699c2018-08-24 14:00:58 -04001474 tokens_helper(_visitor, &(it).0.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001475 _visitor.visit_expr(&*(it).1);
1476 };
1477}
1478#[cfg(feature = "full")]
1479#[cfg(any(feature = "full", feature = "derive"))]
1480pub fn visit_expr_in_place<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprInPlace) {
1481 for it in &_i.attrs {
1482 _visitor.visit_attribute(it)
1483 }
1484 _visitor.visit_expr(&*_i.place);
David Tolnay7ac699c2018-08-24 14:00:58 -04001485 tokens_helper(_visitor, &_i.arrow_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001486 _visitor.visit_expr(&*_i.value);
1487}
1488#[cfg(any(feature = "full", feature = "derive"))]
1489pub fn visit_expr_index<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprIndex) {
1490 for it in &_i.attrs {
1491 _visitor.visit_attribute(it)
1492 }
1493 _visitor.visit_expr(&*_i.expr);
David Tolnay7ac699c2018-08-24 14:00:58 -04001494 tokens_helper(_visitor, &_i.bracket_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001495 _visitor.visit_expr(&*_i.index);
1496}
1497#[cfg(any(feature = "full", feature = "derive"))]
1498pub fn visit_expr_lit<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprLit) {
1499 for it in &_i.attrs {
1500 _visitor.visit_attribute(it)
1501 }
1502 _visitor.visit_lit(&_i.lit);
1503}
1504#[cfg(feature = "full")]
1505#[cfg(any(feature = "full", feature = "derive"))]
1506pub fn visit_expr_loop<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprLoop) {
1507 for it in &_i.attrs {
1508 _visitor.visit_attribute(it)
1509 }
1510 if let Some(ref it) = _i.label {
1511 _visitor.visit_label(it)
1512 };
David Tolnay7ac699c2018-08-24 14:00:58 -04001513 tokens_helper(_visitor, &_i.loop_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001514 _visitor.visit_block(&_i.body);
1515}
1516#[cfg(feature = "full")]
1517#[cfg(any(feature = "full", feature = "derive"))]
1518pub fn visit_expr_macro<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprMacro) {
1519 for it in &_i.attrs {
1520 _visitor.visit_attribute(it)
1521 }
1522 _visitor.visit_macro(&_i.mac);
1523}
1524#[cfg(feature = "full")]
1525#[cfg(any(feature = "full", feature = "derive"))]
1526pub fn visit_expr_match<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprMatch) {
1527 for it in &_i.attrs {
1528 _visitor.visit_attribute(it)
1529 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001530 tokens_helper(_visitor, &_i.match_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001531 _visitor.visit_expr(&*_i.expr);
David Tolnay7ac699c2018-08-24 14:00:58 -04001532 tokens_helper(_visitor, &_i.brace_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001533 for it in &_i.arms {
1534 _visitor.visit_arm(it)
1535 }
1536}
1537#[cfg(feature = "full")]
1538#[cfg(any(feature = "full", feature = "derive"))]
1539pub fn visit_expr_method_call<'ast, V: Visit<'ast> + ?Sized>(
1540 _visitor: &mut V,
1541 _i: &'ast ExprMethodCall,
1542) {
1543 for it in &_i.attrs {
1544 _visitor.visit_attribute(it)
1545 }
1546 _visitor.visit_expr(&*_i.receiver);
David Tolnay7ac699c2018-08-24 14:00:58 -04001547 tokens_helper(_visitor, &_i.dot_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001548 _visitor.visit_ident(&_i.method);
1549 if let Some(ref it) = _i.turbofish {
1550 _visitor.visit_method_turbofish(it)
1551 };
David Tolnay7ac699c2018-08-24 14:00:58 -04001552 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001553 for el in Punctuated::pairs(&_i.args) {
1554 let it = el.value();
1555 _visitor.visit_expr(it)
1556 }
1557}
1558#[cfg(any(feature = "full", feature = "derive"))]
1559pub fn visit_expr_paren<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprParen) {
1560 for it in &_i.attrs {
1561 _visitor.visit_attribute(it)
1562 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001563 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001564 _visitor.visit_expr(&*_i.expr);
1565}
1566#[cfg(any(feature = "full", feature = "derive"))]
1567pub fn visit_expr_path<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprPath) {
1568 for it in &_i.attrs {
1569 _visitor.visit_attribute(it)
1570 }
1571 if let Some(ref it) = _i.qself {
1572 _visitor.visit_qself(it)
1573 };
1574 _visitor.visit_path(&_i.path);
1575}
1576#[cfg(feature = "full")]
1577#[cfg(any(feature = "full", feature = "derive"))]
1578pub fn visit_expr_range<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprRange) {
1579 for it in &_i.attrs {
1580 _visitor.visit_attribute(it)
1581 }
1582 if let Some(ref it) = _i.from {
1583 _visitor.visit_expr(&**it)
1584 };
1585 _visitor.visit_range_limits(&_i.limits);
1586 if let Some(ref it) = _i.to {
1587 _visitor.visit_expr(&**it)
1588 };
1589}
1590#[cfg(feature = "full")]
1591#[cfg(any(feature = "full", feature = "derive"))]
1592pub fn visit_expr_reference<'ast, V: Visit<'ast> + ?Sized>(
1593 _visitor: &mut V,
1594 _i: &'ast ExprReference,
1595) {
1596 for it in &_i.attrs {
1597 _visitor.visit_attribute(it)
1598 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001599 tokens_helper(_visitor, &_i.and_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001600 if let Some(ref it) = _i.mutability {
David Tolnay7ac699c2018-08-24 14:00:58 -04001601 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07001602 };
1603 _visitor.visit_expr(&*_i.expr);
1604}
1605#[cfg(feature = "full")]
1606#[cfg(any(feature = "full", feature = "derive"))]
1607pub fn visit_expr_repeat<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprRepeat) {
1608 for it in &_i.attrs {
1609 _visitor.visit_attribute(it)
1610 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001611 tokens_helper(_visitor, &_i.bracket_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001612 _visitor.visit_expr(&*_i.expr);
David Tolnay7ac699c2018-08-24 14:00:58 -04001613 tokens_helper(_visitor, &_i.semi_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001614 _visitor.visit_expr(&*_i.len);
1615}
1616#[cfg(feature = "full")]
1617#[cfg(any(feature = "full", feature = "derive"))]
1618pub fn visit_expr_return<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprReturn) {
1619 for it in &_i.attrs {
1620 _visitor.visit_attribute(it)
1621 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001622 tokens_helper(_visitor, &_i.return_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001623 if let Some(ref it) = _i.expr {
1624 _visitor.visit_expr(&**it)
1625 };
1626}
1627#[cfg(feature = "full")]
1628#[cfg(any(feature = "full", feature = "derive"))]
1629pub fn visit_expr_struct<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprStruct) {
1630 for it in &_i.attrs {
1631 _visitor.visit_attribute(it)
1632 }
1633 _visitor.visit_path(&_i.path);
David Tolnay7ac699c2018-08-24 14:00:58 -04001634 tokens_helper(_visitor, &_i.brace_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001635 for el in Punctuated::pairs(&_i.fields) {
1636 let it = el.value();
1637 _visitor.visit_field_value(it)
1638 }
1639 if let Some(ref it) = _i.dot2_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04001640 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07001641 };
1642 if let Some(ref it) = _i.rest {
1643 _visitor.visit_expr(&**it)
1644 };
1645}
1646#[cfg(feature = "full")]
1647#[cfg(any(feature = "full", feature = "derive"))]
1648pub fn visit_expr_try<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprTry) {
1649 for it in &_i.attrs {
1650 _visitor.visit_attribute(it)
1651 }
1652 _visitor.visit_expr(&*_i.expr);
David Tolnay7ac699c2018-08-24 14:00:58 -04001653 tokens_helper(_visitor, &_i.question_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001654}
1655#[cfg(feature = "full")]
1656#[cfg(any(feature = "full", feature = "derive"))]
1657pub fn visit_expr_tuple<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprTuple) {
1658 for it in &_i.attrs {
1659 _visitor.visit_attribute(it)
1660 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001661 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001662 for el in Punctuated::pairs(&_i.elems) {
1663 let it = el.value();
1664 _visitor.visit_expr(it)
1665 }
1666}
1667#[cfg(feature = "full")]
1668#[cfg(any(feature = "full", feature = "derive"))]
1669pub fn visit_expr_type<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprType) {
1670 for it in &_i.attrs {
1671 _visitor.visit_attribute(it)
1672 }
1673 _visitor.visit_expr(&*_i.expr);
David Tolnay7ac699c2018-08-24 14:00:58 -04001674 tokens_helper(_visitor, &_i.colon_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001675 _visitor.visit_type(&*_i.ty);
1676}
1677#[cfg(any(feature = "full", feature = "derive"))]
1678pub fn visit_expr_unary<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprUnary) {
1679 for it in &_i.attrs {
1680 _visitor.visit_attribute(it)
1681 }
1682 _visitor.visit_un_op(&_i.op);
1683 _visitor.visit_expr(&*_i.expr);
1684}
1685#[cfg(feature = "full")]
1686#[cfg(any(feature = "full", feature = "derive"))]
1687pub fn visit_expr_unsafe<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprUnsafe) {
1688 for it in &_i.attrs {
1689 _visitor.visit_attribute(it)
1690 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001691 tokens_helper(_visitor, &_i.unsafe_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001692 _visitor.visit_block(&_i.block);
1693}
1694#[cfg(any(feature = "full", feature = "derive"))]
1695pub fn visit_expr_verbatim<'ast, V: Visit<'ast> + ?Sized>(
1696 _visitor: &mut V,
1697 _i: &'ast ExprVerbatim,
1698) {
David Tolnay6af48992018-08-01 11:16:28 -07001699 skip!(_i.tts);
David Tolnay8c81f622018-07-31 23:34:35 -07001700}
1701#[cfg(feature = "full")]
1702#[cfg(any(feature = "full", feature = "derive"))]
1703pub fn visit_expr_while<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprWhile) {
1704 for it in &_i.attrs {
1705 _visitor.visit_attribute(it)
1706 }
1707 if let Some(ref it) = _i.label {
1708 _visitor.visit_label(it)
1709 };
David Tolnay7ac699c2018-08-24 14:00:58 -04001710 tokens_helper(_visitor, &_i.while_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001711 _visitor.visit_expr(&*_i.cond);
1712 _visitor.visit_block(&_i.body);
1713}
1714#[cfg(feature = "full")]
1715#[cfg(any(feature = "full", feature = "derive"))]
1716pub fn visit_expr_while_let<'ast, V: Visit<'ast> + ?Sized>(
1717 _visitor: &mut V,
1718 _i: &'ast ExprWhileLet,
1719) {
1720 for it in &_i.attrs {
1721 _visitor.visit_attribute(it)
1722 }
1723 if let Some(ref it) = _i.label {
1724 _visitor.visit_label(it)
1725 };
David Tolnay7ac699c2018-08-24 14:00:58 -04001726 tokens_helper(_visitor, &_i.while_token.span);
1727 tokens_helper(_visitor, &_i.let_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001728 for el in Punctuated::pairs(&_i.pats) {
1729 let it = el.value();
1730 _visitor.visit_pat(it)
1731 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001732 tokens_helper(_visitor, &_i.eq_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001733 _visitor.visit_expr(&*_i.expr);
1734 _visitor.visit_block(&_i.body);
1735}
1736#[cfg(feature = "full")]
1737#[cfg(any(feature = "full", feature = "derive"))]
1738pub fn visit_expr_yield<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ExprYield) {
1739 for it in &_i.attrs {
1740 _visitor.visit_attribute(it)
1741 }
David Tolnay7ac699c2018-08-24 14:00:58 -04001742 tokens_helper(_visitor, &_i.yield_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001743 if let Some(ref it) = _i.expr {
1744 _visitor.visit_expr(&**it)
1745 };
1746}
1747#[cfg(any(feature = "full", feature = "derive"))]
1748pub fn visit_field<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Field) {
1749 for it in &_i.attrs {
1750 _visitor.visit_attribute(it)
1751 }
1752 _visitor.visit_visibility(&_i.vis);
1753 if let Some(ref it) = _i.ident {
1754 _visitor.visit_ident(it)
1755 };
1756 if let Some(ref it) = _i.colon_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04001757 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07001758 };
1759 _visitor.visit_type(&_i.ty);
1760}
1761#[cfg(any(feature = "full", feature = "derive"))]
1762#[cfg(feature = "full")]
1763pub fn visit_field_pat<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldPat) {
1764 for it in &_i.attrs {
1765 _visitor.visit_attribute(it)
1766 }
1767 _visitor.visit_member(&_i.member);
1768 if let Some(ref it) = _i.colon_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04001769 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07001770 };
1771 _visitor.visit_pat(&*_i.pat);
1772}
1773#[cfg(any(feature = "full", feature = "derive"))]
1774#[cfg(feature = "full")]
1775pub fn visit_field_value<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldValue) {
1776 for it in &_i.attrs {
1777 _visitor.visit_attribute(it)
1778 }
1779 _visitor.visit_member(&_i.member);
1780 if let Some(ref it) = _i.colon_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04001781 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07001782 };
1783 _visitor.visit_expr(&_i.expr);
1784}
1785#[cfg(any(feature = "full", feature = "derive"))]
1786pub fn visit_fields<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Fields) {
1787 match *_i {
1788 Fields::Named(ref _binding_0) => {
1789 _visitor.visit_fields_named(_binding_0);
1790 }
1791 Fields::Unnamed(ref _binding_0) => {
1792 _visitor.visit_fields_unnamed(_binding_0);
1793 }
1794 Fields::Unit => {}
1795 }
1796}
1797#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001798pub fn visit_fields_named<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FieldsNamed) {
David Tolnay7ac699c2018-08-24 14:00:58 -04001799 tokens_helper(_visitor, &_i.brace_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001800 for el in Punctuated::pairs(&_i.named) {
1801 let it = el.value();
1802 _visitor.visit_field(it)
1803 }
David Tolnaye3d41b72017-12-31 15:24:00 -05001804}
David Tolnay8c81f622018-07-31 23:34:35 -07001805#[cfg(any(feature = "full", feature = "derive"))]
1806pub fn visit_fields_unnamed<'ast, V: Visit<'ast> + ?Sized>(
1807 _visitor: &mut V,
1808 _i: &'ast FieldsUnnamed,
1809) {
David Tolnay7ac699c2018-08-24 14:00:58 -04001810 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001811 for el in Punctuated::pairs(&_i.unnamed) {
1812 let it = el.value();
1813 _visitor.visit_field(it)
1814 }
David Tolnaye3d41b72017-12-31 15:24:00 -05001815}
David Tolnay8c81f622018-07-31 23:34:35 -07001816#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001817pub fn visit_file<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast File) {
David Tolnay6af48992018-08-01 11:16:28 -07001818 skip!(_i.shebang);
David Tolnay8c81f622018-07-31 23:34:35 -07001819 for it in &_i.attrs {
1820 _visitor.visit_attribute(it)
1821 }
1822 for it in &_i.items {
1823 _visitor.visit_item(it)
1824 }
Nika Layzell27726662017-10-24 23:16:35 -04001825}
David Tolnay8c81f622018-07-31 23:34:35 -07001826#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001827pub fn visit_fn_arg<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FnArg) {
Nika Layzell27726662017-10-24 23:16:35 -04001828 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07001829 FnArg::SelfRef(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001830 _visitor.visit_arg_self_ref(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001831 }
David Tolnay8c81f622018-07-31 23:34:35 -07001832 FnArg::SelfValue(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001833 _visitor.visit_arg_self(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001834 }
David Tolnay8c81f622018-07-31 23:34:35 -07001835 FnArg::Captured(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001836 _visitor.visit_arg_captured(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001837 }
David Tolnay8c81f622018-07-31 23:34:35 -07001838 FnArg::Inferred(ref _binding_0) => {
David Tolnay80ed55f2017-12-27 22:54:40 -05001839 _visitor.visit_pat(_binding_0);
1840 }
David Tolnay8c81f622018-07-31 23:34:35 -07001841 FnArg::Ignored(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001842 _visitor.visit_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001843 }
1844 }
1845}
David Tolnay8c81f622018-07-31 23:34:35 -07001846#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001847pub fn visit_fn_decl<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast FnDecl) {
David Tolnay7ac699c2018-08-24 14:00:58 -04001848 tokens_helper(_visitor, &_i.fn_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001849 _visitor.visit_generics(&_i.generics);
David Tolnay7ac699c2018-08-24 14:00:58 -04001850 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001851 for el in Punctuated::pairs(&_i.inputs) {
1852 let it = el.value();
1853 _visitor.visit_fn_arg(it)
1854 }
1855 if let Some(ref it) = _i.variadic {
David Tolnay7ac699c2018-08-24 14:00:58 -04001856 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07001857 };
1858 _visitor.visit_return_type(&_i.output);
Nika Layzell27726662017-10-24 23:16:35 -04001859}
David Tolnay8c81f622018-07-31 23:34:35 -07001860#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001861pub fn visit_foreign_item<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ForeignItem) {
Nika Layzell27726662017-10-24 23:16:35 -04001862 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07001863 ForeignItem::Fn(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001864 _visitor.visit_foreign_item_fn(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001865 }
David Tolnay8c81f622018-07-31 23:34:35 -07001866 ForeignItem::Static(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001867 _visitor.visit_foreign_item_static(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04001868 }
David Tolnay8c81f622018-07-31 23:34:35 -07001869 ForeignItem::Type(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001870 _visitor.visit_foreign_item_type(_binding_0);
David Tolnay199bcbb2017-11-12 10:33:52 -08001871 }
David Tolnay435c1782018-08-24 16:15:44 -04001872 ForeignItem::Macro(ref _binding_0) => {
1873 _visitor.visit_foreign_item_macro(_binding_0);
1874 }
David Tolnay8c81f622018-07-31 23:34:35 -07001875 ForeignItem::Verbatim(ref _binding_0) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05001876 _visitor.visit_foreign_item_verbatim(_binding_0);
1877 }
Nika Layzell27726662017-10-24 23:16:35 -04001878 }
1879}
David Tolnay8c81f622018-07-31 23:34:35 -07001880#[cfg(feature = "full")]
1881pub fn visit_foreign_item_fn<'ast, V: Visit<'ast> + ?Sized>(
1882 _visitor: &mut V,
1883 _i: &'ast ForeignItemFn,
1884) {
1885 for it in &_i.attrs {
1886 _visitor.visit_attribute(it)
1887 }
1888 _visitor.visit_visibility(&_i.vis);
1889 _visitor.visit_ident(&_i.ident);
1890 _visitor.visit_fn_decl(&*_i.decl);
David Tolnay7ac699c2018-08-24 14:00:58 -04001891 tokens_helper(_visitor, &_i.semi_token.spans);
David Tolnay8894f602017-11-11 12:11:04 -08001892}
David Tolnay8c81f622018-07-31 23:34:35 -07001893#[cfg(feature = "full")]
David Tolnay435c1782018-08-24 16:15:44 -04001894pub fn visit_foreign_item_macro<'ast, V: Visit<'ast> + ?Sized>(
1895 _visitor: &mut V,
1896 _i: &'ast ForeignItemMacro,
1897) {
1898 for it in &_i.attrs {
1899 _visitor.visit_attribute(it)
1900 }
1901 _visitor.visit_macro(&_i.mac);
1902 if let Some(ref it) = _i.semi_token {
1903 tokens_helper(_visitor, &it.spans)
1904 };
1905}
1906#[cfg(feature = "full")]
David Tolnay8c81f622018-07-31 23:34:35 -07001907pub fn visit_foreign_item_static<'ast, V: Visit<'ast> + ?Sized>(
1908 _visitor: &mut V,
1909 _i: &'ast ForeignItemStatic,
1910) {
1911 for it in &_i.attrs {
1912 _visitor.visit_attribute(it)
1913 }
1914 _visitor.visit_visibility(&_i.vis);
David Tolnay7ac699c2018-08-24 14:00:58 -04001915 tokens_helper(_visitor, &_i.static_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001916 if let Some(ref it) = _i.mutability {
David Tolnay7ac699c2018-08-24 14:00:58 -04001917 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07001918 };
1919 _visitor.visit_ident(&_i.ident);
David Tolnay7ac699c2018-08-24 14:00:58 -04001920 tokens_helper(_visitor, &_i.colon_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07001921 _visitor.visit_type(&*_i.ty);
David Tolnay7ac699c2018-08-24 14:00:58 -04001922 tokens_helper(_visitor, &_i.semi_token.spans);
Nika Layzell27726662017-10-24 23:16:35 -04001923}
David Tolnay8c81f622018-07-31 23:34:35 -07001924#[cfg(feature = "full")]
1925pub fn visit_foreign_item_type<'ast, V: Visit<'ast> + ?Sized>(
1926 _visitor: &mut V,
1927 _i: &'ast ForeignItemType,
1928) {
1929 for it in &_i.attrs {
1930 _visitor.visit_attribute(it)
1931 }
1932 _visitor.visit_visibility(&_i.vis);
David Tolnay7ac699c2018-08-24 14:00:58 -04001933 tokens_helper(_visitor, &_i.type_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07001934 _visitor.visit_ident(&_i.ident);
David Tolnay7ac699c2018-08-24 14:00:58 -04001935 tokens_helper(_visitor, &_i.semi_token.spans);
David Tolnay199bcbb2017-11-12 10:33:52 -08001936}
David Tolnay8c81f622018-07-31 23:34:35 -07001937#[cfg(feature = "full")]
1938pub fn visit_foreign_item_verbatim<'ast, V: Visit<'ast> + ?Sized>(
1939 _visitor: &mut V,
1940 _i: &'ast ForeignItemVerbatim,
1941) {
David Tolnay6af48992018-08-01 11:16:28 -07001942 skip!(_i.tts);
David Tolnay2ae520a2017-12-29 11:19:50 -05001943}
David Tolnay8c81f622018-07-31 23:34:35 -07001944#[cfg(any(feature = "full", feature = "derive"))]
1945pub fn visit_generic_argument<'ast, V: Visit<'ast> + ?Sized>(
1946 _visitor: &mut V,
1947 _i: &'ast GenericArgument,
1948) {
Nika Layzell357885a2017-12-04 15:47:07 -05001949 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07001950 GenericArgument::Lifetime(ref _binding_0) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05001951 _visitor.visit_lifetime(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001952 }
David Tolnay8c81f622018-07-31 23:34:35 -07001953 GenericArgument::Type(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001954 _visitor.visit_type(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001955 }
David Tolnay8c81f622018-07-31 23:34:35 -07001956 GenericArgument::Binding(ref _binding_0) => {
David Tolnay506e43a2017-12-29 11:34:36 -05001957 _visitor.visit_binding(_binding_0);
Nika Layzell357885a2017-12-04 15:47:07 -05001958 }
David Tolnay8c81f622018-07-31 23:34:35 -07001959 GenericArgument::Const(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001960 _visitor.visit_expr(_binding_0);
Nika Layzellc680e612017-12-04 19:07:20 -05001961 }
Nika Layzell357885a2017-12-04 15:47:07 -05001962 }
1963}
David Tolnay8c81f622018-07-31 23:34:35 -07001964#[cfg(any(feature = "full", feature = "derive"))]
1965#[cfg(feature = "full")]
1966pub fn visit_generic_method_argument<'ast, V: Visit<'ast> + ?Sized>(
1967 _visitor: &mut V,
1968 _i: &'ast GenericMethodArgument,
1969) {
David Tolnayd60cfec2017-12-29 00:21:38 -05001970 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07001971 GenericMethodArgument::Type(ref _binding_0) => {
David Tolnayd60cfec2017-12-29 00:21:38 -05001972 _visitor.visit_type(_binding_0);
1973 }
David Tolnay8c81f622018-07-31 23:34:35 -07001974 GenericMethodArgument::Const(ref _binding_0) => {
David Tolnayd60cfec2017-12-29 00:21:38 -05001975 _visitor.visit_expr(_binding_0);
1976 }
1977 }
1978}
David Tolnay8c81f622018-07-31 23:34:35 -07001979#[cfg(any(feature = "full", feature = "derive"))]
1980pub fn visit_generic_param<'ast, V: Visit<'ast> + ?Sized>(
1981 _visitor: &mut V,
1982 _i: &'ast GenericParam,
1983) {
David Tolnayc2f1aba2017-11-12 20:29:22 -08001984 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07001985 GenericParam::Type(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001986 _visitor.visit_type_param(_binding_0);
David Tolnayc2f1aba2017-11-12 20:29:22 -08001987 }
David Tolnay8c81f622018-07-31 23:34:35 -07001988 GenericParam::Lifetime(ref _binding_0) => {
David Tolnay517f3692018-01-01 20:17:23 -08001989 _visitor.visit_lifetime_def(_binding_0);
1990 }
David Tolnay8c81f622018-07-31 23:34:35 -07001991 GenericParam::Const(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05001992 _visitor.visit_const_param(_binding_0);
Nika Layzellf1fdc0b2017-12-04 19:58:32 -05001993 }
David Tolnayc2f1aba2017-11-12 20:29:22 -08001994 }
1995}
David Tolnay8c81f622018-07-31 23:34:35 -07001996#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08001997pub fn visit_generics<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Generics) {
David Tolnay8c81f622018-07-31 23:34:35 -07001998 if let Some(ref it) = _i.lt_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04001999 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002000 };
2001 for el in Punctuated::pairs(&_i.params) {
2002 let it = el.value();
2003 _visitor.visit_generic_param(it)
2004 }
2005 if let Some(ref it) = _i.gt_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002006 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002007 };
2008 if let Some(ref it) = _i.where_clause {
2009 _visitor.visit_where_clause(it)
2010 };
Nika Layzell27726662017-10-24 23:16:35 -04002011}
David Tolnay8c81f622018-07-31 23:34:35 -07002012pub fn visit_ident<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Ident) {}
2013#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002014pub fn visit_impl_item<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ImplItem) {
Nika Layzell27726662017-10-24 23:16:35 -04002015 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002016 ImplItem::Const(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002017 _visitor.visit_impl_item_const(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002018 }
David Tolnay8c81f622018-07-31 23:34:35 -07002019 ImplItem::Method(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002020 _visitor.visit_impl_item_method(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002021 }
David Tolnay8c81f622018-07-31 23:34:35 -07002022 ImplItem::Type(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002023 _visitor.visit_impl_item_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002024 }
David Tolnay8c81f622018-07-31 23:34:35 -07002025 ImplItem::Macro(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002026 _visitor.visit_impl_item_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002027 }
David Tolnay8c81f622018-07-31 23:34:35 -07002028 ImplItem::Verbatim(ref _binding_0) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05002029 _visitor.visit_impl_item_verbatim(_binding_0);
2030 }
Nika Layzell27726662017-10-24 23:16:35 -04002031 }
2032}
David Tolnay8c81f622018-07-31 23:34:35 -07002033#[cfg(feature = "full")]
2034pub fn visit_impl_item_const<'ast, V: Visit<'ast> + ?Sized>(
2035 _visitor: &mut V,
2036 _i: &'ast ImplItemConst,
2037) {
2038 for it in &_i.attrs {
2039 _visitor.visit_attribute(it)
2040 }
2041 _visitor.visit_visibility(&_i.vis);
2042 if let Some(ref it) = _i.defaultness {
David Tolnay7ac699c2018-08-24 14:00:58 -04002043 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002044 };
David Tolnay7ac699c2018-08-24 14:00:58 -04002045 tokens_helper(_visitor, &_i.const_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002046 _visitor.visit_ident(&_i.ident);
David Tolnay7ac699c2018-08-24 14:00:58 -04002047 tokens_helper(_visitor, &_i.colon_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002048 _visitor.visit_type(&_i.ty);
David Tolnay7ac699c2018-08-24 14:00:58 -04002049 tokens_helper(_visitor, &_i.eq_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002050 _visitor.visit_expr(&_i.expr);
David Tolnay7ac699c2018-08-24 14:00:58 -04002051 tokens_helper(_visitor, &_i.semi_token.spans);
David Tolnay857628c2017-11-11 12:25:31 -08002052}
David Tolnay8c81f622018-07-31 23:34:35 -07002053#[cfg(feature = "full")]
2054pub fn visit_impl_item_macro<'ast, V: Visit<'ast> + ?Sized>(
2055 _visitor: &mut V,
2056 _i: &'ast ImplItemMacro,
2057) {
2058 for it in &_i.attrs {
2059 _visitor.visit_attribute(it)
2060 }
2061 _visitor.visit_macro(&_i.mac);
2062 if let Some(ref it) = _i.semi_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002063 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002064 };
David Tolnay857628c2017-11-11 12:25:31 -08002065}
David Tolnay8c81f622018-07-31 23:34:35 -07002066#[cfg(feature = "full")]
2067pub fn visit_impl_item_method<'ast, V: Visit<'ast> + ?Sized>(
2068 _visitor: &mut V,
2069 _i: &'ast ImplItemMethod,
2070) {
2071 for it in &_i.attrs {
2072 _visitor.visit_attribute(it)
2073 }
2074 _visitor.visit_visibility(&_i.vis);
2075 if let Some(ref it) = _i.defaultness {
David Tolnay7ac699c2018-08-24 14:00:58 -04002076 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002077 };
2078 _visitor.visit_method_sig(&_i.sig);
2079 _visitor.visit_block(&_i.block);
Nika Layzell27726662017-10-24 23:16:35 -04002080}
David Tolnay8c81f622018-07-31 23:34:35 -07002081#[cfg(feature = "full")]
2082pub fn visit_impl_item_type<'ast, V: Visit<'ast> + ?Sized>(
2083 _visitor: &mut V,
2084 _i: &'ast ImplItemType,
2085) {
2086 for it in &_i.attrs {
2087 _visitor.visit_attribute(it)
2088 }
2089 _visitor.visit_visibility(&_i.vis);
2090 if let Some(ref it) = _i.defaultness {
David Tolnay7ac699c2018-08-24 14:00:58 -04002091 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002092 };
David Tolnay7ac699c2018-08-24 14:00:58 -04002093 tokens_helper(_visitor, &_i.type_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002094 _visitor.visit_ident(&_i.ident);
2095 _visitor.visit_generics(&_i.generics);
David Tolnay7ac699c2018-08-24 14:00:58 -04002096 tokens_helper(_visitor, &_i.eq_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002097 _visitor.visit_type(&_i.ty);
David Tolnay7ac699c2018-08-24 14:00:58 -04002098 tokens_helper(_visitor, &_i.semi_token.spans);
Nika Layzell27726662017-10-24 23:16:35 -04002099}
David Tolnay8c81f622018-07-31 23:34:35 -07002100#[cfg(feature = "full")]
2101pub fn visit_impl_item_verbatim<'ast, V: Visit<'ast> + ?Sized>(
2102 _visitor: &mut V,
2103 _i: &'ast ImplItemVerbatim,
2104) {
David Tolnay6af48992018-08-01 11:16:28 -07002105 skip!(_i.tts);
David Tolnay2ae520a2017-12-29 11:19:50 -05002106}
David Tolnay8c81f622018-07-31 23:34:35 -07002107#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002108pub fn visit_index<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Index) {
David Tolnay6af48992018-08-01 11:16:28 -07002109 skip!(_i.index);
David Tolnay8c81f622018-07-31 23:34:35 -07002110 _visitor.visit_span(&_i.span);
David Tolnay85b69a42017-12-27 20:43:10 -05002111}
David Tolnay8c81f622018-07-31 23:34:35 -07002112#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002113pub fn visit_item<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Item) {
Nika Layzell27726662017-10-24 23:16:35 -04002114 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002115 Item::ExternCrate(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002116 _visitor.visit_item_extern_crate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002117 }
David Tolnay8c81f622018-07-31 23:34:35 -07002118 Item::Use(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002119 _visitor.visit_item_use(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002120 }
David Tolnay8c81f622018-07-31 23:34:35 -07002121 Item::Static(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002122 _visitor.visit_item_static(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002123 }
David Tolnay8c81f622018-07-31 23:34:35 -07002124 Item::Const(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002125 _visitor.visit_item_const(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002126 }
David Tolnay8c81f622018-07-31 23:34:35 -07002127 Item::Fn(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002128 _visitor.visit_item_fn(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002129 }
David Tolnay8c81f622018-07-31 23:34:35 -07002130 Item::Mod(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002131 _visitor.visit_item_mod(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002132 }
David Tolnay8c81f622018-07-31 23:34:35 -07002133 Item::ForeignMod(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002134 _visitor.visit_item_foreign_mod(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002135 }
David Tolnay8c81f622018-07-31 23:34:35 -07002136 Item::Type(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002137 _visitor.visit_item_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002138 }
David Tolnay8c81f622018-07-31 23:34:35 -07002139 Item::Struct(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002140 _visitor.visit_item_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002141 }
David Tolnay8c81f622018-07-31 23:34:35 -07002142 Item::Enum(ref _binding_0) => {
David Tolnaye3d41b72017-12-31 15:24:00 -05002143 _visitor.visit_item_enum(_binding_0);
2144 }
David Tolnay8c81f622018-07-31 23:34:35 -07002145 Item::Union(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002146 _visitor.visit_item_union(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002147 }
David Tolnay8c81f622018-07-31 23:34:35 -07002148 Item::Trait(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002149 _visitor.visit_item_trait(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002150 }
David Tolnay8c81f622018-07-31 23:34:35 -07002151 Item::Impl(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002152 _visitor.visit_item_impl(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002153 }
David Tolnay8c81f622018-07-31 23:34:35 -07002154 Item::Macro(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002155 _visitor.visit_item_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002156 }
David Tolnay8c81f622018-07-31 23:34:35 -07002157 Item::Macro2(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002158 _visitor.visit_item_macro2(_binding_0);
David Tolnay500d8322017-12-18 00:32:51 -08002159 }
David Tolnay8c81f622018-07-31 23:34:35 -07002160 Item::Verbatim(ref _binding_0) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05002161 _visitor.visit_item_verbatim(_binding_0);
2162 }
Nika Layzell27726662017-10-24 23:16:35 -04002163 }
2164}
David Tolnay8c81f622018-07-31 23:34:35 -07002165#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002166pub fn visit_item_const<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemConst) {
David Tolnay8c81f622018-07-31 23:34:35 -07002167 for it in &_i.attrs {
2168 _visitor.visit_attribute(it)
2169 }
2170 _visitor.visit_visibility(&_i.vis);
David Tolnay7ac699c2018-08-24 14:00:58 -04002171 tokens_helper(_visitor, &_i.const_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002172 _visitor.visit_ident(&_i.ident);
David Tolnay7ac699c2018-08-24 14:00:58 -04002173 tokens_helper(_visitor, &_i.colon_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002174 _visitor.visit_type(&*_i.ty);
David Tolnay7ac699c2018-08-24 14:00:58 -04002175 tokens_helper(_visitor, &_i.eq_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002176 _visitor.visit_expr(&*_i.expr);
David Tolnay7ac699c2018-08-24 14:00:58 -04002177 tokens_helper(_visitor, &_i.semi_token.spans);
David Tolnayc6b55bc2017-11-09 22:48:38 -08002178}
David Tolnay8c81f622018-07-31 23:34:35 -07002179#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002180pub fn visit_item_enum<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemEnum) {
David Tolnay8c81f622018-07-31 23:34:35 -07002181 for it in &_i.attrs {
2182 _visitor.visit_attribute(it)
2183 }
2184 _visitor.visit_visibility(&_i.vis);
David Tolnay7ac699c2018-08-24 14:00:58 -04002185 tokens_helper(_visitor, &_i.enum_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002186 _visitor.visit_ident(&_i.ident);
2187 _visitor.visit_generics(&_i.generics);
David Tolnay7ac699c2018-08-24 14:00:58 -04002188 tokens_helper(_visitor, &_i.brace_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002189 for el in Punctuated::pairs(&_i.variants) {
2190 let it = el.value();
2191 _visitor.visit_variant(it)
2192 }
David Tolnayc6b55bc2017-11-09 22:48:38 -08002193}
David Tolnay8c81f622018-07-31 23:34:35 -07002194#[cfg(feature = "full")]
2195pub fn visit_item_extern_crate<'ast, V: Visit<'ast> + ?Sized>(
2196 _visitor: &mut V,
2197 _i: &'ast ItemExternCrate,
2198) {
2199 for it in &_i.attrs {
2200 _visitor.visit_attribute(it)
2201 }
2202 _visitor.visit_visibility(&_i.vis);
David Tolnay7ac699c2018-08-24 14:00:58 -04002203 tokens_helper(_visitor, &_i.extern_token.span);
2204 tokens_helper(_visitor, &_i.crate_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002205 _visitor.visit_ident(&_i.ident);
2206 if let Some(ref it) = _i.rename {
David Tolnay7ac699c2018-08-24 14:00:58 -04002207 tokens_helper(_visitor, &(it).0.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002208 _visitor.visit_ident(&(it).1);
2209 };
David Tolnay7ac699c2018-08-24 14:00:58 -04002210 tokens_helper(_visitor, &_i.semi_token.spans);
David Tolnayc6b55bc2017-11-09 22:48:38 -08002211}
David Tolnay8c81f622018-07-31 23:34:35 -07002212#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002213pub fn visit_item_fn<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemFn) {
David Tolnay8c81f622018-07-31 23:34:35 -07002214 for it in &_i.attrs {
2215 _visitor.visit_attribute(it)
2216 }
2217 _visitor.visit_visibility(&_i.vis);
2218 if let Some(ref it) = _i.constness {
David Tolnay7ac699c2018-08-24 14:00:58 -04002219 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002220 };
2221 if let Some(ref it) = _i.unsafety {
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.abi {
2225 _visitor.visit_abi(it)
2226 };
2227 _visitor.visit_ident(&_i.ident);
2228 _visitor.visit_fn_decl(&*_i.decl);
2229 _visitor.visit_block(&*_i.block);
David Tolnayc6b55bc2017-11-09 22:48:38 -08002230}
David Tolnay8c81f622018-07-31 23:34:35 -07002231#[cfg(feature = "full")]
2232pub fn visit_item_foreign_mod<'ast, V: Visit<'ast> + ?Sized>(
2233 _visitor: &mut V,
2234 _i: &'ast ItemForeignMod,
2235) {
2236 for it in &_i.attrs {
2237 _visitor.visit_attribute(it)
2238 }
2239 _visitor.visit_abi(&_i.abi);
David Tolnay7ac699c2018-08-24 14:00:58 -04002240 tokens_helper(_visitor, &_i.brace_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002241 for it in &_i.items {
2242 _visitor.visit_foreign_item(it)
2243 }
David Tolnayc6b55bc2017-11-09 22:48:38 -08002244}
David Tolnay8c81f622018-07-31 23:34:35 -07002245#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002246pub fn visit_item_impl<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemImpl) {
David Tolnay8c81f622018-07-31 23:34:35 -07002247 for it in &_i.attrs {
2248 _visitor.visit_attribute(it)
2249 }
2250 if let Some(ref it) = _i.defaultness {
David Tolnay7ac699c2018-08-24 14:00:58 -04002251 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002252 };
2253 if let Some(ref it) = _i.unsafety {
David Tolnay7ac699c2018-08-24 14:00:58 -04002254 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002255 };
David Tolnay7ac699c2018-08-24 14:00:58 -04002256 tokens_helper(_visitor, &_i.impl_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002257 _visitor.visit_generics(&_i.generics);
2258 if let Some(ref it) = _i.trait_ {
2259 if let Some(ref it) = (it).0 {
David Tolnay7ac699c2018-08-24 14:00:58 -04002260 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002261 };
2262 _visitor.visit_path(&(it).1);
David Tolnay7ac699c2018-08-24 14:00:58 -04002263 tokens_helper(_visitor, &(it).2.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002264 };
2265 _visitor.visit_type(&*_i.self_ty);
David Tolnay7ac699c2018-08-24 14:00:58 -04002266 tokens_helper(_visitor, &_i.brace_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002267 for it in &_i.items {
2268 _visitor.visit_impl_item(it)
2269 }
David Tolnayc6b55bc2017-11-09 22:48:38 -08002270}
David Tolnay8c81f622018-07-31 23:34:35 -07002271#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002272pub fn visit_item_macro<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMacro) {
David Tolnay8c81f622018-07-31 23:34:35 -07002273 for it in &_i.attrs {
2274 _visitor.visit_attribute(it)
2275 }
2276 if let Some(ref it) = _i.ident {
2277 _visitor.visit_ident(it)
2278 };
2279 _visitor.visit_macro(&_i.mac);
2280 if let Some(ref it) = _i.semi_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002281 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002282 };
David Tolnayc6b55bc2017-11-09 22:48:38 -08002283}
David Tolnay8c81f622018-07-31 23:34:35 -07002284#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002285pub fn visit_item_macro2<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMacro2) {
David Tolnay8c81f622018-07-31 23:34:35 -07002286 for it in &_i.attrs {
2287 _visitor.visit_attribute(it)
2288 }
2289 _visitor.visit_visibility(&_i.vis);
David Tolnay7ac699c2018-08-24 14:00:58 -04002290 tokens_helper(_visitor, &_i.macro_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002291 _visitor.visit_ident(&_i.ident);
David Tolnay7ac699c2018-08-24 14:00:58 -04002292 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay6af48992018-08-01 11:16:28 -07002293 skip!(_i.args);
David Tolnay7ac699c2018-08-24 14:00:58 -04002294 tokens_helper(_visitor, &_i.brace_token.span);
David Tolnay6af48992018-08-01 11:16:28 -07002295 skip!(_i.body);
David Tolnay500d8322017-12-18 00:32:51 -08002296}
David Tolnay8c81f622018-07-31 23:34:35 -07002297#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002298pub fn visit_item_mod<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemMod) {
David Tolnay8c81f622018-07-31 23:34:35 -07002299 for it in &_i.attrs {
2300 _visitor.visit_attribute(it)
2301 }
2302 _visitor.visit_visibility(&_i.vis);
David Tolnay7ac699c2018-08-24 14:00:58 -04002303 tokens_helper(_visitor, &_i.mod_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002304 _visitor.visit_ident(&_i.ident);
2305 if let Some(ref it) = _i.content {
David Tolnay7ac699c2018-08-24 14:00:58 -04002306 tokens_helper(_visitor, &(it).0.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002307 for it in &(it).1 {
2308 _visitor.visit_item(it)
2309 }
2310 };
2311 if let Some(ref it) = _i.semi {
David Tolnay7ac699c2018-08-24 14:00:58 -04002312 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002313 };
Nika Layzell27726662017-10-24 23:16:35 -04002314}
David Tolnay8c81f622018-07-31 23:34:35 -07002315#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002316pub fn visit_item_static<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemStatic) {
David Tolnay8c81f622018-07-31 23:34:35 -07002317 for it in &_i.attrs {
2318 _visitor.visit_attribute(it)
2319 }
2320 _visitor.visit_visibility(&_i.vis);
David Tolnay7ac699c2018-08-24 14:00:58 -04002321 tokens_helper(_visitor, &_i.static_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002322 if let Some(ref it) = _i.mutability {
David Tolnay7ac699c2018-08-24 14:00:58 -04002323 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002324 };
2325 _visitor.visit_ident(&_i.ident);
David Tolnay7ac699c2018-08-24 14:00:58 -04002326 tokens_helper(_visitor, &_i.colon_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002327 _visitor.visit_type(&*_i.ty);
David Tolnay7ac699c2018-08-24 14:00:58 -04002328 tokens_helper(_visitor, &_i.eq_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002329 _visitor.visit_expr(&*_i.expr);
David Tolnay7ac699c2018-08-24 14:00:58 -04002330 tokens_helper(_visitor, &_i.semi_token.spans);
Nika Layzell27726662017-10-24 23:16:35 -04002331}
David Tolnay8c81f622018-07-31 23:34:35 -07002332#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002333pub fn visit_item_struct<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemStruct) {
David Tolnay8c81f622018-07-31 23:34:35 -07002334 for it in &_i.attrs {
2335 _visitor.visit_attribute(it)
2336 }
2337 _visitor.visit_visibility(&_i.vis);
David Tolnay7ac699c2018-08-24 14:00:58 -04002338 tokens_helper(_visitor, &_i.struct_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002339 _visitor.visit_ident(&_i.ident);
2340 _visitor.visit_generics(&_i.generics);
2341 _visitor.visit_fields(&_i.fields);
2342 if let Some(ref it) = _i.semi_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002343 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002344 };
Nika Layzell27726662017-10-24 23:16:35 -04002345}
David Tolnay8c81f622018-07-31 23:34:35 -07002346#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002347pub fn visit_item_trait<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemTrait) {
David Tolnay8c81f622018-07-31 23:34:35 -07002348 for it in &_i.attrs {
2349 _visitor.visit_attribute(it)
2350 }
2351 _visitor.visit_visibility(&_i.vis);
2352 if let Some(ref it) = _i.unsafety {
David Tolnay7ac699c2018-08-24 14:00:58 -04002353 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002354 };
2355 if let Some(ref it) = _i.auto_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002356 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002357 };
David Tolnay7ac699c2018-08-24 14:00:58 -04002358 tokens_helper(_visitor, &_i.trait_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002359 _visitor.visit_ident(&_i.ident);
2360 _visitor.visit_generics(&_i.generics);
2361 if let Some(ref it) = _i.colon_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002362 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002363 };
2364 for el in Punctuated::pairs(&_i.supertraits) {
2365 let it = el.value();
2366 _visitor.visit_type_param_bound(it)
2367 }
David Tolnay7ac699c2018-08-24 14:00:58 -04002368 tokens_helper(_visitor, &_i.brace_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002369 for it in &_i.items {
2370 _visitor.visit_trait_item(it)
2371 }
Nika Layzell27726662017-10-24 23:16:35 -04002372}
David Tolnay8c81f622018-07-31 23:34:35 -07002373#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002374pub fn visit_item_type<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemType) {
David Tolnay8c81f622018-07-31 23:34:35 -07002375 for it in &_i.attrs {
2376 _visitor.visit_attribute(it)
2377 }
2378 _visitor.visit_visibility(&_i.vis);
David Tolnay7ac699c2018-08-24 14:00:58 -04002379 tokens_helper(_visitor, &_i.type_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002380 _visitor.visit_ident(&_i.ident);
2381 _visitor.visit_generics(&_i.generics);
David Tolnay7ac699c2018-08-24 14:00:58 -04002382 tokens_helper(_visitor, &_i.eq_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002383 _visitor.visit_type(&*_i.ty);
David Tolnay7ac699c2018-08-24 14:00:58 -04002384 tokens_helper(_visitor, &_i.semi_token.spans);
Nika Layzell27726662017-10-24 23:16:35 -04002385}
David Tolnay8c81f622018-07-31 23:34:35 -07002386#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002387pub fn visit_item_union<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemUnion) {
David Tolnay8c81f622018-07-31 23:34:35 -07002388 for it in &_i.attrs {
2389 _visitor.visit_attribute(it)
2390 }
2391 _visitor.visit_visibility(&_i.vis);
David Tolnay7ac699c2018-08-24 14:00:58 -04002392 tokens_helper(_visitor, &_i.union_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002393 _visitor.visit_ident(&_i.ident);
2394 _visitor.visit_generics(&_i.generics);
2395 _visitor.visit_fields_named(&_i.fields);
Nika Layzell27726662017-10-24 23:16:35 -04002396}
David Tolnay8c81f622018-07-31 23:34:35 -07002397#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002398pub fn visit_item_use<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ItemUse) {
David Tolnay8c81f622018-07-31 23:34:35 -07002399 for it in &_i.attrs {
2400 _visitor.visit_attribute(it)
2401 }
2402 _visitor.visit_visibility(&_i.vis);
David Tolnay7ac699c2018-08-24 14:00:58 -04002403 tokens_helper(_visitor, &_i.use_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002404 if let Some(ref it) = _i.leading_colon {
David Tolnay7ac699c2018-08-24 14:00:58 -04002405 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002406 };
2407 _visitor.visit_use_tree(&_i.tree);
David Tolnay7ac699c2018-08-24 14:00:58 -04002408 tokens_helper(_visitor, &_i.semi_token.spans);
Nika Layzell27726662017-10-24 23:16:35 -04002409}
David Tolnay8c81f622018-07-31 23:34:35 -07002410#[cfg(feature = "full")]
2411pub fn visit_item_verbatim<'ast, V: Visit<'ast> + ?Sized>(
2412 _visitor: &mut V,
2413 _i: &'ast ItemVerbatim,
2414) {
David Tolnay6af48992018-08-01 11:16:28 -07002415 skip!(_i.tts);
David Tolnay2ae520a2017-12-29 11:19:50 -05002416}
David Tolnay8c81f622018-07-31 23:34:35 -07002417#[cfg(any(feature = "full", feature = "derive"))]
2418#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002419pub fn visit_label<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Label) {
David Tolnay8c81f622018-07-31 23:34:35 -07002420 _visitor.visit_lifetime(&_i.name);
David Tolnay7ac699c2018-08-24 14:00:58 -04002421 tokens_helper(_visitor, &_i.colon_token.spans);
David Tolnaybcd498f2017-12-29 12:02:33 -05002422}
David Tolnay8c81f622018-07-31 23:34:35 -07002423#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002424pub fn visit_lifetime<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Lifetime) {
David Tolnay6af48992018-08-01 11:16:28 -07002425 skip!(_i.apostrophe);
David Tolnay8c81f622018-07-31 23:34:35 -07002426 _visitor.visit_ident(&_i.ident);
David Tolnay4ba63a02017-12-28 15:53:05 -05002427}
David Tolnay8c81f622018-07-31 23:34:35 -07002428#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002429pub fn visit_lifetime_def<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LifetimeDef) {
David Tolnay8c81f622018-07-31 23:34:35 -07002430 for it in &_i.attrs {
2431 _visitor.visit_attribute(it)
2432 }
2433 _visitor.visit_lifetime(&_i.lifetime);
2434 if let Some(ref it) = _i.colon_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002435 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002436 };
2437 for el in Punctuated::pairs(&_i.bounds) {
2438 let it = el.value();
2439 _visitor.visit_lifetime(it)
2440 }
David Tolnay4ba63a02017-12-28 15:53:05 -05002441}
David Tolnay8c81f622018-07-31 23:34:35 -07002442#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002443pub fn visit_lit<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Lit) {
David Tolnay360efd22018-01-04 23:35:26 -08002444 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002445 Lit::Str(ref _binding_0) => {
David Tolnay360efd22018-01-04 23:35:26 -08002446 _visitor.visit_lit_str(_binding_0);
2447 }
David Tolnay8c81f622018-07-31 23:34:35 -07002448 Lit::ByteStr(ref _binding_0) => {
David Tolnay360efd22018-01-04 23:35:26 -08002449 _visitor.visit_lit_byte_str(_binding_0);
2450 }
David Tolnay8c81f622018-07-31 23:34:35 -07002451 Lit::Byte(ref _binding_0) => {
David Tolnay360efd22018-01-04 23:35:26 -08002452 _visitor.visit_lit_byte(_binding_0);
2453 }
David Tolnay8c81f622018-07-31 23:34:35 -07002454 Lit::Char(ref _binding_0) => {
David Tolnay360efd22018-01-04 23:35:26 -08002455 _visitor.visit_lit_char(_binding_0);
2456 }
David Tolnay8c81f622018-07-31 23:34:35 -07002457 Lit::Int(ref _binding_0) => {
David Tolnay360efd22018-01-04 23:35:26 -08002458 _visitor.visit_lit_int(_binding_0);
2459 }
David Tolnay8c81f622018-07-31 23:34:35 -07002460 Lit::Float(ref _binding_0) => {
David Tolnay360efd22018-01-04 23:35:26 -08002461 _visitor.visit_lit_float(_binding_0);
2462 }
David Tolnay8c81f622018-07-31 23:34:35 -07002463 Lit::Bool(ref _binding_0) => {
David Tolnay360efd22018-01-04 23:35:26 -08002464 _visitor.visit_lit_bool(_binding_0);
2465 }
David Tolnay8c81f622018-07-31 23:34:35 -07002466 Lit::Verbatim(ref _binding_0) => {
David Tolnay360efd22018-01-04 23:35:26 -08002467 _visitor.visit_lit_verbatim(_binding_0);
2468 }
2469 }
2470}
David Tolnay8c81f622018-07-31 23:34:35 -07002471#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002472pub fn visit_lit_bool<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitBool) {
David Tolnay6af48992018-08-01 11:16:28 -07002473 skip!(_i.value);
David Tolnay8c81f622018-07-31 23:34:35 -07002474 _visitor.visit_span(&_i.span);
Nika Layzell27726662017-10-24 23:16:35 -04002475}
David Tolnay8c81f622018-07-31 23:34:35 -07002476#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002477pub fn visit_lit_byte<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitByte) {
David Tolnay6af48992018-08-01 11:16:28 -07002478 skip!(_i.token);
David Tolnay360efd22018-01-04 23:35:26 -08002479}
David Tolnay8c81f622018-07-31 23:34:35 -07002480#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002481pub fn visit_lit_byte_str<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitByteStr) {
David Tolnay6af48992018-08-01 11:16:28 -07002482 skip!(_i.token);
David Tolnay360efd22018-01-04 23:35:26 -08002483}
David Tolnay8c81f622018-07-31 23:34:35 -07002484#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002485pub fn visit_lit_char<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitChar) {
David Tolnay6af48992018-08-01 11:16:28 -07002486 skip!(_i.token);
David Tolnay360efd22018-01-04 23:35:26 -08002487}
David Tolnay8c81f622018-07-31 23:34:35 -07002488#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002489pub fn visit_lit_float<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitFloat) {
David Tolnay6af48992018-08-01 11:16:28 -07002490 skip!(_i.token);
David Tolnay360efd22018-01-04 23:35:26 -08002491}
David Tolnay8c81f622018-07-31 23:34:35 -07002492#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002493pub fn visit_lit_int<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitInt) {
David Tolnay6af48992018-08-01 11:16:28 -07002494 skip!(_i.token);
David Tolnay360efd22018-01-04 23:35:26 -08002495}
David Tolnay8c81f622018-07-31 23:34:35 -07002496#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002497pub fn visit_lit_str<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitStr) {
David Tolnay6af48992018-08-01 11:16:28 -07002498 skip!(_i.token);
David Tolnay360efd22018-01-04 23:35:26 -08002499}
David Tolnay8c81f622018-07-31 23:34:35 -07002500#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002501pub fn visit_lit_verbatim<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast LitVerbatim) {
David Tolnay6af48992018-08-01 11:16:28 -07002502 skip!(_i.token);
David Tolnay360efd22018-01-04 23:35:26 -08002503}
David Tolnay8c81f622018-07-31 23:34:35 -07002504#[cfg(any(feature = "full", feature = "derive"))]
2505#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002506pub fn visit_local<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Local) {
David Tolnay8c81f622018-07-31 23:34:35 -07002507 for it in &_i.attrs {
2508 _visitor.visit_attribute(it)
2509 }
David Tolnay7ac699c2018-08-24 14:00:58 -04002510 tokens_helper(_visitor, &_i.let_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002511 for el in Punctuated::pairs(&_i.pats) {
2512 let it = el.value();
2513 _visitor.visit_pat(it)
2514 }
2515 if let Some(ref it) = _i.ty {
David Tolnay7ac699c2018-08-24 14:00:58 -04002516 tokens_helper(_visitor, &(it).0.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002517 _visitor.visit_type(&*(it).1);
2518 };
2519 if let Some(ref it) = _i.init {
David Tolnay7ac699c2018-08-24 14:00:58 -04002520 tokens_helper(_visitor, &(it).0.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002521 _visitor.visit_expr(&*(it).1);
2522 };
David Tolnay7ac699c2018-08-24 14:00:58 -04002523 tokens_helper(_visitor, &_i.semi_token.spans);
Nika Layzell27726662017-10-24 23:16:35 -04002524}
David Tolnay8c81f622018-07-31 23:34:35 -07002525#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002526pub fn visit_macro<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Macro) {
David Tolnay8c81f622018-07-31 23:34:35 -07002527 _visitor.visit_path(&_i.path);
David Tolnay7ac699c2018-08-24 14:00:58 -04002528 tokens_helper(_visitor, &_i.bang_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002529 _visitor.visit_macro_delimiter(&_i.delimiter);
David Tolnay6af48992018-08-01 11:16:28 -07002530 skip!(_i.tts);
David Tolnayab919512017-12-30 23:31:51 -05002531}
David Tolnay8c81f622018-07-31 23:34:35 -07002532#[cfg(any(feature = "full", feature = "derive"))]
2533pub fn visit_macro_delimiter<'ast, V: Visit<'ast> + ?Sized>(
2534 _visitor: &mut V,
2535 _i: &'ast MacroDelimiter,
2536) {
David Tolnayab919512017-12-30 23:31:51 -05002537 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002538 MacroDelimiter::Paren(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04002539 tokens_helper(_visitor, &_binding_0.span);
David Tolnayab919512017-12-30 23:31:51 -05002540 }
David Tolnay8c81f622018-07-31 23:34:35 -07002541 MacroDelimiter::Brace(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04002542 tokens_helper(_visitor, &_binding_0.span);
David Tolnayab919512017-12-30 23:31:51 -05002543 }
David Tolnay8c81f622018-07-31 23:34:35 -07002544 MacroDelimiter::Bracket(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 }
2547 }
David Tolnaydecf28d2017-11-11 11:56:45 -08002548}
David Tolnay8c81f622018-07-31 23:34:35 -07002549#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002550pub fn visit_member<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Member) {
David Tolnay85b69a42017-12-27 20:43:10 -05002551 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002552 Member::Named(ref _binding_0) => {
Alex Crichtond261d092018-05-18 13:47:35 -07002553 _visitor.visit_ident(_binding_0);
David Tolnay85b69a42017-12-27 20:43:10 -05002554 }
David Tolnay8c81f622018-07-31 23:34:35 -07002555 Member::Unnamed(ref _binding_0) => {
David Tolnay85b69a42017-12-27 20:43:10 -05002556 _visitor.visit_index(_binding_0);
2557 }
2558 }
2559}
David Tolnay8c81f622018-07-31 23:34:35 -07002560#[cfg(any(feature = "full", feature = "derive"))]
David Tolnayaaadd782018-01-06 22:58:13 -08002561pub fn visit_meta<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Meta) {
Nika Layzell27726662017-10-24 23:16:35 -04002562 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002563 Meta::Word(ref _binding_0) => {
Alex Crichtond261d092018-05-18 13:47:35 -07002564 _visitor.visit_ident(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002565 }
David Tolnay8c81f622018-07-31 23:34:35 -07002566 Meta::List(ref _binding_0) => {
David Tolnayaaadd782018-01-06 22:58:13 -08002567 _visitor.visit_meta_list(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002568 }
David Tolnay8c81f622018-07-31 23:34:35 -07002569 Meta::NameValue(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002570 _visitor.visit_meta_name_value(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002571 }
2572 }
2573}
David Tolnay8c81f622018-07-31 23:34:35 -07002574#[cfg(any(feature = "full", feature = "derive"))]
David Tolnayaaadd782018-01-06 22:58:13 -08002575pub fn visit_meta_list<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MetaList) {
David Tolnay8c81f622018-07-31 23:34:35 -07002576 _visitor.visit_ident(&_i.ident);
David Tolnay7ac699c2018-08-24 14:00:58 -04002577 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002578 for el in Punctuated::pairs(&_i.nested) {
2579 let it = el.value();
2580 _visitor.visit_nested_meta(it)
2581 }
Nika Layzell27726662017-10-24 23:16:35 -04002582}
David Tolnay8c81f622018-07-31 23:34:35 -07002583#[cfg(any(feature = "full", feature = "derive"))]
2584pub fn visit_meta_name_value<'ast, V: Visit<'ast> + ?Sized>(
2585 _visitor: &mut V,
2586 _i: &'ast MetaNameValue,
2587) {
2588 _visitor.visit_ident(&_i.ident);
David Tolnay7ac699c2018-08-24 14:00:58 -04002589 tokens_helper(_visitor, &_i.eq_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002590 _visitor.visit_lit(&_i.lit);
Nika Layzell27726662017-10-24 23:16:35 -04002591}
David Tolnay8c81f622018-07-31 23:34:35 -07002592#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002593pub fn visit_method_sig<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast MethodSig) {
David Tolnay8c81f622018-07-31 23:34:35 -07002594 if let Some(ref it) = _i.constness {
David Tolnay7ac699c2018-08-24 14:00:58 -04002595 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002596 };
2597 if let Some(ref it) = _i.unsafety {
David Tolnay7ac699c2018-08-24 14:00:58 -04002598 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002599 };
2600 if let Some(ref it) = _i.abi {
2601 _visitor.visit_abi(it)
2602 };
2603 _visitor.visit_ident(&_i.ident);
2604 _visitor.visit_fn_decl(&_i.decl);
Nika Layzell27726662017-10-24 23:16:35 -04002605}
David Tolnay8c81f622018-07-31 23:34:35 -07002606#[cfg(any(feature = "full", feature = "derive"))]
2607#[cfg(feature = "full")]
2608pub fn visit_method_turbofish<'ast, V: Visit<'ast> + ?Sized>(
2609 _visitor: &mut V,
2610 _i: &'ast MethodTurbofish,
2611) {
David Tolnay7ac699c2018-08-24 14:00:58 -04002612 tokens_helper(_visitor, &_i.colon2_token.spans);
2613 tokens_helper(_visitor, &_i.lt_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002614 for el in Punctuated::pairs(&_i.args) {
2615 let it = el.value();
2616 _visitor.visit_generic_method_argument(it)
2617 }
David Tolnay7ac699c2018-08-24 14:00:58 -04002618 tokens_helper(_visitor, &_i.gt_token.spans);
David Tolnayd60cfec2017-12-29 00:21:38 -05002619}
David Tolnay8c81f622018-07-31 23:34:35 -07002620#[cfg(any(feature = "full", feature = "derive"))]
David Tolnayaaadd782018-01-06 22:58:13 -08002621pub fn visit_nested_meta<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast NestedMeta) {
Nika Layzell27726662017-10-24 23:16:35 -04002622 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002623 NestedMeta::Meta(ref _binding_0) => {
David Tolnayaaadd782018-01-06 22:58:13 -08002624 _visitor.visit_meta(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002625 }
David Tolnay8c81f622018-07-31 23:34:35 -07002626 NestedMeta::Literal(ref _binding_0) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05002627 _visitor.visit_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002628 }
2629 }
2630}
David Tolnay8c81f622018-07-31 23:34:35 -07002631#[cfg(any(feature = "full", feature = "derive"))]
2632pub fn visit_parenthesized_generic_arguments<'ast, V: Visit<'ast> + ?Sized>(
2633 _visitor: &mut V,
2634 _i: &'ast ParenthesizedGenericArguments,
2635) {
David Tolnay7ac699c2018-08-24 14:00:58 -04002636 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002637 for el in Punctuated::pairs(&_i.inputs) {
2638 let it = el.value();
2639 _visitor.visit_type(it)
2640 }
2641 _visitor.visit_return_type(&_i.output);
Nika Layzell27726662017-10-24 23:16:35 -04002642}
David Tolnay8c81f622018-07-31 23:34:35 -07002643#[cfg(any(feature = "full", feature = "derive"))]
2644#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002645pub fn visit_pat<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Pat) {
Nika Layzell27726662017-10-24 23:16:35 -04002646 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002647 Pat::Wild(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002648 _visitor.visit_pat_wild(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002649 }
David Tolnay8c81f622018-07-31 23:34:35 -07002650 Pat::Ident(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002651 _visitor.visit_pat_ident(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002652 }
David Tolnay8c81f622018-07-31 23:34:35 -07002653 Pat::Struct(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002654 _visitor.visit_pat_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002655 }
David Tolnay8c81f622018-07-31 23:34:35 -07002656 Pat::TupleStruct(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002657 _visitor.visit_pat_tuple_struct(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002658 }
David Tolnay8c81f622018-07-31 23:34:35 -07002659 Pat::Path(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002660 _visitor.visit_pat_path(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002661 }
David Tolnay8c81f622018-07-31 23:34:35 -07002662 Pat::Tuple(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002663 _visitor.visit_pat_tuple(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002664 }
David Tolnay8c81f622018-07-31 23:34:35 -07002665 Pat::Box(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002666 _visitor.visit_pat_box(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002667 }
David Tolnay8c81f622018-07-31 23:34:35 -07002668 Pat::Ref(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002669 _visitor.visit_pat_ref(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002670 }
David Tolnay8c81f622018-07-31 23:34:35 -07002671 Pat::Lit(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002672 _visitor.visit_pat_lit(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002673 }
David Tolnay8c81f622018-07-31 23:34:35 -07002674 Pat::Range(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002675 _visitor.visit_pat_range(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002676 }
David Tolnay8c81f622018-07-31 23:34:35 -07002677 Pat::Slice(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002678 _visitor.visit_pat_slice(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002679 }
David Tolnay8c81f622018-07-31 23:34:35 -07002680 Pat::Macro(ref _binding_0) => {
David Tolnay323279a2017-12-29 11:26:32 -05002681 _visitor.visit_pat_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002682 }
David Tolnay8c81f622018-07-31 23:34:35 -07002683 Pat::Verbatim(ref _binding_0) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05002684 _visitor.visit_pat_verbatim(_binding_0);
2685 }
Nika Layzell27726662017-10-24 23:16:35 -04002686 }
2687}
David Tolnay8c81f622018-07-31 23:34:35 -07002688#[cfg(any(feature = "full", feature = "derive"))]
2689#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002690pub fn visit_pat_box<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatBox) {
David Tolnay7ac699c2018-08-24 14:00:58 -04002691 tokens_helper(_visitor, &_i.box_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002692 _visitor.visit_pat(&*_i.pat);
Nika Layzell27726662017-10-24 23:16:35 -04002693}
David Tolnay8c81f622018-07-31 23:34:35 -07002694#[cfg(any(feature = "full", feature = "derive"))]
2695#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002696pub fn visit_pat_ident<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatIdent) {
David Tolnay8c81f622018-07-31 23:34:35 -07002697 if let Some(ref it) = _i.by_ref {
David Tolnay7ac699c2018-08-24 14:00:58 -04002698 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002699 };
2700 if let Some(ref it) = _i.mutability {
David Tolnay7ac699c2018-08-24 14:00:58 -04002701 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002702 };
2703 _visitor.visit_ident(&_i.ident);
2704 if let Some(ref it) = _i.subpat {
David Tolnay7ac699c2018-08-24 14:00:58 -04002705 tokens_helper(_visitor, &(it).0.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002706 _visitor.visit_pat(&*(it).1);
2707 };
Nika Layzell27726662017-10-24 23:16:35 -04002708}
David Tolnay8c81f622018-07-31 23:34:35 -07002709#[cfg(any(feature = "full", feature = "derive"))]
2710#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002711pub fn visit_pat_lit<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatLit) {
David Tolnay8c81f622018-07-31 23:34:35 -07002712 _visitor.visit_expr(&*_i.expr);
Nika Layzell27726662017-10-24 23:16:35 -04002713}
David Tolnay8c81f622018-07-31 23:34:35 -07002714#[cfg(any(feature = "full", feature = "derive"))]
2715#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002716pub fn visit_pat_macro<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatMacro) {
David Tolnay8c81f622018-07-31 23:34:35 -07002717 _visitor.visit_macro(&_i.mac);
David Tolnay323279a2017-12-29 11:26:32 -05002718}
David Tolnay8c81f622018-07-31 23:34:35 -07002719#[cfg(any(feature = "full", feature = "derive"))]
2720#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002721pub fn visit_pat_path<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatPath) {
David Tolnay8c81f622018-07-31 23:34:35 -07002722 if let Some(ref it) = _i.qself {
2723 _visitor.visit_qself(it)
2724 };
2725 _visitor.visit_path(&_i.path);
Nika Layzell27726662017-10-24 23:16:35 -04002726}
David Tolnay8c81f622018-07-31 23:34:35 -07002727#[cfg(any(feature = "full", feature = "derive"))]
2728#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002729pub fn visit_pat_range<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatRange) {
David Tolnay8c81f622018-07-31 23:34:35 -07002730 _visitor.visit_expr(&*_i.lo);
2731 _visitor.visit_range_limits(&_i.limits);
2732 _visitor.visit_expr(&*_i.hi);
Nika Layzell27726662017-10-24 23:16:35 -04002733}
David Tolnay8c81f622018-07-31 23:34:35 -07002734#[cfg(any(feature = "full", feature = "derive"))]
2735#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002736pub fn visit_pat_ref<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatRef) {
David Tolnay7ac699c2018-08-24 14:00:58 -04002737 tokens_helper(_visitor, &_i.and_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002738 if let Some(ref it) = _i.mutability {
David Tolnay7ac699c2018-08-24 14:00:58 -04002739 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002740 };
2741 _visitor.visit_pat(&*_i.pat);
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_slice<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatSlice) {
David Tolnay7ac699c2018-08-24 14:00:58 -04002746 tokens_helper(_visitor, &_i.bracket_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002747 for el in Punctuated::pairs(&_i.front) {
2748 let it = el.value();
2749 _visitor.visit_pat(it)
2750 }
2751 if let Some(ref it) = _i.middle {
2752 _visitor.visit_pat(&**it)
2753 };
2754 if let Some(ref it) = _i.dot2_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002755 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002756 };
2757 if let Some(ref it) = _i.comma_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002758 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002759 };
2760 for el in Punctuated::pairs(&_i.back) {
2761 let it = el.value();
2762 _visitor.visit_pat(it)
2763 }
Nika Layzell27726662017-10-24 23:16:35 -04002764}
David Tolnay8c81f622018-07-31 23:34:35 -07002765#[cfg(any(feature = "full", feature = "derive"))]
2766#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002767pub fn visit_pat_struct<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatStruct) {
David Tolnay8c81f622018-07-31 23:34:35 -07002768 _visitor.visit_path(&_i.path);
David Tolnay7ac699c2018-08-24 14:00:58 -04002769 tokens_helper(_visitor, &_i.brace_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002770 for el in Punctuated::pairs(&_i.fields) {
2771 let it = el.value();
2772 _visitor.visit_field_pat(it)
2773 }
2774 if let Some(ref it) = _i.dot2_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002775 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002776 };
Nika Layzell27726662017-10-24 23:16:35 -04002777}
David Tolnay8c81f622018-07-31 23:34:35 -07002778#[cfg(any(feature = "full", feature = "derive"))]
2779#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002780pub fn visit_pat_tuple<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatTuple) {
David Tolnay7ac699c2018-08-24 14:00:58 -04002781 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002782 for el in Punctuated::pairs(&_i.front) {
2783 let it = el.value();
2784 _visitor.visit_pat(it)
2785 }
2786 if let Some(ref it) = _i.dot2_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002787 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002788 };
2789 if let Some(ref it) = _i.comma_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002790 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002791 };
2792 for el in Punctuated::pairs(&_i.back) {
2793 let it = el.value();
2794 _visitor.visit_pat(it)
2795 }
Nika Layzell27726662017-10-24 23:16:35 -04002796}
David Tolnay8c81f622018-07-31 23:34:35 -07002797#[cfg(any(feature = "full", feature = "derive"))]
2798#[cfg(feature = "full")]
2799pub fn visit_pat_tuple_struct<'ast, V: Visit<'ast> + ?Sized>(
2800 _visitor: &mut V,
2801 _i: &'ast PatTupleStruct,
2802) {
2803 _visitor.visit_path(&_i.path);
2804 _visitor.visit_pat_tuple(&_i.pat);
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")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002808pub fn visit_pat_verbatim<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatVerbatim) {
David Tolnay6af48992018-08-01 11:16:28 -07002809 skip!(_i.tts);
David Tolnay2ae520a2017-12-29 11:19:50 -05002810}
David Tolnay8c81f622018-07-31 23:34:35 -07002811#[cfg(any(feature = "full", feature = "derive"))]
2812#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002813pub fn visit_pat_wild<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PatWild) {
David Tolnay7ac699c2018-08-24 14:00:58 -04002814 tokens_helper(_visitor, &_i.underscore_token.spans);
Nika Layzell27726662017-10-24 23:16:35 -04002815}
David Tolnay8c81f622018-07-31 23:34:35 -07002816#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002817pub fn visit_path<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Path) {
David Tolnay8c81f622018-07-31 23:34:35 -07002818 if let Some(ref it) = _i.leading_colon {
David Tolnay7ac699c2018-08-24 14:00:58 -04002819 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002820 };
2821 for el in Punctuated::pairs(&_i.segments) {
2822 let it = el.value();
2823 _visitor.visit_path_segment(it)
2824 }
Nika Layzell27726662017-10-24 23:16:35 -04002825}
David Tolnay8c81f622018-07-31 23:34:35 -07002826#[cfg(any(feature = "full", feature = "derive"))]
2827pub fn visit_path_arguments<'ast, V: Visit<'ast> + ?Sized>(
2828 _visitor: &mut V,
2829 _i: &'ast PathArguments,
2830) {
Nika Layzellc08227a2017-12-04 16:30:17 -05002831 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002832 PathArguments::None => {}
2833 PathArguments::AngleBracketed(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002834 _visitor.visit_angle_bracketed_generic_arguments(_binding_0);
Nika Layzellc08227a2017-12-04 16:30:17 -05002835 }
David Tolnay8c81f622018-07-31 23:34:35 -07002836 PathArguments::Parenthesized(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002837 _visitor.visit_parenthesized_generic_arguments(_binding_0);
Nika Layzellc08227a2017-12-04 16:30:17 -05002838 }
2839 }
2840}
David Tolnay8c81f622018-07-31 23:34:35 -07002841#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002842pub fn visit_path_segment<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PathSegment) {
David Tolnay8c81f622018-07-31 23:34:35 -07002843 _visitor.visit_ident(&_i.ident);
2844 _visitor.visit_path_arguments(&_i.arguments);
Nika Layzell27726662017-10-24 23:16:35 -04002845}
David Tolnay8c81f622018-07-31 23:34:35 -07002846#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002847pub fn visit_predicate_eq<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast PredicateEq) {
David Tolnay8c81f622018-07-31 23:34:35 -07002848 _visitor.visit_type(&_i.lhs_ty);
David Tolnay7ac699c2018-08-24 14:00:58 -04002849 tokens_helper(_visitor, &_i.eq_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002850 _visitor.visit_type(&_i.rhs_ty);
David Tolnayd4add852018-01-01 20:13:24 -08002851}
David Tolnay8c81f622018-07-31 23:34:35 -07002852#[cfg(any(feature = "full", feature = "derive"))]
2853pub fn visit_predicate_lifetime<'ast, V: Visit<'ast> + ?Sized>(
2854 _visitor: &mut V,
2855 _i: &'ast PredicateLifetime,
2856) {
2857 _visitor.visit_lifetime(&_i.lifetime);
2858 if let Some(ref it) = _i.colon_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002859 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07002860 };
2861 for el in Punctuated::pairs(&_i.bounds) {
2862 let it = el.value();
2863 _visitor.visit_lifetime(it)
2864 }
David Tolnayd4add852018-01-01 20:13:24 -08002865}
David Tolnay8c81f622018-07-31 23:34:35 -07002866#[cfg(any(feature = "full", feature = "derive"))]
2867pub fn visit_predicate_type<'ast, V: Visit<'ast> + ?Sized>(
2868 _visitor: &mut V,
2869 _i: &'ast PredicateType,
2870) {
2871 if let Some(ref it) = _i.lifetimes {
2872 _visitor.visit_bound_lifetimes(it)
2873 };
2874 _visitor.visit_type(&_i.bounded_ty);
David Tolnay7ac699c2018-08-24 14:00:58 -04002875 tokens_helper(_visitor, &_i.colon_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002876 for el in Punctuated::pairs(&_i.bounds) {
2877 let it = el.value();
2878 _visitor.visit_type_param_bound(it)
2879 }
David Tolnayd4add852018-01-01 20:13:24 -08002880}
David Tolnay8c81f622018-07-31 23:34:35 -07002881#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002882pub fn visit_qself<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast QSelf) {
David Tolnay7ac699c2018-08-24 14:00:58 -04002883 tokens_helper(_visitor, &_i.lt_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002884 _visitor.visit_type(&*_i.ty);
David Tolnay6af48992018-08-01 11:16:28 -07002885 skip!(_i.position);
David Tolnay8c81f622018-07-31 23:34:35 -07002886 if let Some(ref it) = _i.as_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002887 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002888 };
David Tolnay7ac699c2018-08-24 14:00:58 -04002889 tokens_helper(_visitor, &_i.gt_token.spans);
Nika Layzell27726662017-10-24 23:16:35 -04002890}
David Tolnay8c81f622018-07-31 23:34:35 -07002891#[cfg(any(feature = "full", feature = "derive"))]
2892#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002893pub fn visit_range_limits<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast RangeLimits) {
Nika Layzell27726662017-10-24 23:16:35 -04002894 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002895 RangeLimits::HalfOpen(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04002896 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -04002897 }
David Tolnay8c81f622018-07-31 23:34:35 -07002898 RangeLimits::Closed(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04002899 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -04002900 }
2901 }
2902}
David Tolnay8c81f622018-07-31 23:34:35 -07002903#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002904pub fn visit_return_type<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ReturnType) {
David Tolnayf93b90d2017-11-11 19:21:26 -08002905 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002906 ReturnType::Default => {}
2907 ReturnType::Type(ref _binding_0, ref _binding_1) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04002908 tokens_helper(_visitor, &_binding_0.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002909 _visitor.visit_type(&**_binding_1);
David Tolnayf93b90d2017-11-11 19:21:26 -08002910 }
2911 }
2912}
David Tolnay8c81f622018-07-31 23:34:35 -07002913pub fn visit_span<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Span) {}
2914#[cfg(any(feature = "full", feature = "derive"))]
2915#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002916pub fn visit_stmt<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Stmt) {
Nika Layzell27726662017-10-24 23:16:35 -04002917 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002918 Stmt::Local(ref _binding_0) => {
David Tolnay1f0b7b82018-01-06 16:07:14 -08002919 _visitor.visit_local(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002920 }
David Tolnay8c81f622018-07-31 23:34:35 -07002921 Stmt::Item(ref _binding_0) => {
David Tolnay1f0b7b82018-01-06 16:07:14 -08002922 _visitor.visit_item(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002923 }
David Tolnay8c81f622018-07-31 23:34:35 -07002924 Stmt::Expr(ref _binding_0) => {
David Tolnay1f0b7b82018-01-06 16:07:14 -08002925 _visitor.visit_expr(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002926 }
David Tolnay8c81f622018-07-31 23:34:35 -07002927 Stmt::Semi(ref _binding_0, ref _binding_1) => {
David Tolnay1f0b7b82018-01-06 16:07:14 -08002928 _visitor.visit_expr(_binding_0);
David Tolnay7ac699c2018-08-24 14:00:58 -04002929 tokens_helper(_visitor, &_binding_1.spans);
Nika Layzell27726662017-10-24 23:16:35 -04002930 }
Nika Layzell27726662017-10-24 23:16:35 -04002931 }
2932}
David Tolnay8c81f622018-07-31 23:34:35 -07002933#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002934pub fn visit_trait_bound<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitBound) {
David Tolnay8c81f622018-07-31 23:34:35 -07002935 if let Some(ref it) = _i.paren_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04002936 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07002937 };
2938 _visitor.visit_trait_bound_modifier(&_i.modifier);
2939 if let Some(ref it) = _i.lifetimes {
2940 _visitor.visit_bound_lifetimes(it)
2941 };
2942 _visitor.visit_path(&_i.path);
David Tolnay40fb8ce2018-01-02 10:53:46 -08002943}
David Tolnay8c81f622018-07-31 23:34:35 -07002944#[cfg(any(feature = "full", feature = "derive"))]
2945pub fn visit_trait_bound_modifier<'ast, V: Visit<'ast> + ?Sized>(
2946 _visitor: &mut V,
2947 _i: &'ast TraitBoundModifier,
2948) {
Nika Layzell27726662017-10-24 23:16:35 -04002949 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002950 TraitBoundModifier::None => {}
2951 TraitBoundModifier::Maybe(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04002952 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -04002953 }
2954 }
2955}
David Tolnay8c81f622018-07-31 23:34:35 -07002956#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08002957pub fn visit_trait_item<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TraitItem) {
Nika Layzell27726662017-10-24 23:16:35 -04002958 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07002959 TraitItem::Const(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002960 _visitor.visit_trait_item_const(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002961 }
David Tolnay8c81f622018-07-31 23:34:35 -07002962 TraitItem::Method(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002963 _visitor.visit_trait_item_method(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002964 }
David Tolnay8c81f622018-07-31 23:34:35 -07002965 TraitItem::Type(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002966 _visitor.visit_trait_item_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002967 }
David Tolnay8c81f622018-07-31 23:34:35 -07002968 TraitItem::Macro(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05002969 _visitor.visit_trait_item_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04002970 }
David Tolnay8c81f622018-07-31 23:34:35 -07002971 TraitItem::Verbatim(ref _binding_0) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05002972 _visitor.visit_trait_item_verbatim(_binding_0);
2973 }
Nika Layzell27726662017-10-24 23:16:35 -04002974 }
2975}
David Tolnay8c81f622018-07-31 23:34:35 -07002976#[cfg(feature = "full")]
2977pub fn visit_trait_item_const<'ast, V: Visit<'ast> + ?Sized>(
2978 _visitor: &mut V,
2979 _i: &'ast TraitItemConst,
2980) {
2981 for it in &_i.attrs {
2982 _visitor.visit_attribute(it)
2983 }
David Tolnay7ac699c2018-08-24 14:00:58 -04002984 tokens_helper(_visitor, &_i.const_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07002985 _visitor.visit_ident(&_i.ident);
David Tolnay7ac699c2018-08-24 14:00:58 -04002986 tokens_helper(_visitor, &_i.colon_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002987 _visitor.visit_type(&_i.ty);
2988 if let Some(ref it) = _i.default {
David Tolnay7ac699c2018-08-24 14:00:58 -04002989 tokens_helper(_visitor, &(it).0.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07002990 _visitor.visit_expr(&(it).1);
2991 };
David Tolnay7ac699c2018-08-24 14:00:58 -04002992 tokens_helper(_visitor, &_i.semi_token.spans);
David Tolnayda705bd2017-11-10 21:58:05 -08002993}
David Tolnay8c81f622018-07-31 23:34:35 -07002994#[cfg(feature = "full")]
2995pub fn visit_trait_item_macro<'ast, V: Visit<'ast> + ?Sized>(
2996 _visitor: &mut V,
2997 _i: &'ast TraitItemMacro,
2998) {
2999 for it in &_i.attrs {
3000 _visitor.visit_attribute(it)
3001 }
3002 _visitor.visit_macro(&_i.mac);
3003 if let Some(ref it) = _i.semi_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04003004 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07003005 };
David Tolnayda705bd2017-11-10 21:58:05 -08003006}
David Tolnay8c81f622018-07-31 23:34:35 -07003007#[cfg(feature = "full")]
3008pub fn visit_trait_item_method<'ast, V: Visit<'ast> + ?Sized>(
3009 _visitor: &mut V,
3010 _i: &'ast TraitItemMethod,
3011) {
3012 for it in &_i.attrs {
3013 _visitor.visit_attribute(it)
3014 }
3015 _visitor.visit_method_sig(&_i.sig);
3016 if let Some(ref it) = _i.default {
3017 _visitor.visit_block(it)
3018 };
3019 if let Some(ref it) = _i.semi_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04003020 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07003021 };
Nika Layzell27726662017-10-24 23:16:35 -04003022}
David Tolnay8c81f622018-07-31 23:34:35 -07003023#[cfg(feature = "full")]
3024pub fn visit_trait_item_type<'ast, V: Visit<'ast> + ?Sized>(
3025 _visitor: &mut V,
3026 _i: &'ast TraitItemType,
3027) {
3028 for it in &_i.attrs {
3029 _visitor.visit_attribute(it)
3030 }
David Tolnay7ac699c2018-08-24 14:00:58 -04003031 tokens_helper(_visitor, &_i.type_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003032 _visitor.visit_ident(&_i.ident);
3033 _visitor.visit_generics(&_i.generics);
3034 if let Some(ref it) = _i.colon_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04003035 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07003036 };
3037 for el in Punctuated::pairs(&_i.bounds) {
3038 let it = el.value();
3039 _visitor.visit_type_param_bound(it)
3040 }
3041 if let Some(ref it) = _i.default {
David Tolnay7ac699c2018-08-24 14:00:58 -04003042 tokens_helper(_visitor, &(it).0.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07003043 _visitor.visit_type(&(it).1);
3044 };
David Tolnay7ac699c2018-08-24 14:00:58 -04003045 tokens_helper(_visitor, &_i.semi_token.spans);
Nika Layzell27726662017-10-24 23:16:35 -04003046}
David Tolnay8c81f622018-07-31 23:34:35 -07003047#[cfg(feature = "full")]
3048pub fn visit_trait_item_verbatim<'ast, V: Visit<'ast> + ?Sized>(
3049 _visitor: &mut V,
3050 _i: &'ast TraitItemVerbatim,
3051) {
David Tolnay6af48992018-08-01 11:16:28 -07003052 skip!(_i.tts);
David Tolnay2ae520a2017-12-29 11:19:50 -05003053}
David Tolnay8c81f622018-07-31 23:34:35 -07003054#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003055pub fn visit_type<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Type) {
Nika Layzell27726662017-10-24 23:16:35 -04003056 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07003057 Type::Slice(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003058 _visitor.visit_type_slice(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003059 }
David Tolnay8c81f622018-07-31 23:34:35 -07003060 Type::Array(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003061 _visitor.visit_type_array(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003062 }
David Tolnay8c81f622018-07-31 23:34:35 -07003063 Type::Ptr(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003064 _visitor.visit_type_ptr(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003065 }
David Tolnay8c81f622018-07-31 23:34:35 -07003066 Type::Reference(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003067 _visitor.visit_type_reference(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003068 }
David Tolnay8c81f622018-07-31 23:34:35 -07003069 Type::BareFn(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003070 _visitor.visit_type_bare_fn(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003071 }
David Tolnay8c81f622018-07-31 23:34:35 -07003072 Type::Never(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003073 _visitor.visit_type_never(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003074 }
David Tolnay8c81f622018-07-31 23:34:35 -07003075 Type::Tuple(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003076 _visitor.visit_type_tuple(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003077 }
David Tolnay8c81f622018-07-31 23:34:35 -07003078 Type::Path(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003079 _visitor.visit_type_path(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003080 }
David Tolnay8c81f622018-07-31 23:34:35 -07003081 Type::TraitObject(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003082 _visitor.visit_type_trait_object(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003083 }
David Tolnay8c81f622018-07-31 23:34:35 -07003084 Type::ImplTrait(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003085 _visitor.visit_type_impl_trait(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003086 }
David Tolnay8c81f622018-07-31 23:34:35 -07003087 Type::Paren(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003088 _visitor.visit_type_paren(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003089 }
David Tolnay8c81f622018-07-31 23:34:35 -07003090 Type::Group(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003091 _visitor.visit_type_group(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003092 }
David Tolnay8c81f622018-07-31 23:34:35 -07003093 Type::Infer(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003094 _visitor.visit_type_infer(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003095 }
David Tolnay8c81f622018-07-31 23:34:35 -07003096 Type::Macro(ref _binding_0) => {
David Tolnay323279a2017-12-29 11:26:32 -05003097 _visitor.visit_type_macro(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003098 }
David Tolnay8c81f622018-07-31 23:34:35 -07003099 Type::Verbatim(ref _binding_0) => {
David Tolnay2ae520a2017-12-29 11:19:50 -05003100 _visitor.visit_type_verbatim(_binding_0);
3101 }
Nika Layzell27726662017-10-24 23:16:35 -04003102 }
3103}
David Tolnay8c81f622018-07-31 23:34:35 -07003104#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003105pub fn visit_type_array<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeArray) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003106 tokens_helper(_visitor, &_i.bracket_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003107 _visitor.visit_type(&*_i.elem);
David Tolnay7ac699c2018-08-24 14:00:58 -04003108 tokens_helper(_visitor, &_i.semi_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07003109 _visitor.visit_expr(&_i.len);
Nika Layzell27726662017-10-24 23:16:35 -04003110}
David Tolnay8c81f622018-07-31 23:34:35 -07003111#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003112pub fn visit_type_bare_fn<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeBareFn) {
David Tolnay8c81f622018-07-31 23:34:35 -07003113 if let Some(ref it) = _i.unsafety {
David Tolnay7ac699c2018-08-24 14:00:58 -04003114 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07003115 };
3116 if let Some(ref it) = _i.abi {
3117 _visitor.visit_abi(it)
3118 };
David Tolnay7ac699c2018-08-24 14:00:58 -04003119 tokens_helper(_visitor, &_i.fn_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003120 if let Some(ref it) = _i.lifetimes {
3121 _visitor.visit_bound_lifetimes(it)
3122 };
David Tolnay7ac699c2018-08-24 14:00:58 -04003123 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003124 for el in Punctuated::pairs(&_i.inputs) {
3125 let it = el.value();
3126 _visitor.visit_bare_fn_arg(it)
3127 }
3128 if let Some(ref it) = _i.variadic {
David Tolnay7ac699c2018-08-24 14:00:58 -04003129 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07003130 };
3131 _visitor.visit_return_type(&_i.output);
Nika Layzell27726662017-10-24 23:16:35 -04003132}
David Tolnay8c81f622018-07-31 23:34:35 -07003133#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003134pub fn visit_type_group<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeGroup) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003135 tokens_helper(_visitor, &_i.group_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003136 _visitor.visit_type(&*_i.elem);
Nika Layzell27726662017-10-24 23:16:35 -04003137}
David Tolnay8c81f622018-07-31 23:34:35 -07003138#[cfg(any(feature = "full", feature = "derive"))]
3139pub fn visit_type_impl_trait<'ast, V: Visit<'ast> + ?Sized>(
3140 _visitor: &mut V,
3141 _i: &'ast TypeImplTrait,
3142) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003143 tokens_helper(_visitor, &_i.impl_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003144 for el in Punctuated::pairs(&_i.bounds) {
3145 let it = el.value();
3146 _visitor.visit_type_param_bound(it)
3147 }
Nika Layzell27726662017-10-24 23:16:35 -04003148}
David Tolnay8c81f622018-07-31 23:34:35 -07003149#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003150pub fn visit_type_infer<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeInfer) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003151 tokens_helper(_visitor, &_i.underscore_token.spans);
Nika Layzell27726662017-10-24 23:16:35 -04003152}
David Tolnay8c81f622018-07-31 23:34:35 -07003153#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003154pub fn visit_type_macro<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeMacro) {
David Tolnay8c81f622018-07-31 23:34:35 -07003155 _visitor.visit_macro(&_i.mac);
David Tolnay323279a2017-12-29 11:26:32 -05003156}
David Tolnay8c81f622018-07-31 23:34:35 -07003157#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003158pub fn visit_type_never<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeNever) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003159 tokens_helper(_visitor, &_i.bang_token.spans);
Nika Layzell27726662017-10-24 23:16:35 -04003160}
David Tolnay8c81f622018-07-31 23:34:35 -07003161#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003162pub fn visit_type_param<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParam) {
David Tolnay8c81f622018-07-31 23:34:35 -07003163 for it in &_i.attrs {
3164 _visitor.visit_attribute(it)
3165 }
3166 _visitor.visit_ident(&_i.ident);
3167 if let Some(ref it) = _i.colon_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04003168 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07003169 };
3170 for el in Punctuated::pairs(&_i.bounds) {
3171 let it = el.value();
3172 _visitor.visit_type_param_bound(it)
3173 }
3174 if let Some(ref it) = _i.eq_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04003175 tokens_helper(_visitor, &it.spans)
David Tolnay8c81f622018-07-31 23:34:35 -07003176 };
3177 if let Some(ref it) = _i.default {
3178 _visitor.visit_type(it)
3179 };
Nika Layzell27726662017-10-24 23:16:35 -04003180}
David Tolnay8c81f622018-07-31 23:34:35 -07003181#[cfg(any(feature = "full", feature = "derive"))]
3182pub fn visit_type_param_bound<'ast, V: Visit<'ast> + ?Sized>(
3183 _visitor: &mut V,
3184 _i: &'ast TypeParamBound,
3185) {
Nika Layzell27726662017-10-24 23:16:35 -04003186 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07003187 TypeParamBound::Trait(ref _binding_0) => {
David Tolnay40fb8ce2018-01-02 10:53:46 -08003188 _visitor.visit_trait_bound(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003189 }
David Tolnay8c81f622018-07-31 23:34:35 -07003190 TypeParamBound::Lifetime(ref _binding_0) => {
David Tolnay4ba63a02017-12-28 15:53:05 -05003191 _visitor.visit_lifetime(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003192 }
3193 }
3194}
David Tolnay8c81f622018-07-31 23:34:35 -07003195#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003196pub fn visit_type_paren<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeParen) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003197 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003198 _visitor.visit_type(&*_i.elem);
Nika Layzell27726662017-10-24 23:16:35 -04003199}
David Tolnay8c81f622018-07-31 23:34:35 -07003200#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003201pub fn visit_type_path<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypePath) {
David Tolnay8c81f622018-07-31 23:34:35 -07003202 if let Some(ref it) = _i.qself {
3203 _visitor.visit_qself(it)
3204 };
3205 _visitor.visit_path(&_i.path);
Nika Layzell27726662017-10-24 23:16:35 -04003206}
David Tolnay8c81f622018-07-31 23:34:35 -07003207#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003208pub fn visit_type_ptr<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypePtr) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003209 tokens_helper(_visitor, &_i.star_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07003210 if let Some(ref it) = _i.const_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04003211 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07003212 };
3213 if let Some(ref it) = _i.mutability {
David Tolnay7ac699c2018-08-24 14:00:58 -04003214 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07003215 };
3216 _visitor.visit_type(&*_i.elem);
Nika Layzell27726662017-10-24 23:16:35 -04003217}
David Tolnay8c81f622018-07-31 23:34:35 -07003218#[cfg(any(feature = "full", feature = "derive"))]
3219pub fn visit_type_reference<'ast, V: Visit<'ast> + ?Sized>(
3220 _visitor: &mut V,
3221 _i: &'ast TypeReference,
3222) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003223 tokens_helper(_visitor, &_i.and_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07003224 if let Some(ref it) = _i.lifetime {
3225 _visitor.visit_lifetime(it)
3226 };
3227 if let Some(ref it) = _i.mutability {
David Tolnay7ac699c2018-08-24 14:00:58 -04003228 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07003229 };
3230 _visitor.visit_type(&*_i.elem);
Nika Layzell27726662017-10-24 23:16:35 -04003231}
David Tolnay8c81f622018-07-31 23:34:35 -07003232#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003233pub fn visit_type_slice<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeSlice) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003234 tokens_helper(_visitor, &_i.bracket_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003235 _visitor.visit_type(&*_i.elem);
Nika Layzell27726662017-10-24 23:16:35 -04003236}
David Tolnay8c81f622018-07-31 23:34:35 -07003237#[cfg(any(feature = "full", feature = "derive"))]
3238pub fn visit_type_trait_object<'ast, V: Visit<'ast> + ?Sized>(
3239 _visitor: &mut V,
3240 _i: &'ast TypeTraitObject,
3241) {
3242 if let Some(ref it) = _i.dyn_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04003243 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07003244 };
3245 for el in Punctuated::pairs(&_i.bounds) {
3246 let it = el.value();
3247 _visitor.visit_type_param_bound(it)
3248 }
Nika Layzell27726662017-10-24 23:16:35 -04003249}
David Tolnay8c81f622018-07-31 23:34:35 -07003250#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003251pub fn visit_type_tuple<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast TypeTuple) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003252 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003253 for el in Punctuated::pairs(&_i.elems) {
3254 let it = el.value();
3255 _visitor.visit_type(it)
3256 }
Nika Layzell27726662017-10-24 23:16:35 -04003257}
David Tolnay8c81f622018-07-31 23:34:35 -07003258#[cfg(any(feature = "full", feature = "derive"))]
3259pub fn visit_type_verbatim<'ast, V: Visit<'ast> + ?Sized>(
3260 _visitor: &mut V,
3261 _i: &'ast TypeVerbatim,
3262) {
David Tolnay6af48992018-08-01 11:16:28 -07003263 skip!(_i.tts);
David Tolnay2ae520a2017-12-29 11:19:50 -05003264}
David Tolnay8c81f622018-07-31 23:34:35 -07003265#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003266pub fn visit_un_op<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UnOp) {
Nika Layzell27726662017-10-24 23:16:35 -04003267 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07003268 UnOp::Deref(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04003269 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -04003270 }
David Tolnay8c81f622018-07-31 23:34:35 -07003271 UnOp::Not(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04003272 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -04003273 }
David Tolnay8c81f622018-07-31 23:34:35 -07003274 UnOp::Neg(ref _binding_0) => {
David Tolnay7ac699c2018-08-24 14:00:58 -04003275 tokens_helper(_visitor, &_binding_0.spans);
Nika Layzell27726662017-10-24 23:16:35 -04003276 }
3277 }
3278}
David Tolnay8c81f622018-07-31 23:34:35 -07003279#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003280pub fn visit_use_glob<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseGlob) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003281 tokens_helper(_visitor, &_i.star_token.spans);
David Tolnay5f332a92017-12-26 00:42:45 -05003282}
David Tolnay8c81f622018-07-31 23:34:35 -07003283#[cfg(feature = "full")]
David Tolnayd97a7d22018-03-31 19:17:01 +02003284pub fn visit_use_group<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseGroup) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003285 tokens_helper(_visitor, &_i.brace_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003286 for el in Punctuated::pairs(&_i.items) {
3287 let it = el.value();
3288 _visitor.visit_use_tree(it)
3289 }
David Tolnay5f332a92017-12-26 00:42:45 -05003290}
David Tolnay8c81f622018-07-31 23:34:35 -07003291#[cfg(feature = "full")]
David Tolnayd97a7d22018-03-31 19:17:01 +02003292pub fn visit_use_name<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseName) {
David Tolnay8c81f622018-07-31 23:34:35 -07003293 _visitor.visit_ident(&_i.ident);
David Tolnayd97a7d22018-03-31 19:17:01 +02003294}
David Tolnay8c81f622018-07-31 23:34:35 -07003295#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003296pub fn visit_use_path<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UsePath) {
David Tolnay8c81f622018-07-31 23:34:35 -07003297 _visitor.visit_ident(&_i.ident);
David Tolnay7ac699c2018-08-24 14:00:58 -04003298 tokens_helper(_visitor, &_i.colon2_token.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07003299 _visitor.visit_use_tree(&*_i.tree);
David Tolnayd97a7d22018-03-31 19:17:01 +02003300}
David Tolnay8c81f622018-07-31 23:34:35 -07003301#[cfg(feature = "full")]
David Tolnayd97a7d22018-03-31 19:17:01 +02003302pub fn visit_use_rename<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseRename) {
David Tolnay8c81f622018-07-31 23:34:35 -07003303 _visitor.visit_ident(&_i.ident);
David Tolnay7ac699c2018-08-24 14:00:58 -04003304 tokens_helper(_visitor, &_i.as_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003305 _visitor.visit_ident(&_i.rename);
David Tolnay5f332a92017-12-26 00:42:45 -05003306}
David Tolnay8c81f622018-07-31 23:34:35 -07003307#[cfg(feature = "full")]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003308pub fn visit_use_tree<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast UseTree) {
David Tolnay5f332a92017-12-26 00:42:45 -05003309 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07003310 UseTree::Path(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003311 _visitor.visit_use_path(_binding_0);
David Tolnay5f332a92017-12-26 00:42:45 -05003312 }
David Tolnay8c81f622018-07-31 23:34:35 -07003313 UseTree::Name(ref _binding_0) => {
David Tolnayd97a7d22018-03-31 19:17:01 +02003314 _visitor.visit_use_name(_binding_0);
3315 }
David Tolnay8c81f622018-07-31 23:34:35 -07003316 UseTree::Rename(ref _binding_0) => {
David Tolnayd97a7d22018-03-31 19:17:01 +02003317 _visitor.visit_use_rename(_binding_0);
3318 }
David Tolnay8c81f622018-07-31 23:34:35 -07003319 UseTree::Glob(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003320 _visitor.visit_use_glob(_binding_0);
David Tolnay5f332a92017-12-26 00:42:45 -05003321 }
David Tolnay8c81f622018-07-31 23:34:35 -07003322 UseTree::Group(ref _binding_0) => {
David Tolnayd97a7d22018-03-31 19:17:01 +02003323 _visitor.visit_use_group(_binding_0);
David Tolnay5f332a92017-12-26 00:42:45 -05003324 }
3325 }
3326}
David Tolnay8c81f622018-07-31 23:34:35 -07003327#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003328pub fn visit_variant<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Variant) {
David Tolnay8c81f622018-07-31 23:34:35 -07003329 for it in &_i.attrs {
3330 _visitor.visit_attribute(it)
3331 }
3332 _visitor.visit_ident(&_i.ident);
3333 _visitor.visit_fields(&_i.fields);
3334 if let Some(ref it) = _i.discriminant {
David Tolnay7ac699c2018-08-24 14:00:58 -04003335 tokens_helper(_visitor, &(it).0.spans);
David Tolnay8c81f622018-07-31 23:34:35 -07003336 _visitor.visit_expr(&(it).1);
3337 };
Nika Layzell27726662017-10-24 23:16:35 -04003338}
David Tolnay8c81f622018-07-31 23:34:35 -07003339#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003340pub fn visit_vis_crate<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisCrate) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003341 tokens_helper(_visitor, &_i.crate_token.span);
Nika Layzell27726662017-10-24 23:16:35 -04003342}
David Tolnay8c81f622018-07-31 23:34:35 -07003343#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003344pub fn visit_vis_public<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast VisPublic) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003345 tokens_helper(_visitor, &_i.pub_token.span);
Nika Layzell27726662017-10-24 23:16:35 -04003346}
David Tolnay8c81f622018-07-31 23:34:35 -07003347#[cfg(any(feature = "full", feature = "derive"))]
3348pub fn visit_vis_restricted<'ast, V: Visit<'ast> + ?Sized>(
3349 _visitor: &mut V,
3350 _i: &'ast VisRestricted,
3351) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003352 tokens_helper(_visitor, &_i.pub_token.span);
3353 tokens_helper(_visitor, &_i.paren_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003354 if let Some(ref it) = _i.in_token {
David Tolnay7ac699c2018-08-24 14:00:58 -04003355 tokens_helper(_visitor, &it.span)
David Tolnay8c81f622018-07-31 23:34:35 -07003356 };
3357 _visitor.visit_path(&*_i.path);
Nika Layzell27726662017-10-24 23:16:35 -04003358}
David Tolnay8c81f622018-07-31 23:34:35 -07003359#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003360pub fn visit_visibility<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Visibility) {
Nika Layzell27726662017-10-24 23:16:35 -04003361 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07003362 Visibility::Public(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003363 _visitor.visit_vis_public(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003364 }
David Tolnay8c81f622018-07-31 23:34:35 -07003365 Visibility::Crate(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003366 _visitor.visit_vis_crate(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003367 }
David Tolnay8c81f622018-07-31 23:34:35 -07003368 Visibility::Restricted(ref _binding_0) => {
David Tolnayf0d63bf2017-12-26 12:29:47 -05003369 _visitor.visit_vis_restricted(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003370 }
David Tolnay8c81f622018-07-31 23:34:35 -07003371 Visibility::Inherited => {}
Nika Layzell27726662017-10-24 23:16:35 -04003372 }
3373}
David Tolnay8c81f622018-07-31 23:34:35 -07003374#[cfg(any(feature = "full", feature = "derive"))]
David Tolnay4b4c4b62018-01-06 13:48:05 -08003375pub fn visit_where_clause<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast WhereClause) {
David Tolnay7ac699c2018-08-24 14:00:58 -04003376 tokens_helper(_visitor, &_i.where_token.span);
David Tolnay8c81f622018-07-31 23:34:35 -07003377 for el in Punctuated::pairs(&_i.predicates) {
3378 let it = el.value();
3379 _visitor.visit_where_predicate(it)
3380 }
Nika Layzell27726662017-10-24 23:16:35 -04003381}
David Tolnay8c81f622018-07-31 23:34:35 -07003382#[cfg(any(feature = "full", feature = "derive"))]
3383pub fn visit_where_predicate<'ast, V: Visit<'ast> + ?Sized>(
3384 _visitor: &mut V,
3385 _i: &'ast WherePredicate,
3386) {
Nika Layzell27726662017-10-24 23:16:35 -04003387 match *_i {
David Tolnay8c81f622018-07-31 23:34:35 -07003388 WherePredicate::Type(ref _binding_0) => {
David Tolnayd4add852018-01-01 20:13:24 -08003389 _visitor.visit_predicate_type(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003390 }
David Tolnay8c81f622018-07-31 23:34:35 -07003391 WherePredicate::Lifetime(ref _binding_0) => {
David Tolnayd4add852018-01-01 20:13:24 -08003392 _visitor.visit_predicate_lifetime(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003393 }
David Tolnay8c81f622018-07-31 23:34:35 -07003394 WherePredicate::Eq(ref _binding_0) => {
David Tolnayd4add852018-01-01 20:13:24 -08003395 _visitor.visit_predicate_eq(_binding_0);
Nika Layzell27726662017-10-24 23:16:35 -04003396 }
3397 }
3398}