1// This file is @generated by syn-internal-codegen.
2// It is not intended for manual editing.
3
4#![allow(unused_variables)]
5#[cfg(any(feature = "full", feature = "derive"))]
6use crate::gen::helper::visit::*;
7#[cfg(any(feature = "full", feature = "derive"))]
8use crate::punctuated::Punctuated;
9use crate::*;
10use proc_macro2::Span;
11#[cfg(feature = "full")]
12macro_rules! full {
13 ($e:expr) => {
14 $e
15 };
16}
17#[cfg(all(feature = "derive", not(feature = "full")))]
18macro_rules! full {
19 ($e:expr) => {
20 unreachable!()
21 };
22}
23macro_rules! skip {
24 ($($tt:tt)*) => {};
25}
26/// Syntax tree traversal to walk a shared borrow of a syntax tree.
27///
28/// See the [module documentation] for details.
29///
30/// [module documentation]: self
31///
32/// *This trait is available only if Syn is built with the `"visit"` feature.*
33pub trait Visit<'ast> {
34 #[cfg(any(feature = "derive", feature = "full"))]
35 fn visit_abi(&mut self, i: &'ast Abi) {
36 visit_abi(self, i);
37 }
38 #[cfg(any(feature = "derive", feature = "full"))]
39 fn visit_angle_bracketed_generic_arguments(
40 &mut self,
41 i: &'ast AngleBracketedGenericArguments,
42 ) {
43 visit_angle_bracketed_generic_arguments(self, i);
44 }
45 #[cfg(feature = "full")]
46 fn visit_arm(&mut self, i: &'ast Arm) {
47 visit_arm(self, i);
48 }
49 #[cfg(any(feature = "derive", feature = "full"))]
50 fn visit_attr_style(&mut self, i: &'ast AttrStyle) {
51 visit_attr_style(self, i);
52 }
53 #[cfg(any(feature = "derive", feature = "full"))]
54 fn visit_attribute(&mut self, i: &'ast Attribute) {
55 visit_attribute(self, i);
56 }
57 #[cfg(any(feature = "derive", feature = "full"))]
58 fn visit_bare_fn_arg(&mut self, i: &'ast BareFnArg) {
59 visit_bare_fn_arg(self, i);
60 }
61 #[cfg(any(feature = "derive", feature = "full"))]
62 fn visit_bin_op(&mut self, i: &'ast BinOp) {
63 visit_bin_op(self, i);
64 }
65 #[cfg(any(feature = "derive", feature = "full"))]
66 fn visit_binding(&mut self, i: &'ast Binding) {
67 visit_binding(self, i);
68 }
69 #[cfg(feature = "full")]
70 fn visit_block(&mut self, i: &'ast Block) {
71 visit_block(self, i);
72 }
73 #[cfg(any(feature = "derive", feature = "full"))]
74 fn visit_bound_lifetimes(&mut self, i: &'ast BoundLifetimes) {
75 visit_bound_lifetimes(self, i);
76 }
77 #[cfg(any(feature = "derive", feature = "full"))]
78 fn visit_const_param(&mut self, i: &'ast ConstParam) {
79 visit_const_param(self, i);
80 }
81 #[cfg(any(feature = "derive", feature = "full"))]
82 fn visit_constraint(&mut self, i: &'ast Constraint) {
83 visit_constraint(self, i);
84 }
85 #[cfg(feature = "derive")]
86 fn visit_data(&mut self, i: &'ast Data) {
87 visit_data(self, i);
88 }
89 #[cfg(feature = "derive")]
90 fn visit_data_enum(&mut self, i: &'ast DataEnum) {
91 visit_data_enum(self, i);
92 }
93 #[cfg(feature = "derive")]
94 fn visit_data_struct(&mut self, i: &'ast DataStruct) {
95 visit_data_struct(self, i);
96 }
97 #[cfg(feature = "derive")]
98 fn visit_data_union(&mut self, i: &'ast DataUnion) {
99 visit_data_union(self, i);
100 }
101 #[cfg(feature = "derive")]
102 fn visit_derive_input(&mut self, i: &'ast DeriveInput) {
103 visit_derive_input(self, i);
104 }
105 #[cfg(any(feature = "derive", feature = "full"))]
106 fn visit_expr(&mut self, i: &'ast Expr) {
107 visit_expr(self, i);
108 }
109 #[cfg(feature = "full")]
110 fn visit_expr_array(&mut self, i: &'ast ExprArray) {
111 visit_expr_array(self, i);
112 }
113 #[cfg(feature = "full")]
114 fn visit_expr_assign(&mut self, i: &'ast ExprAssign) {
115 visit_expr_assign(self, i);
116 }
117 #[cfg(feature = "full")]
118 fn visit_expr_assign_op(&mut self, i: &'ast ExprAssignOp) {
119 visit_expr_assign_op(self, i);
120 }
121 #[cfg(feature = "full")]
122 fn visit_expr_async(&mut self, i: &'ast ExprAsync) {
123 visit_expr_async(self, i);
124 }
125 #[cfg(feature = "full")]
126 fn visit_expr_await(&mut self, i: &'ast ExprAwait) {
127 visit_expr_await(self, i);
128 }
129 #[cfg(any(feature = "derive", feature = "full"))]
130 fn visit_expr_binary(&mut self, i: &'ast ExprBinary) {
131 visit_expr_binary(self, i);
132 }
133 #[cfg(feature = "full")]
134 fn visit_expr_block(&mut self, i: &'ast ExprBlock) {
135 visit_expr_block(self, i);
136 }
137 #[cfg(feature = "full")]
138 fn visit_expr_box(&mut self, i: &'ast ExprBox) {
139 visit_expr_box(self, i);
140 }
141 #[cfg(feature = "full")]
142 fn visit_expr_break(&mut self, i: &'ast ExprBreak) {
143 visit_expr_break(self, i);
144 }
145 #[cfg(any(feature = "derive", feature = "full"))]
146 fn visit_expr_call(&mut self, i: &'ast ExprCall) {
147 visit_expr_call(self, i);
148 }
149 #[cfg(any(feature = "derive", feature = "full"))]
150 fn visit_expr_cast(&mut self, i: &'ast ExprCast) {
151 visit_expr_cast(self, i);
152 }
153 #[cfg(feature = "full")]
154 fn visit_expr_closure(&mut self, i: &'ast ExprClosure) {
155 visit_expr_closure(self, i);
156 }
157 #[cfg(feature = "full")]
158 fn visit_expr_continue(&mut self, i: &'ast ExprContinue) {
159 visit_expr_continue(self, i);
160 }
161 #[cfg(any(feature = "derive", feature = "full"))]
162 fn visit_expr_field(&mut self, i: &'ast ExprField) {
163 visit_expr_field(self, i);
164 }
165 #[cfg(feature = "full")]
166 fn visit_expr_for_loop(&mut self, i: &'ast ExprForLoop) {
167 visit_expr_for_loop(self, i);
168 }
169 #[cfg(feature = "full")]
170 fn visit_expr_group(&mut self, i: &'ast ExprGroup) {
171 visit_expr_group(self, i);
172 }
173 #[cfg(feature = "full")]
174 fn visit_expr_if(&mut self, i: &'ast ExprIf) {
175 visit_expr_if(self, i);
176 }
177 #[cfg(any(feature = "derive", feature = "full"))]
178 fn visit_expr_index(&mut self, i: &'ast ExprIndex) {
179 visit_expr_index(self, i);
180 }
181 #[cfg(feature = "full")]
182 fn visit_expr_let(&mut self, i: &'ast ExprLet) {
183 visit_expr_let(self, i);
184 }
185 #[cfg(any(feature = "derive", feature = "full"))]
186 fn visit_expr_lit(&mut self, i: &'ast ExprLit) {
187 visit_expr_lit(self, i);
188 }
189 #[cfg(feature = "full")]
190 fn visit_expr_loop(&mut self, i: &'ast ExprLoop) {
191 visit_expr_loop(self, i);
192 }
193 #[cfg(feature = "full")]
194 fn visit_expr_macro(&mut self, i: &'ast ExprMacro) {
195 visit_expr_macro(self, i);
196 }
197 #[cfg(feature = "full")]
198 fn visit_expr_match(&mut self, i: &'ast ExprMatch) {
199 visit_expr_match(self, i);
200 }
201 #[cfg(feature = "full")]
202 fn visit_expr_method_call(&mut self, i: &'ast ExprMethodCall) {
203 visit_expr_method_call(self, i);
204 }
205 #[cfg(any(feature = "derive", feature = "full"))]
206 fn visit_expr_paren(&mut self, i: &'ast ExprParen) {
207 visit_expr_paren(self, i);
208 }
209 #[cfg(any(feature = "derive", feature = "full"))]
210 fn visit_expr_path(&mut self, i: &'ast ExprPath) {
211 visit_expr_path(self, i);
212 }
213 #[cfg(feature = "full")]
214 fn visit_expr_range(&mut self, i: &'ast ExprRange) {
215 visit_expr_range(self, i);
216 }
217 #[cfg(feature = "full")]
218 fn visit_expr_reference(&mut self, i: &'ast ExprReference) {
219 visit_expr_reference(self, i);
220 }
221 #[cfg(feature = "full")]
222 fn visit_expr_repeat(&mut self, i: &'ast ExprRepeat) {
223 visit_expr_repeat(self, i);
224 }
225 #[cfg(feature = "full")]
226 fn visit_expr_return(&mut self, i: &'ast ExprReturn) {
227 visit_expr_return(self, i);
228 }
229 #[cfg(feature = "full")]
230 fn visit_expr_struct(&mut self, i: &'ast ExprStruct) {
231 visit_expr_struct(self, i);
232 }
233 #[cfg(feature = "full")]
234 fn visit_expr_try(&mut self, i: &'ast ExprTry) {
235 visit_expr_try(self, i);
236 }
237 #[cfg(feature = "full")]
238 fn visit_expr_try_block(&mut self, i: &'ast ExprTryBlock) {
239 visit_expr_try_block(self, i);
240 }
241 #[cfg(feature = "full")]
242 fn visit_expr_tuple(&mut self, i: &'ast ExprTuple) {
243 visit_expr_tuple(self, i);
244 }
245 #[cfg(feature = "full")]
246 fn visit_expr_type(&mut self, i: &'ast ExprType) {
247 visit_expr_type(self, i);
248 }
249 #[cfg(any(feature = "derive", feature = "full"))]
250 fn visit_expr_unary(&mut self, i: &'ast ExprUnary) {
251 visit_expr_unary(self, i);
252 }
253 #[cfg(feature = "full")]
254 fn visit_expr_unsafe(&mut self, i: &'ast ExprUnsafe) {
255 visit_expr_unsafe(self, i);
256 }
257 #[cfg(feature = "full")]
258 fn visit_expr_while(&mut self, i: &'ast ExprWhile) {
259 visit_expr_while(self, i);
260 }
261 #[cfg(feature = "full")]
262 fn visit_expr_yield(&mut self, i: &'ast ExprYield) {
263 visit_expr_yield(self, i);
264 }
265 #[cfg(any(feature = "derive", feature = "full"))]
266 fn visit_field(&mut self, i: &'ast Field) {
267 visit_field(self, i);
268 }
269 #[cfg(feature = "full")]
270 fn visit_field_pat(&mut self, i: &'ast FieldPat) {
271 visit_field_pat(self, i);
272 }
273 #[cfg(feature = "full")]
274 fn visit_field_value(&mut self, i: &'ast FieldValue) {
275 visit_field_value(self, i);
276 }
277 #[cfg(any(feature = "derive", feature = "full"))]
278 fn visit_fields(&mut self, i: &'ast Fields) {
279 visit_fields(self, i);
280 }
281 #[cfg(any(feature = "derive", feature = "full"))]
282 fn visit_fields_named(&mut self, i: &'ast FieldsNamed) {
283 visit_fields_named(self, i);
284 }
285 #[cfg(any(feature = "derive", feature = "full"))]
286 fn visit_fields_unnamed(&mut self, i: &'ast FieldsUnnamed) {
287 visit_fields_unnamed(self, i);
288 }
289 #[cfg(feature = "full")]
290 fn visit_file(&mut self, i: &'ast File) {
291 visit_file(self, i);
292 }
293 #[cfg(feature = "full")]
294 fn visit_fn_arg(&mut self, i: &'ast FnArg) {
295 visit_fn_arg(self, i);
296 }
297 #[cfg(feature = "full")]
298 fn visit_foreign_item(&mut self, i: &'ast ForeignItem) {
299 visit_foreign_item(self, i);
300 }
301 #[cfg(feature = "full")]
302 fn visit_foreign_item_fn(&mut self, i: &'ast ForeignItemFn) {
303 visit_foreign_item_fn(self, i);
304 }
305 #[cfg(feature = "full")]
306 fn visit_foreign_item_macro(&mut self, i: &'ast ForeignItemMacro) {
307 visit_foreign_item_macro(self, i);
308 }
309 #[cfg(feature = "full")]
310 fn visit_foreign_item_static(&mut self, i: &'ast ForeignItemStatic) {
311 visit_foreign_item_static(self, i);
312 }
313 #[cfg(feature = "full")]
314 fn visit_foreign_item_type(&mut self, i: &'ast ForeignItemType) {
315 visit_foreign_item_type(self, i);
316 }
317 #[cfg(any(feature = "derive", feature = "full"))]
318 fn visit_generic_argument(&mut self, i: &'ast GenericArgument) {
319 visit_generic_argument(self, i);
320 }
321 #[cfg(feature = "full")]
322 fn visit_generic_method_argument(&mut self, i: &'ast GenericMethodArgument) {
323 visit_generic_method_argument(self, i);
324 }
325 #[cfg(any(feature = "derive", feature = "full"))]
326 fn visit_generic_param(&mut self, i: &'ast GenericParam) {
327 visit_generic_param(self, i);
328 }
329 #[cfg(any(feature = "derive", feature = "full"))]
330 fn visit_generics(&mut self, i: &'ast Generics) {
331 visit_generics(self, i);
332 }
333 fn visit_ident(&mut self, i: &'ast Ident) {
334 visit_ident(self, i);
335 }
336 #[cfg(feature = "full")]
337 fn visit_impl_item(&mut self, i: &'ast ImplItem) {
338 visit_impl_item(self, i);
339 }
340 #[cfg(feature = "full")]
341 fn visit_impl_item_const(&mut self, i: &'ast ImplItemConst) {
342 visit_impl_item_const(self, i);
343 }
344 #[cfg(feature = "full")]
345 fn visit_impl_item_macro(&mut self, i: &'ast ImplItemMacro) {
346 visit_impl_item_macro(self, i);
347 }
348 #[cfg(feature = "full")]
349 fn visit_impl_item_method(&mut self, i: &'ast ImplItemMethod) {
350 visit_impl_item_method(self, i);
351 }
352 #[cfg(feature = "full")]
353 fn visit_impl_item_type(&mut self, i: &'ast ImplItemType) {
354 visit_impl_item_type(self, i);
355 }
356 #[cfg(any(feature = "derive", feature = "full"))]
357 fn visit_index(&mut self, i: &'ast Index) {
358 visit_index(self, i);
359 }
360 #[cfg(feature = "full")]
361 fn visit_item(&mut self, i: &'ast Item) {
362 visit_item(self, i);
363 }
364 #[cfg(feature = "full")]
365 fn visit_item_const(&mut self, i: &'ast ItemConst) {
366 visit_item_const(self, i);
367 }
368 #[cfg(feature = "full")]
369 fn visit_item_enum(&mut self, i: &'ast ItemEnum) {
370 visit_item_enum(self, i);
371 }
372 #[cfg(feature = "full")]
373 fn visit_item_extern_crate(&mut self, i: &'ast ItemExternCrate) {
374 visit_item_extern_crate(self, i);
375 }
376 #[cfg(feature = "full")]
377 fn visit_item_fn(&mut self, i: &'ast ItemFn) {
378 visit_item_fn(self, i);
379 }
380 #[cfg(feature = "full")]
381 fn visit_item_foreign_mod(&mut self, i: &'ast ItemForeignMod) {
382 visit_item_foreign_mod(self, i);
383 }
384 #[cfg(feature = "full")]
385 fn visit_item_impl(&mut self, i: &'ast ItemImpl) {
386 visit_item_impl(self, i);
387 }
388 #[cfg(feature = "full")]
389 fn visit_item_macro(&mut self, i: &'ast ItemMacro) {
390 visit_item_macro(self, i);
391 }
392 #[cfg(feature = "full")]
393 fn visit_item_macro2(&mut self, i: &'ast ItemMacro2) {
394 visit_item_macro2(self, i);
395 }
396 #[cfg(feature = "full")]
397 fn visit_item_mod(&mut self, i: &'ast ItemMod) {
398 visit_item_mod(self, i);
399 }
400 #[cfg(feature = "full")]
401 fn visit_item_static(&mut self, i: &'ast ItemStatic) {
402 visit_item_static(self, i);
403 }
404 #[cfg(feature = "full")]
405 fn visit_item_struct(&mut self, i: &'ast ItemStruct) {
406 visit_item_struct(self, i);
407 }
408 #[cfg(feature = "full")]
409 fn visit_item_trait(&mut self, i: &'ast ItemTrait) {
410 visit_item_trait(self, i);
411 }
412 #[cfg(feature = "full")]
413 fn visit_item_trait_alias(&mut self, i: &'ast ItemTraitAlias) {
414 visit_item_trait_alias(self, i);
415 }
416 #[cfg(feature = "full")]
417 fn visit_item_type(&mut self, i: &'ast ItemType) {
418 visit_item_type(self, i);
419 }
420 #[cfg(feature = "full")]
421 fn visit_item_union(&mut self, i: &'ast ItemUnion) {
422 visit_item_union(self, i);
423 }
424 #[cfg(feature = "full")]
425 fn visit_item_use(&mut self, i: &'ast ItemUse) {
426 visit_item_use(self, i);
427 }
428 #[cfg(feature = "full")]
429 fn visit_label(&mut self, i: &'ast Label) {
430 visit_label(self, i);
431 }
432 fn visit_lifetime(&mut self, i: &'ast Lifetime) {
433 visit_lifetime(self, i);
434 }
435 #[cfg(any(feature = "derive", feature = "full"))]
436 fn visit_lifetime_def(&mut self, i: &'ast LifetimeDef) {
437 visit_lifetime_def(self, i);
438 }
439 fn visit_lit(&mut self, i: &'ast Lit) {
440 visit_lit(self, i);
441 }
442 fn visit_lit_bool(&mut self, i: &'ast LitBool) {
443 visit_lit_bool(self, i);
444 }
445 fn visit_lit_byte(&mut self, i: &'ast LitByte) {
446 visit_lit_byte(self, i);
447 }
448 fn visit_lit_byte_str(&mut self, i: &'ast LitByteStr) {
449 visit_lit_byte_str(self, i);
450 }
451 fn visit_lit_char(&mut self, i: &'ast LitChar) {
452 visit_lit_char(self, i);
453 }
454 fn visit_lit_float(&mut self, i: &'ast LitFloat) {
455 visit_lit_float(self, i);
456 }
457 fn visit_lit_int(&mut self, i: &'ast LitInt) {
458 visit_lit_int(self, i);
459 }
460 fn visit_lit_str(&mut self, i: &'ast LitStr) {
461 visit_lit_str(self, i);
462 }
463 #[cfg(feature = "full")]
464 fn visit_local(&mut self, i: &'ast Local) {
465 visit_local(self, i);
466 }
467 #[cfg(any(feature = "derive", feature = "full"))]
468 fn visit_macro(&mut self, i: &'ast Macro) {
469 visit_macro(self, i);
470 }
471 #[cfg(any(feature = "derive", feature = "full"))]
472 fn visit_macro_delimiter(&mut self, i: &'ast MacroDelimiter) {
473 visit_macro_delimiter(self, i);
474 }
475 #[cfg(any(feature = "derive", feature = "full"))]
476 fn visit_member(&mut self, i: &'ast Member) {
477 visit_member(self, i);
478 }
479 #[cfg(any(feature = "derive", feature = "full"))]
480 fn visit_meta(&mut self, i: &'ast Meta) {
481 visit_meta(self, i);
482 }
483 #[cfg(any(feature = "derive", feature = "full"))]
484 fn visit_meta_list(&mut self, i: &'ast MetaList) {
485 visit_meta_list(self, i);
486 }
487 #[cfg(any(feature = "derive", feature = "full"))]
488 fn visit_meta_name_value(&mut self, i: &'ast MetaNameValue) {
489 visit_meta_name_value(self, i);
490 }
491 #[cfg(feature = "full")]
492 fn visit_method_turbofish(&mut self, i: &'ast MethodTurbofish) {
493 visit_method_turbofish(self, i);
494 }
495 #[cfg(any(feature = "derive", feature = "full"))]
496 fn visit_nested_meta(&mut self, i: &'ast NestedMeta) {
497 visit_nested_meta(self, i);
498 }
499 #[cfg(any(feature = "derive", feature = "full"))]
500 fn visit_parenthesized_generic_arguments(
501 &mut self,
502 i: &'ast ParenthesizedGenericArguments,
503 ) {
504 visit_parenthesized_generic_arguments(self, i);
505 }
506 #[cfg(feature = "full")]
507 fn visit_pat(&mut self, i: &'ast Pat) {
508 visit_pat(self, i);
509 }
510 #[cfg(feature = "full")]
511 fn visit_pat_box(&mut self, i: &'ast PatBox) {
512 visit_pat_box(self, i);
513 }
514 #[cfg(feature = "full")]
515 fn visit_pat_ident(&mut self, i: &'ast PatIdent) {
516 visit_pat_ident(self, i);
517 }
518 #[cfg(feature = "full")]
519 fn visit_pat_lit(&mut self, i: &'ast PatLit) {
520 visit_pat_lit(self, i);
521 }
522 #[cfg(feature = "full")]
523 fn visit_pat_macro(&mut self, i: &'ast PatMacro) {
524 visit_pat_macro(self, i);
525 }
526 #[cfg(feature = "full")]
527 fn visit_pat_or(&mut self, i: &'ast PatOr) {
528 visit_pat_or(self, i);
529 }
530 #[cfg(feature = "full")]
531 fn visit_pat_path(&mut self, i: &'ast PatPath) {
532 visit_pat_path(self, i);
533 }
534 #[cfg(feature = "full")]
535 fn visit_pat_range(&mut self, i: &'ast PatRange) {
536 visit_pat_range(self, i);
537 }
538 #[cfg(feature = "full")]
539 fn visit_pat_reference(&mut self, i: &'ast PatReference) {
540 visit_pat_reference(self, i);
541 }
542 #[cfg(feature = "full")]
543 fn visit_pat_rest(&mut self, i: &'ast PatRest) {
544 visit_pat_rest(self, i);
545 }
546 #[cfg(feature = "full")]
547 fn visit_pat_slice(&mut self, i: &'ast PatSlice) {
548 visit_pat_slice(self, i);
549 }
550 #[cfg(feature = "full")]
551 fn visit_pat_struct(&mut self, i: &'ast PatStruct) {
552 visit_pat_struct(self, i);
553 }
554 #[cfg(feature = "full")]
555 fn visit_pat_tuple(&mut self, i: &'ast PatTuple) {
556 visit_pat_tuple(self, i);
557 }
558 #[cfg(feature = "full")]
559 fn visit_pat_tuple_struct(&mut self, i: &'ast PatTupleStruct) {
560 visit_pat_tuple_struct(self, i);
561 }
562 #[cfg(feature = "full")]
563 fn visit_pat_type(&mut self, i: &'ast PatType) {
564 visit_pat_type(self, i);
565 }
566 #[cfg(feature = "full")]
567 fn visit_pat_wild(&mut self, i: &'ast PatWild) {
568 visit_pat_wild(self, i);
569 }
570 #[cfg(any(feature = "derive", feature = "full"))]
571 fn visit_path(&mut self, i: &'ast Path) {
572 visit_path(self, i);
573 }
574 #[cfg(any(feature = "derive", feature = "full"))]
575 fn visit_path_arguments(&mut self, i: &'ast PathArguments) {
576 visit_path_arguments(self, i);
577 }
578 #[cfg(any(feature = "derive", feature = "full"))]
579 fn visit_path_segment(&mut self, i: &'ast PathSegment) {
580 visit_path_segment(self, i);
581 }
582 #[cfg(any(feature = "derive", feature = "full"))]
583 fn visit_predicate_eq(&mut self, i: &'ast PredicateEq) {
584 visit_predicate_eq(self, i);
585 }
586 #[cfg(any(feature = "derive", feature = "full"))]
587 fn visit_predicate_lifetime(&mut self, i: &'ast PredicateLifetime) {
588 visit_predicate_lifetime(self, i);
589 }
590 #[cfg(any(feature = "derive", feature = "full"))]
591 fn visit_predicate_type(&mut self, i: &'ast PredicateType) {
592 visit_predicate_type(self, i);
593 }
594 #[cfg(any(feature = "derive", feature = "full"))]
595 fn visit_qself(&mut self, i: &'ast QSelf) {
596 visit_qself(self, i);
597 }
598 #[cfg(feature = "full")]
599 fn visit_range_limits(&mut self, i: &'ast RangeLimits) {
600 visit_range_limits(self, i);
601 }
602 #[cfg(feature = "full")]
603 fn visit_receiver(&mut self, i: &'ast Receiver) {
604 visit_receiver(self, i);
605 }
606 #[cfg(any(feature = "derive", feature = "full"))]
607 fn visit_return_type(&mut self, i: &'ast ReturnType) {
608 visit_return_type(self, i);
609 }
610 #[cfg(feature = "full")]
611 fn visit_signature(&mut self, i: &'ast Signature) {
612 visit_signature(self, i);
613 }
614 fn visit_span(&mut self, i: &Span) {
615 visit_span(self, i);
616 }
617 #[cfg(feature = "full")]
618 fn visit_stmt(&mut self, i: &'ast Stmt) {
619 visit_stmt(self, i);
620 }
621 #[cfg(any(feature = "derive", feature = "full"))]
622 fn visit_trait_bound(&mut self, i: &'ast TraitBound) {
623 visit_trait_bound(self, i);
624 }
625 #[cfg(any(feature = "derive", feature = "full"))]
626 fn visit_trait_bound_modifier(&mut self, i: &'ast TraitBoundModifier) {
627 visit_trait_bound_modifier(self, i);
628 }
629 #[cfg(feature = "full")]
630 fn visit_trait_item(&mut self, i: &'ast TraitItem) {
631 visit_trait_item(self, i);
632 }
633 #[cfg(feature = "full")]
634 fn visit_trait_item_const(&mut self, i: &'ast TraitItemConst) {
635 visit_trait_item_const(self, i);
636 }
637 #[cfg(feature = "full")]
638 fn visit_trait_item_macro(&mut self, i: &'ast TraitItemMacro) {
639 visit_trait_item_macro(self, i);
640 }
641 #[cfg(feature = "full")]
642 fn visit_trait_item_method(&mut self, i: &'ast TraitItemMethod) {
643 visit_trait_item_method(self, i);
644 }
645 #[cfg(feature = "full")]
646 fn visit_trait_item_type(&mut self, i: &'ast TraitItemType) {
647 visit_trait_item_type(self, i);
648 }
649 #[cfg(any(feature = "derive", feature = "full"))]
650 fn visit_type(&mut self, i: &'ast Type) {
651 visit_type(self, i);
652 }
653 #[cfg(any(feature = "derive", feature = "full"))]
654 fn visit_type_array(&mut self, i: &'ast TypeArray) {
655 visit_type_array(self, i);
656 }
657 #[cfg(any(feature = "derive", feature = "full"))]
658 fn visit_type_bare_fn(&mut self, i: &'ast TypeBareFn) {
659 visit_type_bare_fn(self, i);
660 }
661 #[cfg(any(feature = "derive", feature = "full"))]
662 fn visit_type_group(&mut self, i: &'ast TypeGroup) {
663 visit_type_group(self, i);
664 }
665 #[cfg(any(feature = "derive", feature = "full"))]
666 fn visit_type_impl_trait(&mut self, i: &'ast TypeImplTrait) {
667 visit_type_impl_trait(self, i);
668 }
669 #[cfg(any(feature = "derive", feature = "full"))]
670 fn visit_type_infer(&mut self, i: &'ast TypeInfer) {
671 visit_type_infer(self, i);
672 }
673 #[cfg(any(feature = "derive", feature = "full"))]
674 fn visit_type_macro(&mut self, i: &'ast TypeMacro) {
675 visit_type_macro(self, i);
676 }
677 #[cfg(any(feature = "derive", feature = "full"))]
678 fn visit_type_never(&mut self, i: &'ast TypeNever) {
679 visit_type_never(self, i);
680 }
681 #[cfg(any(feature = "derive", feature = "full"))]
682 fn visit_type_param(&mut self, i: &'ast TypeParam) {
683 visit_type_param(self, i);
684 }
685 #[cfg(any(feature = "derive", feature = "full"))]
686 fn visit_type_param_bound(&mut self, i: &'ast TypeParamBound) {
687 visit_type_param_bound(self, i);
688 }
689 #[cfg(any(feature = "derive", feature = "full"))]
690 fn visit_type_paren(&mut self, i: &'ast TypeParen) {
691 visit_type_paren(self, i);
692 }
693 #[cfg(any(feature = "derive", feature = "full"))]
694 fn visit_type_path(&mut self, i: &'ast TypePath) {
695 visit_type_path(self, i);
696 }
697 #[cfg(any(feature = "derive", feature = "full"))]
698 fn visit_type_ptr(&mut self, i: &'ast TypePtr) {
699 visit_type_ptr(self, i);
700 }
701 #[cfg(any(feature = "derive", feature = "full"))]
702 fn visit_type_reference(&mut self, i: &'ast TypeReference) {
703 visit_type_reference(self, i);
704 }
705 #[cfg(any(feature = "derive", feature = "full"))]
706 fn visit_type_slice(&mut self, i: &'ast TypeSlice) {
707 visit_type_slice(self, i);
708 }
709 #[cfg(any(feature = "derive", feature = "full"))]
710 fn visit_type_trait_object(&mut self, i: &'ast TypeTraitObject) {
711 visit_type_trait_object(self, i);
712 }
713 #[cfg(any(feature = "derive", feature = "full"))]
714 fn visit_type_tuple(&mut self, i: &'ast TypeTuple) {
715 visit_type_tuple(self, i);
716 }
717 #[cfg(any(feature = "derive", feature = "full"))]
718 fn visit_un_op(&mut self, i: &'ast UnOp) {
719 visit_un_op(self, i);
720 }
721 #[cfg(feature = "full")]
722 fn visit_use_glob(&mut self, i: &'ast UseGlob) {
723 visit_use_glob(self, i);
724 }
725 #[cfg(feature = "full")]
726 fn visit_use_group(&mut self, i: &'ast UseGroup) {
727 visit_use_group(self, i);
728 }
729 #[cfg(feature = "full")]
730 fn visit_use_name(&mut self, i: &'ast UseName) {
731 visit_use_name(self, i);
732 }
733 #[cfg(feature = "full")]
734 fn visit_use_path(&mut self, i: &'ast UsePath) {
735 visit_use_path(self, i);
736 }
737 #[cfg(feature = "full")]
738 fn visit_use_rename(&mut self, i: &'ast UseRename) {
739 visit_use_rename(self, i);
740 }
741 #[cfg(feature = "full")]
742 fn visit_use_tree(&mut self, i: &'ast UseTree) {
743 visit_use_tree(self, i);
744 }
745 #[cfg(any(feature = "derive", feature = "full"))]
746 fn visit_variadic(&mut self, i: &'ast Variadic) {
747 visit_variadic(self, i);
748 }
749 #[cfg(any(feature = "derive", feature = "full"))]
750 fn visit_variant(&mut self, i: &'ast Variant) {
751 visit_variant(self, i);
752 }
753 #[cfg(any(feature = "derive", feature = "full"))]
754 fn visit_vis_crate(&mut self, i: &'ast VisCrate) {
755 visit_vis_crate(self, i);
756 }
757 #[cfg(any(feature = "derive", feature = "full"))]
758 fn visit_vis_public(&mut self, i: &'ast VisPublic) {
759 visit_vis_public(self, i);
760 }
761 #[cfg(any(feature = "derive", feature = "full"))]
762 fn visit_vis_restricted(&mut self, i: &'ast VisRestricted) {
763 visit_vis_restricted(self, i);
764 }
765 #[cfg(any(feature = "derive", feature = "full"))]
766 fn visit_visibility(&mut self, i: &'ast Visibility) {
767 visit_visibility(self, i);
768 }
769 #[cfg(any(feature = "derive", feature = "full"))]
770 fn visit_where_clause(&mut self, i: &'ast WhereClause) {
771 visit_where_clause(self, i);
772 }
773 #[cfg(any(feature = "derive", feature = "full"))]
774 fn visit_where_predicate(&mut self, i: &'ast WherePredicate) {
775 visit_where_predicate(self, i);
776 }
777}
778#[cfg(any(feature = "derive", feature = "full"))]
779pub fn visit_abi<'ast, V>(v: &mut V, node: &'ast Abi)
780where
781 V: Visit<'ast> + ?Sized,
782{
783 tokens_helper(visitor:v, &node.extern_token.span);
784 if let Some(it: &LitStr) = &node.name {
785 v.visit_lit_str(it);
786 }
787}
788#[cfg(any(feature = "derive", feature = "full"))]
789pub fn visit_angle_bracketed_generic_arguments<'ast, V>(
790 v: &mut V,
791 node: &'ast AngleBracketedGenericArguments,
792)
793where
794 V: Visit<'ast> + ?Sized,
795{
796 if let Some(it: &Colon2) = &node.colon2_token {
797 tokens_helper(visitor:v, &it.spans);
798 }
799 tokens_helper(visitor:v, &node.lt_token.spans);
800 for el: Pair<&GenericArgument, &Comma> in Punctuated::pairs(&node.args) {
801 let (it: &GenericArgument, p: Option<&Comma>) = el.into_tuple();
802 v.visit_generic_argument(it);
803 if let Some(p: &Comma) = p {
804 tokens_helper(visitor:v, &p.spans);
805 }
806 }
807 tokens_helper(visitor:v, &node.gt_token.spans);
808}
809#[cfg(feature = "full")]
810pub fn visit_arm<'ast, V>(v: &mut V, node: &'ast Arm)
811where
812 V: Visit<'ast> + ?Sized,
813{
814 for it: &Attribute in &node.attrs {
815 v.visit_attribute(it);
816 }
817 v.visit_pat(&node.pat);
818 if let Some(it: &(If, Box)) = &node.guard {
819 tokens_helper(visitor:v, &(it).0.span);
820 v.visit_expr(&*(it).1);
821 }
822 tokens_helper(visitor:v, &node.fat_arrow_token.spans);
823 v.visit_expr(&*node.body);
824 if let Some(it: &Comma) = &node.comma {
825 tokens_helper(visitor:v, &it.spans);
826 }
827}
828#[cfg(any(feature = "derive", feature = "full"))]
829pub fn visit_attr_style<'ast, V>(v: &mut V, node: &'ast AttrStyle)
830where
831 V: Visit<'ast> + ?Sized,
832{
833 match node {
834 AttrStyle::Outer => {}
835 AttrStyle::Inner(_binding_0: &Bang) => {
836 tokens_helper(visitor:v, &_binding_0.spans);
837 }
838 }
839}
840#[cfg(any(feature = "derive", feature = "full"))]
841pub fn visit_attribute<'ast, V>(v: &mut V, node: &'ast Attribute)
842where
843 V: Visit<'ast> + ?Sized,
844{
845 tokens_helper(visitor:v, &node.pound_token.spans);
846 v.visit_attr_style(&node.style);
847 tokens_helper(visitor:v, &node.bracket_token.span);
848 v.visit_path(&node.path);
849 skip!(node.tokens);
850}
851#[cfg(any(feature = "derive", feature = "full"))]
852pub fn visit_bare_fn_arg<'ast, V>(v: &mut V, node: &'ast BareFnArg)
853where
854 V: Visit<'ast> + ?Sized,
855{
856 for it: &Attribute in &node.attrs {
857 v.visit_attribute(it);
858 }
859 if let Some(it: &(Ident, Colon)) = &node.name {
860 v.visit_ident(&(it).0);
861 tokens_helper(visitor:v, &(it).1.spans);
862 }
863 v.visit_type(&node.ty);
864}
865#[cfg(any(feature = "derive", feature = "full"))]
866pub fn visit_bin_op<'ast, V>(v: &mut V, node: &'ast BinOp)
867where
868 V: Visit<'ast> + ?Sized,
869{
870 match node {
871 BinOp::Add(_binding_0) => {
872 tokens_helper(v, &_binding_0.spans);
873 }
874 BinOp::Sub(_binding_0) => {
875 tokens_helper(v, &_binding_0.spans);
876 }
877 BinOp::Mul(_binding_0) => {
878 tokens_helper(v, &_binding_0.spans);
879 }
880 BinOp::Div(_binding_0) => {
881 tokens_helper(v, &_binding_0.spans);
882 }
883 BinOp::Rem(_binding_0) => {
884 tokens_helper(v, &_binding_0.spans);
885 }
886 BinOp::And(_binding_0) => {
887 tokens_helper(v, &_binding_0.spans);
888 }
889 BinOp::Or(_binding_0) => {
890 tokens_helper(v, &_binding_0.spans);
891 }
892 BinOp::BitXor(_binding_0) => {
893 tokens_helper(v, &_binding_0.spans);
894 }
895 BinOp::BitAnd(_binding_0) => {
896 tokens_helper(v, &_binding_0.spans);
897 }
898 BinOp::BitOr(_binding_0) => {
899 tokens_helper(v, &_binding_0.spans);
900 }
901 BinOp::Shl(_binding_0) => {
902 tokens_helper(v, &_binding_0.spans);
903 }
904 BinOp::Shr(_binding_0) => {
905 tokens_helper(v, &_binding_0.spans);
906 }
907 BinOp::Eq(_binding_0) => {
908 tokens_helper(v, &_binding_0.spans);
909 }
910 BinOp::Lt(_binding_0) => {
911 tokens_helper(v, &_binding_0.spans);
912 }
913 BinOp::Le(_binding_0) => {
914 tokens_helper(v, &_binding_0.spans);
915 }
916 BinOp::Ne(_binding_0) => {
917 tokens_helper(v, &_binding_0.spans);
918 }
919 BinOp::Ge(_binding_0) => {
920 tokens_helper(v, &_binding_0.spans);
921 }
922 BinOp::Gt(_binding_0) => {
923 tokens_helper(v, &_binding_0.spans);
924 }
925 BinOp::AddEq(_binding_0) => {
926 tokens_helper(v, &_binding_0.spans);
927 }
928 BinOp::SubEq(_binding_0) => {
929 tokens_helper(v, &_binding_0.spans);
930 }
931 BinOp::MulEq(_binding_0) => {
932 tokens_helper(v, &_binding_0.spans);
933 }
934 BinOp::DivEq(_binding_0) => {
935 tokens_helper(v, &_binding_0.spans);
936 }
937 BinOp::RemEq(_binding_0) => {
938 tokens_helper(v, &_binding_0.spans);
939 }
940 BinOp::BitXorEq(_binding_0) => {
941 tokens_helper(v, &_binding_0.spans);
942 }
943 BinOp::BitAndEq(_binding_0) => {
944 tokens_helper(v, &_binding_0.spans);
945 }
946 BinOp::BitOrEq(_binding_0) => {
947 tokens_helper(v, &_binding_0.spans);
948 }
949 BinOp::ShlEq(_binding_0) => {
950 tokens_helper(v, &_binding_0.spans);
951 }
952 BinOp::ShrEq(_binding_0) => {
953 tokens_helper(v, &_binding_0.spans);
954 }
955 }
956}
957#[cfg(any(feature = "derive", feature = "full"))]
958pub fn visit_binding<'ast, V>(v: &mut V, node: &'ast Binding)
959where
960 V: Visit<'ast> + ?Sized,
961{
962 v.visit_ident(&node.ident);
963 tokens_helper(visitor:v, &node.eq_token.spans);
964 v.visit_type(&node.ty);
965}
966#[cfg(feature = "full")]
967pub fn visit_block<'ast, V>(v: &mut V, node: &'ast Block)
968where
969 V: Visit<'ast> + ?Sized,
970{
971 tokens_helper(visitor:v, &node.brace_token.span);
972 for it: &Stmt in &node.stmts {
973 v.visit_stmt(it);
974 }
975}
976#[cfg(any(feature = "derive", feature = "full"))]
977pub fn visit_bound_lifetimes<'ast, V>(v: &mut V, node: &'ast BoundLifetimes)
978where
979 V: Visit<'ast> + ?Sized,
980{
981 tokens_helper(visitor:v, &node.for_token.span);
982 tokens_helper(visitor:v, &node.lt_token.spans);
983 for el: Pair<&LifetimeDef, &Comma> in Punctuated::pairs(&node.lifetimes) {
984 let (it: &LifetimeDef, p: Option<&Comma>) = el.into_tuple();
985 v.visit_lifetime_def(it);
986 if let Some(p: &Comma) = p {
987 tokens_helper(visitor:v, &p.spans);
988 }
989 }
990 tokens_helper(visitor:v, &node.gt_token.spans);
991}
992#[cfg(any(feature = "derive", feature = "full"))]
993pub fn visit_const_param<'ast, V>(v: &mut V, node: &'ast ConstParam)
994where
995 V: Visit<'ast> + ?Sized,
996{
997 for it: &Attribute in &node.attrs {
998 v.visit_attribute(it);
999 }
1000 tokens_helper(visitor:v, &node.const_token.span);
1001 v.visit_ident(&node.ident);
1002 tokens_helper(visitor:v, &node.colon_token.spans);
1003 v.visit_type(&node.ty);
1004 if let Some(it: &Eq) = &node.eq_token {
1005 tokens_helper(visitor:v, &it.spans);
1006 }
1007 if let Some(it: &Expr) = &node.default {
1008 v.visit_expr(it);
1009 }
1010}
1011#[cfg(any(feature = "derive", feature = "full"))]
1012pub fn visit_constraint<'ast, V>(v: &mut V, node: &'ast Constraint)
1013where
1014 V: Visit<'ast> + ?Sized,
1015{
1016 v.visit_ident(&node.ident);
1017 tokens_helper(visitor:v, &node.colon_token.spans);
1018 for el: Pair<&TypeParamBound, &Add> in Punctuated::pairs(&node.bounds) {
1019 let (it: &TypeParamBound, p: Option<&Add>) = el.into_tuple();
1020 v.visit_type_param_bound(it);
1021 if let Some(p: &Add) = p {
1022 tokens_helper(visitor:v, &p.spans);
1023 }
1024 }
1025}
1026#[cfg(feature = "derive")]
1027pub fn visit_data<'ast, V>(v: &mut V, node: &'ast Data)
1028where
1029 V: Visit<'ast> + ?Sized,
1030{
1031 match node {
1032 Data::Struct(_binding_0: &DataStruct) => {
1033 v.visit_data_struct(_binding_0);
1034 }
1035 Data::Enum(_binding_0: &DataEnum) => {
1036 v.visit_data_enum(_binding_0);
1037 }
1038 Data::Union(_binding_0: &DataUnion) => {
1039 v.visit_data_union(_binding_0);
1040 }
1041 }
1042}
1043#[cfg(feature = "derive")]
1044pub fn visit_data_enum<'ast, V>(v: &mut V, node: &'ast DataEnum)
1045where
1046 V: Visit<'ast> + ?Sized,
1047{
1048 tokens_helper(visitor:v, &node.enum_token.span);
1049 tokens_helper(visitor:v, &node.brace_token.span);
1050 for el: Pair<&Variant, &Comma> in Punctuated::pairs(&node.variants) {
1051 let (it: &Variant, p: Option<&Comma>) = el.into_tuple();
1052 v.visit_variant(it);
1053 if let Some(p: &Comma) = p {
1054 tokens_helper(visitor:v, &p.spans);
1055 }
1056 }
1057}
1058#[cfg(feature = "derive")]
1059pub fn visit_data_struct<'ast, V>(v: &mut V, node: &'ast DataStruct)
1060where
1061 V: Visit<'ast> + ?Sized,
1062{
1063 tokens_helper(visitor:v, &node.struct_token.span);
1064 v.visit_fields(&node.fields);
1065 if let Some(it: &Semi) = &node.semi_token {
1066 tokens_helper(visitor:v, &it.spans);
1067 }
1068}
1069#[cfg(feature = "derive")]
1070pub fn visit_data_union<'ast, V>(v: &mut V, node: &'ast DataUnion)
1071where
1072 V: Visit<'ast> + ?Sized,
1073{
1074 tokens_helper(visitor:v, &node.union_token.span);
1075 v.visit_fields_named(&node.fields);
1076}
1077#[cfg(feature = "derive")]
1078pub fn visit_derive_input<'ast, V>(v: &mut V, node: &'ast DeriveInput)
1079where
1080 V: Visit<'ast> + ?Sized,
1081{
1082 for it: &Attribute in &node.attrs {
1083 v.visit_attribute(it);
1084 }
1085 v.visit_visibility(&node.vis);
1086 v.visit_ident(&node.ident);
1087 v.visit_generics(&node.generics);
1088 v.visit_data(&node.data);
1089}
1090#[cfg(any(feature = "derive", feature = "full"))]
1091pub fn visit_expr<'ast, V>(v: &mut V, node: &'ast Expr)
1092where
1093 V: Visit<'ast> + ?Sized,
1094{
1095 match node {
1096 Expr::Array(_binding_0) => {
1097 full!(v.visit_expr_array(_binding_0));
1098 }
1099 Expr::Assign(_binding_0) => {
1100 full!(v.visit_expr_assign(_binding_0));
1101 }
1102 Expr::AssignOp(_binding_0) => {
1103 full!(v.visit_expr_assign_op(_binding_0));
1104 }
1105 Expr::Async(_binding_0) => {
1106 full!(v.visit_expr_async(_binding_0));
1107 }
1108 Expr::Await(_binding_0) => {
1109 full!(v.visit_expr_await(_binding_0));
1110 }
1111 Expr::Binary(_binding_0) => {
1112 v.visit_expr_binary(_binding_0);
1113 }
1114 Expr::Block(_binding_0) => {
1115 full!(v.visit_expr_block(_binding_0));
1116 }
1117 Expr::Box(_binding_0) => {
1118 full!(v.visit_expr_box(_binding_0));
1119 }
1120 Expr::Break(_binding_0) => {
1121 full!(v.visit_expr_break(_binding_0));
1122 }
1123 Expr::Call(_binding_0) => {
1124 v.visit_expr_call(_binding_0);
1125 }
1126 Expr::Cast(_binding_0) => {
1127 v.visit_expr_cast(_binding_0);
1128 }
1129 Expr::Closure(_binding_0) => {
1130 full!(v.visit_expr_closure(_binding_0));
1131 }
1132 Expr::Continue(_binding_0) => {
1133 full!(v.visit_expr_continue(_binding_0));
1134 }
1135 Expr::Field(_binding_0) => {
1136 v.visit_expr_field(_binding_0);
1137 }
1138 Expr::ForLoop(_binding_0) => {
1139 full!(v.visit_expr_for_loop(_binding_0));
1140 }
1141 Expr::Group(_binding_0) => {
1142 full!(v.visit_expr_group(_binding_0));
1143 }
1144 Expr::If(_binding_0) => {
1145 full!(v.visit_expr_if(_binding_0));
1146 }
1147 Expr::Index(_binding_0) => {
1148 v.visit_expr_index(_binding_0);
1149 }
1150 Expr::Let(_binding_0) => {
1151 full!(v.visit_expr_let(_binding_0));
1152 }
1153 Expr::Lit(_binding_0) => {
1154 v.visit_expr_lit(_binding_0);
1155 }
1156 Expr::Loop(_binding_0) => {
1157 full!(v.visit_expr_loop(_binding_0));
1158 }
1159 Expr::Macro(_binding_0) => {
1160 full!(v.visit_expr_macro(_binding_0));
1161 }
1162 Expr::Match(_binding_0) => {
1163 full!(v.visit_expr_match(_binding_0));
1164 }
1165 Expr::MethodCall(_binding_0) => {
1166 full!(v.visit_expr_method_call(_binding_0));
1167 }
1168 Expr::Paren(_binding_0) => {
1169 v.visit_expr_paren(_binding_0);
1170 }
1171 Expr::Path(_binding_0) => {
1172 v.visit_expr_path(_binding_0);
1173 }
1174 Expr::Range(_binding_0) => {
1175 full!(v.visit_expr_range(_binding_0));
1176 }
1177 Expr::Reference(_binding_0) => {
1178 full!(v.visit_expr_reference(_binding_0));
1179 }
1180 Expr::Repeat(_binding_0) => {
1181 full!(v.visit_expr_repeat(_binding_0));
1182 }
1183 Expr::Return(_binding_0) => {
1184 full!(v.visit_expr_return(_binding_0));
1185 }
1186 Expr::Struct(_binding_0) => {
1187 full!(v.visit_expr_struct(_binding_0));
1188 }
1189 Expr::Try(_binding_0) => {
1190 full!(v.visit_expr_try(_binding_0));
1191 }
1192 Expr::TryBlock(_binding_0) => {
1193 full!(v.visit_expr_try_block(_binding_0));
1194 }
1195 Expr::Tuple(_binding_0) => {
1196 full!(v.visit_expr_tuple(_binding_0));
1197 }
1198 Expr::Type(_binding_0) => {
1199 full!(v.visit_expr_type(_binding_0));
1200 }
1201 Expr::Unary(_binding_0) => {
1202 v.visit_expr_unary(_binding_0);
1203 }
1204 Expr::Unsafe(_binding_0) => {
1205 full!(v.visit_expr_unsafe(_binding_0));
1206 }
1207 Expr::Verbatim(_binding_0) => {
1208 skip!(_binding_0);
1209 }
1210 Expr::While(_binding_0) => {
1211 full!(v.visit_expr_while(_binding_0));
1212 }
1213 Expr::Yield(_binding_0) => {
1214 full!(v.visit_expr_yield(_binding_0));
1215 }
1216 #[cfg(syn_no_non_exhaustive)]
1217 _ => unreachable!(),
1218 }
1219}
1220#[cfg(feature = "full")]
1221pub fn visit_expr_array<'ast, V>(v: &mut V, node: &'ast ExprArray)
1222where
1223 V: Visit<'ast> + ?Sized,
1224{
1225 for it: &Attribute in &node.attrs {
1226 v.visit_attribute(it);
1227 }
1228 tokens_helper(visitor:v, &node.bracket_token.span);
1229 for el: Pair<&Expr, &Comma> in Punctuated::pairs(&node.elems) {
1230 let (it: &Expr, p: Option<&Comma>) = el.into_tuple();
1231 v.visit_expr(it);
1232 if let Some(p: &Comma) = p {
1233 tokens_helper(visitor:v, &p.spans);
1234 }
1235 }
1236}
1237#[cfg(feature = "full")]
1238pub fn visit_expr_assign<'ast, V>(v: &mut V, node: &'ast ExprAssign)
1239where
1240 V: Visit<'ast> + ?Sized,
1241{
1242 for it: &Attribute in &node.attrs {
1243 v.visit_attribute(it);
1244 }
1245 v.visit_expr(&*node.left);
1246 tokens_helper(visitor:v, &node.eq_token.spans);
1247 v.visit_expr(&*node.right);
1248}
1249#[cfg(feature = "full")]
1250pub fn visit_expr_assign_op<'ast, V>(v: &mut V, node: &'ast ExprAssignOp)
1251where
1252 V: Visit<'ast> + ?Sized,
1253{
1254 for it: &Attribute in &node.attrs {
1255 v.visit_attribute(it);
1256 }
1257 v.visit_expr(&*node.left);
1258 v.visit_bin_op(&node.op);
1259 v.visit_expr(&*node.right);
1260}
1261#[cfg(feature = "full")]
1262pub fn visit_expr_async<'ast, V>(v: &mut V, node: &'ast ExprAsync)
1263where
1264 V: Visit<'ast> + ?Sized,
1265{
1266 for it: &Attribute in &node.attrs {
1267 v.visit_attribute(it);
1268 }
1269 tokens_helper(visitor:v, &node.async_token.span);
1270 if let Some(it: &Move) = &node.capture {
1271 tokens_helper(visitor:v, &it.span);
1272 }
1273 v.visit_block(&node.block);
1274}
1275#[cfg(feature = "full")]
1276pub fn visit_expr_await<'ast, V>(v: &mut V, node: &'ast ExprAwait)
1277where
1278 V: Visit<'ast> + ?Sized,
1279{
1280 for it: &Attribute in &node.attrs {
1281 v.visit_attribute(it);
1282 }
1283 v.visit_expr(&*node.base);
1284 tokens_helper(visitor:v, &node.dot_token.spans);
1285 tokens_helper(visitor:v, &node.await_token.span);
1286}
1287#[cfg(any(feature = "derive", feature = "full"))]
1288pub fn visit_expr_binary<'ast, V>(v: &mut V, node: &'ast ExprBinary)
1289where
1290 V: Visit<'ast> + ?Sized,
1291{
1292 for it: &Attribute in &node.attrs {
1293 v.visit_attribute(it);
1294 }
1295 v.visit_expr(&*node.left);
1296 v.visit_bin_op(&node.op);
1297 v.visit_expr(&*node.right);
1298}
1299#[cfg(feature = "full")]
1300pub fn visit_expr_block<'ast, V>(v: &mut V, node: &'ast ExprBlock)
1301where
1302 V: Visit<'ast> + ?Sized,
1303{
1304 for it: &Attribute in &node.attrs {
1305 v.visit_attribute(it);
1306 }
1307 if let Some(it: &Label) = &node.label {
1308 v.visit_label(it);
1309 }
1310 v.visit_block(&node.block);
1311}
1312#[cfg(feature = "full")]
1313pub fn visit_expr_box<'ast, V>(v: &mut V, node: &'ast ExprBox)
1314where
1315 V: Visit<'ast> + ?Sized,
1316{
1317 for it: &Attribute in &node.attrs {
1318 v.visit_attribute(it);
1319 }
1320 tokens_helper(visitor:v, &node.box_token.span);
1321 v.visit_expr(&*node.expr);
1322}
1323#[cfg(feature = "full")]
1324pub fn visit_expr_break<'ast, V>(v: &mut V, node: &'ast ExprBreak)
1325where
1326 V: Visit<'ast> + ?Sized,
1327{
1328 for it: &Attribute in &node.attrs {
1329 v.visit_attribute(it);
1330 }
1331 tokens_helper(visitor:v, &node.break_token.span);
1332 if let Some(it: &Lifetime) = &node.label {
1333 v.visit_lifetime(it);
1334 }
1335 if let Some(it: &Box) = &node.expr {
1336 v.visit_expr(&**it);
1337 }
1338}
1339#[cfg(any(feature = "derive", feature = "full"))]
1340pub fn visit_expr_call<'ast, V>(v: &mut V, node: &'ast ExprCall)
1341where
1342 V: Visit<'ast> + ?Sized,
1343{
1344 for it: &Attribute in &node.attrs {
1345 v.visit_attribute(it);
1346 }
1347 v.visit_expr(&*node.func);
1348 tokens_helper(visitor:v, &node.paren_token.span);
1349 for el: Pair<&Expr, &Comma> in Punctuated::pairs(&node.args) {
1350 let (it: &Expr, p: Option<&Comma>) = el.into_tuple();
1351 v.visit_expr(it);
1352 if let Some(p: &Comma) = p {
1353 tokens_helper(visitor:v, &p.spans);
1354 }
1355 }
1356}
1357#[cfg(any(feature = "derive", feature = "full"))]
1358pub fn visit_expr_cast<'ast, V>(v: &mut V, node: &'ast ExprCast)
1359where
1360 V: Visit<'ast> + ?Sized,
1361{
1362 for it: &Attribute in &node.attrs {
1363 v.visit_attribute(it);
1364 }
1365 v.visit_expr(&*node.expr);
1366 tokens_helper(visitor:v, &node.as_token.span);
1367 v.visit_type(&*node.ty);
1368}
1369#[cfg(feature = "full")]
1370pub fn visit_expr_closure<'ast, V>(v: &mut V, node: &'ast ExprClosure)
1371where
1372 V: Visit<'ast> + ?Sized,
1373{
1374 for it in &node.attrs {
1375 v.visit_attribute(it);
1376 }
1377 if let Some(it) = &node.movability {
1378 tokens_helper(v, &it.span);
1379 }
1380 if let Some(it) = &node.asyncness {
1381 tokens_helper(v, &it.span);
1382 }
1383 if let Some(it) = &node.capture {
1384 tokens_helper(v, &it.span);
1385 }
1386 tokens_helper(v, &node.or1_token.spans);
1387 for el in Punctuated::pairs(&node.inputs) {
1388 let (it, p) = el.into_tuple();
1389 v.visit_pat(it);
1390 if let Some(p) = p {
1391 tokens_helper(v, &p.spans);
1392 }
1393 }
1394 tokens_helper(v, &node.or2_token.spans);
1395 v.visit_return_type(&node.output);
1396 v.visit_expr(&*node.body);
1397}
1398#[cfg(feature = "full")]
1399pub fn visit_expr_continue<'ast, V>(v: &mut V, node: &'ast ExprContinue)
1400where
1401 V: Visit<'ast> + ?Sized,
1402{
1403 for it: &Attribute in &node.attrs {
1404 v.visit_attribute(it);
1405 }
1406 tokens_helper(visitor:v, &node.continue_token.span);
1407 if let Some(it: &Lifetime) = &node.label {
1408 v.visit_lifetime(it);
1409 }
1410}
1411#[cfg(any(feature = "derive", feature = "full"))]
1412pub fn visit_expr_field<'ast, V>(v: &mut V, node: &'ast ExprField)
1413where
1414 V: Visit<'ast> + ?Sized,
1415{
1416 for it: &Attribute in &node.attrs {
1417 v.visit_attribute(it);
1418 }
1419 v.visit_expr(&*node.base);
1420 tokens_helper(visitor:v, &node.dot_token.spans);
1421 v.visit_member(&node.member);
1422}
1423#[cfg(feature = "full")]
1424pub fn visit_expr_for_loop<'ast, V>(v: &mut V, node: &'ast ExprForLoop)
1425where
1426 V: Visit<'ast> + ?Sized,
1427{
1428 for it: &Attribute in &node.attrs {
1429 v.visit_attribute(it);
1430 }
1431 if let Some(it: &Label) = &node.label {
1432 v.visit_label(it);
1433 }
1434 tokens_helper(visitor:v, &node.for_token.span);
1435 v.visit_pat(&node.pat);
1436 tokens_helper(visitor:v, &node.in_token.span);
1437 v.visit_expr(&*node.expr);
1438 v.visit_block(&node.body);
1439}
1440#[cfg(feature = "full")]
1441pub fn visit_expr_group<'ast, V>(v: &mut V, node: &'ast ExprGroup)
1442where
1443 V: Visit<'ast> + ?Sized,
1444{
1445 for it: &Attribute in &node.attrs {
1446 v.visit_attribute(it);
1447 }
1448 tokens_helper(visitor:v, &node.group_token.span);
1449 v.visit_expr(&*node.expr);
1450}
1451#[cfg(feature = "full")]
1452pub fn visit_expr_if<'ast, V>(v: &mut V, node: &'ast ExprIf)
1453where
1454 V: Visit<'ast> + ?Sized,
1455{
1456 for it: &Attribute in &node.attrs {
1457 v.visit_attribute(it);
1458 }
1459 tokens_helper(visitor:v, &node.if_token.span);
1460 v.visit_expr(&*node.cond);
1461 v.visit_block(&node.then_branch);
1462 if let Some(it: &(Else, Box)) = &node.else_branch {
1463 tokens_helper(visitor:v, &(it).0.span);
1464 v.visit_expr(&*(it).1);
1465 }
1466}
1467#[cfg(any(feature = "derive", feature = "full"))]
1468pub fn visit_expr_index<'ast, V>(v: &mut V, node: &'ast ExprIndex)
1469where
1470 V: Visit<'ast> + ?Sized,
1471{
1472 for it: &Attribute in &node.attrs {
1473 v.visit_attribute(it);
1474 }
1475 v.visit_expr(&*node.expr);
1476 tokens_helper(visitor:v, &node.bracket_token.span);
1477 v.visit_expr(&*node.index);
1478}
1479#[cfg(feature = "full")]
1480pub fn visit_expr_let<'ast, V>(v: &mut V, node: &'ast ExprLet)
1481where
1482 V: Visit<'ast> + ?Sized,
1483{
1484 for it: &Attribute in &node.attrs {
1485 v.visit_attribute(it);
1486 }
1487 tokens_helper(visitor:v, &node.let_token.span);
1488 v.visit_pat(&node.pat);
1489 tokens_helper(visitor:v, &node.eq_token.spans);
1490 v.visit_expr(&*node.expr);
1491}
1492#[cfg(any(feature = "derive", feature = "full"))]
1493pub fn visit_expr_lit<'ast, V>(v: &mut V, node: &'ast ExprLit)
1494where
1495 V: Visit<'ast> + ?Sized,
1496{
1497 for it: &Attribute in &node.attrs {
1498 v.visit_attribute(it);
1499 }
1500 v.visit_lit(&node.lit);
1501}
1502#[cfg(feature = "full")]
1503pub fn visit_expr_loop<'ast, V>(v: &mut V, node: &'ast ExprLoop)
1504where
1505 V: Visit<'ast> + ?Sized,
1506{
1507 for it: &Attribute in &node.attrs {
1508 v.visit_attribute(it);
1509 }
1510 if let Some(it: &Label) = &node.label {
1511 v.visit_label(it);
1512 }
1513 tokens_helper(visitor:v, &node.loop_token.span);
1514 v.visit_block(&node.body);
1515}
1516#[cfg(feature = "full")]
1517pub fn visit_expr_macro<'ast, V>(v: &mut V, node: &'ast ExprMacro)
1518where
1519 V: Visit<'ast> + ?Sized,
1520{
1521 for it: &Attribute in &node.attrs {
1522 v.visit_attribute(it);
1523 }
1524 v.visit_macro(&node.mac);
1525}
1526#[cfg(feature = "full")]
1527pub fn visit_expr_match<'ast, V>(v: &mut V, node: &'ast ExprMatch)
1528where
1529 V: Visit<'ast> + ?Sized,
1530{
1531 for it: &Attribute in &node.attrs {
1532 v.visit_attribute(it);
1533 }
1534 tokens_helper(visitor:v, &node.match_token.span);
1535 v.visit_expr(&*node.expr);
1536 tokens_helper(visitor:v, &node.brace_token.span);
1537 for it: &Arm in &node.arms {
1538 v.visit_arm(it);
1539 }
1540}
1541#[cfg(feature = "full")]
1542pub fn visit_expr_method_call<'ast, V>(v: &mut V, node: &'ast ExprMethodCall)
1543where
1544 V: Visit<'ast> + ?Sized,
1545{
1546 for it: &Attribute in &node.attrs {
1547 v.visit_attribute(it);
1548 }
1549 v.visit_expr(&*node.receiver);
1550 tokens_helper(visitor:v, &node.dot_token.spans);
1551 v.visit_ident(&node.method);
1552 if let Some(it: &MethodTurbofish) = &node.turbofish {
1553 v.visit_method_turbofish(it);
1554 }
1555 tokens_helper(visitor:v, &node.paren_token.span);
1556 for el: Pair<&Expr, &Comma> in Punctuated::pairs(&node.args) {
1557 let (it: &Expr, p: Option<&Comma>) = el.into_tuple();
1558 v.visit_expr(it);
1559 if let Some(p: &Comma) = p {
1560 tokens_helper(visitor:v, &p.spans);
1561 }
1562 }
1563}
1564#[cfg(any(feature = "derive", feature = "full"))]
1565pub fn visit_expr_paren<'ast, V>(v: &mut V, node: &'ast ExprParen)
1566where
1567 V: Visit<'ast> + ?Sized,
1568{
1569 for it: &Attribute in &node.attrs {
1570 v.visit_attribute(it);
1571 }
1572 tokens_helper(visitor:v, &node.paren_token.span);
1573 v.visit_expr(&*node.expr);
1574}
1575#[cfg(any(feature = "derive", feature = "full"))]
1576pub fn visit_expr_path<'ast, V>(v: &mut V, node: &'ast ExprPath)
1577where
1578 V: Visit<'ast> + ?Sized,
1579{
1580 for it: &Attribute in &node.attrs {
1581 v.visit_attribute(it);
1582 }
1583 if let Some(it: &QSelf) = &node.qself {
1584 v.visit_qself(it);
1585 }
1586 v.visit_path(&node.path);
1587}
1588#[cfg(feature = "full")]
1589pub fn visit_expr_range<'ast, V>(v: &mut V, node: &'ast ExprRange)
1590where
1591 V: Visit<'ast> + ?Sized,
1592{
1593 for it: &Attribute in &node.attrs {
1594 v.visit_attribute(it);
1595 }
1596 if let Some(it: &Box) = &node.from {
1597 v.visit_expr(&**it);
1598 }
1599 v.visit_range_limits(&node.limits);
1600 if let Some(it: &Box) = &node.to {
1601 v.visit_expr(&**it);
1602 }
1603}
1604#[cfg(feature = "full")]
1605pub fn visit_expr_reference<'ast, V>(v: &mut V, node: &'ast ExprReference)
1606where
1607 V: Visit<'ast> + ?Sized,
1608{
1609 for it: &Attribute in &node.attrs {
1610 v.visit_attribute(it);
1611 }
1612 tokens_helper(visitor:v, &node.and_token.spans);
1613 if let Some(it: &Mut) = &node.mutability {
1614 tokens_helper(visitor:v, &it.span);
1615 }
1616 v.visit_expr(&*node.expr);
1617}
1618#[cfg(feature = "full")]
1619pub fn visit_expr_repeat<'ast, V>(v: &mut V, node: &'ast ExprRepeat)
1620where
1621 V: Visit<'ast> + ?Sized,
1622{
1623 for it: &Attribute in &node.attrs {
1624 v.visit_attribute(it);
1625 }
1626 tokens_helper(visitor:v, &node.bracket_token.span);
1627 v.visit_expr(&*node.expr);
1628 tokens_helper(visitor:v, &node.semi_token.spans);
1629 v.visit_expr(&*node.len);
1630}
1631#[cfg(feature = "full")]
1632pub fn visit_expr_return<'ast, V>(v: &mut V, node: &'ast ExprReturn)
1633where
1634 V: Visit<'ast> + ?Sized,
1635{
1636 for it: &Attribute in &node.attrs {
1637 v.visit_attribute(it);
1638 }
1639 tokens_helper(visitor:v, &node.return_token.span);
1640 if let Some(it: &Box) = &node.expr {
1641 v.visit_expr(&**it);
1642 }
1643}
1644#[cfg(feature = "full")]
1645pub fn visit_expr_struct<'ast, V>(v: &mut V, node: &'ast ExprStruct)
1646where
1647 V: Visit<'ast> + ?Sized,
1648{
1649 for it: &Attribute in &node.attrs {
1650 v.visit_attribute(it);
1651 }
1652 v.visit_path(&node.path);
1653 tokens_helper(visitor:v, &node.brace_token.span);
1654 for el: Pair<&FieldValue, &Comma> in Punctuated::pairs(&node.fields) {
1655 let (it: &FieldValue, p: Option<&Comma>) = el.into_tuple();
1656 v.visit_field_value(it);
1657 if let Some(p: &Comma) = p {
1658 tokens_helper(visitor:v, &p.spans);
1659 }
1660 }
1661 if let Some(it: &Dot2) = &node.dot2_token {
1662 tokens_helper(visitor:v, &it.spans);
1663 }
1664 if let Some(it: &Box) = &node.rest {
1665 v.visit_expr(&**it);
1666 }
1667}
1668#[cfg(feature = "full")]
1669pub fn visit_expr_try<'ast, V>(v: &mut V, node: &'ast ExprTry)
1670where
1671 V: Visit<'ast> + ?Sized,
1672{
1673 for it: &Attribute in &node.attrs {
1674 v.visit_attribute(it);
1675 }
1676 v.visit_expr(&*node.expr);
1677 tokens_helper(visitor:v, &node.question_token.spans);
1678}
1679#[cfg(feature = "full")]
1680pub fn visit_expr_try_block<'ast, V>(v: &mut V, node: &'ast ExprTryBlock)
1681where
1682 V: Visit<'ast> + ?Sized,
1683{
1684 for it: &Attribute in &node.attrs {
1685 v.visit_attribute(it);
1686 }
1687 tokens_helper(visitor:v, &node.try_token.span);
1688 v.visit_block(&node.block);
1689}
1690#[cfg(feature = "full")]
1691pub fn visit_expr_tuple<'ast, V>(v: &mut V, node: &'ast ExprTuple)
1692where
1693 V: Visit<'ast> + ?Sized,
1694{
1695 for it: &Attribute in &node.attrs {
1696 v.visit_attribute(it);
1697 }
1698 tokens_helper(visitor:v, &node.paren_token.span);
1699 for el: Pair<&Expr, &Comma> in Punctuated::pairs(&node.elems) {
1700 let (it: &Expr, p: Option<&Comma>) = el.into_tuple();
1701 v.visit_expr(it);
1702 if let Some(p: &Comma) = p {
1703 tokens_helper(visitor:v, &p.spans);
1704 }
1705 }
1706}
1707#[cfg(feature = "full")]
1708pub fn visit_expr_type<'ast, V>(v: &mut V, node: &'ast ExprType)
1709where
1710 V: Visit<'ast> + ?Sized,
1711{
1712 for it: &Attribute in &node.attrs {
1713 v.visit_attribute(it);
1714 }
1715 v.visit_expr(&*node.expr);
1716 tokens_helper(visitor:v, &node.colon_token.spans);
1717 v.visit_type(&*node.ty);
1718}
1719#[cfg(any(feature = "derive", feature = "full"))]
1720pub fn visit_expr_unary<'ast, V>(v: &mut V, node: &'ast ExprUnary)
1721where
1722 V: Visit<'ast> + ?Sized,
1723{
1724 for it: &Attribute in &node.attrs {
1725 v.visit_attribute(it);
1726 }
1727 v.visit_un_op(&node.op);
1728 v.visit_expr(&*node.expr);
1729}
1730#[cfg(feature = "full")]
1731pub fn visit_expr_unsafe<'ast, V>(v: &mut V, node: &'ast ExprUnsafe)
1732where
1733 V: Visit<'ast> + ?Sized,
1734{
1735 for it: &Attribute in &node.attrs {
1736 v.visit_attribute(it);
1737 }
1738 tokens_helper(visitor:v, &node.unsafe_token.span);
1739 v.visit_block(&node.block);
1740}
1741#[cfg(feature = "full")]
1742pub fn visit_expr_while<'ast, V>(v: &mut V, node: &'ast ExprWhile)
1743where
1744 V: Visit<'ast> + ?Sized,
1745{
1746 for it: &Attribute in &node.attrs {
1747 v.visit_attribute(it);
1748 }
1749 if let Some(it: &Label) = &node.label {
1750 v.visit_label(it);
1751 }
1752 tokens_helper(visitor:v, &node.while_token.span);
1753 v.visit_expr(&*node.cond);
1754 v.visit_block(&node.body);
1755}
1756#[cfg(feature = "full")]
1757pub fn visit_expr_yield<'ast, V>(v: &mut V, node: &'ast ExprYield)
1758where
1759 V: Visit<'ast> + ?Sized,
1760{
1761 for it: &Attribute in &node.attrs {
1762 v.visit_attribute(it);
1763 }
1764 tokens_helper(visitor:v, &node.yield_token.span);
1765 if let Some(it: &Box) = &node.expr {
1766 v.visit_expr(&**it);
1767 }
1768}
1769#[cfg(any(feature = "derive", feature = "full"))]
1770pub fn visit_field<'ast, V>(v: &mut V, node: &'ast Field)
1771where
1772 V: Visit<'ast> + ?Sized,
1773{
1774 for it: &Attribute in &node.attrs {
1775 v.visit_attribute(it);
1776 }
1777 v.visit_visibility(&node.vis);
1778 if let Some(it: &Ident) = &node.ident {
1779 v.visit_ident(it);
1780 }
1781 if let Some(it: &Colon) = &node.colon_token {
1782 tokens_helper(visitor:v, &it.spans);
1783 }
1784 v.visit_type(&node.ty);
1785}
1786#[cfg(feature = "full")]
1787pub fn visit_field_pat<'ast, V>(v: &mut V, node: &'ast FieldPat)
1788where
1789 V: Visit<'ast> + ?Sized,
1790{
1791 for it: &Attribute in &node.attrs {
1792 v.visit_attribute(it);
1793 }
1794 v.visit_member(&node.member);
1795 if let Some(it: &Colon) = &node.colon_token {
1796 tokens_helper(visitor:v, &it.spans);
1797 }
1798 v.visit_pat(&*node.pat);
1799}
1800#[cfg(feature = "full")]
1801pub fn visit_field_value<'ast, V>(v: &mut V, node: &'ast FieldValue)
1802where
1803 V: Visit<'ast> + ?Sized,
1804{
1805 for it: &Attribute in &node.attrs {
1806 v.visit_attribute(it);
1807 }
1808 v.visit_member(&node.member);
1809 if let Some(it: &Colon) = &node.colon_token {
1810 tokens_helper(visitor:v, &it.spans);
1811 }
1812 v.visit_expr(&node.expr);
1813}
1814#[cfg(any(feature = "derive", feature = "full"))]
1815pub fn visit_fields<'ast, V>(v: &mut V, node: &'ast Fields)
1816where
1817 V: Visit<'ast> + ?Sized,
1818{
1819 match node {
1820 Fields::Named(_binding_0: &FieldsNamed) => {
1821 v.visit_fields_named(_binding_0);
1822 }
1823 Fields::Unnamed(_binding_0: &FieldsUnnamed) => {
1824 v.visit_fields_unnamed(_binding_0);
1825 }
1826 Fields::Unit => {}
1827 }
1828}
1829#[cfg(any(feature = "derive", feature = "full"))]
1830pub fn visit_fields_named<'ast, V>(v: &mut V, node: &'ast FieldsNamed)
1831where
1832 V: Visit<'ast> + ?Sized,
1833{
1834 tokens_helper(visitor:v, &node.brace_token.span);
1835 for el: Pair<&Field, &Comma> in Punctuated::pairs(&node.named) {
1836 let (it: &Field, p: Option<&Comma>) = el.into_tuple();
1837 v.visit_field(it);
1838 if let Some(p: &Comma) = p {
1839 tokens_helper(visitor:v, &p.spans);
1840 }
1841 }
1842}
1843#[cfg(any(feature = "derive", feature = "full"))]
1844pub fn visit_fields_unnamed<'ast, V>(v: &mut V, node: &'ast FieldsUnnamed)
1845where
1846 V: Visit<'ast> + ?Sized,
1847{
1848 tokens_helper(visitor:v, &node.paren_token.span);
1849 for el: Pair<&Field, &Comma> in Punctuated::pairs(&node.unnamed) {
1850 let (it: &Field, p: Option<&Comma>) = el.into_tuple();
1851 v.visit_field(it);
1852 if let Some(p: &Comma) = p {
1853 tokens_helper(visitor:v, &p.spans);
1854 }
1855 }
1856}
1857#[cfg(feature = "full")]
1858pub fn visit_file<'ast, V>(v: &mut V, node: &'ast File)
1859where
1860 V: Visit<'ast> + ?Sized,
1861{
1862 skip!(node.shebang);
1863 for it: &Attribute in &node.attrs {
1864 v.visit_attribute(it);
1865 }
1866 for it: &Item in &node.items {
1867 v.visit_item(it);
1868 }
1869}
1870#[cfg(feature = "full")]
1871pub fn visit_fn_arg<'ast, V>(v: &mut V, node: &'ast FnArg)
1872where
1873 V: Visit<'ast> + ?Sized,
1874{
1875 match node {
1876 FnArg::Receiver(_binding_0: &Receiver) => {
1877 v.visit_receiver(_binding_0);
1878 }
1879 FnArg::Typed(_binding_0: &PatType) => {
1880 v.visit_pat_type(_binding_0);
1881 }
1882 }
1883}
1884#[cfg(feature = "full")]
1885pub fn visit_foreign_item<'ast, V>(v: &mut V, node: &'ast ForeignItem)
1886where
1887 V: Visit<'ast> + ?Sized,
1888{
1889 match node {
1890 ForeignItem::Fn(_binding_0: &ForeignItemFn) => {
1891 v.visit_foreign_item_fn(_binding_0);
1892 }
1893 ForeignItem::Static(_binding_0: &ForeignItemStatic) => {
1894 v.visit_foreign_item_static(_binding_0);
1895 }
1896 ForeignItem::Type(_binding_0: &ForeignItemType) => {
1897 v.visit_foreign_item_type(_binding_0);
1898 }
1899 ForeignItem::Macro(_binding_0: &ForeignItemMacro) => {
1900 v.visit_foreign_item_macro(_binding_0);
1901 }
1902 ForeignItem::Verbatim(_binding_0: &TokenStream) => {
1903 skip!(_binding_0);
1904 }
1905 #[cfg(syn_no_non_exhaustive)]
1906 _ => unreachable!(),
1907 }
1908}
1909#[cfg(feature = "full")]
1910pub fn visit_foreign_item_fn<'ast, V>(v: &mut V, node: &'ast ForeignItemFn)
1911where
1912 V: Visit<'ast> + ?Sized,
1913{
1914 for it: &Attribute in &node.attrs {
1915 v.visit_attribute(it);
1916 }
1917 v.visit_visibility(&node.vis);
1918 v.visit_signature(&node.sig);
1919 tokens_helper(visitor:v, &node.semi_token.spans);
1920}
1921#[cfg(feature = "full")]
1922pub fn visit_foreign_item_macro<'ast, V>(v: &mut V, node: &'ast ForeignItemMacro)
1923where
1924 V: Visit<'ast> + ?Sized,
1925{
1926 for it: &Attribute in &node.attrs {
1927 v.visit_attribute(it);
1928 }
1929 v.visit_macro(&node.mac);
1930 if let Some(it: &Semi) = &node.semi_token {
1931 tokens_helper(visitor:v, &it.spans);
1932 }
1933}
1934#[cfg(feature = "full")]
1935pub fn visit_foreign_item_static<'ast, V>(v: &mut V, node: &'ast ForeignItemStatic)
1936where
1937 V: Visit<'ast> + ?Sized,
1938{
1939 for it: &Attribute in &node.attrs {
1940 v.visit_attribute(it);
1941 }
1942 v.visit_visibility(&node.vis);
1943 tokens_helper(visitor:v, &node.static_token.span);
1944 if let Some(it: &Mut) = &node.mutability {
1945 tokens_helper(visitor:v, &it.span);
1946 }
1947 v.visit_ident(&node.ident);
1948 tokens_helper(visitor:v, &node.colon_token.spans);
1949 v.visit_type(&*node.ty);
1950 tokens_helper(visitor:v, &node.semi_token.spans);
1951}
1952#[cfg(feature = "full")]
1953pub fn visit_foreign_item_type<'ast, V>(v: &mut V, node: &'ast ForeignItemType)
1954where
1955 V: Visit<'ast> + ?Sized,
1956{
1957 for it: &Attribute in &node.attrs {
1958 v.visit_attribute(it);
1959 }
1960 v.visit_visibility(&node.vis);
1961 tokens_helper(visitor:v, &node.type_token.span);
1962 v.visit_ident(&node.ident);
1963 tokens_helper(visitor:v, &node.semi_token.spans);
1964}
1965#[cfg(any(feature = "derive", feature = "full"))]
1966pub fn visit_generic_argument<'ast, V>(v: &mut V, node: &'ast GenericArgument)
1967where
1968 V: Visit<'ast> + ?Sized,
1969{
1970 match node {
1971 GenericArgument::Lifetime(_binding_0: &Lifetime) => {
1972 v.visit_lifetime(_binding_0);
1973 }
1974 GenericArgument::Type(_binding_0: &Type) => {
1975 v.visit_type(_binding_0);
1976 }
1977 GenericArgument::Const(_binding_0: &Expr) => {
1978 v.visit_expr(_binding_0);
1979 }
1980 GenericArgument::Binding(_binding_0: &Binding) => {
1981 v.visit_binding(_binding_0);
1982 }
1983 GenericArgument::Constraint(_binding_0: &Constraint) => {
1984 v.visit_constraint(_binding_0);
1985 }
1986 }
1987}
1988#[cfg(feature = "full")]
1989pub fn visit_generic_method_argument<'ast, V>(
1990 v: &mut V,
1991 node: &'ast GenericMethodArgument,
1992)
1993where
1994 V: Visit<'ast> + ?Sized,
1995{
1996 match node {
1997 GenericMethodArgument::Type(_binding_0: &Type) => {
1998 v.visit_type(_binding_0);
1999 }
2000 GenericMethodArgument::Const(_binding_0: &Expr) => {
2001 v.visit_expr(_binding_0);
2002 }
2003 }
2004}
2005#[cfg(any(feature = "derive", feature = "full"))]
2006pub fn visit_generic_param<'ast, V>(v: &mut V, node: &'ast GenericParam)
2007where
2008 V: Visit<'ast> + ?Sized,
2009{
2010 match node {
2011 GenericParam::Type(_binding_0: &TypeParam) => {
2012 v.visit_type_param(_binding_0);
2013 }
2014 GenericParam::Lifetime(_binding_0: &LifetimeDef) => {
2015 v.visit_lifetime_def(_binding_0);
2016 }
2017 GenericParam::Const(_binding_0: &ConstParam) => {
2018 v.visit_const_param(_binding_0);
2019 }
2020 }
2021}
2022#[cfg(any(feature = "derive", feature = "full"))]
2023pub fn visit_generics<'ast, V>(v: &mut V, node: &'ast Generics)
2024where
2025 V: Visit<'ast> + ?Sized,
2026{
2027 if let Some(it: &Lt) = &node.lt_token {
2028 tokens_helper(visitor:v, &it.spans);
2029 }
2030 for el: Pair<&GenericParam, &Comma> in Punctuated::pairs(&node.params) {
2031 let (it: &GenericParam, p: Option<&Comma>) = el.into_tuple();
2032 v.visit_generic_param(it);
2033 if let Some(p: &Comma) = p {
2034 tokens_helper(visitor:v, &p.spans);
2035 }
2036 }
2037 if let Some(it: &Gt) = &node.gt_token {
2038 tokens_helper(visitor:v, &it.spans);
2039 }
2040 if let Some(it: &WhereClause) = &node.where_clause {
2041 v.visit_where_clause(it);
2042 }
2043}
2044pub fn visit_ident<'ast, V>(v: &mut V, node: &'ast Ident)
2045where
2046 V: Visit<'ast> + ?Sized,
2047{
2048 v.visit_span(&node.span());
2049}
2050#[cfg(feature = "full")]
2051pub fn visit_impl_item<'ast, V>(v: &mut V, node: &'ast ImplItem)
2052where
2053 V: Visit<'ast> + ?Sized,
2054{
2055 match node {
2056 ImplItem::Const(_binding_0: &ImplItemConst) => {
2057 v.visit_impl_item_const(_binding_0);
2058 }
2059 ImplItem::Method(_binding_0: &ImplItemMethod) => {
2060 v.visit_impl_item_method(_binding_0);
2061 }
2062 ImplItem::Type(_binding_0: &ImplItemType) => {
2063 v.visit_impl_item_type(_binding_0);
2064 }
2065 ImplItem::Macro(_binding_0: &ImplItemMacro) => {
2066 v.visit_impl_item_macro(_binding_0);
2067 }
2068 ImplItem::Verbatim(_binding_0: &TokenStream) => {
2069 skip!(_binding_0);
2070 }
2071 #[cfg(syn_no_non_exhaustive)]
2072 _ => unreachable!(),
2073 }
2074}
2075#[cfg(feature = "full")]
2076pub fn visit_impl_item_const<'ast, V>(v: &mut V, node: &'ast ImplItemConst)
2077where
2078 V: Visit<'ast> + ?Sized,
2079{
2080 for it: &Attribute in &node.attrs {
2081 v.visit_attribute(it);
2082 }
2083 v.visit_visibility(&node.vis);
2084 if let Some(it: &Default) = &node.defaultness {
2085 tokens_helper(visitor:v, &it.span);
2086 }
2087 tokens_helper(visitor:v, &node.const_token.span);
2088 v.visit_ident(&node.ident);
2089 tokens_helper(visitor:v, &node.colon_token.spans);
2090 v.visit_type(&node.ty);
2091 tokens_helper(visitor:v, &node.eq_token.spans);
2092 v.visit_expr(&node.expr);
2093 tokens_helper(visitor:v, &node.semi_token.spans);
2094}
2095#[cfg(feature = "full")]
2096pub fn visit_impl_item_macro<'ast, V>(v: &mut V, node: &'ast ImplItemMacro)
2097where
2098 V: Visit<'ast> + ?Sized,
2099{
2100 for it: &Attribute in &node.attrs {
2101 v.visit_attribute(it);
2102 }
2103 v.visit_macro(&node.mac);
2104 if let Some(it: &Semi) = &node.semi_token {
2105 tokens_helper(visitor:v, &it.spans);
2106 }
2107}
2108#[cfg(feature = "full")]
2109pub fn visit_impl_item_method<'ast, V>(v: &mut V, node: &'ast ImplItemMethod)
2110where
2111 V: Visit<'ast> + ?Sized,
2112{
2113 for it: &Attribute in &node.attrs {
2114 v.visit_attribute(it);
2115 }
2116 v.visit_visibility(&node.vis);
2117 if let Some(it: &Default) = &node.defaultness {
2118 tokens_helper(visitor:v, &it.span);
2119 }
2120 v.visit_signature(&node.sig);
2121 v.visit_block(&node.block);
2122}
2123#[cfg(feature = "full")]
2124pub fn visit_impl_item_type<'ast, V>(v: &mut V, node: &'ast ImplItemType)
2125where
2126 V: Visit<'ast> + ?Sized,
2127{
2128 for it: &Attribute in &node.attrs {
2129 v.visit_attribute(it);
2130 }
2131 v.visit_visibility(&node.vis);
2132 if let Some(it: &Default) = &node.defaultness {
2133 tokens_helper(visitor:v, &it.span);
2134 }
2135 tokens_helper(visitor:v, &node.type_token.span);
2136 v.visit_ident(&node.ident);
2137 v.visit_generics(&node.generics);
2138 tokens_helper(visitor:v, &node.eq_token.spans);
2139 v.visit_type(&node.ty);
2140 tokens_helper(visitor:v, &node.semi_token.spans);
2141}
2142#[cfg(any(feature = "derive", feature = "full"))]
2143pub fn visit_index<'ast, V>(v: &mut V, node: &'ast Index)
2144where
2145 V: Visit<'ast> + ?Sized,
2146{
2147 skip!(node.index);
2148 v.visit_span(&node.span);
2149}
2150#[cfg(feature = "full")]
2151pub fn visit_item<'ast, V>(v: &mut V, node: &'ast Item)
2152where
2153 V: Visit<'ast> + ?Sized,
2154{
2155 match node {
2156 Item::Const(_binding_0) => {
2157 v.visit_item_const(_binding_0);
2158 }
2159 Item::Enum(_binding_0) => {
2160 v.visit_item_enum(_binding_0);
2161 }
2162 Item::ExternCrate(_binding_0) => {
2163 v.visit_item_extern_crate(_binding_0);
2164 }
2165 Item::Fn(_binding_0) => {
2166 v.visit_item_fn(_binding_0);
2167 }
2168 Item::ForeignMod(_binding_0) => {
2169 v.visit_item_foreign_mod(_binding_0);
2170 }
2171 Item::Impl(_binding_0) => {
2172 v.visit_item_impl(_binding_0);
2173 }
2174 Item::Macro(_binding_0) => {
2175 v.visit_item_macro(_binding_0);
2176 }
2177 Item::Macro2(_binding_0) => {
2178 v.visit_item_macro2(_binding_0);
2179 }
2180 Item::Mod(_binding_0) => {
2181 v.visit_item_mod(_binding_0);
2182 }
2183 Item::Static(_binding_0) => {
2184 v.visit_item_static(_binding_0);
2185 }
2186 Item::Struct(_binding_0) => {
2187 v.visit_item_struct(_binding_0);
2188 }
2189 Item::Trait(_binding_0) => {
2190 v.visit_item_trait(_binding_0);
2191 }
2192 Item::TraitAlias(_binding_0) => {
2193 v.visit_item_trait_alias(_binding_0);
2194 }
2195 Item::Type(_binding_0) => {
2196 v.visit_item_type(_binding_0);
2197 }
2198 Item::Union(_binding_0) => {
2199 v.visit_item_union(_binding_0);
2200 }
2201 Item::Use(_binding_0) => {
2202 v.visit_item_use(_binding_0);
2203 }
2204 Item::Verbatim(_binding_0) => {
2205 skip!(_binding_0);
2206 }
2207 #[cfg(syn_no_non_exhaustive)]
2208 _ => unreachable!(),
2209 }
2210}
2211#[cfg(feature = "full")]
2212pub fn visit_item_const<'ast, V>(v: &mut V, node: &'ast ItemConst)
2213where
2214 V: Visit<'ast> + ?Sized,
2215{
2216 for it: &Attribute in &node.attrs {
2217 v.visit_attribute(it);
2218 }
2219 v.visit_visibility(&node.vis);
2220 tokens_helper(visitor:v, &node.const_token.span);
2221 v.visit_ident(&node.ident);
2222 tokens_helper(visitor:v, &node.colon_token.spans);
2223 v.visit_type(&*node.ty);
2224 tokens_helper(visitor:v, &node.eq_token.spans);
2225 v.visit_expr(&*node.expr);
2226 tokens_helper(visitor:v, &node.semi_token.spans);
2227}
2228#[cfg(feature = "full")]
2229pub fn visit_item_enum<'ast, V>(v: &mut V, node: &'ast ItemEnum)
2230where
2231 V: Visit<'ast> + ?Sized,
2232{
2233 for it: &Attribute in &node.attrs {
2234 v.visit_attribute(it);
2235 }
2236 v.visit_visibility(&node.vis);
2237 tokens_helper(visitor:v, &node.enum_token.span);
2238 v.visit_ident(&node.ident);
2239 v.visit_generics(&node.generics);
2240 tokens_helper(visitor:v, &node.brace_token.span);
2241 for el: Pair<&Variant, &Comma> in Punctuated::pairs(&node.variants) {
2242 let (it: &Variant, p: Option<&Comma>) = el.into_tuple();
2243 v.visit_variant(it);
2244 if let Some(p: &Comma) = p {
2245 tokens_helper(visitor:v, &p.spans);
2246 }
2247 }
2248}
2249#[cfg(feature = "full")]
2250pub fn visit_item_extern_crate<'ast, V>(v: &mut V, node: &'ast ItemExternCrate)
2251where
2252 V: Visit<'ast> + ?Sized,
2253{
2254 for it: &Attribute in &node.attrs {
2255 v.visit_attribute(it);
2256 }
2257 v.visit_visibility(&node.vis);
2258 tokens_helper(visitor:v, &node.extern_token.span);
2259 tokens_helper(visitor:v, &node.crate_token.span);
2260 v.visit_ident(&node.ident);
2261 if let Some(it: &(As, Ident)) = &node.rename {
2262 tokens_helper(visitor:v, &(it).0.span);
2263 v.visit_ident(&(it).1);
2264 }
2265 tokens_helper(visitor:v, &node.semi_token.spans);
2266}
2267#[cfg(feature = "full")]
2268pub fn visit_item_fn<'ast, V>(v: &mut V, node: &'ast ItemFn)
2269where
2270 V: Visit<'ast> + ?Sized,
2271{
2272 for it: &Attribute in &node.attrs {
2273 v.visit_attribute(it);
2274 }
2275 v.visit_visibility(&node.vis);
2276 v.visit_signature(&node.sig);
2277 v.visit_block(&*node.block);
2278}
2279#[cfg(feature = "full")]
2280pub fn visit_item_foreign_mod<'ast, V>(v: &mut V, node: &'ast ItemForeignMod)
2281where
2282 V: Visit<'ast> + ?Sized,
2283{
2284 for it: &Attribute in &node.attrs {
2285 v.visit_attribute(it);
2286 }
2287 v.visit_abi(&node.abi);
2288 tokens_helper(visitor:v, &node.brace_token.span);
2289 for it: &ForeignItem in &node.items {
2290 v.visit_foreign_item(it);
2291 }
2292}
2293#[cfg(feature = "full")]
2294pub fn visit_item_impl<'ast, V>(v: &mut V, node: &'ast ItemImpl)
2295where
2296 V: Visit<'ast> + ?Sized,
2297{
2298 for it in &node.attrs {
2299 v.visit_attribute(it);
2300 }
2301 if let Some(it) = &node.defaultness {
2302 tokens_helper(v, &it.span);
2303 }
2304 if let Some(it) = &node.unsafety {
2305 tokens_helper(v, &it.span);
2306 }
2307 tokens_helper(v, &node.impl_token.span);
2308 v.visit_generics(&node.generics);
2309 if let Some(it) = &node.trait_ {
2310 if let Some(it) = &(it).0 {
2311 tokens_helper(v, &it.spans);
2312 }
2313 v.visit_path(&(it).1);
2314 tokens_helper(v, &(it).2.span);
2315 }
2316 v.visit_type(&*node.self_ty);
2317 tokens_helper(v, &node.brace_token.span);
2318 for it in &node.items {
2319 v.visit_impl_item(it);
2320 }
2321}
2322#[cfg(feature = "full")]
2323pub fn visit_item_macro<'ast, V>(v: &mut V, node: &'ast ItemMacro)
2324where
2325 V: Visit<'ast> + ?Sized,
2326{
2327 for it: &Attribute in &node.attrs {
2328 v.visit_attribute(it);
2329 }
2330 if let Some(it: &Ident) = &node.ident {
2331 v.visit_ident(it);
2332 }
2333 v.visit_macro(&node.mac);
2334 if let Some(it: &Semi) = &node.semi_token {
2335 tokens_helper(visitor:v, &it.spans);
2336 }
2337}
2338#[cfg(feature = "full")]
2339pub fn visit_item_macro2<'ast, V>(v: &mut V, node: &'ast ItemMacro2)
2340where
2341 V: Visit<'ast> + ?Sized,
2342{
2343 for it: &Attribute in &node.attrs {
2344 v.visit_attribute(it);
2345 }
2346 v.visit_visibility(&node.vis);
2347 tokens_helper(visitor:v, &node.macro_token.span);
2348 v.visit_ident(&node.ident);
2349 skip!(node.rules);
2350}
2351#[cfg(feature = "full")]
2352pub fn visit_item_mod<'ast, V>(v: &mut V, node: &'ast ItemMod)
2353where
2354 V: Visit<'ast> + ?Sized,
2355{
2356 for it: &Attribute in &node.attrs {
2357 v.visit_attribute(it);
2358 }
2359 v.visit_visibility(&node.vis);
2360 tokens_helper(visitor:v, &node.mod_token.span);
2361 v.visit_ident(&node.ident);
2362 if let Some(it: &(Brace, Vec)) = &node.content {
2363 tokens_helper(visitor:v, &(it).0.span);
2364 for it: &Item in &(it).1 {
2365 v.visit_item(it);
2366 }
2367 }
2368 if let Some(it: &Semi) = &node.semi {
2369 tokens_helper(visitor:v, &it.spans);
2370 }
2371}
2372#[cfg(feature = "full")]
2373pub fn visit_item_static<'ast, V>(v: &mut V, node: &'ast ItemStatic)
2374where
2375 V: Visit<'ast> + ?Sized,
2376{
2377 for it: &Attribute in &node.attrs {
2378 v.visit_attribute(it);
2379 }
2380 v.visit_visibility(&node.vis);
2381 tokens_helper(visitor:v, &node.static_token.span);
2382 if let Some(it: &Mut) = &node.mutability {
2383 tokens_helper(visitor:v, &it.span);
2384 }
2385 v.visit_ident(&node.ident);
2386 tokens_helper(visitor:v, &node.colon_token.spans);
2387 v.visit_type(&*node.ty);
2388 tokens_helper(visitor:v, &node.eq_token.spans);
2389 v.visit_expr(&*node.expr);
2390 tokens_helper(visitor:v, &node.semi_token.spans);
2391}
2392#[cfg(feature = "full")]
2393pub fn visit_item_struct<'ast, V>(v: &mut V, node: &'ast ItemStruct)
2394where
2395 V: Visit<'ast> + ?Sized,
2396{
2397 for it: &Attribute in &node.attrs {
2398 v.visit_attribute(it);
2399 }
2400 v.visit_visibility(&node.vis);
2401 tokens_helper(visitor:v, &node.struct_token.span);
2402 v.visit_ident(&node.ident);
2403 v.visit_generics(&node.generics);
2404 v.visit_fields(&node.fields);
2405 if let Some(it: &Semi) = &node.semi_token {
2406 tokens_helper(visitor:v, &it.spans);
2407 }
2408}
2409#[cfg(feature = "full")]
2410pub fn visit_item_trait<'ast, V>(v: &mut V, node: &'ast ItemTrait)
2411where
2412 V: Visit<'ast> + ?Sized,
2413{
2414 for it in &node.attrs {
2415 v.visit_attribute(it);
2416 }
2417 v.visit_visibility(&node.vis);
2418 if let Some(it) = &node.unsafety {
2419 tokens_helper(v, &it.span);
2420 }
2421 if let Some(it) = &node.auto_token {
2422 tokens_helper(v, &it.span);
2423 }
2424 tokens_helper(v, &node.trait_token.span);
2425 v.visit_ident(&node.ident);
2426 v.visit_generics(&node.generics);
2427 if let Some(it) = &node.colon_token {
2428 tokens_helper(v, &it.spans);
2429 }
2430 for el in Punctuated::pairs(&node.supertraits) {
2431 let (it, p) = el.into_tuple();
2432 v.visit_type_param_bound(it);
2433 if let Some(p) = p {
2434 tokens_helper(v, &p.spans);
2435 }
2436 }
2437 tokens_helper(v, &node.brace_token.span);
2438 for it in &node.items {
2439 v.visit_trait_item(it);
2440 }
2441}
2442#[cfg(feature = "full")]
2443pub fn visit_item_trait_alias<'ast, V>(v: &mut V, node: &'ast ItemTraitAlias)
2444where
2445 V: Visit<'ast> + ?Sized,
2446{
2447 for it: &Attribute in &node.attrs {
2448 v.visit_attribute(it);
2449 }
2450 v.visit_visibility(&node.vis);
2451 tokens_helper(visitor:v, &node.trait_token.span);
2452 v.visit_ident(&node.ident);
2453 v.visit_generics(&node.generics);
2454 tokens_helper(visitor:v, &node.eq_token.spans);
2455 for el: Pair<&TypeParamBound, &Add> in Punctuated::pairs(&node.bounds) {
2456 let (it: &TypeParamBound, p: Option<&Add>) = el.into_tuple();
2457 v.visit_type_param_bound(it);
2458 if let Some(p: &Add) = p {
2459 tokens_helper(visitor:v, &p.spans);
2460 }
2461 }
2462 tokens_helper(visitor:v, &node.semi_token.spans);
2463}
2464#[cfg(feature = "full")]
2465pub fn visit_item_type<'ast, V>(v: &mut V, node: &'ast ItemType)
2466where
2467 V: Visit<'ast> + ?Sized,
2468{
2469 for it: &Attribute in &node.attrs {
2470 v.visit_attribute(it);
2471 }
2472 v.visit_visibility(&node.vis);
2473 tokens_helper(visitor:v, &node.type_token.span);
2474 v.visit_ident(&node.ident);
2475 v.visit_generics(&node.generics);
2476 tokens_helper(visitor:v, &node.eq_token.spans);
2477 v.visit_type(&*node.ty);
2478 tokens_helper(visitor:v, &node.semi_token.spans);
2479}
2480#[cfg(feature = "full")]
2481pub fn visit_item_union<'ast, V>(v: &mut V, node: &'ast ItemUnion)
2482where
2483 V: Visit<'ast> + ?Sized,
2484{
2485 for it: &Attribute in &node.attrs {
2486 v.visit_attribute(it);
2487 }
2488 v.visit_visibility(&node.vis);
2489 tokens_helper(visitor:v, &node.union_token.span);
2490 v.visit_ident(&node.ident);
2491 v.visit_generics(&node.generics);
2492 v.visit_fields_named(&node.fields);
2493}
2494#[cfg(feature = "full")]
2495pub fn visit_item_use<'ast, V>(v: &mut V, node: &'ast ItemUse)
2496where
2497 V: Visit<'ast> + ?Sized,
2498{
2499 for it: &Attribute in &node.attrs {
2500 v.visit_attribute(it);
2501 }
2502 v.visit_visibility(&node.vis);
2503 tokens_helper(visitor:v, &node.use_token.span);
2504 if let Some(it: &Colon2) = &node.leading_colon {
2505 tokens_helper(visitor:v, &it.spans);
2506 }
2507 v.visit_use_tree(&node.tree);
2508 tokens_helper(visitor:v, &node.semi_token.spans);
2509}
2510#[cfg(feature = "full")]
2511pub fn visit_label<'ast, V>(v: &mut V, node: &'ast Label)
2512where
2513 V: Visit<'ast> + ?Sized,
2514{
2515 v.visit_lifetime(&node.name);
2516 tokens_helper(visitor:v, &node.colon_token.spans);
2517}
2518pub fn visit_lifetime<'ast, V>(v: &mut V, node: &'ast Lifetime)
2519where
2520 V: Visit<'ast> + ?Sized,
2521{
2522 v.visit_span(&node.apostrophe);
2523 v.visit_ident(&node.ident);
2524}
2525#[cfg(any(feature = "derive", feature = "full"))]
2526pub fn visit_lifetime_def<'ast, V>(v: &mut V, node: &'ast LifetimeDef)
2527where
2528 V: Visit<'ast> + ?Sized,
2529{
2530 for it: &Attribute in &node.attrs {
2531 v.visit_attribute(it);
2532 }
2533 v.visit_lifetime(&node.lifetime);
2534 if let Some(it: &Colon) = &node.colon_token {
2535 tokens_helper(visitor:v, &it.spans);
2536 }
2537 for el: Pair<&Lifetime, &Add> in Punctuated::pairs(&node.bounds) {
2538 let (it: &Lifetime, p: Option<&Add>) = el.into_tuple();
2539 v.visit_lifetime(it);
2540 if let Some(p: &Add) = p {
2541 tokens_helper(visitor:v, &p.spans);
2542 }
2543 }
2544}
2545pub fn visit_lit<'ast, V>(v: &mut V, node: &'ast Lit)
2546where
2547 V: Visit<'ast> + ?Sized,
2548{
2549 match node {
2550 Lit::Str(_binding_0) => {
2551 v.visit_lit_str(_binding_0);
2552 }
2553 Lit::ByteStr(_binding_0) => {
2554 v.visit_lit_byte_str(_binding_0);
2555 }
2556 Lit::Byte(_binding_0) => {
2557 v.visit_lit_byte(_binding_0);
2558 }
2559 Lit::Char(_binding_0) => {
2560 v.visit_lit_char(_binding_0);
2561 }
2562 Lit::Int(_binding_0) => {
2563 v.visit_lit_int(_binding_0);
2564 }
2565 Lit::Float(_binding_0) => {
2566 v.visit_lit_float(_binding_0);
2567 }
2568 Lit::Bool(_binding_0) => {
2569 v.visit_lit_bool(_binding_0);
2570 }
2571 Lit::Verbatim(_binding_0) => {
2572 skip!(_binding_0);
2573 }
2574 }
2575}
2576pub fn visit_lit_bool<'ast, V>(v: &mut V, node: &'ast LitBool)
2577where
2578 V: Visit<'ast> + ?Sized,
2579{
2580 skip!(node.value);
2581 v.visit_span(&node.span);
2582}
2583pub fn visit_lit_byte<'ast, V>(v: &mut V, node: &'ast LitByte)
2584where
2585 V: Visit<'ast> + ?Sized,
2586{}
2587pub fn visit_lit_byte_str<'ast, V>(v: &mut V, node: &'ast LitByteStr)
2588where
2589 V: Visit<'ast> + ?Sized,
2590{}
2591pub fn visit_lit_char<'ast, V>(v: &mut V, node: &'ast LitChar)
2592where
2593 V: Visit<'ast> + ?Sized,
2594{}
2595pub fn visit_lit_float<'ast, V>(v: &mut V, node: &'ast LitFloat)
2596where
2597 V: Visit<'ast> + ?Sized,
2598{}
2599pub fn visit_lit_int<'ast, V>(v: &mut V, node: &'ast LitInt)
2600where
2601 V: Visit<'ast> + ?Sized,
2602{}
2603pub fn visit_lit_str<'ast, V>(v: &mut V, node: &'ast LitStr)
2604where
2605 V: Visit<'ast> + ?Sized,
2606{}
2607#[cfg(feature = "full")]
2608pub fn visit_local<'ast, V>(v: &mut V, node: &'ast Local)
2609where
2610 V: Visit<'ast> + ?Sized,
2611{
2612 for it: &Attribute in &node.attrs {
2613 v.visit_attribute(it);
2614 }
2615 tokens_helper(visitor:v, &node.let_token.span);
2616 v.visit_pat(&node.pat);
2617 if let Some(it: &(Eq, Box)) = &node.init {
2618 tokens_helper(visitor:v, &(it).0.spans);
2619 v.visit_expr(&*(it).1);
2620 }
2621 tokens_helper(visitor:v, &node.semi_token.spans);
2622}
2623#[cfg(any(feature = "derive", feature = "full"))]
2624pub fn visit_macro<'ast, V>(v: &mut V, node: &'ast Macro)
2625where
2626 V: Visit<'ast> + ?Sized,
2627{
2628 v.visit_path(&node.path);
2629 tokens_helper(visitor:v, &node.bang_token.spans);
2630 v.visit_macro_delimiter(&node.delimiter);
2631 skip!(node.tokens);
2632}
2633#[cfg(any(feature = "derive", feature = "full"))]
2634pub fn visit_macro_delimiter<'ast, V>(v: &mut V, node: &'ast MacroDelimiter)
2635where
2636 V: Visit<'ast> + ?Sized,
2637{
2638 match node {
2639 MacroDelimiter::Paren(_binding_0: &Paren) => {
2640 tokens_helper(visitor:v, &_binding_0.span);
2641 }
2642 MacroDelimiter::Brace(_binding_0: &Brace) => {
2643 tokens_helper(visitor:v, &_binding_0.span);
2644 }
2645 MacroDelimiter::Bracket(_binding_0: &Bracket) => {
2646 tokens_helper(visitor:v, &_binding_0.span);
2647 }
2648 }
2649}
2650#[cfg(any(feature = "derive", feature = "full"))]
2651pub fn visit_member<'ast, V>(v: &mut V, node: &'ast Member)
2652where
2653 V: Visit<'ast> + ?Sized,
2654{
2655 match node {
2656 Member::Named(_binding_0: &Ident) => {
2657 v.visit_ident(_binding_0);
2658 }
2659 Member::Unnamed(_binding_0: &Index) => {
2660 v.visit_index(_binding_0);
2661 }
2662 }
2663}
2664#[cfg(any(feature = "derive", feature = "full"))]
2665pub fn visit_meta<'ast, V>(v: &mut V, node: &'ast Meta)
2666where
2667 V: Visit<'ast> + ?Sized,
2668{
2669 match node {
2670 Meta::Path(_binding_0: &Path) => {
2671 v.visit_path(_binding_0);
2672 }
2673 Meta::List(_binding_0: &MetaList) => {
2674 v.visit_meta_list(_binding_0);
2675 }
2676 Meta::NameValue(_binding_0: &MetaNameValue) => {
2677 v.visit_meta_name_value(_binding_0);
2678 }
2679 }
2680}
2681#[cfg(any(feature = "derive", feature = "full"))]
2682pub fn visit_meta_list<'ast, V>(v: &mut V, node: &'ast MetaList)
2683where
2684 V: Visit<'ast> + ?Sized,
2685{
2686 v.visit_path(&node.path);
2687 tokens_helper(visitor:v, &node.paren_token.span);
2688 for el: Pair<&NestedMeta, &Comma> in Punctuated::pairs(&node.nested) {
2689 let (it: &NestedMeta, p: Option<&Comma>) = el.into_tuple();
2690 v.visit_nested_meta(it);
2691 if let Some(p: &Comma) = p {
2692 tokens_helper(visitor:v, &p.spans);
2693 }
2694 }
2695}
2696#[cfg(any(feature = "derive", feature = "full"))]
2697pub fn visit_meta_name_value<'ast, V>(v: &mut V, node: &'ast MetaNameValue)
2698where
2699 V: Visit<'ast> + ?Sized,
2700{
2701 v.visit_path(&node.path);
2702 tokens_helper(visitor:v, &node.eq_token.spans);
2703 v.visit_lit(&node.lit);
2704}
2705#[cfg(feature = "full")]
2706pub fn visit_method_turbofish<'ast, V>(v: &mut V, node: &'ast MethodTurbofish)
2707where
2708 V: Visit<'ast> + ?Sized,
2709{
2710 tokens_helper(visitor:v, &node.colon2_token.spans);
2711 tokens_helper(visitor:v, &node.lt_token.spans);
2712 for el: Pair<&GenericMethodArgument, …> in Punctuated::pairs(&node.args) {
2713 let (it: &GenericMethodArgument, p: Option<&Comma>) = el.into_tuple();
2714 v.visit_generic_method_argument(it);
2715 if let Some(p: &Comma) = p {
2716 tokens_helper(visitor:v, &p.spans);
2717 }
2718 }
2719 tokens_helper(visitor:v, &node.gt_token.spans);
2720}
2721#[cfg(any(feature = "derive", feature = "full"))]
2722pub fn visit_nested_meta<'ast, V>(v: &mut V, node: &'ast NestedMeta)
2723where
2724 V: Visit<'ast> + ?Sized,
2725{
2726 match node {
2727 NestedMeta::Meta(_binding_0: &Meta) => {
2728 v.visit_meta(_binding_0);
2729 }
2730 NestedMeta::Lit(_binding_0: &Lit) => {
2731 v.visit_lit(_binding_0);
2732 }
2733 }
2734}
2735#[cfg(any(feature = "derive", feature = "full"))]
2736pub fn visit_parenthesized_generic_arguments<'ast, V>(
2737 v: &mut V,
2738 node: &'ast ParenthesizedGenericArguments,
2739)
2740where
2741 V: Visit<'ast> + ?Sized,
2742{
2743 tokens_helper(visitor:v, &node.paren_token.span);
2744 for el: Pair<&Type, &Comma> in Punctuated::pairs(&node.inputs) {
2745 let (it: &Type, p: Option<&Comma>) = el.into_tuple();
2746 v.visit_type(it);
2747 if let Some(p: &Comma) = p {
2748 tokens_helper(visitor:v, &p.spans);
2749 }
2750 }
2751 v.visit_return_type(&node.output);
2752}
2753#[cfg(feature = "full")]
2754pub fn visit_pat<'ast, V>(v: &mut V, node: &'ast Pat)
2755where
2756 V: Visit<'ast> + ?Sized,
2757{
2758 match node {
2759 Pat::Box(_binding_0) => {
2760 v.visit_pat_box(_binding_0);
2761 }
2762 Pat::Ident(_binding_0) => {
2763 v.visit_pat_ident(_binding_0);
2764 }
2765 Pat::Lit(_binding_0) => {
2766 v.visit_pat_lit(_binding_0);
2767 }
2768 Pat::Macro(_binding_0) => {
2769 v.visit_pat_macro(_binding_0);
2770 }
2771 Pat::Or(_binding_0) => {
2772 v.visit_pat_or(_binding_0);
2773 }
2774 Pat::Path(_binding_0) => {
2775 v.visit_pat_path(_binding_0);
2776 }
2777 Pat::Range(_binding_0) => {
2778 v.visit_pat_range(_binding_0);
2779 }
2780 Pat::Reference(_binding_0) => {
2781 v.visit_pat_reference(_binding_0);
2782 }
2783 Pat::Rest(_binding_0) => {
2784 v.visit_pat_rest(_binding_0);
2785 }
2786 Pat::Slice(_binding_0) => {
2787 v.visit_pat_slice(_binding_0);
2788 }
2789 Pat::Struct(_binding_0) => {
2790 v.visit_pat_struct(_binding_0);
2791 }
2792 Pat::Tuple(_binding_0) => {
2793 v.visit_pat_tuple(_binding_0);
2794 }
2795 Pat::TupleStruct(_binding_0) => {
2796 v.visit_pat_tuple_struct(_binding_0);
2797 }
2798 Pat::Type(_binding_0) => {
2799 v.visit_pat_type(_binding_0);
2800 }
2801 Pat::Verbatim(_binding_0) => {
2802 skip!(_binding_0);
2803 }
2804 Pat::Wild(_binding_0) => {
2805 v.visit_pat_wild(_binding_0);
2806 }
2807 #[cfg(syn_no_non_exhaustive)]
2808 _ => unreachable!(),
2809 }
2810}
2811#[cfg(feature = "full")]
2812pub fn visit_pat_box<'ast, V>(v: &mut V, node: &'ast PatBox)
2813where
2814 V: Visit<'ast> + ?Sized,
2815{
2816 for it: &Attribute in &node.attrs {
2817 v.visit_attribute(it);
2818 }
2819 tokens_helper(visitor:v, &node.box_token.span);
2820 v.visit_pat(&*node.pat);
2821}
2822#[cfg(feature = "full")]
2823pub fn visit_pat_ident<'ast, V>(v: &mut V, node: &'ast PatIdent)
2824where
2825 V: Visit<'ast> + ?Sized,
2826{
2827 for it: &Attribute in &node.attrs {
2828 v.visit_attribute(it);
2829 }
2830 if let Some(it: &Ref) = &node.by_ref {
2831 tokens_helper(visitor:v, &it.span);
2832 }
2833 if let Some(it: &Mut) = &node.mutability {
2834 tokens_helper(visitor:v, &it.span);
2835 }
2836 v.visit_ident(&node.ident);
2837 if let Some(it: &(At, Box)) = &node.subpat {
2838 tokens_helper(visitor:v, &(it).0.spans);
2839 v.visit_pat(&*(it).1);
2840 }
2841}
2842#[cfg(feature = "full")]
2843pub fn visit_pat_lit<'ast, V>(v: &mut V, node: &'ast PatLit)
2844where
2845 V: Visit<'ast> + ?Sized,
2846{
2847 for it: &Attribute in &node.attrs {
2848 v.visit_attribute(it);
2849 }
2850 v.visit_expr(&*node.expr);
2851}
2852#[cfg(feature = "full")]
2853pub fn visit_pat_macro<'ast, V>(v: &mut V, node: &'ast PatMacro)
2854where
2855 V: Visit<'ast> + ?Sized,
2856{
2857 for it: &Attribute in &node.attrs {
2858 v.visit_attribute(it);
2859 }
2860 v.visit_macro(&node.mac);
2861}
2862#[cfg(feature = "full")]
2863pub fn visit_pat_or<'ast, V>(v: &mut V, node: &'ast PatOr)
2864where
2865 V: Visit<'ast> + ?Sized,
2866{
2867 for it: &Attribute in &node.attrs {
2868 v.visit_attribute(it);
2869 }
2870 if let Some(it: &Or) = &node.leading_vert {
2871 tokens_helper(visitor:v, &it.spans);
2872 }
2873 for el: Pair<&Pat, &Or> in Punctuated::pairs(&node.cases) {
2874 let (it: &Pat, p: Option<&Or>) = el.into_tuple();
2875 v.visit_pat(it);
2876 if let Some(p: &Or) = p {
2877 tokens_helper(visitor:v, &p.spans);
2878 }
2879 }
2880}
2881#[cfg(feature = "full")]
2882pub fn visit_pat_path<'ast, V>(v: &mut V, node: &'ast PatPath)
2883where
2884 V: Visit<'ast> + ?Sized,
2885{
2886 for it: &Attribute in &node.attrs {
2887 v.visit_attribute(it);
2888 }
2889 if let Some(it: &QSelf) = &node.qself {
2890 v.visit_qself(it);
2891 }
2892 v.visit_path(&node.path);
2893}
2894#[cfg(feature = "full")]
2895pub fn visit_pat_range<'ast, V>(v: &mut V, node: &'ast PatRange)
2896where
2897 V: Visit<'ast> + ?Sized,
2898{
2899 for it: &Attribute in &node.attrs {
2900 v.visit_attribute(it);
2901 }
2902 v.visit_expr(&*node.lo);
2903 v.visit_range_limits(&node.limits);
2904 v.visit_expr(&*node.hi);
2905}
2906#[cfg(feature = "full")]
2907pub fn visit_pat_reference<'ast, V>(v: &mut V, node: &'ast PatReference)
2908where
2909 V: Visit<'ast> + ?Sized,
2910{
2911 for it: &Attribute in &node.attrs {
2912 v.visit_attribute(it);
2913 }
2914 tokens_helper(visitor:v, &node.and_token.spans);
2915 if let Some(it: &Mut) = &node.mutability {
2916 tokens_helper(visitor:v, &it.span);
2917 }
2918 v.visit_pat(&*node.pat);
2919}
2920#[cfg(feature = "full")]
2921pub fn visit_pat_rest<'ast, V>(v: &mut V, node: &'ast PatRest)
2922where
2923 V: Visit<'ast> + ?Sized,
2924{
2925 for it: &Attribute in &node.attrs {
2926 v.visit_attribute(it);
2927 }
2928 tokens_helper(visitor:v, &node.dot2_token.spans);
2929}
2930#[cfg(feature = "full")]
2931pub fn visit_pat_slice<'ast, V>(v: &mut V, node: &'ast PatSlice)
2932where
2933 V: Visit<'ast> + ?Sized,
2934{
2935 for it: &Attribute in &node.attrs {
2936 v.visit_attribute(it);
2937 }
2938 tokens_helper(visitor:v, &node.bracket_token.span);
2939 for el: Pair<&Pat, &Comma> in Punctuated::pairs(&node.elems) {
2940 let (it: &Pat, p: Option<&Comma>) = el.into_tuple();
2941 v.visit_pat(it);
2942 if let Some(p: &Comma) = p {
2943 tokens_helper(visitor:v, &p.spans);
2944 }
2945 }
2946}
2947#[cfg(feature = "full")]
2948pub fn visit_pat_struct<'ast, V>(v: &mut V, node: &'ast PatStruct)
2949where
2950 V: Visit<'ast> + ?Sized,
2951{
2952 for it: &Attribute in &node.attrs {
2953 v.visit_attribute(it);
2954 }
2955 v.visit_path(&node.path);
2956 tokens_helper(visitor:v, &node.brace_token.span);
2957 for el: Pair<&FieldPat, &Comma> in Punctuated::pairs(&node.fields) {
2958 let (it: &FieldPat, p: Option<&Comma>) = el.into_tuple();
2959 v.visit_field_pat(it);
2960 if let Some(p: &Comma) = p {
2961 tokens_helper(visitor:v, &p.spans);
2962 }
2963 }
2964 if let Some(it: &Dot2) = &node.dot2_token {
2965 tokens_helper(visitor:v, &it.spans);
2966 }
2967}
2968#[cfg(feature = "full")]
2969pub fn visit_pat_tuple<'ast, V>(v: &mut V, node: &'ast PatTuple)
2970where
2971 V: Visit<'ast> + ?Sized,
2972{
2973 for it: &Attribute in &node.attrs {
2974 v.visit_attribute(it);
2975 }
2976 tokens_helper(visitor:v, &node.paren_token.span);
2977 for el: Pair<&Pat, &Comma> in Punctuated::pairs(&node.elems) {
2978 let (it: &Pat, p: Option<&Comma>) = el.into_tuple();
2979 v.visit_pat(it);
2980 if let Some(p: &Comma) = p {
2981 tokens_helper(visitor:v, &p.spans);
2982 }
2983 }
2984}
2985#[cfg(feature = "full")]
2986pub fn visit_pat_tuple_struct<'ast, V>(v: &mut V, node: &'ast PatTupleStruct)
2987where
2988 V: Visit<'ast> + ?Sized,
2989{
2990 for it: &Attribute in &node.attrs {
2991 v.visit_attribute(it);
2992 }
2993 v.visit_path(&node.path);
2994 v.visit_pat_tuple(&node.pat);
2995}
2996#[cfg(feature = "full")]
2997pub fn visit_pat_type<'ast, V>(v: &mut V, node: &'ast PatType)
2998where
2999 V: Visit<'ast> + ?Sized,
3000{
3001 for it: &Attribute in &node.attrs {
3002 v.visit_attribute(it);
3003 }
3004 v.visit_pat(&*node.pat);
3005 tokens_helper(visitor:v, &node.colon_token.spans);
3006 v.visit_type(&*node.ty);
3007}
3008#[cfg(feature = "full")]
3009pub fn visit_pat_wild<'ast, V>(v: &mut V, node: &'ast PatWild)
3010where
3011 V: Visit<'ast> + ?Sized,
3012{
3013 for it: &Attribute in &node.attrs {
3014 v.visit_attribute(it);
3015 }
3016 tokens_helper(visitor:v, &node.underscore_token.spans);
3017}
3018#[cfg(any(feature = "derive", feature = "full"))]
3019pub fn visit_path<'ast, V>(v: &mut V, node: &'ast Path)
3020where
3021 V: Visit<'ast> + ?Sized,
3022{
3023 if let Some(it: &Colon2) = &node.leading_colon {
3024 tokens_helper(visitor:v, &it.spans);
3025 }
3026 for el: Pair<&PathSegment, &Colon2> in Punctuated::pairs(&node.segments) {
3027 let (it: &PathSegment, p: Option<&Colon2>) = el.into_tuple();
3028 v.visit_path_segment(it);
3029 if let Some(p: &Colon2) = p {
3030 tokens_helper(visitor:v, &p.spans);
3031 }
3032 }
3033}
3034#[cfg(any(feature = "derive", feature = "full"))]
3035pub fn visit_path_arguments<'ast, V>(v: &mut V, node: &'ast PathArguments)
3036where
3037 V: Visit<'ast> + ?Sized,
3038{
3039 match node {
3040 PathArguments::None => {}
3041 PathArguments::AngleBracketed(_binding_0: &AngleBracketedGenericArguments) => {
3042 v.visit_angle_bracketed_generic_arguments(_binding_0);
3043 }
3044 PathArguments::Parenthesized(_binding_0: &ParenthesizedGenericArguments) => {
3045 v.visit_parenthesized_generic_arguments(_binding_0);
3046 }
3047 }
3048}
3049#[cfg(any(feature = "derive", feature = "full"))]
3050pub fn visit_path_segment<'ast, V>(v: &mut V, node: &'ast PathSegment)
3051where
3052 V: Visit<'ast> + ?Sized,
3053{
3054 v.visit_ident(&node.ident);
3055 v.visit_path_arguments(&node.arguments);
3056}
3057#[cfg(any(feature = "derive", feature = "full"))]
3058pub fn visit_predicate_eq<'ast, V>(v: &mut V, node: &'ast PredicateEq)
3059where
3060 V: Visit<'ast> + ?Sized,
3061{
3062 v.visit_type(&node.lhs_ty);
3063 tokens_helper(visitor:v, &node.eq_token.spans);
3064 v.visit_type(&node.rhs_ty);
3065}
3066#[cfg(any(feature = "derive", feature = "full"))]
3067pub fn visit_predicate_lifetime<'ast, V>(v: &mut V, node: &'ast PredicateLifetime)
3068where
3069 V: Visit<'ast> + ?Sized,
3070{
3071 v.visit_lifetime(&node.lifetime);
3072 tokens_helper(visitor:v, &node.colon_token.spans);
3073 for el: Pair<&Lifetime, &Add> in Punctuated::pairs(&node.bounds) {
3074 let (it: &Lifetime, p: Option<&Add>) = el.into_tuple();
3075 v.visit_lifetime(it);
3076 if let Some(p: &Add) = p {
3077 tokens_helper(visitor:v, &p.spans);
3078 }
3079 }
3080}
3081#[cfg(any(feature = "derive", feature = "full"))]
3082pub fn visit_predicate_type<'ast, V>(v: &mut V, node: &'ast PredicateType)
3083where
3084 V: Visit<'ast> + ?Sized,
3085{
3086 if let Some(it: &BoundLifetimes) = &node.lifetimes {
3087 v.visit_bound_lifetimes(it);
3088 }
3089 v.visit_type(&node.bounded_ty);
3090 tokens_helper(visitor:v, &node.colon_token.spans);
3091 for el: Pair<&TypeParamBound, &Add> in Punctuated::pairs(&node.bounds) {
3092 let (it: &TypeParamBound, p: Option<&Add>) = el.into_tuple();
3093 v.visit_type_param_bound(it);
3094 if let Some(p: &Add) = p {
3095 tokens_helper(visitor:v, &p.spans);
3096 }
3097 }
3098}
3099#[cfg(any(feature = "derive", feature = "full"))]
3100pub fn visit_qself<'ast, V>(v: &mut V, node: &'ast QSelf)
3101where
3102 V: Visit<'ast> + ?Sized,
3103{
3104 tokens_helper(visitor:v, &node.lt_token.spans);
3105 v.visit_type(&*node.ty);
3106 skip!(node.position);
3107 if let Some(it: &As) = &node.as_token {
3108 tokens_helper(visitor:v, &it.span);
3109 }
3110 tokens_helper(visitor:v, &node.gt_token.spans);
3111}
3112#[cfg(feature = "full")]
3113pub fn visit_range_limits<'ast, V>(v: &mut V, node: &'ast RangeLimits)
3114where
3115 V: Visit<'ast> + ?Sized,
3116{
3117 match node {
3118 RangeLimits::HalfOpen(_binding_0: &Dot2) => {
3119 tokens_helper(visitor:v, &_binding_0.spans);
3120 }
3121 RangeLimits::Closed(_binding_0: &DotDotEq) => {
3122 tokens_helper(visitor:v, &_binding_0.spans);
3123 }
3124 }
3125}
3126#[cfg(feature = "full")]
3127pub fn visit_receiver<'ast, V>(v: &mut V, node: &'ast Receiver)
3128where
3129 V: Visit<'ast> + ?Sized,
3130{
3131 for it: &Attribute in &node.attrs {
3132 v.visit_attribute(it);
3133 }
3134 if let Some(it: &(And, Option)) = &node.reference {
3135 tokens_helper(visitor:v, &(it).0.spans);
3136 if let Some(it: &Lifetime) = &(it).1 {
3137 v.visit_lifetime(it);
3138 }
3139 }
3140 if let Some(it: &Mut) = &node.mutability {
3141 tokens_helper(visitor:v, &it.span);
3142 }
3143 tokens_helper(visitor:v, &node.self_token.span);
3144}
3145#[cfg(any(feature = "derive", feature = "full"))]
3146pub fn visit_return_type<'ast, V>(v: &mut V, node: &'ast ReturnType)
3147where
3148 V: Visit<'ast> + ?Sized,
3149{
3150 match node {
3151 ReturnType::Default => {}
3152 ReturnType::Type(_binding_0: &RArrow, _binding_1: &Box) => {
3153 tokens_helper(visitor:v, &_binding_0.spans);
3154 v.visit_type(&**_binding_1);
3155 }
3156 }
3157}
3158#[cfg(feature = "full")]
3159pub fn visit_signature<'ast, V>(v: &mut V, node: &'ast Signature)
3160where
3161 V: Visit<'ast> + ?Sized,
3162{
3163 if let Some(it) = &node.constness {
3164 tokens_helper(v, &it.span);
3165 }
3166 if let Some(it) = &node.asyncness {
3167 tokens_helper(v, &it.span);
3168 }
3169 if let Some(it) = &node.unsafety {
3170 tokens_helper(v, &it.span);
3171 }
3172 if let Some(it) = &node.abi {
3173 v.visit_abi(it);
3174 }
3175 tokens_helper(v, &node.fn_token.span);
3176 v.visit_ident(&node.ident);
3177 v.visit_generics(&node.generics);
3178 tokens_helper(v, &node.paren_token.span);
3179 for el in Punctuated::pairs(&node.inputs) {
3180 let (it, p) = el.into_tuple();
3181 v.visit_fn_arg(it);
3182 if let Some(p) = p {
3183 tokens_helper(v, &p.spans);
3184 }
3185 }
3186 if let Some(it) = &node.variadic {
3187 v.visit_variadic(it);
3188 }
3189 v.visit_return_type(&node.output);
3190}
3191pub fn visit_span<'ast, V>(v: &mut V, node: &Span)
3192where
3193 V: Visit<'ast> + ?Sized,
3194{}
3195#[cfg(feature = "full")]
3196pub fn visit_stmt<'ast, V>(v: &mut V, node: &'ast Stmt)
3197where
3198 V: Visit<'ast> + ?Sized,
3199{
3200 match node {
3201 Stmt::Local(_binding_0: &Local) => {
3202 v.visit_local(_binding_0);
3203 }
3204 Stmt::Item(_binding_0: &Item) => {
3205 v.visit_item(_binding_0);
3206 }
3207 Stmt::Expr(_binding_0: &Expr) => {
3208 v.visit_expr(_binding_0);
3209 }
3210 Stmt::Semi(_binding_0: &Expr, _binding_1: &Semi) => {
3211 v.visit_expr(_binding_0);
3212 tokens_helper(visitor:v, &_binding_1.spans);
3213 }
3214 }
3215}
3216#[cfg(any(feature = "derive", feature = "full"))]
3217pub fn visit_trait_bound<'ast, V>(v: &mut V, node: &'ast TraitBound)
3218where
3219 V: Visit<'ast> + ?Sized,
3220{
3221 if let Some(it: &Paren) = &node.paren_token {
3222 tokens_helper(visitor:v, &it.span);
3223 }
3224 v.visit_trait_bound_modifier(&node.modifier);
3225 if let Some(it: &BoundLifetimes) = &node.lifetimes {
3226 v.visit_bound_lifetimes(it);
3227 }
3228 v.visit_path(&node.path);
3229}
3230#[cfg(any(feature = "derive", feature = "full"))]
3231pub fn visit_trait_bound_modifier<'ast, V>(v: &mut V, node: &'ast TraitBoundModifier)
3232where
3233 V: Visit<'ast> + ?Sized,
3234{
3235 match node {
3236 TraitBoundModifier::None => {}
3237 TraitBoundModifier::Maybe(_binding_0: &Question) => {
3238 tokens_helper(visitor:v, &_binding_0.spans);
3239 }
3240 }
3241}
3242#[cfg(feature = "full")]
3243pub fn visit_trait_item<'ast, V>(v: &mut V, node: &'ast TraitItem)
3244where
3245 V: Visit<'ast> + ?Sized,
3246{
3247 match node {
3248 TraitItem::Const(_binding_0: &TraitItemConst) => {
3249 v.visit_trait_item_const(_binding_0);
3250 }
3251 TraitItem::Method(_binding_0: &TraitItemMethod) => {
3252 v.visit_trait_item_method(_binding_0);
3253 }
3254 TraitItem::Type(_binding_0: &TraitItemType) => {
3255 v.visit_trait_item_type(_binding_0);
3256 }
3257 TraitItem::Macro(_binding_0: &TraitItemMacro) => {
3258 v.visit_trait_item_macro(_binding_0);
3259 }
3260 TraitItem::Verbatim(_binding_0: &TokenStream) => {
3261 skip!(_binding_0);
3262 }
3263 #[cfg(syn_no_non_exhaustive)]
3264 _ => unreachable!(),
3265 }
3266}
3267#[cfg(feature = "full")]
3268pub fn visit_trait_item_const<'ast, V>(v: &mut V, node: &'ast TraitItemConst)
3269where
3270 V: Visit<'ast> + ?Sized,
3271{
3272 for it: &Attribute in &node.attrs {
3273 v.visit_attribute(it);
3274 }
3275 tokens_helper(visitor:v, &node.const_token.span);
3276 v.visit_ident(&node.ident);
3277 tokens_helper(visitor:v, &node.colon_token.spans);
3278 v.visit_type(&node.ty);
3279 if let Some(it: &(Eq, Expr)) = &node.default {
3280 tokens_helper(visitor:v, &(it).0.spans);
3281 v.visit_expr(&(it).1);
3282 }
3283 tokens_helper(visitor:v, &node.semi_token.spans);
3284}
3285#[cfg(feature = "full")]
3286pub fn visit_trait_item_macro<'ast, V>(v: &mut V, node: &'ast TraitItemMacro)
3287where
3288 V: Visit<'ast> + ?Sized,
3289{
3290 for it: &Attribute in &node.attrs {
3291 v.visit_attribute(it);
3292 }
3293 v.visit_macro(&node.mac);
3294 if let Some(it: &Semi) = &node.semi_token {
3295 tokens_helper(visitor:v, &it.spans);
3296 }
3297}
3298#[cfg(feature = "full")]
3299pub fn visit_trait_item_method<'ast, V>(v: &mut V, node: &'ast TraitItemMethod)
3300where
3301 V: Visit<'ast> + ?Sized,
3302{
3303 for it: &Attribute in &node.attrs {
3304 v.visit_attribute(it);
3305 }
3306 v.visit_signature(&node.sig);
3307 if let Some(it: &Block) = &node.default {
3308 v.visit_block(it);
3309 }
3310 if let Some(it: &Semi) = &node.semi_token {
3311 tokens_helper(visitor:v, &it.spans);
3312 }
3313}
3314#[cfg(feature = "full")]
3315pub fn visit_trait_item_type<'ast, V>(v: &mut V, node: &'ast TraitItemType)
3316where
3317 V: Visit<'ast> + ?Sized,
3318{
3319 for it: &Attribute in &node.attrs {
3320 v.visit_attribute(it);
3321 }
3322 tokens_helper(visitor:v, &node.type_token.span);
3323 v.visit_ident(&node.ident);
3324 v.visit_generics(&node.generics);
3325 if let Some(it: &Colon) = &node.colon_token {
3326 tokens_helper(visitor:v, &it.spans);
3327 }
3328 for el: Pair<&TypeParamBound, &Add> in Punctuated::pairs(&node.bounds) {
3329 let (it: &TypeParamBound, p: Option<&Add>) = el.into_tuple();
3330 v.visit_type_param_bound(it);
3331 if let Some(p: &Add) = p {
3332 tokens_helper(visitor:v, &p.spans);
3333 }
3334 }
3335 if let Some(it: &(Eq, Type)) = &node.default {
3336 tokens_helper(visitor:v, &(it).0.spans);
3337 v.visit_type(&(it).1);
3338 }
3339 tokens_helper(visitor:v, &node.semi_token.spans);
3340}
3341#[cfg(any(feature = "derive", feature = "full"))]
3342pub fn visit_type<'ast, V>(v: &mut V, node: &'ast Type)
3343where
3344 V: Visit<'ast> + ?Sized,
3345{
3346 match node {
3347 Type::Array(_binding_0) => {
3348 v.visit_type_array(_binding_0);
3349 }
3350 Type::BareFn(_binding_0) => {
3351 v.visit_type_bare_fn(_binding_0);
3352 }
3353 Type::Group(_binding_0) => {
3354 v.visit_type_group(_binding_0);
3355 }
3356 Type::ImplTrait(_binding_0) => {
3357 v.visit_type_impl_trait(_binding_0);
3358 }
3359 Type::Infer(_binding_0) => {
3360 v.visit_type_infer(_binding_0);
3361 }
3362 Type::Macro(_binding_0) => {
3363 v.visit_type_macro(_binding_0);
3364 }
3365 Type::Never(_binding_0) => {
3366 v.visit_type_never(_binding_0);
3367 }
3368 Type::Paren(_binding_0) => {
3369 v.visit_type_paren(_binding_0);
3370 }
3371 Type::Path(_binding_0) => {
3372 v.visit_type_path(_binding_0);
3373 }
3374 Type::Ptr(_binding_0) => {
3375 v.visit_type_ptr(_binding_0);
3376 }
3377 Type::Reference(_binding_0) => {
3378 v.visit_type_reference(_binding_0);
3379 }
3380 Type::Slice(_binding_0) => {
3381 v.visit_type_slice(_binding_0);
3382 }
3383 Type::TraitObject(_binding_0) => {
3384 v.visit_type_trait_object(_binding_0);
3385 }
3386 Type::Tuple(_binding_0) => {
3387 v.visit_type_tuple(_binding_0);
3388 }
3389 Type::Verbatim(_binding_0) => {
3390 skip!(_binding_0);
3391 }
3392 #[cfg(syn_no_non_exhaustive)]
3393 _ => unreachable!(),
3394 }
3395}
3396#[cfg(any(feature = "derive", feature = "full"))]
3397pub fn visit_type_array<'ast, V>(v: &mut V, node: &'ast TypeArray)
3398where
3399 V: Visit<'ast> + ?Sized,
3400{
3401 tokens_helper(visitor:v, &node.bracket_token.span);
3402 v.visit_type(&*node.elem);
3403 tokens_helper(visitor:v, &node.semi_token.spans);
3404 v.visit_expr(&node.len);
3405}
3406#[cfg(any(feature = "derive", feature = "full"))]
3407pub fn visit_type_bare_fn<'ast, V>(v: &mut V, node: &'ast TypeBareFn)
3408where
3409 V: Visit<'ast> + ?Sized,
3410{
3411 if let Some(it: &BoundLifetimes) = &node.lifetimes {
3412 v.visit_bound_lifetimes(it);
3413 }
3414 if let Some(it: &Unsafe) = &node.unsafety {
3415 tokens_helper(visitor:v, &it.span);
3416 }
3417 if let Some(it: &Abi) = &node.abi {
3418 v.visit_abi(it);
3419 }
3420 tokens_helper(visitor:v, &node.fn_token.span);
3421 tokens_helper(visitor:v, &node.paren_token.span);
3422 for el: Pair<&BareFnArg, &Comma> in Punctuated::pairs(&node.inputs) {
3423 let (it: &BareFnArg, p: Option<&Comma>) = el.into_tuple();
3424 v.visit_bare_fn_arg(it);
3425 if let Some(p: &Comma) = p {
3426 tokens_helper(visitor:v, &p.spans);
3427 }
3428 }
3429 if let Some(it: &Variadic) = &node.variadic {
3430 v.visit_variadic(it);
3431 }
3432 v.visit_return_type(&node.output);
3433}
3434#[cfg(any(feature = "derive", feature = "full"))]
3435pub fn visit_type_group<'ast, V>(v: &mut V, node: &'ast TypeGroup)
3436where
3437 V: Visit<'ast> + ?Sized,
3438{
3439 tokens_helper(visitor:v, &node.group_token.span);
3440 v.visit_type(&*node.elem);
3441}
3442#[cfg(any(feature = "derive", feature = "full"))]
3443pub fn visit_type_impl_trait<'ast, V>(v: &mut V, node: &'ast TypeImplTrait)
3444where
3445 V: Visit<'ast> + ?Sized,
3446{
3447 tokens_helper(visitor:v, &node.impl_token.span);
3448 for el: Pair<&TypeParamBound, &Add> in Punctuated::pairs(&node.bounds) {
3449 let (it: &TypeParamBound, p: Option<&Add>) = el.into_tuple();
3450 v.visit_type_param_bound(it);
3451 if let Some(p: &Add) = p {
3452 tokens_helper(visitor:v, &p.spans);
3453 }
3454 }
3455}
3456#[cfg(any(feature = "derive", feature = "full"))]
3457pub fn visit_type_infer<'ast, V>(v: &mut V, node: &'ast TypeInfer)
3458where
3459 V: Visit<'ast> + ?Sized,
3460{
3461 tokens_helper(visitor:v, &node.underscore_token.spans);
3462}
3463#[cfg(any(feature = "derive", feature = "full"))]
3464pub fn visit_type_macro<'ast, V>(v: &mut V, node: &'ast TypeMacro)
3465where
3466 V: Visit<'ast> + ?Sized,
3467{
3468 v.visit_macro(&node.mac);
3469}
3470#[cfg(any(feature = "derive", feature = "full"))]
3471pub fn visit_type_never<'ast, V>(v: &mut V, node: &'ast TypeNever)
3472where
3473 V: Visit<'ast> + ?Sized,
3474{
3475 tokens_helper(visitor:v, &node.bang_token.spans);
3476}
3477#[cfg(any(feature = "derive", feature = "full"))]
3478pub fn visit_type_param<'ast, V>(v: &mut V, node: &'ast TypeParam)
3479where
3480 V: Visit<'ast> + ?Sized,
3481{
3482 for it: &Attribute in &node.attrs {
3483 v.visit_attribute(it);
3484 }
3485 v.visit_ident(&node.ident);
3486 if let Some(it: &Colon) = &node.colon_token {
3487 tokens_helper(visitor:v, &it.spans);
3488 }
3489 for el: Pair<&TypeParamBound, &Add> in Punctuated::pairs(&node.bounds) {
3490 let (it: &TypeParamBound, p: Option<&Add>) = el.into_tuple();
3491 v.visit_type_param_bound(it);
3492 if let Some(p: &Add) = p {
3493 tokens_helper(visitor:v, &p.spans);
3494 }
3495 }
3496 if let Some(it: &Eq) = &node.eq_token {
3497 tokens_helper(visitor:v, &it.spans);
3498 }
3499 if let Some(it: &Type) = &node.default {
3500 v.visit_type(it);
3501 }
3502}
3503#[cfg(any(feature = "derive", feature = "full"))]
3504pub fn visit_type_param_bound<'ast, V>(v: &mut V, node: &'ast TypeParamBound)
3505where
3506 V: Visit<'ast> + ?Sized,
3507{
3508 match node {
3509 TypeParamBound::Trait(_binding_0: &TraitBound) => {
3510 v.visit_trait_bound(_binding_0);
3511 }
3512 TypeParamBound::Lifetime(_binding_0: &Lifetime) => {
3513 v.visit_lifetime(_binding_0);
3514 }
3515 }
3516}
3517#[cfg(any(feature = "derive", feature = "full"))]
3518pub fn visit_type_paren<'ast, V>(v: &mut V, node: &'ast TypeParen)
3519where
3520 V: Visit<'ast> + ?Sized,
3521{
3522 tokens_helper(visitor:v, &node.paren_token.span);
3523 v.visit_type(&*node.elem);
3524}
3525#[cfg(any(feature = "derive", feature = "full"))]
3526pub fn visit_type_path<'ast, V>(v: &mut V, node: &'ast TypePath)
3527where
3528 V: Visit<'ast> + ?Sized,
3529{
3530 if let Some(it: &QSelf) = &node.qself {
3531 v.visit_qself(it);
3532 }
3533 v.visit_path(&node.path);
3534}
3535#[cfg(any(feature = "derive", feature = "full"))]
3536pub fn visit_type_ptr<'ast, V>(v: &mut V, node: &'ast TypePtr)
3537where
3538 V: Visit<'ast> + ?Sized,
3539{
3540 tokens_helper(visitor:v, &node.star_token.spans);
3541 if let Some(it: &Const) = &node.const_token {
3542 tokens_helper(visitor:v, &it.span);
3543 }
3544 if let Some(it: &Mut) = &node.mutability {
3545 tokens_helper(visitor:v, &it.span);
3546 }
3547 v.visit_type(&*node.elem);
3548}
3549#[cfg(any(feature = "derive", feature = "full"))]
3550pub fn visit_type_reference<'ast, V>(v: &mut V, node: &'ast TypeReference)
3551where
3552 V: Visit<'ast> + ?Sized,
3553{
3554 tokens_helper(visitor:v, &node.and_token.spans);
3555 if let Some(it: &Lifetime) = &node.lifetime {
3556 v.visit_lifetime(it);
3557 }
3558 if let Some(it: &Mut) = &node.mutability {
3559 tokens_helper(visitor:v, &it.span);
3560 }
3561 v.visit_type(&*node.elem);
3562}
3563#[cfg(any(feature = "derive", feature = "full"))]
3564pub fn visit_type_slice<'ast, V>(v: &mut V, node: &'ast TypeSlice)
3565where
3566 V: Visit<'ast> + ?Sized,
3567{
3568 tokens_helper(visitor:v, &node.bracket_token.span);
3569 v.visit_type(&*node.elem);
3570}
3571#[cfg(any(feature = "derive", feature = "full"))]
3572pub fn visit_type_trait_object<'ast, V>(v: &mut V, node: &'ast TypeTraitObject)
3573where
3574 V: Visit<'ast> + ?Sized,
3575{
3576 if let Some(it: &Dyn) = &node.dyn_token {
3577 tokens_helper(visitor:v, &it.span);
3578 }
3579 for el: Pair<&TypeParamBound, &Add> in Punctuated::pairs(&node.bounds) {
3580 let (it: &TypeParamBound, p: Option<&Add>) = el.into_tuple();
3581 v.visit_type_param_bound(it);
3582 if let Some(p: &Add) = p {
3583 tokens_helper(visitor:v, &p.spans);
3584 }
3585 }
3586}
3587#[cfg(any(feature = "derive", feature = "full"))]
3588pub fn visit_type_tuple<'ast, V>(v: &mut V, node: &'ast TypeTuple)
3589where
3590 V: Visit<'ast> + ?Sized,
3591{
3592 tokens_helper(visitor:v, &node.paren_token.span);
3593 for el: Pair<&Type, &Comma> in Punctuated::pairs(&node.elems) {
3594 let (it: &Type, p: Option<&Comma>) = el.into_tuple();
3595 v.visit_type(it);
3596 if let Some(p: &Comma) = p {
3597 tokens_helper(visitor:v, &p.spans);
3598 }
3599 }
3600}
3601#[cfg(any(feature = "derive", feature = "full"))]
3602pub fn visit_un_op<'ast, V>(v: &mut V, node: &'ast UnOp)
3603where
3604 V: Visit<'ast> + ?Sized,
3605{
3606 match node {
3607 UnOp::Deref(_binding_0: &Star) => {
3608 tokens_helper(visitor:v, &_binding_0.spans);
3609 }
3610 UnOp::Not(_binding_0: &Bang) => {
3611 tokens_helper(visitor:v, &_binding_0.spans);
3612 }
3613 UnOp::Neg(_binding_0: &Sub) => {
3614 tokens_helper(visitor:v, &_binding_0.spans);
3615 }
3616 }
3617}
3618#[cfg(feature = "full")]
3619pub fn visit_use_glob<'ast, V>(v: &mut V, node: &'ast UseGlob)
3620where
3621 V: Visit<'ast> + ?Sized,
3622{
3623 tokens_helper(visitor:v, &node.star_token.spans);
3624}
3625#[cfg(feature = "full")]
3626pub fn visit_use_group<'ast, V>(v: &mut V, node: &'ast UseGroup)
3627where
3628 V: Visit<'ast> + ?Sized,
3629{
3630 tokens_helper(visitor:v, &node.brace_token.span);
3631 for el: Pair<&UseTree, &Comma> in Punctuated::pairs(&node.items) {
3632 let (it: &UseTree, p: Option<&Comma>) = el.into_tuple();
3633 v.visit_use_tree(it);
3634 if let Some(p: &Comma) = p {
3635 tokens_helper(visitor:v, &p.spans);
3636 }
3637 }
3638}
3639#[cfg(feature = "full")]
3640pub fn visit_use_name<'ast, V>(v: &mut V, node: &'ast UseName)
3641where
3642 V: Visit<'ast> + ?Sized,
3643{
3644 v.visit_ident(&node.ident);
3645}
3646#[cfg(feature = "full")]
3647pub fn visit_use_path<'ast, V>(v: &mut V, node: &'ast UsePath)
3648where
3649 V: Visit<'ast> + ?Sized,
3650{
3651 v.visit_ident(&node.ident);
3652 tokens_helper(visitor:v, &node.colon2_token.spans);
3653 v.visit_use_tree(&*node.tree);
3654}
3655#[cfg(feature = "full")]
3656pub fn visit_use_rename<'ast, V>(v: &mut V, node: &'ast UseRename)
3657where
3658 V: Visit<'ast> + ?Sized,
3659{
3660 v.visit_ident(&node.ident);
3661 tokens_helper(visitor:v, &node.as_token.span);
3662 v.visit_ident(&node.rename);
3663}
3664#[cfg(feature = "full")]
3665pub fn visit_use_tree<'ast, V>(v: &mut V, node: &'ast UseTree)
3666where
3667 V: Visit<'ast> + ?Sized,
3668{
3669 match node {
3670 UseTree::Path(_binding_0: &UsePath) => {
3671 v.visit_use_path(_binding_0);
3672 }
3673 UseTree::Name(_binding_0: &UseName) => {
3674 v.visit_use_name(_binding_0);
3675 }
3676 UseTree::Rename(_binding_0: &UseRename) => {
3677 v.visit_use_rename(_binding_0);
3678 }
3679 UseTree::Glob(_binding_0: &UseGlob) => {
3680 v.visit_use_glob(_binding_0);
3681 }
3682 UseTree::Group(_binding_0: &UseGroup) => {
3683 v.visit_use_group(_binding_0);
3684 }
3685 }
3686}
3687#[cfg(any(feature = "derive", feature = "full"))]
3688pub fn visit_variadic<'ast, V>(v: &mut V, node: &'ast Variadic)
3689where
3690 V: Visit<'ast> + ?Sized,
3691{
3692 for it: &Attribute in &node.attrs {
3693 v.visit_attribute(it);
3694 }
3695 tokens_helper(visitor:v, &node.dots.spans);
3696}
3697#[cfg(any(feature = "derive", feature = "full"))]
3698pub fn visit_variant<'ast, V>(v: &mut V, node: &'ast Variant)
3699where
3700 V: Visit<'ast> + ?Sized,
3701{
3702 for it: &Attribute in &node.attrs {
3703 v.visit_attribute(it);
3704 }
3705 v.visit_ident(&node.ident);
3706 v.visit_fields(&node.fields);
3707 if let Some(it: &(Eq, Expr)) = &node.discriminant {
3708 tokens_helper(visitor:v, &(it).0.spans);
3709 v.visit_expr(&(it).1);
3710 }
3711}
3712#[cfg(any(feature = "derive", feature = "full"))]
3713pub fn visit_vis_crate<'ast, V>(v: &mut V, node: &'ast VisCrate)
3714where
3715 V: Visit<'ast> + ?Sized,
3716{
3717 tokens_helper(visitor:v, &node.crate_token.span);
3718}
3719#[cfg(any(feature = "derive", feature = "full"))]
3720pub fn visit_vis_public<'ast, V>(v: &mut V, node: &'ast VisPublic)
3721where
3722 V: Visit<'ast> + ?Sized,
3723{
3724 tokens_helper(visitor:v, &node.pub_token.span);
3725}
3726#[cfg(any(feature = "derive", feature = "full"))]
3727pub fn visit_vis_restricted<'ast, V>(v: &mut V, node: &'ast VisRestricted)
3728where
3729 V: Visit<'ast> + ?Sized,
3730{
3731 tokens_helper(visitor:v, &node.pub_token.span);
3732 tokens_helper(visitor:v, &node.paren_token.span);
3733 if let Some(it: &In) = &node.in_token {
3734 tokens_helper(visitor:v, &it.span);
3735 }
3736 v.visit_path(&*node.path);
3737}
3738#[cfg(any(feature = "derive", feature = "full"))]
3739pub fn visit_visibility<'ast, V>(v: &mut V, node: &'ast Visibility)
3740where
3741 V: Visit<'ast> + ?Sized,
3742{
3743 match node {
3744 Visibility::Public(_binding_0: &VisPublic) => {
3745 v.visit_vis_public(_binding_0);
3746 }
3747 Visibility::Crate(_binding_0: &VisCrate) => {
3748 v.visit_vis_crate(_binding_0);
3749 }
3750 Visibility::Restricted(_binding_0: &VisRestricted) => {
3751 v.visit_vis_restricted(_binding_0);
3752 }
3753 Visibility::Inherited => {}
3754 }
3755}
3756#[cfg(any(feature = "derive", feature = "full"))]
3757pub fn visit_where_clause<'ast, V>(v: &mut V, node: &'ast WhereClause)
3758where
3759 V: Visit<'ast> + ?Sized,
3760{
3761 tokens_helper(visitor:v, &node.where_token.span);
3762 for el: Pair<&WherePredicate, &Comma> in Punctuated::pairs(&node.predicates) {
3763 let (it: &WherePredicate, p: Option<&Comma>) = el.into_tuple();
3764 v.visit_where_predicate(it);
3765 if let Some(p: &Comma) = p {
3766 tokens_helper(visitor:v, &p.spans);
3767 }
3768 }
3769}
3770#[cfg(any(feature = "derive", feature = "full"))]
3771pub fn visit_where_predicate<'ast, V>(v: &mut V, node: &'ast WherePredicate)
3772where
3773 V: Visit<'ast> + ?Sized,
3774{
3775 match node {
3776 WherePredicate::Type(_binding_0: &PredicateType) => {
3777 v.visit_predicate_type(_binding_0);
3778 }
3779 WherePredicate::Lifetime(_binding_0: &PredicateLifetime) => {
3780 v.visit_predicate_lifetime(_binding_0);
3781 }
3782 WherePredicate::Eq(_binding_0: &PredicateEq) => {
3783 v.visit_predicate_eq(_binding_0);
3784 }
3785 }
3786}
3787