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