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