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