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