aboutsummaryrefslogtreecommitdiff
path: root/syn/src/gen
diff options
context:
space:
mode:
Diffstat (limited to 'syn/src/gen')
-rw-r--r--syn/src/gen/fold.rs3236
-rw-r--r--syn/src/gen/visit.rs3792
-rw-r--r--syn/src/gen/visit_mut.rs3798
3 files changed, 10826 insertions, 0 deletions
diff --git a/syn/src/gen/fold.rs b/syn/src/gen/fold.rs
new file mode 100644
index 0000000..f51218b
--- /dev/null
+++ b/syn/src/gen/fold.rs
@@ -0,0 +1,3236 @@
+// This file is @generated by syn-internal-codegen.
+// It is not intended for manual editing.
+
+#![allow(unreachable_code, unused_variables)]
+#[cfg(any(feature = "full", feature = "derive"))]
+use crate::gen::helper::fold::*;
+#[cfg(any(feature = "full", feature = "derive"))]
+use crate::token::{Brace, Bracket, Group, Paren};
+use crate::*;
+use proc_macro2::Span;
+#[cfg(feature = "full")]
+macro_rules! full {
+ ($e:expr) => {
+ $e
+ };
+}
+#[cfg(all(feature = "derive", not(feature = "full")))]
+macro_rules! full {
+ ($e:expr) => {
+ unreachable!()
+ };
+}
+/// Syntax tree traversal to transform the nodes of an owned syntax tree.
+///
+/// See the [module documentation] for details.
+///
+/// [module documentation]: self
+///
+/// *This trait is available if Syn is built with the `"fold"` feature.*
+pub trait Fold {
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_abi(&mut self, i: Abi) -> Abi {
+ fold_abi(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_angle_bracketed_generic_arguments(
+ &mut self,
+ i: AngleBracketedGenericArguments,
+ ) -> AngleBracketedGenericArguments {
+ fold_angle_bracketed_generic_arguments(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_arm(&mut self, i: Arm) -> Arm {
+ fold_arm(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_attr_style(&mut self, i: AttrStyle) -> AttrStyle {
+ fold_attr_style(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_attribute(&mut self, i: Attribute) -> Attribute {
+ fold_attribute(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_bare_fn_arg(&mut self, i: BareFnArg) -> BareFnArg {
+ fold_bare_fn_arg(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_bin_op(&mut self, i: BinOp) -> BinOp {
+ fold_bin_op(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_binding(&mut self, i: Binding) -> Binding {
+ fold_binding(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_block(&mut self, i: Block) -> Block {
+ fold_block(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_bound_lifetimes(&mut self, i: BoundLifetimes) -> BoundLifetimes {
+ fold_bound_lifetimes(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_const_param(&mut self, i: ConstParam) -> ConstParam {
+ fold_const_param(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_constraint(&mut self, i: Constraint) -> Constraint {
+ fold_constraint(self, i)
+ }
+ #[cfg(feature = "derive")]
+ fn fold_data(&mut self, i: Data) -> Data {
+ fold_data(self, i)
+ }
+ #[cfg(feature = "derive")]
+ fn fold_data_enum(&mut self, i: DataEnum) -> DataEnum {
+ fold_data_enum(self, i)
+ }
+ #[cfg(feature = "derive")]
+ fn fold_data_struct(&mut self, i: DataStruct) -> DataStruct {
+ fold_data_struct(self, i)
+ }
+ #[cfg(feature = "derive")]
+ fn fold_data_union(&mut self, i: DataUnion) -> DataUnion {
+ fold_data_union(self, i)
+ }
+ #[cfg(feature = "derive")]
+ fn fold_derive_input(&mut self, i: DeriveInput) -> DeriveInput {
+ fold_derive_input(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_expr(&mut self, i: Expr) -> Expr {
+ fold_expr(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_array(&mut self, i: ExprArray) -> ExprArray {
+ fold_expr_array(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_assign(&mut self, i: ExprAssign) -> ExprAssign {
+ fold_expr_assign(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_assign_op(&mut self, i: ExprAssignOp) -> ExprAssignOp {
+ fold_expr_assign_op(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_async(&mut self, i: ExprAsync) -> ExprAsync {
+ fold_expr_async(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_await(&mut self, i: ExprAwait) -> ExprAwait {
+ fold_expr_await(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_expr_binary(&mut self, i: ExprBinary) -> ExprBinary {
+ fold_expr_binary(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_block(&mut self, i: ExprBlock) -> ExprBlock {
+ fold_expr_block(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_box(&mut self, i: ExprBox) -> ExprBox {
+ fold_expr_box(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_break(&mut self, i: ExprBreak) -> ExprBreak {
+ fold_expr_break(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_expr_call(&mut self, i: ExprCall) -> ExprCall {
+ fold_expr_call(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_expr_cast(&mut self, i: ExprCast) -> ExprCast {
+ fold_expr_cast(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_closure(&mut self, i: ExprClosure) -> ExprClosure {
+ fold_expr_closure(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_continue(&mut self, i: ExprContinue) -> ExprContinue {
+ fold_expr_continue(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_expr_field(&mut self, i: ExprField) -> ExprField {
+ fold_expr_field(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_for_loop(&mut self, i: ExprForLoop) -> ExprForLoop {
+ fold_expr_for_loop(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_group(&mut self, i: ExprGroup) -> ExprGroup {
+ fold_expr_group(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_if(&mut self, i: ExprIf) -> ExprIf {
+ fold_expr_if(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_expr_index(&mut self, i: ExprIndex) -> ExprIndex {
+ fold_expr_index(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_let(&mut self, i: ExprLet) -> ExprLet {
+ fold_expr_let(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_expr_lit(&mut self, i: ExprLit) -> ExprLit {
+ fold_expr_lit(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_loop(&mut self, i: ExprLoop) -> ExprLoop {
+ fold_expr_loop(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_macro(&mut self, i: ExprMacro) -> ExprMacro {
+ fold_expr_macro(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_match(&mut self, i: ExprMatch) -> ExprMatch {
+ fold_expr_match(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_method_call(&mut self, i: ExprMethodCall) -> ExprMethodCall {
+ fold_expr_method_call(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_expr_paren(&mut self, i: ExprParen) -> ExprParen {
+ fold_expr_paren(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_expr_path(&mut self, i: ExprPath) -> ExprPath {
+ fold_expr_path(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_range(&mut self, i: ExprRange) -> ExprRange {
+ fold_expr_range(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_reference(&mut self, i: ExprReference) -> ExprReference {
+ fold_expr_reference(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_repeat(&mut self, i: ExprRepeat) -> ExprRepeat {
+ fold_expr_repeat(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_return(&mut self, i: ExprReturn) -> ExprReturn {
+ fold_expr_return(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_struct(&mut self, i: ExprStruct) -> ExprStruct {
+ fold_expr_struct(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_try(&mut self, i: ExprTry) -> ExprTry {
+ fold_expr_try(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_try_block(&mut self, i: ExprTryBlock) -> ExprTryBlock {
+ fold_expr_try_block(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_tuple(&mut self, i: ExprTuple) -> ExprTuple {
+ fold_expr_tuple(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_type(&mut self, i: ExprType) -> ExprType {
+ fold_expr_type(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_expr_unary(&mut self, i: ExprUnary) -> ExprUnary {
+ fold_expr_unary(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_unsafe(&mut self, i: ExprUnsafe) -> ExprUnsafe {
+ fold_expr_unsafe(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_while(&mut self, i: ExprWhile) -> ExprWhile {
+ fold_expr_while(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_yield(&mut self, i: ExprYield) -> ExprYield {
+ fold_expr_yield(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_field(&mut self, i: Field) -> Field {
+ fold_field(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_field_pat(&mut self, i: FieldPat) -> FieldPat {
+ fold_field_pat(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_field_value(&mut self, i: FieldValue) -> FieldValue {
+ fold_field_value(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_fields(&mut self, i: Fields) -> Fields {
+ fold_fields(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_fields_named(&mut self, i: FieldsNamed) -> FieldsNamed {
+ fold_fields_named(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_fields_unnamed(&mut self, i: FieldsUnnamed) -> FieldsUnnamed {
+ fold_fields_unnamed(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_file(&mut self, i: File) -> File {
+ fold_file(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_fn_arg(&mut self, i: FnArg) -> FnArg {
+ fold_fn_arg(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_foreign_item(&mut self, i: ForeignItem) -> ForeignItem {
+ fold_foreign_item(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_foreign_item_fn(&mut self, i: ForeignItemFn) -> ForeignItemFn {
+ fold_foreign_item_fn(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_foreign_item_macro(&mut self, i: ForeignItemMacro) -> ForeignItemMacro {
+ fold_foreign_item_macro(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_foreign_item_static(&mut self, i: ForeignItemStatic) -> ForeignItemStatic {
+ fold_foreign_item_static(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_foreign_item_type(&mut self, i: ForeignItemType) -> ForeignItemType {
+ fold_foreign_item_type(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_generic_argument(&mut self, i: GenericArgument) -> GenericArgument {
+ fold_generic_argument(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_generic_method_argument(&mut self, i: GenericMethodArgument) -> GenericMethodArgument {
+ fold_generic_method_argument(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_generic_param(&mut self, i: GenericParam) -> GenericParam {
+ fold_generic_param(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_generics(&mut self, i: Generics) -> Generics {
+ fold_generics(self, i)
+ }
+ fn fold_ident(&mut self, i: Ident) -> Ident {
+ fold_ident(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_impl_item(&mut self, i: ImplItem) -> ImplItem {
+ fold_impl_item(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_impl_item_const(&mut self, i: ImplItemConst) -> ImplItemConst {
+ fold_impl_item_const(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_impl_item_macro(&mut self, i: ImplItemMacro) -> ImplItemMacro {
+ fold_impl_item_macro(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_impl_item_method(&mut self, i: ImplItemMethod) -> ImplItemMethod {
+ fold_impl_item_method(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_impl_item_type(&mut self, i: ImplItemType) -> ImplItemType {
+ fold_impl_item_type(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_index(&mut self, i: Index) -> Index {
+ fold_index(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_item(&mut self, i: Item) -> Item {
+ fold_item(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_item_const(&mut self, i: ItemConst) -> ItemConst {
+ fold_item_const(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_item_enum(&mut self, i: ItemEnum) -> ItemEnum {
+ fold_item_enum(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_item_extern_crate(&mut self, i: ItemExternCrate) -> ItemExternCrate {
+ fold_item_extern_crate(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_item_fn(&mut self, i: ItemFn) -> ItemFn {
+ fold_item_fn(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_item_foreign_mod(&mut self, i: ItemForeignMod) -> ItemForeignMod {
+ fold_item_foreign_mod(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_item_impl(&mut self, i: ItemImpl) -> ItemImpl {
+ fold_item_impl(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_item_macro(&mut self, i: ItemMacro) -> ItemMacro {
+ fold_item_macro(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_item_macro2(&mut self, i: ItemMacro2) -> ItemMacro2 {
+ fold_item_macro2(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_item_mod(&mut self, i: ItemMod) -> ItemMod {
+ fold_item_mod(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_item_static(&mut self, i: ItemStatic) -> ItemStatic {
+ fold_item_static(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_item_struct(&mut self, i: ItemStruct) -> ItemStruct {
+ fold_item_struct(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_item_trait(&mut self, i: ItemTrait) -> ItemTrait {
+ fold_item_trait(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_item_trait_alias(&mut self, i: ItemTraitAlias) -> ItemTraitAlias {
+ fold_item_trait_alias(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_item_type(&mut self, i: ItemType) -> ItemType {
+ fold_item_type(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_item_union(&mut self, i: ItemUnion) -> ItemUnion {
+ fold_item_union(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_item_use(&mut self, i: ItemUse) -> ItemUse {
+ fold_item_use(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_label(&mut self, i: Label) -> Label {
+ fold_label(self, i)
+ }
+ fn fold_lifetime(&mut self, i: Lifetime) -> Lifetime {
+ fold_lifetime(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_lifetime_def(&mut self, i: LifetimeDef) -> LifetimeDef {
+ fold_lifetime_def(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_lit(&mut self, i: Lit) -> Lit {
+ fold_lit(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_lit_bool(&mut self, i: LitBool) -> LitBool {
+ fold_lit_bool(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_lit_byte(&mut self, i: LitByte) -> LitByte {
+ fold_lit_byte(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_lit_byte_str(&mut self, i: LitByteStr) -> LitByteStr {
+ fold_lit_byte_str(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_lit_char(&mut self, i: LitChar) -> LitChar {
+ fold_lit_char(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_lit_float(&mut self, i: LitFloat) -> LitFloat {
+ fold_lit_float(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_lit_int(&mut self, i: LitInt) -> LitInt {
+ fold_lit_int(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_lit_str(&mut self, i: LitStr) -> LitStr {
+ fold_lit_str(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_local(&mut self, i: Local) -> Local {
+ fold_local(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_macro(&mut self, i: Macro) -> Macro {
+ fold_macro(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_macro_delimiter(&mut self, i: MacroDelimiter) -> MacroDelimiter {
+ fold_macro_delimiter(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_member(&mut self, i: Member) -> Member {
+ fold_member(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_meta(&mut self, i: Meta) -> Meta {
+ fold_meta(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_meta_list(&mut self, i: MetaList) -> MetaList {
+ fold_meta_list(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_meta_name_value(&mut self, i: MetaNameValue) -> MetaNameValue {
+ fold_meta_name_value(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_method_turbofish(&mut self, i: MethodTurbofish) -> MethodTurbofish {
+ fold_method_turbofish(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_nested_meta(&mut self, i: NestedMeta) -> NestedMeta {
+ fold_nested_meta(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_parenthesized_generic_arguments(
+ &mut self,
+ i: ParenthesizedGenericArguments,
+ ) -> ParenthesizedGenericArguments {
+ fold_parenthesized_generic_arguments(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_pat(&mut self, i: Pat) -> Pat {
+ fold_pat(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_pat_box(&mut self, i: PatBox) -> PatBox {
+ fold_pat_box(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_pat_ident(&mut self, i: PatIdent) -> PatIdent {
+ fold_pat_ident(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_pat_lit(&mut self, i: PatLit) -> PatLit {
+ fold_pat_lit(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_pat_macro(&mut self, i: PatMacro) -> PatMacro {
+ fold_pat_macro(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_pat_or(&mut self, i: PatOr) -> PatOr {
+ fold_pat_or(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_pat_path(&mut self, i: PatPath) -> PatPath {
+ fold_pat_path(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_pat_range(&mut self, i: PatRange) -> PatRange {
+ fold_pat_range(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_pat_reference(&mut self, i: PatReference) -> PatReference {
+ fold_pat_reference(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_pat_rest(&mut self, i: PatRest) -> PatRest {
+ fold_pat_rest(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_pat_slice(&mut self, i: PatSlice) -> PatSlice {
+ fold_pat_slice(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_pat_struct(&mut self, i: PatStruct) -> PatStruct {
+ fold_pat_struct(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_pat_tuple(&mut self, i: PatTuple) -> PatTuple {
+ fold_pat_tuple(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_pat_tuple_struct(&mut self, i: PatTupleStruct) -> PatTupleStruct {
+ fold_pat_tuple_struct(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_pat_type(&mut self, i: PatType) -> PatType {
+ fold_pat_type(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_pat_wild(&mut self, i: PatWild) -> PatWild {
+ fold_pat_wild(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_path(&mut self, i: Path) -> Path {
+ fold_path(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_path_arguments(&mut self, i: PathArguments) -> PathArguments {
+ fold_path_arguments(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_path_segment(&mut self, i: PathSegment) -> PathSegment {
+ fold_path_segment(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_predicate_eq(&mut self, i: PredicateEq) -> PredicateEq {
+ fold_predicate_eq(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_predicate_lifetime(&mut self, i: PredicateLifetime) -> PredicateLifetime {
+ fold_predicate_lifetime(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_predicate_type(&mut self, i: PredicateType) -> PredicateType {
+ fold_predicate_type(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_qself(&mut self, i: QSelf) -> QSelf {
+ fold_qself(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_range_limits(&mut self, i: RangeLimits) -> RangeLimits {
+ fold_range_limits(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_receiver(&mut self, i: Receiver) -> Receiver {
+ fold_receiver(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_return_type(&mut self, i: ReturnType) -> ReturnType {
+ fold_return_type(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_signature(&mut self, i: Signature) -> Signature {
+ fold_signature(self, i)
+ }
+ fn fold_span(&mut self, i: Span) -> Span {
+ fold_span(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_stmt(&mut self, i: Stmt) -> Stmt {
+ fold_stmt(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_trait_bound(&mut self, i: TraitBound) -> TraitBound {
+ fold_trait_bound(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_trait_bound_modifier(&mut self, i: TraitBoundModifier) -> TraitBoundModifier {
+ fold_trait_bound_modifier(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_trait_item(&mut self, i: TraitItem) -> TraitItem {
+ fold_trait_item(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_trait_item_const(&mut self, i: TraitItemConst) -> TraitItemConst {
+ fold_trait_item_const(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_trait_item_macro(&mut self, i: TraitItemMacro) -> TraitItemMacro {
+ fold_trait_item_macro(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_trait_item_method(&mut self, i: TraitItemMethod) -> TraitItemMethod {
+ fold_trait_item_method(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_trait_item_type(&mut self, i: TraitItemType) -> TraitItemType {
+ fold_trait_item_type(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_type(&mut self, i: Type) -> Type {
+ fold_type(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_type_array(&mut self, i: TypeArray) -> TypeArray {
+ fold_type_array(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_type_bare_fn(&mut self, i: TypeBareFn) -> TypeBareFn {
+ fold_type_bare_fn(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_type_group(&mut self, i: TypeGroup) -> TypeGroup {
+ fold_type_group(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_type_impl_trait(&mut self, i: TypeImplTrait) -> TypeImplTrait {
+ fold_type_impl_trait(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_type_infer(&mut self, i: TypeInfer) -> TypeInfer {
+ fold_type_infer(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_type_macro(&mut self, i: TypeMacro) -> TypeMacro {
+ fold_type_macro(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_type_never(&mut self, i: TypeNever) -> TypeNever {
+ fold_type_never(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_type_param(&mut self, i: TypeParam) -> TypeParam {
+ fold_type_param(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_type_param_bound(&mut self, i: TypeParamBound) -> TypeParamBound {
+ fold_type_param_bound(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_type_paren(&mut self, i: TypeParen) -> TypeParen {
+ fold_type_paren(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_type_path(&mut self, i: TypePath) -> TypePath {
+ fold_type_path(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_type_ptr(&mut self, i: TypePtr) -> TypePtr {
+ fold_type_ptr(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_type_reference(&mut self, i: TypeReference) -> TypeReference {
+ fold_type_reference(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_type_slice(&mut self, i: TypeSlice) -> TypeSlice {
+ fold_type_slice(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_type_trait_object(&mut self, i: TypeTraitObject) -> TypeTraitObject {
+ fold_type_trait_object(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_type_tuple(&mut self, i: TypeTuple) -> TypeTuple {
+ fold_type_tuple(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_un_op(&mut self, i: UnOp) -> UnOp {
+ fold_un_op(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_use_glob(&mut self, i: UseGlob) -> UseGlob {
+ fold_use_glob(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_use_group(&mut self, i: UseGroup) -> UseGroup {
+ fold_use_group(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_use_name(&mut self, i: UseName) -> UseName {
+ fold_use_name(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_use_path(&mut self, i: UsePath) -> UsePath {
+ fold_use_path(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_use_rename(&mut self, i: UseRename) -> UseRename {
+ fold_use_rename(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_use_tree(&mut self, i: UseTree) -> UseTree {
+ fold_use_tree(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_variadic(&mut self, i: Variadic) -> Variadic {
+ fold_variadic(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_variant(&mut self, i: Variant) -> Variant {
+ fold_variant(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_vis_crate(&mut self, i: VisCrate) -> VisCrate {
+ fold_vis_crate(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_vis_public(&mut self, i: VisPublic) -> VisPublic {
+ fold_vis_public(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_vis_restricted(&mut self, i: VisRestricted) -> VisRestricted {
+ fold_vis_restricted(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_visibility(&mut self, i: Visibility) -> Visibility {
+ fold_visibility(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_where_clause(&mut self, i: WhereClause) -> WhereClause {
+ fold_where_clause(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_where_predicate(&mut self, i: WherePredicate) -> WherePredicate {
+ fold_where_predicate(self, i)
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_abi<F>(f: &mut F, node: Abi) -> Abi
+where
+ F: Fold + ?Sized,
+{
+ Abi {
+ extern_token: Token![extern](tokens_helper(f, &node.extern_token.span)),
+ name: (node.name).map(|it| f.fold_lit_str(it)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_angle_bracketed_generic_arguments<F>(
+ f: &mut F,
+ node: AngleBracketedGenericArguments,
+) -> AngleBracketedGenericArguments
+where
+ F: Fold + ?Sized,
+{
+ AngleBracketedGenericArguments {
+ colon2_token: (node.colon2_token).map(|it| Token ! [ :: ](tokens_helper(f, &it.spans))),
+ lt_token: Token ! [ < ](tokens_helper(f, &node.lt_token.spans)),
+ args: FoldHelper::lift(node.args, |it| f.fold_generic_argument(it)),
+ gt_token: Token ! [ > ](tokens_helper(f, &node.gt_token.spans)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_arm<F>(f: &mut F, node: Arm) -> Arm
+where
+ F: Fold + ?Sized,
+{
+ Arm {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ pat: f.fold_pat(node.pat),
+ guard: (node.guard).map(|it| {
+ (
+ Token![if](tokens_helper(f, &(it).0.span)),
+ Box::new(f.fold_expr(*(it).1)),
+ )
+ }),
+ fat_arrow_token: Token ! [ => ](tokens_helper(f, &node.fat_arrow_token.spans)),
+ body: Box::new(f.fold_expr(*node.body)),
+ comma: (node.comma).map(|it| Token ! [ , ](tokens_helper(f, &it.spans))),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_attr_style<F>(f: &mut F, node: AttrStyle) -> AttrStyle
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ AttrStyle::Outer => AttrStyle::Outer,
+ AttrStyle::Inner(_binding_0) => {
+ AttrStyle::Inner(Token![!](tokens_helper(f, &_binding_0.spans)))
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_attribute<F>(f: &mut F, node: Attribute) -> Attribute
+where
+ F: Fold + ?Sized,
+{
+ Attribute {
+ pound_token: Token ! [ # ](tokens_helper(f, &node.pound_token.spans)),
+ style: f.fold_attr_style(node.style),
+ bracket_token: Bracket(tokens_helper(f, &node.bracket_token.span)),
+ path: f.fold_path(node.path),
+ tokens: node.tokens,
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_bare_fn_arg<F>(f: &mut F, node: BareFnArg) -> BareFnArg
+where
+ F: Fold + ?Sized,
+{
+ BareFnArg {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ name: (node.name).map(|it| {
+ (
+ f.fold_ident((it).0),
+ Token ! [ : ](tokens_helper(f, &(it).1.spans)),
+ )
+ }),
+ ty: f.fold_type(node.ty),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_bin_op<F>(f: &mut F, node: BinOp) -> BinOp
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ BinOp::Add(_binding_0) => BinOp::Add(Token ! [ + ](tokens_helper(f, &_binding_0.spans))),
+ BinOp::Sub(_binding_0) => BinOp::Sub(Token ! [ - ](tokens_helper(f, &_binding_0.spans))),
+ BinOp::Mul(_binding_0) => BinOp::Mul(Token ! [ * ](tokens_helper(f, &_binding_0.spans))),
+ BinOp::Div(_binding_0) => BinOp::Div(Token ! [ / ](tokens_helper(f, &_binding_0.spans))),
+ BinOp::Rem(_binding_0) => BinOp::Rem(Token ! [ % ](tokens_helper(f, &_binding_0.spans))),
+ BinOp::And(_binding_0) => BinOp::And(Token ! [ && ](tokens_helper(f, &_binding_0.spans))),
+ BinOp::Or(_binding_0) => BinOp::Or(Token ! [ || ](tokens_helper(f, &_binding_0.spans))),
+ BinOp::BitXor(_binding_0) => {
+ BinOp::BitXor(Token ! [ ^ ](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::BitAnd(_binding_0) => {
+ BinOp::BitAnd(Token ! [ & ](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::BitOr(_binding_0) => {
+ BinOp::BitOr(Token ! [ | ](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::Shl(_binding_0) => BinOp::Shl(Token ! [ << ](tokens_helper(f, &_binding_0.spans))),
+ BinOp::Shr(_binding_0) => BinOp::Shr(Token ! [ >> ](tokens_helper(f, &_binding_0.spans))),
+ BinOp::Eq(_binding_0) => BinOp::Eq(Token ! [ == ](tokens_helper(f, &_binding_0.spans))),
+ BinOp::Lt(_binding_0) => BinOp::Lt(Token ! [ < ](tokens_helper(f, &_binding_0.spans))),
+ BinOp::Le(_binding_0) => BinOp::Le(Token ! [ <= ](tokens_helper(f, &_binding_0.spans))),
+ BinOp::Ne(_binding_0) => BinOp::Ne(Token ! [ != ](tokens_helper(f, &_binding_0.spans))),
+ BinOp::Ge(_binding_0) => BinOp::Ge(Token ! [ >= ](tokens_helper(f, &_binding_0.spans))),
+ BinOp::Gt(_binding_0) => BinOp::Gt(Token ! [ > ](tokens_helper(f, &_binding_0.spans))),
+ BinOp::AddEq(_binding_0) => {
+ BinOp::AddEq(Token ! [ += ](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::SubEq(_binding_0) => {
+ BinOp::SubEq(Token ! [ -= ](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::MulEq(_binding_0) => {
+ BinOp::MulEq(Token ! [ *= ](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::DivEq(_binding_0) => {
+ BinOp::DivEq(Token ! [ /= ](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::RemEq(_binding_0) => {
+ BinOp::RemEq(Token ! [ %= ](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::BitXorEq(_binding_0) => {
+ BinOp::BitXorEq(Token ! [ ^= ](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::BitAndEq(_binding_0) => {
+ BinOp::BitAndEq(Token ! [ &= ](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::BitOrEq(_binding_0) => {
+ BinOp::BitOrEq(Token ! [ |= ](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::ShlEq(_binding_0) => {
+ BinOp::ShlEq(Token ! [ <<= ](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::ShrEq(_binding_0) => {
+ BinOp::ShrEq(Token ! [ >>= ](tokens_helper(f, &_binding_0.spans)))
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_binding<F>(f: &mut F, node: Binding) -> Binding
+where
+ F: Fold + ?Sized,
+{
+ Binding {
+ ident: f.fold_ident(node.ident),
+ eq_token: Token ! [ = ](tokens_helper(f, &node.eq_token.spans)),
+ ty: f.fold_type(node.ty),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_block<F>(f: &mut F, node: Block) -> Block
+where
+ F: Fold + ?Sized,
+{
+ Block {
+ brace_token: Brace(tokens_helper(f, &node.brace_token.span)),
+ stmts: FoldHelper::lift(node.stmts, |it| f.fold_stmt(it)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_bound_lifetimes<F>(f: &mut F, node: BoundLifetimes) -> BoundLifetimes
+where
+ F: Fold + ?Sized,
+{
+ BoundLifetimes {
+ for_token: Token![for](tokens_helper(f, &node.for_token.span)),
+ lt_token: Token ! [ < ](tokens_helper(f, &node.lt_token.spans)),
+ lifetimes: FoldHelper::lift(node.lifetimes, |it| f.fold_lifetime_def(it)),
+ gt_token: Token ! [ > ](tokens_helper(f, &node.gt_token.spans)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_const_param<F>(f: &mut F, node: ConstParam) -> ConstParam
+where
+ F: Fold + ?Sized,
+{
+ ConstParam {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ const_token: Token![const](tokens_helper(f, &node.const_token.span)),
+ ident: f.fold_ident(node.ident),
+ colon_token: Token ! [ : ](tokens_helper(f, &node.colon_token.spans)),
+ ty: f.fold_type(node.ty),
+ eq_token: (node.eq_token).map(|it| Token ! [ = ](tokens_helper(f, &it.spans))),
+ default: (node.default).map(|it| f.fold_expr(it)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_constraint<F>(f: &mut F, node: Constraint) -> Constraint
+where
+ F: Fold + ?Sized,
+{
+ Constraint {
+ ident: f.fold_ident(node.ident),
+ colon_token: Token ! [ : ](tokens_helper(f, &node.colon_token.spans)),
+ bounds: FoldHelper::lift(node.bounds, |it| f.fold_type_param_bound(it)),
+ }
+}
+#[cfg(feature = "derive")]
+pub fn fold_data<F>(f: &mut F, node: Data) -> Data
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ Data::Struct(_binding_0) => Data::Struct(f.fold_data_struct(_binding_0)),
+ Data::Enum(_binding_0) => Data::Enum(f.fold_data_enum(_binding_0)),
+ Data::Union(_binding_0) => Data::Union(f.fold_data_union(_binding_0)),
+ }
+}
+#[cfg(feature = "derive")]
+pub fn fold_data_enum<F>(f: &mut F, node: DataEnum) -> DataEnum
+where
+ F: Fold + ?Sized,
+{
+ DataEnum {
+ enum_token: Token![enum](tokens_helper(f, &node.enum_token.span)),
+ brace_token: Brace(tokens_helper(f, &node.brace_token.span)),
+ variants: FoldHelper::lift(node.variants, |it| f.fold_variant(it)),
+ }
+}
+#[cfg(feature = "derive")]
+pub fn fold_data_struct<F>(f: &mut F, node: DataStruct) -> DataStruct
+where
+ F: Fold + ?Sized,
+{
+ DataStruct {
+ struct_token: Token![struct](tokens_helper(f, &node.struct_token.span)),
+ fields: f.fold_fields(node.fields),
+ semi_token: (node.semi_token).map(|it| Token ! [ ; ](tokens_helper(f, &it.spans))),
+ }
+}
+#[cfg(feature = "derive")]
+pub fn fold_data_union<F>(f: &mut F, node: DataUnion) -> DataUnion
+where
+ F: Fold + ?Sized,
+{
+ DataUnion {
+ union_token: Token![union](tokens_helper(f, &node.union_token.span)),
+ fields: f.fold_fields_named(node.fields),
+ }
+}
+#[cfg(feature = "derive")]
+pub fn fold_derive_input<F>(f: &mut F, node: DeriveInput) -> DeriveInput
+where
+ F: Fold + ?Sized,
+{
+ DeriveInput {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ ident: f.fold_ident(node.ident),
+ generics: f.fold_generics(node.generics),
+ data: f.fold_data(node.data),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_expr<F>(f: &mut F, node: Expr) -> Expr
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ Expr::Array(_binding_0) => Expr::Array(full!(f.fold_expr_array(_binding_0))),
+ Expr::Assign(_binding_0) => Expr::Assign(full!(f.fold_expr_assign(_binding_0))),
+ Expr::AssignOp(_binding_0) => Expr::AssignOp(full!(f.fold_expr_assign_op(_binding_0))),
+ Expr::Async(_binding_0) => Expr::Async(full!(f.fold_expr_async(_binding_0))),
+ Expr::Await(_binding_0) => Expr::Await(full!(f.fold_expr_await(_binding_0))),
+ Expr::Binary(_binding_0) => Expr::Binary(f.fold_expr_binary(_binding_0)),
+ Expr::Block(_binding_0) => Expr::Block(full!(f.fold_expr_block(_binding_0))),
+ Expr::Box(_binding_0) => Expr::Box(full!(f.fold_expr_box(_binding_0))),
+ Expr::Break(_binding_0) => Expr::Break(full!(f.fold_expr_break(_binding_0))),
+ Expr::Call(_binding_0) => Expr::Call(f.fold_expr_call(_binding_0)),
+ Expr::Cast(_binding_0) => Expr::Cast(f.fold_expr_cast(_binding_0)),
+ Expr::Closure(_binding_0) => Expr::Closure(full!(f.fold_expr_closure(_binding_0))),
+ Expr::Continue(_binding_0) => Expr::Continue(full!(f.fold_expr_continue(_binding_0))),
+ Expr::Field(_binding_0) => Expr::Field(f.fold_expr_field(_binding_0)),
+ Expr::ForLoop(_binding_0) => Expr::ForLoop(full!(f.fold_expr_for_loop(_binding_0))),
+ Expr::Group(_binding_0) => Expr::Group(full!(f.fold_expr_group(_binding_0))),
+ Expr::If(_binding_0) => Expr::If(full!(f.fold_expr_if(_binding_0))),
+ Expr::Index(_binding_0) => Expr::Index(f.fold_expr_index(_binding_0)),
+ Expr::Let(_binding_0) => Expr::Let(full!(f.fold_expr_let(_binding_0))),
+ Expr::Lit(_binding_0) => Expr::Lit(f.fold_expr_lit(_binding_0)),
+ Expr::Loop(_binding_0) => Expr::Loop(full!(f.fold_expr_loop(_binding_0))),
+ Expr::Macro(_binding_0) => Expr::Macro(full!(f.fold_expr_macro(_binding_0))),
+ Expr::Match(_binding_0) => Expr::Match(full!(f.fold_expr_match(_binding_0))),
+ Expr::MethodCall(_binding_0) => {
+ Expr::MethodCall(full!(f.fold_expr_method_call(_binding_0)))
+ }
+ Expr::Paren(_binding_0) => Expr::Paren(f.fold_expr_paren(_binding_0)),
+ Expr::Path(_binding_0) => Expr::Path(f.fold_expr_path(_binding_0)),
+ Expr::Range(_binding_0) => Expr::Range(full!(f.fold_expr_range(_binding_0))),
+ Expr::Reference(_binding_0) => Expr::Reference(full!(f.fold_expr_reference(_binding_0))),
+ Expr::Repeat(_binding_0) => Expr::Repeat(full!(f.fold_expr_repeat(_binding_0))),
+ Expr::Return(_binding_0) => Expr::Return(full!(f.fold_expr_return(_binding_0))),
+ Expr::Struct(_binding_0) => Expr::Struct(full!(f.fold_expr_struct(_binding_0))),
+ Expr::Try(_binding_0) => Expr::Try(full!(f.fold_expr_try(_binding_0))),
+ Expr::TryBlock(_binding_0) => Expr::TryBlock(full!(f.fold_expr_try_block(_binding_0))),
+ Expr::Tuple(_binding_0) => Expr::Tuple(full!(f.fold_expr_tuple(_binding_0))),
+ Expr::Type(_binding_0) => Expr::Type(full!(f.fold_expr_type(_binding_0))),
+ Expr::Unary(_binding_0) => Expr::Unary(f.fold_expr_unary(_binding_0)),
+ Expr::Unsafe(_binding_0) => Expr::Unsafe(full!(f.fold_expr_unsafe(_binding_0))),
+ Expr::Verbatim(_binding_0) => Expr::Verbatim(_binding_0),
+ Expr::While(_binding_0) => Expr::While(full!(f.fold_expr_while(_binding_0))),
+ Expr::Yield(_binding_0) => Expr::Yield(full!(f.fold_expr_yield(_binding_0))),
+ _ => unreachable!(),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_array<F>(f: &mut F, node: ExprArray) -> ExprArray
+where
+ F: Fold + ?Sized,
+{
+ ExprArray {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ bracket_token: Bracket(tokens_helper(f, &node.bracket_token.span)),
+ elems: FoldHelper::lift(node.elems, |it| f.fold_expr(it)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_assign<F>(f: &mut F, node: ExprAssign) -> ExprAssign
+where
+ F: Fold + ?Sized,
+{
+ ExprAssign {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ left: Box::new(f.fold_expr(*node.left)),
+ eq_token: Token ! [ = ](tokens_helper(f, &node.eq_token.spans)),
+ right: Box::new(f.fold_expr(*node.right)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_assign_op<F>(f: &mut F, node: ExprAssignOp) -> ExprAssignOp
+where
+ F: Fold + ?Sized,
+{
+ ExprAssignOp {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ left: Box::new(f.fold_expr(*node.left)),
+ op: f.fold_bin_op(node.op),
+ right: Box::new(f.fold_expr(*node.right)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_async<F>(f: &mut F, node: ExprAsync) -> ExprAsync
+where
+ F: Fold + ?Sized,
+{
+ ExprAsync {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ async_token: Token![async](tokens_helper(f, &node.async_token.span)),
+ capture: (node.capture).map(|it| Token![move](tokens_helper(f, &it.span))),
+ block: f.fold_block(node.block),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_await<F>(f: &mut F, node: ExprAwait) -> ExprAwait
+where
+ F: Fold + ?Sized,
+{
+ ExprAwait {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ base: Box::new(f.fold_expr(*node.base)),
+ dot_token: Token ! [ . ](tokens_helper(f, &node.dot_token.spans)),
+ await_token: crate::token::Await(tokens_helper(f, &node.await_token.span)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_expr_binary<F>(f: &mut F, node: ExprBinary) -> ExprBinary
+where
+ F: Fold + ?Sized,
+{
+ ExprBinary {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ left: Box::new(f.fold_expr(*node.left)),
+ op: f.fold_bin_op(node.op),
+ right: Box::new(f.fold_expr(*node.right)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_block<F>(f: &mut F, node: ExprBlock) -> ExprBlock
+where
+ F: Fold + ?Sized,
+{
+ ExprBlock {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ label: (node.label).map(|it| f.fold_label(it)),
+ block: f.fold_block(node.block),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_box<F>(f: &mut F, node: ExprBox) -> ExprBox
+where
+ F: Fold + ?Sized,
+{
+ ExprBox {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ box_token: Token![box](tokens_helper(f, &node.box_token.span)),
+ expr: Box::new(f.fold_expr(*node.expr)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_break<F>(f: &mut F, node: ExprBreak) -> ExprBreak
+where
+ F: Fold + ?Sized,
+{
+ ExprBreak {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ break_token: Token![break](tokens_helper(f, &node.break_token.span)),
+ label: (node.label).map(|it| f.fold_lifetime(it)),
+ expr: (node.expr).map(|it| Box::new(f.fold_expr(*it))),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_expr_call<F>(f: &mut F, node: ExprCall) -> ExprCall
+where
+ F: Fold + ?Sized,
+{
+ ExprCall {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ func: Box::new(f.fold_expr(*node.func)),
+ paren_token: Paren(tokens_helper(f, &node.paren_token.span)),
+ args: FoldHelper::lift(node.args, |it| f.fold_expr(it)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_expr_cast<F>(f: &mut F, node: ExprCast) -> ExprCast
+where
+ F: Fold + ?Sized,
+{
+ ExprCast {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ expr: Box::new(f.fold_expr(*node.expr)),
+ as_token: Token![as](tokens_helper(f, &node.as_token.span)),
+ ty: Box::new(f.fold_type(*node.ty)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_closure<F>(f: &mut F, node: ExprClosure) -> ExprClosure
+where
+ F: Fold + ?Sized,
+{
+ ExprClosure {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ asyncness: (node.asyncness).map(|it| Token![async](tokens_helper(f, &it.span))),
+ movability: (node.movability).map(|it| Token![static](tokens_helper(f, &it.span))),
+ capture: (node.capture).map(|it| Token![move](tokens_helper(f, &it.span))),
+ or1_token: Token ! [ | ](tokens_helper(f, &node.or1_token.spans)),
+ inputs: FoldHelper::lift(node.inputs, |it| f.fold_pat(it)),
+ or2_token: Token ! [ | ](tokens_helper(f, &node.or2_token.spans)),
+ output: f.fold_return_type(node.output),
+ body: Box::new(f.fold_expr(*node.body)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_continue<F>(f: &mut F, node: ExprContinue) -> ExprContinue
+where
+ F: Fold + ?Sized,
+{
+ ExprContinue {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ continue_token: Token![continue](tokens_helper(f, &node.continue_token.span)),
+ label: (node.label).map(|it| f.fold_lifetime(it)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_expr_field<F>(f: &mut F, node: ExprField) -> ExprField
+where
+ F: Fold + ?Sized,
+{
+ ExprField {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ base: Box::new(f.fold_expr(*node.base)),
+ dot_token: Token ! [ . ](tokens_helper(f, &node.dot_token.spans)),
+ member: f.fold_member(node.member),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_for_loop<F>(f: &mut F, node: ExprForLoop) -> ExprForLoop
+where
+ F: Fold + ?Sized,
+{
+ ExprForLoop {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ label: (node.label).map(|it| f.fold_label(it)),
+ for_token: Token![for](tokens_helper(f, &node.for_token.span)),
+ pat: f.fold_pat(node.pat),
+ in_token: Token![in](tokens_helper(f, &node.in_token.span)),
+ expr: Box::new(f.fold_expr(*node.expr)),
+ body: f.fold_block(node.body),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_group<F>(f: &mut F, node: ExprGroup) -> ExprGroup
+where
+ F: Fold + ?Sized,
+{
+ ExprGroup {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ group_token: Group(tokens_helper(f, &node.group_token.span)),
+ expr: Box::new(f.fold_expr(*node.expr)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_if<F>(f: &mut F, node: ExprIf) -> ExprIf
+where
+ F: Fold + ?Sized,
+{
+ ExprIf {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ if_token: Token![if](tokens_helper(f, &node.if_token.span)),
+ cond: Box::new(f.fold_expr(*node.cond)),
+ then_branch: f.fold_block(node.then_branch),
+ else_branch: (node.else_branch).map(|it| {
+ (
+ Token![else](tokens_helper(f, &(it).0.span)),
+ Box::new(f.fold_expr(*(it).1)),
+ )
+ }),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_expr_index<F>(f: &mut F, node: ExprIndex) -> ExprIndex
+where
+ F: Fold + ?Sized,
+{
+ ExprIndex {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ expr: Box::new(f.fold_expr(*node.expr)),
+ bracket_token: Bracket(tokens_helper(f, &node.bracket_token.span)),
+ index: Box::new(f.fold_expr(*node.index)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_let<F>(f: &mut F, node: ExprLet) -> ExprLet
+where
+ F: Fold + ?Sized,
+{
+ ExprLet {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ let_token: Token![let](tokens_helper(f, &node.let_token.span)),
+ pat: f.fold_pat(node.pat),
+ eq_token: Token ! [ = ](tokens_helper(f, &node.eq_token.spans)),
+ expr: Box::new(f.fold_expr(*node.expr)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_expr_lit<F>(f: &mut F, node: ExprLit) -> ExprLit
+where
+ F: Fold + ?Sized,
+{
+ ExprLit {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ lit: f.fold_lit(node.lit),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_loop<F>(f: &mut F, node: ExprLoop) -> ExprLoop
+where
+ F: Fold + ?Sized,
+{
+ ExprLoop {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ label: (node.label).map(|it| f.fold_label(it)),
+ loop_token: Token![loop](tokens_helper(f, &node.loop_token.span)),
+ body: f.fold_block(node.body),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_macro<F>(f: &mut F, node: ExprMacro) -> ExprMacro
+where
+ F: Fold + ?Sized,
+{
+ ExprMacro {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ mac: f.fold_macro(node.mac),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_match<F>(f: &mut F, node: ExprMatch) -> ExprMatch
+where
+ F: Fold + ?Sized,
+{
+ ExprMatch {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ match_token: Token![match](tokens_helper(f, &node.match_token.span)),
+ expr: Box::new(f.fold_expr(*node.expr)),
+ brace_token: Brace(tokens_helper(f, &node.brace_token.span)),
+ arms: FoldHelper::lift(node.arms, |it| f.fold_arm(it)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_method_call<F>(f: &mut F, node: ExprMethodCall) -> ExprMethodCall
+where
+ F: Fold + ?Sized,
+{
+ ExprMethodCall {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ receiver: Box::new(f.fold_expr(*node.receiver)),
+ dot_token: Token ! [ . ](tokens_helper(f, &node.dot_token.spans)),
+ method: f.fold_ident(node.method),
+ turbofish: (node.turbofish).map(|it| f.fold_method_turbofish(it)),
+ paren_token: Paren(tokens_helper(f, &node.paren_token.span)),
+ args: FoldHelper::lift(node.args, |it| f.fold_expr(it)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_expr_paren<F>(f: &mut F, node: ExprParen) -> ExprParen
+where
+ F: Fold + ?Sized,
+{
+ ExprParen {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ paren_token: Paren(tokens_helper(f, &node.paren_token.span)),
+ expr: Box::new(f.fold_expr(*node.expr)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_expr_path<F>(f: &mut F, node: ExprPath) -> ExprPath
+where
+ F: Fold + ?Sized,
+{
+ ExprPath {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ qself: (node.qself).map(|it| f.fold_qself(it)),
+ path: f.fold_path(node.path),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_range<F>(f: &mut F, node: ExprRange) -> ExprRange
+where
+ F: Fold + ?Sized,
+{
+ ExprRange {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ from: (node.from).map(|it| Box::new(f.fold_expr(*it))),
+ limits: f.fold_range_limits(node.limits),
+ to: (node.to).map(|it| Box::new(f.fold_expr(*it))),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_reference<F>(f: &mut F, node: ExprReference) -> ExprReference
+where
+ F: Fold + ?Sized,
+{
+ ExprReference {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ and_token: Token ! [ & ](tokens_helper(f, &node.and_token.spans)),
+ raw: node.raw,
+ mutability: (node.mutability).map(|it| Token![mut](tokens_helper(f, &it.span))),
+ expr: Box::new(f.fold_expr(*node.expr)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_repeat<F>(f: &mut F, node: ExprRepeat) -> ExprRepeat
+where
+ F: Fold + ?Sized,
+{
+ ExprRepeat {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ bracket_token: Bracket(tokens_helper(f, &node.bracket_token.span)),
+ expr: Box::new(f.fold_expr(*node.expr)),
+ semi_token: Token ! [ ; ](tokens_helper(f, &node.semi_token.spans)),
+ len: Box::new(f.fold_expr(*node.len)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_return<F>(f: &mut F, node: ExprReturn) -> ExprReturn
+where
+ F: Fold + ?Sized,
+{
+ ExprReturn {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ return_token: Token![return](tokens_helper(f, &node.return_token.span)),
+ expr: (node.expr).map(|it| Box::new(f.fold_expr(*it))),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_struct<F>(f: &mut F, node: ExprStruct) -> ExprStruct
+where
+ F: Fold + ?Sized,
+{
+ ExprStruct {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ path: f.fold_path(node.path),
+ brace_token: Brace(tokens_helper(f, &node.brace_token.span)),
+ fields: FoldHelper::lift(node.fields, |it| f.fold_field_value(it)),
+ dot2_token: (node.dot2_token).map(|it| Token![..](tokens_helper(f, &it.spans))),
+ rest: (node.rest).map(|it| Box::new(f.fold_expr(*it))),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_try<F>(f: &mut F, node: ExprTry) -> ExprTry
+where
+ F: Fold + ?Sized,
+{
+ ExprTry {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ expr: Box::new(f.fold_expr(*node.expr)),
+ question_token: Token ! [ ? ](tokens_helper(f, &node.question_token.spans)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_try_block<F>(f: &mut F, node: ExprTryBlock) -> ExprTryBlock
+where
+ F: Fold + ?Sized,
+{
+ ExprTryBlock {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ try_token: Token![try](tokens_helper(f, &node.try_token.span)),
+ block: f.fold_block(node.block),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_tuple<F>(f: &mut F, node: ExprTuple) -> ExprTuple
+where
+ F: Fold + ?Sized,
+{
+ ExprTuple {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ paren_token: Paren(tokens_helper(f, &node.paren_token.span)),
+ elems: FoldHelper::lift(node.elems, |it| f.fold_expr(it)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_type<F>(f: &mut F, node: ExprType) -> ExprType
+where
+ F: Fold + ?Sized,
+{
+ ExprType {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ expr: Box::new(f.fold_expr(*node.expr)),
+ colon_token: Token ! [ : ](tokens_helper(f, &node.colon_token.spans)),
+ ty: Box::new(f.fold_type(*node.ty)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_expr_unary<F>(f: &mut F, node: ExprUnary) -> ExprUnary
+where
+ F: Fold + ?Sized,
+{
+ ExprUnary {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ op: f.fold_un_op(node.op),
+ expr: Box::new(f.fold_expr(*node.expr)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_unsafe<F>(f: &mut F, node: ExprUnsafe) -> ExprUnsafe
+where
+ F: Fold + ?Sized,
+{
+ ExprUnsafe {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ unsafe_token: Token![unsafe](tokens_helper(f, &node.unsafe_token.span)),
+ block: f.fold_block(node.block),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_while<F>(f: &mut F, node: ExprWhile) -> ExprWhile
+where
+ F: Fold + ?Sized,
+{
+ ExprWhile {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ label: (node.label).map(|it| f.fold_label(it)),
+ while_token: Token![while](tokens_helper(f, &node.while_token.span)),
+ cond: Box::new(f.fold_expr(*node.cond)),
+ body: f.fold_block(node.body),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_yield<F>(f: &mut F, node: ExprYield) -> ExprYield
+where
+ F: Fold + ?Sized,
+{
+ ExprYield {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ yield_token: Token![yield](tokens_helper(f, &node.yield_token.span)),
+ expr: (node.expr).map(|it| Box::new(f.fold_expr(*it))),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_field<F>(f: &mut F, node: Field) -> Field
+where
+ F: Fold + ?Sized,
+{
+ Field {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ ident: (node.ident).map(|it| f.fold_ident(it)),
+ colon_token: (node.colon_token).map(|it| Token ! [ : ](tokens_helper(f, &it.spans))),
+ ty: f.fold_type(node.ty),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_field_pat<F>(f: &mut F, node: FieldPat) -> FieldPat
+where
+ F: Fold + ?Sized,
+{
+ FieldPat {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ member: f.fold_member(node.member),
+ colon_token: (node.colon_token).map(|it| Token ! [ : ](tokens_helper(f, &it.spans))),
+ pat: Box::new(f.fold_pat(*node.pat)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_field_value<F>(f: &mut F, node: FieldValue) -> FieldValue
+where
+ F: Fold + ?Sized,
+{
+ FieldValue {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ member: f.fold_member(node.member),
+ colon_token: (node.colon_token).map(|it| Token ! [ : ](tokens_helper(f, &it.spans))),
+ expr: f.fold_expr(node.expr),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_fields<F>(f: &mut F, node: Fields) -> Fields
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ Fields::Named(_binding_0) => Fields::Named(f.fold_fields_named(_binding_0)),
+ Fields::Unnamed(_binding_0) => Fields::Unnamed(f.fold_fields_unnamed(_binding_0)),
+ Fields::Unit => Fields::Unit,
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_fields_named<F>(f: &mut F, node: FieldsNamed) -> FieldsNamed
+where
+ F: Fold + ?Sized,
+{
+ FieldsNamed {
+ brace_token: Brace(tokens_helper(f, &node.brace_token.span)),
+ named: FoldHelper::lift(node.named, |it| f.fold_field(it)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_fields_unnamed<F>(f: &mut F, node: FieldsUnnamed) -> FieldsUnnamed
+where
+ F: Fold + ?Sized,
+{
+ FieldsUnnamed {
+ paren_token: Paren(tokens_helper(f, &node.paren_token.span)),
+ unnamed: FoldHelper::lift(node.unnamed, |it| f.fold_field(it)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_file<F>(f: &mut F, node: File) -> File
+where
+ F: Fold + ?Sized,
+{
+ File {
+ shebang: node.shebang,
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ items: FoldHelper::lift(node.items, |it| f.fold_item(it)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_fn_arg<F>(f: &mut F, node: FnArg) -> FnArg
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ FnArg::Receiver(_binding_0) => FnArg::Receiver(f.fold_receiver(_binding_0)),
+ FnArg::Typed(_binding_0) => FnArg::Typed(f.fold_pat_type(_binding_0)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_foreign_item<F>(f: &mut F, node: ForeignItem) -> ForeignItem
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ ForeignItem::Fn(_binding_0) => ForeignItem::Fn(f.fold_foreign_item_fn(_binding_0)),
+ ForeignItem::Static(_binding_0) => {
+ ForeignItem::Static(f.fold_foreign_item_static(_binding_0))
+ }
+ ForeignItem::Type(_binding_0) => ForeignItem::Type(f.fold_foreign_item_type(_binding_0)),
+ ForeignItem::Macro(_binding_0) => ForeignItem::Macro(f.fold_foreign_item_macro(_binding_0)),
+ ForeignItem::Verbatim(_binding_0) => ForeignItem::Verbatim(_binding_0),
+ _ => unreachable!(),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_foreign_item_fn<F>(f: &mut F, node: ForeignItemFn) -> ForeignItemFn
+where
+ F: Fold + ?Sized,
+{
+ ForeignItemFn {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ sig: f.fold_signature(node.sig),
+ semi_token: Token ! [ ; ](tokens_helper(f, &node.semi_token.spans)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_foreign_item_macro<F>(f: &mut F, node: ForeignItemMacro) -> ForeignItemMacro
+where
+ F: Fold + ?Sized,
+{
+ ForeignItemMacro {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ mac: f.fold_macro(node.mac),
+ semi_token: (node.semi_token).map(|it| Token ! [ ; ](tokens_helper(f, &it.spans))),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_foreign_item_static<F>(f: &mut F, node: ForeignItemStatic) -> ForeignItemStatic
+where
+ F: Fold + ?Sized,
+{
+ ForeignItemStatic {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ static_token: Token![static](tokens_helper(f, &node.static_token.span)),
+ mutability: (node.mutability).map(|it| Token![mut](tokens_helper(f, &it.span))),
+ ident: f.fold_ident(node.ident),
+ colon_token: Token ! [ : ](tokens_helper(f, &node.colon_token.spans)),
+ ty: Box::new(f.fold_type(*node.ty)),
+ semi_token: Token ! [ ; ](tokens_helper(f, &node.semi_token.spans)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_foreign_item_type<F>(f: &mut F, node: ForeignItemType) -> ForeignItemType
+where
+ F: Fold + ?Sized,
+{
+ ForeignItemType {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ type_token: Token![type](tokens_helper(f, &node.type_token.span)),
+ ident: f.fold_ident(node.ident),
+ semi_token: Token ! [ ; ](tokens_helper(f, &node.semi_token.spans)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_generic_argument<F>(f: &mut F, node: GenericArgument) -> GenericArgument
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ GenericArgument::Lifetime(_binding_0) => {
+ GenericArgument::Lifetime(f.fold_lifetime(_binding_0))
+ }
+ GenericArgument::Type(_binding_0) => GenericArgument::Type(f.fold_type(_binding_0)),
+ GenericArgument::Binding(_binding_0) => {
+ GenericArgument::Binding(f.fold_binding(_binding_0))
+ }
+ GenericArgument::Constraint(_binding_0) => {
+ GenericArgument::Constraint(f.fold_constraint(_binding_0))
+ }
+ GenericArgument::Const(_binding_0) => GenericArgument::Const(f.fold_expr(_binding_0)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_generic_method_argument<F>(
+ f: &mut F,
+ node: GenericMethodArgument,
+) -> GenericMethodArgument
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ GenericMethodArgument::Type(_binding_0) => {
+ GenericMethodArgument::Type(f.fold_type(_binding_0))
+ }
+ GenericMethodArgument::Const(_binding_0) => {
+ GenericMethodArgument::Const(f.fold_expr(_binding_0))
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_generic_param<F>(f: &mut F, node: GenericParam) -> GenericParam
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ GenericParam::Type(_binding_0) => GenericParam::Type(f.fold_type_param(_binding_0)),
+ GenericParam::Lifetime(_binding_0) => {
+ GenericParam::Lifetime(f.fold_lifetime_def(_binding_0))
+ }
+ GenericParam::Const(_binding_0) => GenericParam::Const(f.fold_const_param(_binding_0)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_generics<F>(f: &mut F, node: Generics) -> Generics
+where
+ F: Fold + ?Sized,
+{
+ Generics {
+ lt_token: (node.lt_token).map(|it| Token ! [ < ](tokens_helper(f, &it.spans))),
+ params: FoldHelper::lift(node.params, |it| f.fold_generic_param(it)),
+ gt_token: (node.gt_token).map(|it| Token ! [ > ](tokens_helper(f, &it.spans))),
+ where_clause: (node.where_clause).map(|it| f.fold_where_clause(it)),
+ }
+}
+pub fn fold_ident<F>(f: &mut F, node: Ident) -> Ident
+where
+ F: Fold + ?Sized,
+{
+ let mut node = node;
+ let span = f.fold_span(node.span());
+ node.set_span(span);
+ node
+}
+#[cfg(feature = "full")]
+pub fn fold_impl_item<F>(f: &mut F, node: ImplItem) -> ImplItem
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ ImplItem::Const(_binding_0) => ImplItem::Const(f.fold_impl_item_const(_binding_0)),
+ ImplItem::Method(_binding_0) => ImplItem::Method(f.fold_impl_item_method(_binding_0)),
+ ImplItem::Type(_binding_0) => ImplItem::Type(f.fold_impl_item_type(_binding_0)),
+ ImplItem::Macro(_binding_0) => ImplItem::Macro(f.fold_impl_item_macro(_binding_0)),
+ ImplItem::Verbatim(_binding_0) => ImplItem::Verbatim(_binding_0),
+ _ => unreachable!(),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_impl_item_const<F>(f: &mut F, node: ImplItemConst) -> ImplItemConst
+where
+ F: Fold + ?Sized,
+{
+ ImplItemConst {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ defaultness: (node.defaultness).map(|it| Token![default](tokens_helper(f, &it.span))),
+ const_token: Token![const](tokens_helper(f, &node.const_token.span)),
+ ident: f.fold_ident(node.ident),
+ colon_token: Token ! [ : ](tokens_helper(f, &node.colon_token.spans)),
+ ty: f.fold_type(node.ty),
+ eq_token: Token ! [ = ](tokens_helper(f, &node.eq_token.spans)),
+ expr: f.fold_expr(node.expr),
+ semi_token: Token ! [ ; ](tokens_helper(f, &node.semi_token.spans)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_impl_item_macro<F>(f: &mut F, node: ImplItemMacro) -> ImplItemMacro
+where
+ F: Fold + ?Sized,
+{
+ ImplItemMacro {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ mac: f.fold_macro(node.mac),
+ semi_token: (node.semi_token).map(|it| Token ! [ ; ](tokens_helper(f, &it.spans))),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_impl_item_method<F>(f: &mut F, node: ImplItemMethod) -> ImplItemMethod
+where
+ F: Fold + ?Sized,
+{
+ ImplItemMethod {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ defaultness: (node.defaultness).map(|it| Token![default](tokens_helper(f, &it.span))),
+ sig: f.fold_signature(node.sig),
+ block: f.fold_block(node.block),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_impl_item_type<F>(f: &mut F, node: ImplItemType) -> ImplItemType
+where
+ F: Fold + ?Sized,
+{
+ ImplItemType {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ defaultness: (node.defaultness).map(|it| Token![default](tokens_helper(f, &it.span))),
+ type_token: Token![type](tokens_helper(f, &node.type_token.span)),
+ ident: f.fold_ident(node.ident),
+ generics: f.fold_generics(node.generics),
+ eq_token: Token ! [ = ](tokens_helper(f, &node.eq_token.spans)),
+ ty: f.fold_type(node.ty),
+ semi_token: Token ! [ ; ](tokens_helper(f, &node.semi_token.spans)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_index<F>(f: &mut F, node: Index) -> Index
+where
+ F: Fold + ?Sized,
+{
+ Index {
+ index: node.index,
+ span: f.fold_span(node.span),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_item<F>(f: &mut F, node: Item) -> Item
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ Item::Const(_binding_0) => Item::Const(f.fold_item_const(_binding_0)),
+ Item::Enum(_binding_0) => Item::Enum(f.fold_item_enum(_binding_0)),
+ Item::ExternCrate(_binding_0) => Item::ExternCrate(f.fold_item_extern_crate(_binding_0)),
+ Item::Fn(_binding_0) => Item::Fn(f.fold_item_fn(_binding_0)),
+ Item::ForeignMod(_binding_0) => Item::ForeignMod(f.fold_item_foreign_mod(_binding_0)),
+ Item::Impl(_binding_0) => Item::Impl(f.fold_item_impl(_binding_0)),
+ Item::Macro(_binding_0) => Item::Macro(f.fold_item_macro(_binding_0)),
+ Item::Macro2(_binding_0) => Item::Macro2(f.fold_item_macro2(_binding_0)),
+ Item::Mod(_binding_0) => Item::Mod(f.fold_item_mod(_binding_0)),
+ Item::Static(_binding_0) => Item::Static(f.fold_item_static(_binding_0)),
+ Item::Struct(_binding_0) => Item::Struct(f.fold_item_struct(_binding_0)),
+ Item::Trait(_binding_0) => Item::Trait(f.fold_item_trait(_binding_0)),
+ Item::TraitAlias(_binding_0) => Item::TraitAlias(f.fold_item_trait_alias(_binding_0)),
+ Item::Type(_binding_0) => Item::Type(f.fold_item_type(_binding_0)),
+ Item::Union(_binding_0) => Item::Union(f.fold_item_union(_binding_0)),
+ Item::Use(_binding_0) => Item::Use(f.fold_item_use(_binding_0)),
+ Item::Verbatim(_binding_0) => Item::Verbatim(_binding_0),
+ _ => unreachable!(),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_item_const<F>(f: &mut F, node: ItemConst) -> ItemConst
+where
+ F: Fold + ?Sized,
+{
+ ItemConst {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ const_token: Token![const](tokens_helper(f, &node.const_token.span)),
+ ident: f.fold_ident(node.ident),
+ colon_token: Token ! [ : ](tokens_helper(f, &node.colon_token.spans)),
+ ty: Box::new(f.fold_type(*node.ty)),
+ eq_token: Token ! [ = ](tokens_helper(f, &node.eq_token.spans)),
+ expr: Box::new(f.fold_expr(*node.expr)),
+ semi_token: Token ! [ ; ](tokens_helper(f, &node.semi_token.spans)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_item_enum<F>(f: &mut F, node: ItemEnum) -> ItemEnum
+where
+ F: Fold + ?Sized,
+{
+ ItemEnum {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ enum_token: Token![enum](tokens_helper(f, &node.enum_token.span)),
+ ident: f.fold_ident(node.ident),
+ generics: f.fold_generics(node.generics),
+ brace_token: Brace(tokens_helper(f, &node.brace_token.span)),
+ variants: FoldHelper::lift(node.variants, |it| f.fold_variant(it)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_item_extern_crate<F>(f: &mut F, node: ItemExternCrate) -> ItemExternCrate
+where
+ F: Fold + ?Sized,
+{
+ ItemExternCrate {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ extern_token: Token![extern](tokens_helper(f, &node.extern_token.span)),
+ crate_token: Token![crate](tokens_helper(f, &node.crate_token.span)),
+ ident: f.fold_ident(node.ident),
+ rename: (node.rename).map(|it| {
+ (
+ Token![as](tokens_helper(f, &(it).0.span)),
+ f.fold_ident((it).1),
+ )
+ }),
+ semi_token: Token ! [ ; ](tokens_helper(f, &node.semi_token.spans)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_item_fn<F>(f: &mut F, node: ItemFn) -> ItemFn
+where
+ F: Fold + ?Sized,
+{
+ ItemFn {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ sig: f.fold_signature(node.sig),
+ block: Box::new(f.fold_block(*node.block)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_item_foreign_mod<F>(f: &mut F, node: ItemForeignMod) -> ItemForeignMod
+where
+ F: Fold + ?Sized,
+{
+ ItemForeignMod {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ abi: f.fold_abi(node.abi),
+ brace_token: Brace(tokens_helper(f, &node.brace_token.span)),
+ items: FoldHelper::lift(node.items, |it| f.fold_foreign_item(it)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_item_impl<F>(f: &mut F, node: ItemImpl) -> ItemImpl
+where
+ F: Fold + ?Sized,
+{
+ ItemImpl {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ defaultness: (node.defaultness).map(|it| Token![default](tokens_helper(f, &it.span))),
+ unsafety: (node.unsafety).map(|it| Token![unsafe](tokens_helper(f, &it.span))),
+ impl_token: Token![impl](tokens_helper(f, &node.impl_token.span)),
+ generics: f.fold_generics(node.generics),
+ trait_: (node.trait_).map(|it| {
+ (
+ ((it).0).map(|it| Token![!](tokens_helper(f, &it.spans))),
+ f.fold_path((it).1),
+ Token![for](tokens_helper(f, &(it).2.span)),
+ )
+ }),
+ self_ty: Box::new(f.fold_type(*node.self_ty)),
+ brace_token: Brace(tokens_helper(f, &node.brace_token.span)),
+ items: FoldHelper::lift(node.items, |it| f.fold_impl_item(it)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_item_macro<F>(f: &mut F, node: ItemMacro) -> ItemMacro
+where
+ F: Fold + ?Sized,
+{
+ ItemMacro {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ ident: (node.ident).map(|it| f.fold_ident(it)),
+ mac: f.fold_macro(node.mac),
+ semi_token: (node.semi_token).map(|it| Token ! [ ; ](tokens_helper(f, &it.spans))),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_item_macro2<F>(f: &mut F, node: ItemMacro2) -> ItemMacro2
+where
+ F: Fold + ?Sized,
+{
+ ItemMacro2 {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ macro_token: Token![macro](tokens_helper(f, &node.macro_token.span)),
+ ident: f.fold_ident(node.ident),
+ rules: node.rules,
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_item_mod<F>(f: &mut F, node: ItemMod) -> ItemMod
+where
+ F: Fold + ?Sized,
+{
+ ItemMod {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ mod_token: Token![mod](tokens_helper(f, &node.mod_token.span)),
+ ident: f.fold_ident(node.ident),
+ content: (node.content).map(|it| {
+ (
+ Brace(tokens_helper(f, &(it).0.span)),
+ FoldHelper::lift((it).1, |it| f.fold_item(it)),
+ )
+ }),
+ semi: (node.semi).map(|it| Token ! [ ; ](tokens_helper(f, &it.spans))),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_item_static<F>(f: &mut F, node: ItemStatic) -> ItemStatic
+where
+ F: Fold + ?Sized,
+{
+ ItemStatic {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ static_token: Token![static](tokens_helper(f, &node.static_token.span)),
+ mutability: (node.mutability).map(|it| Token![mut](tokens_helper(f, &it.span))),
+ ident: f.fold_ident(node.ident),
+ colon_token: Token ! [ : ](tokens_helper(f, &node.colon_token.spans)),
+ ty: Box::new(f.fold_type(*node.ty)),
+ eq_token: Token ! [ = ](tokens_helper(f, &node.eq_token.spans)),
+ expr: Box::new(f.fold_expr(*node.expr)),
+ semi_token: Token ! [ ; ](tokens_helper(f, &node.semi_token.spans)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_item_struct<F>(f: &mut F, node: ItemStruct) -> ItemStruct
+where
+ F: Fold + ?Sized,
+{
+ ItemStruct {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ struct_token: Token![struct](tokens_helper(f, &node.struct_token.span)),
+ ident: f.fold_ident(node.ident),
+ generics: f.fold_generics(node.generics),
+ fields: f.fold_fields(node.fields),
+ semi_token: (node.semi_token).map(|it| Token ! [ ; ](tokens_helper(f, &it.spans))),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_item_trait<F>(f: &mut F, node: ItemTrait) -> ItemTrait
+where
+ F: Fold + ?Sized,
+{
+ ItemTrait {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ unsafety: (node.unsafety).map(|it| Token![unsafe](tokens_helper(f, &it.span))),
+ auto_token: (node.auto_token).map(|it| Token![auto](tokens_helper(f, &it.span))),
+ trait_token: Token![trait](tokens_helper(f, &node.trait_token.span)),
+ ident: f.fold_ident(node.ident),
+ generics: f.fold_generics(node.generics),
+ colon_token: (node.colon_token).map(|it| Token ! [ : ](tokens_helper(f, &it.spans))),
+ supertraits: FoldHelper::lift(node.supertraits, |it| f.fold_type_param_bound(it)),
+ brace_token: Brace(tokens_helper(f, &node.brace_token.span)),
+ items: FoldHelper::lift(node.items, |it| f.fold_trait_item(it)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_item_trait_alias<F>(f: &mut F, node: ItemTraitAlias) -> ItemTraitAlias
+where
+ F: Fold + ?Sized,
+{
+ ItemTraitAlias {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ trait_token: Token![trait](tokens_helper(f, &node.trait_token.span)),
+ ident: f.fold_ident(node.ident),
+ generics: f.fold_generics(node.generics),
+ eq_token: Token ! [ = ](tokens_helper(f, &node.eq_token.spans)),
+ bounds: FoldHelper::lift(node.bounds, |it| f.fold_type_param_bound(it)),
+ semi_token: Token ! [ ; ](tokens_helper(f, &node.semi_token.spans)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_item_type<F>(f: &mut F, node: ItemType) -> ItemType
+where
+ F: Fold + ?Sized,
+{
+ ItemType {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ type_token: Token![type](tokens_helper(f, &node.type_token.span)),
+ ident: f.fold_ident(node.ident),
+ generics: f.fold_generics(node.generics),
+ eq_token: Token ! [ = ](tokens_helper(f, &node.eq_token.spans)),
+ ty: Box::new(f.fold_type(*node.ty)),
+ semi_token: Token ! [ ; ](tokens_helper(f, &node.semi_token.spans)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_item_union<F>(f: &mut F, node: ItemUnion) -> ItemUnion
+where
+ F: Fold + ?Sized,
+{
+ ItemUnion {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ union_token: Token![union](tokens_helper(f, &node.union_token.span)),
+ ident: f.fold_ident(node.ident),
+ generics: f.fold_generics(node.generics),
+ fields: f.fold_fields_named(node.fields),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_item_use<F>(f: &mut F, node: ItemUse) -> ItemUse
+where
+ F: Fold + ?Sized,
+{
+ ItemUse {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ use_token: Token![use](tokens_helper(f, &node.use_token.span)),
+ leading_colon: (node.leading_colon).map(|it| Token ! [ :: ](tokens_helper(f, &it.spans))),
+ tree: f.fold_use_tree(node.tree),
+ semi_token: Token ! [ ; ](tokens_helper(f, &node.semi_token.spans)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_label<F>(f: &mut F, node: Label) -> Label
+where
+ F: Fold + ?Sized,
+{
+ Label {
+ name: f.fold_lifetime(node.name),
+ colon_token: Token ! [ : ](tokens_helper(f, &node.colon_token.spans)),
+ }
+}
+pub fn fold_lifetime<F>(f: &mut F, node: Lifetime) -> Lifetime
+where
+ F: Fold + ?Sized,
+{
+ Lifetime {
+ apostrophe: f.fold_span(node.apostrophe),
+ ident: f.fold_ident(node.ident),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_lifetime_def<F>(f: &mut F, node: LifetimeDef) -> LifetimeDef
+where
+ F: Fold + ?Sized,
+{
+ LifetimeDef {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ lifetime: f.fold_lifetime(node.lifetime),
+ colon_token: (node.colon_token).map(|it| Token ! [ : ](tokens_helper(f, &it.spans))),
+ bounds: FoldHelper::lift(node.bounds, |it| f.fold_lifetime(it)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_lit<F>(f: &mut F, node: Lit) -> Lit
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ Lit::Str(_binding_0) => Lit::Str(f.fold_lit_str(_binding_0)),
+ Lit::ByteStr(_binding_0) => Lit::ByteStr(f.fold_lit_byte_str(_binding_0)),
+ Lit::Byte(_binding_0) => Lit::Byte(f.fold_lit_byte(_binding_0)),
+ Lit::Char(_binding_0) => Lit::Char(f.fold_lit_char(_binding_0)),
+ Lit::Int(_binding_0) => Lit::Int(f.fold_lit_int(_binding_0)),
+ Lit::Float(_binding_0) => Lit::Float(f.fold_lit_float(_binding_0)),
+ Lit::Bool(_binding_0) => Lit::Bool(f.fold_lit_bool(_binding_0)),
+ Lit::Verbatim(_binding_0) => Lit::Verbatim(_binding_0),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_lit_bool<F>(f: &mut F, node: LitBool) -> LitBool
+where
+ F: Fold + ?Sized,
+{
+ LitBool {
+ value: node.value,
+ span: f.fold_span(node.span),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_lit_byte<F>(f: &mut F, node: LitByte) -> LitByte
+where
+ F: Fold + ?Sized,
+{
+ let span = f.fold_span(node.span());
+ let mut node = node;
+ node.set_span(span);
+ node
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_lit_byte_str<F>(f: &mut F, node: LitByteStr) -> LitByteStr
+where
+ F: Fold + ?Sized,
+{
+ let span = f.fold_span(node.span());
+ let mut node = node;
+ node.set_span(span);
+ node
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_lit_char<F>(f: &mut F, node: LitChar) -> LitChar
+where
+ F: Fold + ?Sized,
+{
+ let span = f.fold_span(node.span());
+ let mut node = node;
+ node.set_span(span);
+ node
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_lit_float<F>(f: &mut F, node: LitFloat) -> LitFloat
+where
+ F: Fold + ?Sized,
+{
+ let span = f.fold_span(node.span());
+ let mut node = node;
+ node.set_span(span);
+ node
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_lit_int<F>(f: &mut F, node: LitInt) -> LitInt
+where
+ F: Fold + ?Sized,
+{
+ let span = f.fold_span(node.span());
+ let mut node = node;
+ node.set_span(span);
+ node
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_lit_str<F>(f: &mut F, node: LitStr) -> LitStr
+where
+ F: Fold + ?Sized,
+{
+ let span = f.fold_span(node.span());
+ let mut node = node;
+ node.set_span(span);
+ node
+}
+#[cfg(feature = "full")]
+pub fn fold_local<F>(f: &mut F, node: Local) -> Local
+where
+ F: Fold + ?Sized,
+{
+ Local {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ let_token: Token![let](tokens_helper(f, &node.let_token.span)),
+ pat: f.fold_pat(node.pat),
+ init: (node.init).map(|it| {
+ (
+ Token ! [ = ](tokens_helper(f, &(it).0.spans)),
+ Box::new(f.fold_expr(*(it).1)),
+ )
+ }),
+ semi_token: Token ! [ ; ](tokens_helper(f, &node.semi_token.spans)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_macro<F>(f: &mut F, node: Macro) -> Macro
+where
+ F: Fold + ?Sized,
+{
+ Macro {
+ path: f.fold_path(node.path),
+ bang_token: Token![!](tokens_helper(f, &node.bang_token.spans)),
+ delimiter: f.fold_macro_delimiter(node.delimiter),
+ tokens: node.tokens,
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_macro_delimiter<F>(f: &mut F, node: MacroDelimiter) -> MacroDelimiter
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ MacroDelimiter::Paren(_binding_0) => {
+ MacroDelimiter::Paren(Paren(tokens_helper(f, &_binding_0.span)))
+ }
+ MacroDelimiter::Brace(_binding_0) => {
+ MacroDelimiter::Brace(Brace(tokens_helper(f, &_binding_0.span)))
+ }
+ MacroDelimiter::Bracket(_binding_0) => {
+ MacroDelimiter::Bracket(Bracket(tokens_helper(f, &_binding_0.span)))
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_member<F>(f: &mut F, node: Member) -> Member
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ Member::Named(_binding_0) => Member::Named(f.fold_ident(_binding_0)),
+ Member::Unnamed(_binding_0) => Member::Unnamed(f.fold_index(_binding_0)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_meta<F>(f: &mut F, node: Meta) -> Meta
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ Meta::Path(_binding_0) => Meta::Path(f.fold_path(_binding_0)),
+ Meta::List(_binding_0) => Meta::List(f.fold_meta_list(_binding_0)),
+ Meta::NameValue(_binding_0) => Meta::NameValue(f.fold_meta_name_value(_binding_0)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_meta_list<F>(f: &mut F, node: MetaList) -> MetaList
+where
+ F: Fold + ?Sized,
+{
+ MetaList {
+ path: f.fold_path(node.path),
+ paren_token: Paren(tokens_helper(f, &node.paren_token.span)),
+ nested: FoldHelper::lift(node.nested, |it| f.fold_nested_meta(it)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_meta_name_value<F>(f: &mut F, node: MetaNameValue) -> MetaNameValue
+where
+ F: Fold + ?Sized,
+{
+ MetaNameValue {
+ path: f.fold_path(node.path),
+ eq_token: Token ! [ = ](tokens_helper(f, &node.eq_token.spans)),
+ lit: f.fold_lit(node.lit),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_method_turbofish<F>(f: &mut F, node: MethodTurbofish) -> MethodTurbofish
+where
+ F: Fold + ?Sized,
+{
+ MethodTurbofish {
+ colon2_token: Token ! [ :: ](tokens_helper(f, &node.colon2_token.spans)),
+ lt_token: Token ! [ < ](tokens_helper(f, &node.lt_token.spans)),
+ args: FoldHelper::lift(node.args, |it| f.fold_generic_method_argument(it)),
+ gt_token: Token ! [ > ](tokens_helper(f, &node.gt_token.spans)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_nested_meta<F>(f: &mut F, node: NestedMeta) -> NestedMeta
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ NestedMeta::Meta(_binding_0) => NestedMeta::Meta(f.fold_meta(_binding_0)),
+ NestedMeta::Lit(_binding_0) => NestedMeta::Lit(f.fold_lit(_binding_0)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_parenthesized_generic_arguments<F>(
+ f: &mut F,
+ node: ParenthesizedGenericArguments,
+) -> ParenthesizedGenericArguments
+where
+ F: Fold + ?Sized,
+{
+ ParenthesizedGenericArguments {
+ paren_token: Paren(tokens_helper(f, &node.paren_token.span)),
+ inputs: FoldHelper::lift(node.inputs, |it| f.fold_type(it)),
+ output: f.fold_return_type(node.output),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_pat<F>(f: &mut F, node: Pat) -> Pat
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ Pat::Box(_binding_0) => Pat::Box(f.fold_pat_box(_binding_0)),
+ Pat::Ident(_binding_0) => Pat::Ident(f.fold_pat_ident(_binding_0)),
+ Pat::Lit(_binding_0) => Pat::Lit(f.fold_pat_lit(_binding_0)),
+ Pat::Macro(_binding_0) => Pat::Macro(f.fold_pat_macro(_binding_0)),
+ Pat::Or(_binding_0) => Pat::Or(f.fold_pat_or(_binding_0)),
+ Pat::Path(_binding_0) => Pat::Path(f.fold_pat_path(_binding_0)),
+ Pat::Range(_binding_0) => Pat::Range(f.fold_pat_range(_binding_0)),
+ Pat::Reference(_binding_0) => Pat::Reference(f.fold_pat_reference(_binding_0)),
+ Pat::Rest(_binding_0) => Pat::Rest(f.fold_pat_rest(_binding_0)),
+ Pat::Slice(_binding_0) => Pat::Slice(f.fold_pat_slice(_binding_0)),
+ Pat::Struct(_binding_0) => Pat::Struct(f.fold_pat_struct(_binding_0)),
+ Pat::Tuple(_binding_0) => Pat::Tuple(f.fold_pat_tuple(_binding_0)),
+ Pat::TupleStruct(_binding_0) => Pat::TupleStruct(f.fold_pat_tuple_struct(_binding_0)),
+ Pat::Type(_binding_0) => Pat::Type(f.fold_pat_type(_binding_0)),
+ Pat::Verbatim(_binding_0) => Pat::Verbatim(_binding_0),
+ Pat::Wild(_binding_0) => Pat::Wild(f.fold_pat_wild(_binding_0)),
+ _ => unreachable!(),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_pat_box<F>(f: &mut F, node: PatBox) -> PatBox
+where
+ F: Fold + ?Sized,
+{
+ PatBox {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ box_token: Token![box](tokens_helper(f, &node.box_token.span)),
+ pat: Box::new(f.fold_pat(*node.pat)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_pat_ident<F>(f: &mut F, node: PatIdent) -> PatIdent
+where
+ F: Fold + ?Sized,
+{
+ PatIdent {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ by_ref: (node.by_ref).map(|it| Token![ref](tokens_helper(f, &it.span))),
+ mutability: (node.mutability).map(|it| Token![mut](tokens_helper(f, &it.span))),
+ ident: f.fold_ident(node.ident),
+ subpat: (node.subpat).map(|it| {
+ (
+ Token ! [ @ ](tokens_helper(f, &(it).0.spans)),
+ Box::new(f.fold_pat(*(it).1)),
+ )
+ }),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_pat_lit<F>(f: &mut F, node: PatLit) -> PatLit
+where
+ F: Fold + ?Sized,
+{
+ PatLit {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ expr: Box::new(f.fold_expr(*node.expr)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_pat_macro<F>(f: &mut F, node: PatMacro) -> PatMacro
+where
+ F: Fold + ?Sized,
+{
+ PatMacro {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ mac: f.fold_macro(node.mac),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_pat_or<F>(f: &mut F, node: PatOr) -> PatOr
+where
+ F: Fold + ?Sized,
+{
+ PatOr {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ leading_vert: (node.leading_vert).map(|it| Token ! [ | ](tokens_helper(f, &it.spans))),
+ cases: FoldHelper::lift(node.cases, |it| f.fold_pat(it)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_pat_path<F>(f: &mut F, node: PatPath) -> PatPath
+where
+ F: Fold + ?Sized,
+{
+ PatPath {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ qself: (node.qself).map(|it| f.fold_qself(it)),
+ path: f.fold_path(node.path),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_pat_range<F>(f: &mut F, node: PatRange) -> PatRange
+where
+ F: Fold + ?Sized,
+{
+ PatRange {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ lo: Box::new(f.fold_expr(*node.lo)),
+ limits: f.fold_range_limits(node.limits),
+ hi: Box::new(f.fold_expr(*node.hi)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_pat_reference<F>(f: &mut F, node: PatReference) -> PatReference
+where
+ F: Fold + ?Sized,
+{
+ PatReference {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ and_token: Token ! [ & ](tokens_helper(f, &node.and_token.spans)),
+ mutability: (node.mutability).map(|it| Token![mut](tokens_helper(f, &it.span))),
+ pat: Box::new(f.fold_pat(*node.pat)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_pat_rest<F>(f: &mut F, node: PatRest) -> PatRest
+where
+ F: Fold + ?Sized,
+{
+ PatRest {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ dot2_token: Token![..](tokens_helper(f, &node.dot2_token.spans)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_pat_slice<F>(f: &mut F, node: PatSlice) -> PatSlice
+where
+ F: Fold + ?Sized,
+{
+ PatSlice {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ bracket_token: Bracket(tokens_helper(f, &node.bracket_token.span)),
+ elems: FoldHelper::lift(node.elems, |it| f.fold_pat(it)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_pat_struct<F>(f: &mut F, node: PatStruct) -> PatStruct
+where
+ F: Fold + ?Sized,
+{
+ PatStruct {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ path: f.fold_path(node.path),
+ brace_token: Brace(tokens_helper(f, &node.brace_token.span)),
+ fields: FoldHelper::lift(node.fields, |it| f.fold_field_pat(it)),
+ dot2_token: (node.dot2_token).map(|it| Token![..](tokens_helper(f, &it.spans))),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_pat_tuple<F>(f: &mut F, node: PatTuple) -> PatTuple
+where
+ F: Fold + ?Sized,
+{
+ PatTuple {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ paren_token: Paren(tokens_helper(f, &node.paren_token.span)),
+ elems: FoldHelper::lift(node.elems, |it| f.fold_pat(it)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_pat_tuple_struct<F>(f: &mut F, node: PatTupleStruct) -> PatTupleStruct
+where
+ F: Fold + ?Sized,
+{
+ PatTupleStruct {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ path: f.fold_path(node.path),
+ pat: f.fold_pat_tuple(node.pat),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_pat_type<F>(f: &mut F, node: PatType) -> PatType
+where
+ F: Fold + ?Sized,
+{
+ PatType {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ pat: Box::new(f.fold_pat(*node.pat)),
+ colon_token: Token ! [ : ](tokens_helper(f, &node.colon_token.spans)),
+ ty: Box::new(f.fold_type(*node.ty)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_pat_wild<F>(f: &mut F, node: PatWild) -> PatWild
+where
+ F: Fold + ?Sized,
+{
+ PatWild {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ underscore_token: Token![_](tokens_helper(f, &node.underscore_token.spans)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_path<F>(f: &mut F, node: Path) -> Path
+where
+ F: Fold + ?Sized,
+{
+ Path {
+ leading_colon: (node.leading_colon).map(|it| Token ! [ :: ](tokens_helper(f, &it.spans))),
+ segments: FoldHelper::lift(node.segments, |it| f.fold_path_segment(it)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_path_arguments<F>(f: &mut F, node: PathArguments) -> PathArguments
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ PathArguments::None => PathArguments::None,
+ PathArguments::AngleBracketed(_binding_0) => {
+ PathArguments::AngleBracketed(f.fold_angle_bracketed_generic_arguments(_binding_0))
+ }
+ PathArguments::Parenthesized(_binding_0) => {
+ PathArguments::Parenthesized(f.fold_parenthesized_generic_arguments(_binding_0))
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_path_segment<F>(f: &mut F, node: PathSegment) -> PathSegment
+where
+ F: Fold + ?Sized,
+{
+ PathSegment {
+ ident: f.fold_ident(node.ident),
+ arguments: f.fold_path_arguments(node.arguments),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_predicate_eq<F>(f: &mut F, node: PredicateEq) -> PredicateEq
+where
+ F: Fold + ?Sized,
+{
+ PredicateEq {
+ lhs_ty: f.fold_type(node.lhs_ty),
+ eq_token: Token ! [ = ](tokens_helper(f, &node.eq_token.spans)),
+ rhs_ty: f.fold_type(node.rhs_ty),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_predicate_lifetime<F>(f: &mut F, node: PredicateLifetime) -> PredicateLifetime
+where
+ F: Fold + ?Sized,
+{
+ PredicateLifetime {
+ lifetime: f.fold_lifetime(node.lifetime),
+ colon_token: Token ! [ : ](tokens_helper(f, &node.colon_token.spans)),
+ bounds: FoldHelper::lift(node.bounds, |it| f.fold_lifetime(it)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_predicate_type<F>(f: &mut F, node: PredicateType) -> PredicateType
+where
+ F: Fold + ?Sized,
+{
+ PredicateType {
+ lifetimes: (node.lifetimes).map(|it| f.fold_bound_lifetimes(it)),
+ bounded_ty: f.fold_type(node.bounded_ty),
+ colon_token: Token ! [ : ](tokens_helper(f, &node.colon_token.spans)),
+ bounds: FoldHelper::lift(node.bounds, |it| f.fold_type_param_bound(it)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_qself<F>(f: &mut F, node: QSelf) -> QSelf
+where
+ F: Fold + ?Sized,
+{
+ QSelf {
+ lt_token: Token ! [ < ](tokens_helper(f, &node.lt_token.spans)),
+ ty: Box::new(f.fold_type(*node.ty)),
+ position: node.position,
+ as_token: (node.as_token).map(|it| Token![as](tokens_helper(f, &it.span))),
+ gt_token: Token ! [ > ](tokens_helper(f, &node.gt_token.spans)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_range_limits<F>(f: &mut F, node: RangeLimits) -> RangeLimits
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ RangeLimits::HalfOpen(_binding_0) => {
+ RangeLimits::HalfOpen(Token![..](tokens_helper(f, &_binding_0.spans)))
+ }
+ RangeLimits::Closed(_binding_0) => {
+ RangeLimits::Closed(Token ! [ ..= ](tokens_helper(f, &_binding_0.spans)))
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_receiver<F>(f: &mut F, node: Receiver) -> Receiver
+where
+ F: Fold + ?Sized,
+{
+ Receiver {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ reference: (node.reference).map(|it| {
+ (
+ Token ! [ & ](tokens_helper(f, &(it).0.spans)),
+ ((it).1).map(|it| f.fold_lifetime(it)),
+ )
+ }),
+ mutability: (node.mutability).map(|it| Token![mut](tokens_helper(f, &it.span))),
+ self_token: Token![self](tokens_helper(f, &node.self_token.span)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_return_type<F>(f: &mut F, node: ReturnType) -> ReturnType
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ ReturnType::Default => ReturnType::Default,
+ ReturnType::Type(_binding_0, _binding_1) => ReturnType::Type(
+ Token ! [ -> ](tokens_helper(f, &_binding_0.spans)),
+ Box::new(f.fold_type(*_binding_1)),
+ ),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_signature<F>(f: &mut F, node: Signature) -> Signature
+where
+ F: Fold + ?Sized,
+{
+ Signature {
+ constness: (node.constness).map(|it| Token![const](tokens_helper(f, &it.span))),
+ asyncness: (node.asyncness).map(|it| Token![async](tokens_helper(f, &it.span))),
+ unsafety: (node.unsafety).map(|it| Token![unsafe](tokens_helper(f, &it.span))),
+ abi: (node.abi).map(|it| f.fold_abi(it)),
+ fn_token: Token![fn](tokens_helper(f, &node.fn_token.span)),
+ ident: f.fold_ident(node.ident),
+ generics: f.fold_generics(node.generics),
+ paren_token: Paren(tokens_helper(f, &node.paren_token.span)),
+ inputs: FoldHelper::lift(node.inputs, |it| f.fold_fn_arg(it)),
+ variadic: (node.variadic).map(|it| f.fold_variadic(it)),
+ output: f.fold_return_type(node.output),
+ }
+}
+pub fn fold_span<F>(f: &mut F, node: Span) -> Span
+where
+ F: Fold + ?Sized,
+{
+ node
+}
+#[cfg(feature = "full")]
+pub fn fold_stmt<F>(f: &mut F, node: Stmt) -> Stmt
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ Stmt::Local(_binding_0) => Stmt::Local(f.fold_local(_binding_0)),
+ Stmt::Item(_binding_0) => Stmt::Item(f.fold_item(_binding_0)),
+ Stmt::Expr(_binding_0) => Stmt::Expr(f.fold_expr(_binding_0)),
+ Stmt::Semi(_binding_0, _binding_1) => Stmt::Semi(
+ f.fold_expr(_binding_0),
+ Token ! [ ; ](tokens_helper(f, &_binding_1.spans)),
+ ),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_trait_bound<F>(f: &mut F, node: TraitBound) -> TraitBound
+where
+ F: Fold + ?Sized,
+{
+ TraitBound {
+ paren_token: (node.paren_token).map(|it| Paren(tokens_helper(f, &it.span))),
+ modifier: f.fold_trait_bound_modifier(node.modifier),
+ lifetimes: (node.lifetimes).map(|it| f.fold_bound_lifetimes(it)),
+ path: f.fold_path(node.path),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_trait_bound_modifier<F>(f: &mut F, node: TraitBoundModifier) -> TraitBoundModifier
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ TraitBoundModifier::None => TraitBoundModifier::None,
+ TraitBoundModifier::Maybe(_binding_0) => {
+ TraitBoundModifier::Maybe(Token ! [ ? ](tokens_helper(f, &_binding_0.spans)))
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_trait_item<F>(f: &mut F, node: TraitItem) -> TraitItem
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ TraitItem::Const(_binding_0) => TraitItem::Const(f.fold_trait_item_const(_binding_0)),
+ TraitItem::Method(_binding_0) => TraitItem::Method(f.fold_trait_item_method(_binding_0)),
+ TraitItem::Type(_binding_0) => TraitItem::Type(f.fold_trait_item_type(_binding_0)),
+ TraitItem::Macro(_binding_0) => TraitItem::Macro(f.fold_trait_item_macro(_binding_0)),
+ TraitItem::Verbatim(_binding_0) => TraitItem::Verbatim(_binding_0),
+ _ => unreachable!(),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_trait_item_const<F>(f: &mut F, node: TraitItemConst) -> TraitItemConst
+where
+ F: Fold + ?Sized,
+{
+ TraitItemConst {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ const_token: Token![const](tokens_helper(f, &node.const_token.span)),
+ ident: f.fold_ident(node.ident),
+ colon_token: Token ! [ : ](tokens_helper(f, &node.colon_token.spans)),
+ ty: f.fold_type(node.ty),
+ default: (node.default).map(|it| {
+ (
+ Token ! [ = ](tokens_helper(f, &(it).0.spans)),
+ f.fold_expr((it).1),
+ )
+ }),
+ semi_token: Token ! [ ; ](tokens_helper(f, &node.semi_token.spans)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_trait_item_macro<F>(f: &mut F, node: TraitItemMacro) -> TraitItemMacro
+where
+ F: Fold + ?Sized,
+{
+ TraitItemMacro {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ mac: f.fold_macro(node.mac),
+ semi_token: (node.semi_token).map(|it| Token ! [ ; ](tokens_helper(f, &it.spans))),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_trait_item_method<F>(f: &mut F, node: TraitItemMethod) -> TraitItemMethod
+where
+ F: Fold + ?Sized,
+{
+ TraitItemMethod {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ sig: f.fold_signature(node.sig),
+ default: (node.default).map(|it| f.fold_block(it)),
+ semi_token: (node.semi_token).map(|it| Token ! [ ; ](tokens_helper(f, &it.spans))),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_trait_item_type<F>(f: &mut F, node: TraitItemType) -> TraitItemType
+where
+ F: Fold + ?Sized,
+{
+ TraitItemType {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ type_token: Token![type](tokens_helper(f, &node.type_token.span)),
+ ident: f.fold_ident(node.ident),
+ generics: f.fold_generics(node.generics),
+ colon_token: (node.colon_token).map(|it| Token ! [ : ](tokens_helper(f, &it.spans))),
+ bounds: FoldHelper::lift(node.bounds, |it| f.fold_type_param_bound(it)),
+ default: (node.default).map(|it| {
+ (
+ Token ! [ = ](tokens_helper(f, &(it).0.spans)),
+ f.fold_type((it).1),
+ )
+ }),
+ semi_token: Token ! [ ; ](tokens_helper(f, &node.semi_token.spans)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_type<F>(f: &mut F, node: Type) -> Type
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ Type::Array(_binding_0) => Type::Array(f.fold_type_array(_binding_0)),
+ Type::BareFn(_binding_0) => Type::BareFn(f.fold_type_bare_fn(_binding_0)),
+ Type::Group(_binding_0) => Type::Group(f.fold_type_group(_binding_0)),
+ Type::ImplTrait(_binding_0) => Type::ImplTrait(f.fold_type_impl_trait(_binding_0)),
+ Type::Infer(_binding_0) => Type::Infer(f.fold_type_infer(_binding_0)),
+ Type::Macro(_binding_0) => Type::Macro(f.fold_type_macro(_binding_0)),
+ Type::Never(_binding_0) => Type::Never(f.fold_type_never(_binding_0)),
+ Type::Paren(_binding_0) => Type::Paren(f.fold_type_paren(_binding_0)),
+ Type::Path(_binding_0) => Type::Path(f.fold_type_path(_binding_0)),
+ Type::Ptr(_binding_0) => Type::Ptr(f.fold_type_ptr(_binding_0)),
+ Type::Reference(_binding_0) => Type::Reference(f.fold_type_reference(_binding_0)),
+ Type::Slice(_binding_0) => Type::Slice(f.fold_type_slice(_binding_0)),
+ Type::TraitObject(_binding_0) => Type::TraitObject(f.fold_type_trait_object(_binding_0)),
+ Type::Tuple(_binding_0) => Type::Tuple(f.fold_type_tuple(_binding_0)),
+ Type::Verbatim(_binding_0) => Type::Verbatim(_binding_0),
+ _ => unreachable!(),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_type_array<F>(f: &mut F, node: TypeArray) -> TypeArray
+where
+ F: Fold + ?Sized,
+{
+ TypeArray {
+ bracket_token: Bracket(tokens_helper(f, &node.bracket_token.span)),
+ elem: Box::new(f.fold_type(*node.elem)),
+ semi_token: Token ! [ ; ](tokens_helper(f, &node.semi_token.spans)),
+ len: f.fold_expr(node.len),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_type_bare_fn<F>(f: &mut F, node: TypeBareFn) -> TypeBareFn
+where
+ F: Fold + ?Sized,
+{
+ TypeBareFn {
+ lifetimes: (node.lifetimes).map(|it| f.fold_bound_lifetimes(it)),
+ unsafety: (node.unsafety).map(|it| Token![unsafe](tokens_helper(f, &it.span))),
+ abi: (node.abi).map(|it| f.fold_abi(it)),
+ fn_token: Token![fn](tokens_helper(f, &node.fn_token.span)),
+ paren_token: Paren(tokens_helper(f, &node.paren_token.span)),
+ inputs: FoldHelper::lift(node.inputs, |it| f.fold_bare_fn_arg(it)),
+ variadic: (node.variadic).map(|it| f.fold_variadic(it)),
+ output: f.fold_return_type(node.output),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_type_group<F>(f: &mut F, node: TypeGroup) -> TypeGroup
+where
+ F: Fold + ?Sized,
+{
+ TypeGroup {
+ group_token: Group(tokens_helper(f, &node.group_token.span)),
+ elem: Box::new(f.fold_type(*node.elem)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_type_impl_trait<F>(f: &mut F, node: TypeImplTrait) -> TypeImplTrait
+where
+ F: Fold + ?Sized,
+{
+ TypeImplTrait {
+ impl_token: Token![impl](tokens_helper(f, &node.impl_token.span)),
+ bounds: FoldHelper::lift(node.bounds, |it| f.fold_type_param_bound(it)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_type_infer<F>(f: &mut F, node: TypeInfer) -> TypeInfer
+where
+ F: Fold + ?Sized,
+{
+ TypeInfer {
+ underscore_token: Token![_](tokens_helper(f, &node.underscore_token.spans)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_type_macro<F>(f: &mut F, node: TypeMacro) -> TypeMacro
+where
+ F: Fold + ?Sized,
+{
+ TypeMacro {
+ mac: f.fold_macro(node.mac),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_type_never<F>(f: &mut F, node: TypeNever) -> TypeNever
+where
+ F: Fold + ?Sized,
+{
+ TypeNever {
+ bang_token: Token![!](tokens_helper(f, &node.bang_token.spans)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_type_param<F>(f: &mut F, node: TypeParam) -> TypeParam
+where
+ F: Fold + ?Sized,
+{
+ TypeParam {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ ident: f.fold_ident(node.ident),
+ colon_token: (node.colon_token).map(|it| Token ! [ : ](tokens_helper(f, &it.spans))),
+ bounds: FoldHelper::lift(node.bounds, |it| f.fold_type_param_bound(it)),
+ eq_token: (node.eq_token).map(|it| Token ! [ = ](tokens_helper(f, &it.spans))),
+ default: (node.default).map(|it| f.fold_type(it)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_type_param_bound<F>(f: &mut F, node: TypeParamBound) -> TypeParamBound
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ TypeParamBound::Trait(_binding_0) => TypeParamBound::Trait(f.fold_trait_bound(_binding_0)),
+ TypeParamBound::Lifetime(_binding_0) => {
+ TypeParamBound::Lifetime(f.fold_lifetime(_binding_0))
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_type_paren<F>(f: &mut F, node: TypeParen) -> TypeParen
+where
+ F: Fold + ?Sized,
+{
+ TypeParen {
+ paren_token: Paren(tokens_helper(f, &node.paren_token.span)),
+ elem: Box::new(f.fold_type(*node.elem)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_type_path<F>(f: &mut F, node: TypePath) -> TypePath
+where
+ F: Fold + ?Sized,
+{
+ TypePath {
+ qself: (node.qself).map(|it| f.fold_qself(it)),
+ path: f.fold_path(node.path),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_type_ptr<F>(f: &mut F, node: TypePtr) -> TypePtr
+where
+ F: Fold + ?Sized,
+{
+ TypePtr {
+ star_token: Token ! [ * ](tokens_helper(f, &node.star_token.spans)),
+ const_token: (node.const_token).map(|it| Token![const](tokens_helper(f, &it.span))),
+ mutability: (node.mutability).map(|it| Token![mut](tokens_helper(f, &it.span))),
+ elem: Box::new(f.fold_type(*node.elem)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_type_reference<F>(f: &mut F, node: TypeReference) -> TypeReference
+where
+ F: Fold + ?Sized,
+{
+ TypeReference {
+ and_token: Token ! [ & ](tokens_helper(f, &node.and_token.spans)),
+ lifetime: (node.lifetime).map(|it| f.fold_lifetime(it)),
+ mutability: (node.mutability).map(|it| Token![mut](tokens_helper(f, &it.span))),
+ elem: Box::new(f.fold_type(*node.elem)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_type_slice<F>(f: &mut F, node: TypeSlice) -> TypeSlice
+where
+ F: Fold + ?Sized,
+{
+ TypeSlice {
+ bracket_token: Bracket(tokens_helper(f, &node.bracket_token.span)),
+ elem: Box::new(f.fold_type(*node.elem)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_type_trait_object<F>(f: &mut F, node: TypeTraitObject) -> TypeTraitObject
+where
+ F: Fold + ?Sized,
+{
+ TypeTraitObject {
+ dyn_token: (node.dyn_token).map(|it| Token![dyn](tokens_helper(f, &it.span))),
+ bounds: FoldHelper::lift(node.bounds, |it| f.fold_type_param_bound(it)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_type_tuple<F>(f: &mut F, node: TypeTuple) -> TypeTuple
+where
+ F: Fold + ?Sized,
+{
+ TypeTuple {
+ paren_token: Paren(tokens_helper(f, &node.paren_token.span)),
+ elems: FoldHelper::lift(node.elems, |it| f.fold_type(it)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_un_op<F>(f: &mut F, node: UnOp) -> UnOp
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ UnOp::Deref(_binding_0) => UnOp::Deref(Token ! [ * ](tokens_helper(f, &_binding_0.spans))),
+ UnOp::Not(_binding_0) => UnOp::Not(Token![!](tokens_helper(f, &_binding_0.spans))),
+ UnOp::Neg(_binding_0) => UnOp::Neg(Token ! [ - ](tokens_helper(f, &_binding_0.spans))),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_use_glob<F>(f: &mut F, node: UseGlob) -> UseGlob
+where
+ F: Fold + ?Sized,
+{
+ UseGlob {
+ star_token: Token ! [ * ](tokens_helper(f, &node.star_token.spans)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_use_group<F>(f: &mut F, node: UseGroup) -> UseGroup
+where
+ F: Fold + ?Sized,
+{
+ UseGroup {
+ brace_token: Brace(tokens_helper(f, &node.brace_token.span)),
+ items: FoldHelper::lift(node.items, |it| f.fold_use_tree(it)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_use_name<F>(f: &mut F, node: UseName) -> UseName
+where
+ F: Fold + ?Sized,
+{
+ UseName {
+ ident: f.fold_ident(node.ident),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_use_path<F>(f: &mut F, node: UsePath) -> UsePath
+where
+ F: Fold + ?Sized,
+{
+ UsePath {
+ ident: f.fold_ident(node.ident),
+ colon2_token: Token ! [ :: ](tokens_helper(f, &node.colon2_token.spans)),
+ tree: Box::new(f.fold_use_tree(*node.tree)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_use_rename<F>(f: &mut F, node: UseRename) -> UseRename
+where
+ F: Fold + ?Sized,
+{
+ UseRename {
+ ident: f.fold_ident(node.ident),
+ as_token: Token![as](tokens_helper(f, &node.as_token.span)),
+ rename: f.fold_ident(node.rename),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_use_tree<F>(f: &mut F, node: UseTree) -> UseTree
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ UseTree::Path(_binding_0) => UseTree::Path(f.fold_use_path(_binding_0)),
+ UseTree::Name(_binding_0) => UseTree::Name(f.fold_use_name(_binding_0)),
+ UseTree::Rename(_binding_0) => UseTree::Rename(f.fold_use_rename(_binding_0)),
+ UseTree::Glob(_binding_0) => UseTree::Glob(f.fold_use_glob(_binding_0)),
+ UseTree::Group(_binding_0) => UseTree::Group(f.fold_use_group(_binding_0)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_variadic<F>(f: &mut F, node: Variadic) -> Variadic
+where
+ F: Fold + ?Sized,
+{
+ Variadic {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ dots: Token ! [ ... ](tokens_helper(f, &node.dots.spans)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_variant<F>(f: &mut F, node: Variant) -> Variant
+where
+ F: Fold + ?Sized,
+{
+ Variant {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ ident: f.fold_ident(node.ident),
+ fields: f.fold_fields(node.fields),
+ discriminant: (node.discriminant).map(|it| {
+ (
+ Token ! [ = ](tokens_helper(f, &(it).0.spans)),
+ f.fold_expr((it).1),
+ )
+ }),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_vis_crate<F>(f: &mut F, node: VisCrate) -> VisCrate
+where
+ F: Fold + ?Sized,
+{
+ VisCrate {
+ crate_token: Token![crate](tokens_helper(f, &node.crate_token.span)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_vis_public<F>(f: &mut F, node: VisPublic) -> VisPublic
+where
+ F: Fold + ?Sized,
+{
+ VisPublic {
+ pub_token: Token![pub](tokens_helper(f, &node.pub_token.span)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_vis_restricted<F>(f: &mut F, node: VisRestricted) -> VisRestricted
+where
+ F: Fold + ?Sized,
+{
+ VisRestricted {
+ pub_token: Token![pub](tokens_helper(f, &node.pub_token.span)),
+ paren_token: Paren(tokens_helper(f, &node.paren_token.span)),
+ in_token: (node.in_token).map(|it| Token![in](tokens_helper(f, &it.span))),
+ path: Box::new(f.fold_path(*node.path)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_visibility<F>(f: &mut F, node: Visibility) -> Visibility
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ Visibility::Public(_binding_0) => Visibility::Public(f.fold_vis_public(_binding_0)),
+ Visibility::Crate(_binding_0) => Visibility::Crate(f.fold_vis_crate(_binding_0)),
+ Visibility::Restricted(_binding_0) => {
+ Visibility::Restricted(f.fold_vis_restricted(_binding_0))
+ }
+ Visibility::Inherited => Visibility::Inherited,
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_where_clause<F>(f: &mut F, node: WhereClause) -> WhereClause
+where
+ F: Fold + ?Sized,
+{
+ WhereClause {
+ where_token: Token![where](tokens_helper(f, &node.where_token.span)),
+ predicates: FoldHelper::lift(node.predicates, |it| f.fold_where_predicate(it)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_where_predicate<F>(f: &mut F, node: WherePredicate) -> WherePredicate
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ WherePredicate::Type(_binding_0) => WherePredicate::Type(f.fold_predicate_type(_binding_0)),
+ WherePredicate::Lifetime(_binding_0) => {
+ WherePredicate::Lifetime(f.fold_predicate_lifetime(_binding_0))
+ }
+ WherePredicate::Eq(_binding_0) => WherePredicate::Eq(f.fold_predicate_eq(_binding_0)),
+ }
+}
diff --git a/syn/src/gen/visit.rs b/syn/src/gen/visit.rs
new file mode 100644
index 0000000..b667f53
--- /dev/null
+++ b/syn/src/gen/visit.rs
@@ -0,0 +1,3792 @@
+// This file is @generated by syn-internal-codegen.
+// It is not intended for manual editing.
+
+#![allow(unused_variables)]
+#[cfg(any(feature = "full", feature = "derive"))]
+use crate::gen::helper::visit::*;
+#[cfg(any(feature = "full", feature = "derive"))]
+use crate::punctuated::Punctuated;
+use crate::*;
+use proc_macro2::Span;
+#[cfg(feature = "full")]
+macro_rules! full {
+ ($e:expr) => {
+ $e
+ };
+}
+#[cfg(all(feature = "derive", not(feature = "full")))]
+macro_rules! full {
+ ($e:expr) => {
+ unreachable!()
+ };
+}
+#[cfg(any(feature = "full", feature = "derive"))]
+macro_rules! skip {
+ ($($tt:tt)*) => {};
+}
+/// Syntax tree traversal to walk a shared borrow of a syntax tree.
+///
+/// See the [module documentation] for details.
+///
+/// [module documentation]: self
+///
+/// *This trait is available if Syn is built with the `"visit"` feature.*
+pub trait Visit<'ast> {
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_abi(&mut self, i: &'ast Abi) {
+ visit_abi(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_angle_bracketed_generic_arguments(&mut self, i: &'ast AngleBracketedGenericArguments) {
+ visit_angle_bracketed_generic_arguments(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_arm(&mut self, i: &'ast Arm) {
+ visit_arm(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_attr_style(&mut self, i: &'ast AttrStyle) {
+ visit_attr_style(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_attribute(&mut self, i: &'ast Attribute) {
+ visit_attribute(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_bare_fn_arg(&mut self, i: &'ast BareFnArg) {
+ visit_bare_fn_arg(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_bin_op(&mut self, i: &'ast BinOp) {
+ visit_bin_op(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_binding(&mut self, i: &'ast Binding) {
+ visit_binding(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_block(&mut self, i: &'ast Block) {
+ visit_block(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_bound_lifetimes(&mut self, i: &'ast BoundLifetimes) {
+ visit_bound_lifetimes(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_const_param(&mut self, i: &'ast ConstParam) {
+ visit_const_param(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_constraint(&mut self, i: &'ast Constraint) {
+ visit_constraint(self, i)
+ }
+ #[cfg(feature = "derive")]
+ fn visit_data(&mut self, i: &'ast Data) {
+ visit_data(self, i)
+ }
+ #[cfg(feature = "derive")]
+ fn visit_data_enum(&mut self, i: &'ast DataEnum) {
+ visit_data_enum(self, i)
+ }
+ #[cfg(feature = "derive")]
+ fn visit_data_struct(&mut self, i: &'ast DataStruct) {
+ visit_data_struct(self, i)
+ }
+ #[cfg(feature = "derive")]
+ fn visit_data_union(&mut self, i: &'ast DataUnion) {
+ visit_data_union(self, i)
+ }
+ #[cfg(feature = "derive")]
+ fn visit_derive_input(&mut self, i: &'ast DeriveInput) {
+ visit_derive_input(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr(&mut self, i: &'ast Expr) {
+ visit_expr(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_array(&mut self, i: &'ast ExprArray) {
+ visit_expr_array(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_assign(&mut self, i: &'ast ExprAssign) {
+ visit_expr_assign(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_assign_op(&mut self, i: &'ast ExprAssignOp) {
+ visit_expr_assign_op(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_async(&mut self, i: &'ast ExprAsync) {
+ visit_expr_async(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_await(&mut self, i: &'ast ExprAwait) {
+ visit_expr_await(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr_binary(&mut self, i: &'ast ExprBinary) {
+ visit_expr_binary(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_block(&mut self, i: &'ast ExprBlock) {
+ visit_expr_block(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_box(&mut self, i: &'ast ExprBox) {
+ visit_expr_box(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_break(&mut self, i: &'ast ExprBreak) {
+ visit_expr_break(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr_call(&mut self, i: &'ast ExprCall) {
+ visit_expr_call(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr_cast(&mut self, i: &'ast ExprCast) {
+ visit_expr_cast(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_closure(&mut self, i: &'ast ExprClosure) {
+ visit_expr_closure(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_continue(&mut self, i: &'ast ExprContinue) {
+ visit_expr_continue(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr_field(&mut self, i: &'ast ExprField) {
+ visit_expr_field(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_for_loop(&mut self, i: &'ast ExprForLoop) {
+ visit_expr_for_loop(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_group(&mut self, i: &'ast ExprGroup) {
+ visit_expr_group(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_if(&mut self, i: &'ast ExprIf) {
+ visit_expr_if(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr_index(&mut self, i: &'ast ExprIndex) {
+ visit_expr_index(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_let(&mut self, i: &'ast ExprLet) {
+ visit_expr_let(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr_lit(&mut self, i: &'ast ExprLit) {
+ visit_expr_lit(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_loop(&mut self, i: &'ast ExprLoop) {
+ visit_expr_loop(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_macro(&mut self, i: &'ast ExprMacro) {
+ visit_expr_macro(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_match(&mut self, i: &'ast ExprMatch) {
+ visit_expr_match(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_method_call(&mut self, i: &'ast ExprMethodCall) {
+ visit_expr_method_call(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr_paren(&mut self, i: &'ast ExprParen) {
+ visit_expr_paren(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr_path(&mut self, i: &'ast ExprPath) {
+ visit_expr_path(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_range(&mut self, i: &'ast ExprRange) {
+ visit_expr_range(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_reference(&mut self, i: &'ast ExprReference) {
+ visit_expr_reference(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_repeat(&mut self, i: &'ast ExprRepeat) {
+ visit_expr_repeat(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_return(&mut self, i: &'ast ExprReturn) {
+ visit_expr_return(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_struct(&mut self, i: &'ast ExprStruct) {
+ visit_expr_struct(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_try(&mut self, i: &'ast ExprTry) {
+ visit_expr_try(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_try_block(&mut self, i: &'ast ExprTryBlock) {
+ visit_expr_try_block(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_tuple(&mut self, i: &'ast ExprTuple) {
+ visit_expr_tuple(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_type(&mut self, i: &'ast ExprType) {
+ visit_expr_type(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr_unary(&mut self, i: &'ast ExprUnary) {
+ visit_expr_unary(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_unsafe(&mut self, i: &'ast ExprUnsafe) {
+ visit_expr_unsafe(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_while(&mut self, i: &'ast ExprWhile) {
+ visit_expr_while(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_yield(&mut self, i: &'ast ExprYield) {
+ visit_expr_yield(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_field(&mut self, i: &'ast Field) {
+ visit_field(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_field_pat(&mut self, i: &'ast FieldPat) {
+ visit_field_pat(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_field_value(&mut self, i: &'ast FieldValue) {
+ visit_field_value(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_fields(&mut self, i: &'ast Fields) {
+ visit_fields(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_fields_named(&mut self, i: &'ast FieldsNamed) {
+ visit_fields_named(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_fields_unnamed(&mut self, i: &'ast FieldsUnnamed) {
+ visit_fields_unnamed(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_file(&mut self, i: &'ast File) {
+ visit_file(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_fn_arg(&mut self, i: &'ast FnArg) {
+ visit_fn_arg(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_foreign_item(&mut self, i: &'ast ForeignItem) {
+ visit_foreign_item(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_foreign_item_fn(&mut self, i: &'ast ForeignItemFn) {
+ visit_foreign_item_fn(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_foreign_item_macro(&mut self, i: &'ast ForeignItemMacro) {
+ visit_foreign_item_macro(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_foreign_item_static(&mut self, i: &'ast ForeignItemStatic) {
+ visit_foreign_item_static(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_foreign_item_type(&mut self, i: &'ast ForeignItemType) {
+ visit_foreign_item_type(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_generic_argument(&mut self, i: &'ast GenericArgument) {
+ visit_generic_argument(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_generic_method_argument(&mut self, i: &'ast GenericMethodArgument) {
+ visit_generic_method_argument(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_generic_param(&mut self, i: &'ast GenericParam) {
+ visit_generic_param(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_generics(&mut self, i: &'ast Generics) {
+ visit_generics(self, i)
+ }
+ fn visit_ident(&mut self, i: &'ast Ident) {
+ visit_ident(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_impl_item(&mut self, i: &'ast ImplItem) {
+ visit_impl_item(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_impl_item_const(&mut self, i: &'ast ImplItemConst) {
+ visit_impl_item_const(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_impl_item_macro(&mut self, i: &'ast ImplItemMacro) {
+ visit_impl_item_macro(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_impl_item_method(&mut self, i: &'ast ImplItemMethod) {
+ visit_impl_item_method(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_impl_item_type(&mut self, i: &'ast ImplItemType) {
+ visit_impl_item_type(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_index(&mut self, i: &'ast Index) {
+ visit_index(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_item(&mut self, i: &'ast Item) {
+ visit_item(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_const(&mut self, i: &'ast ItemConst) {
+ visit_item_const(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_enum(&mut self, i: &'ast ItemEnum) {
+ visit_item_enum(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_extern_crate(&mut self, i: &'ast ItemExternCrate) {
+ visit_item_extern_crate(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_fn(&mut self, i: &'ast ItemFn) {
+ visit_item_fn(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_foreign_mod(&mut self, i: &'ast ItemForeignMod) {
+ visit_item_foreign_mod(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_impl(&mut self, i: &'ast ItemImpl) {
+ visit_item_impl(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_macro(&mut self, i: &'ast ItemMacro) {
+ visit_item_macro(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_macro2(&mut self, i: &'ast ItemMacro2) {
+ visit_item_macro2(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_mod(&mut self, i: &'ast ItemMod) {
+ visit_item_mod(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_static(&mut self, i: &'ast ItemStatic) {
+ visit_item_static(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_struct(&mut self, i: &'ast ItemStruct) {
+ visit_item_struct(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_trait(&mut self, i: &'ast ItemTrait) {
+ visit_item_trait(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_trait_alias(&mut self, i: &'ast ItemTraitAlias) {
+ visit_item_trait_alias(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_type(&mut self, i: &'ast ItemType) {
+ visit_item_type(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_union(&mut self, i: &'ast ItemUnion) {
+ visit_item_union(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_use(&mut self, i: &'ast ItemUse) {
+ visit_item_use(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_label(&mut self, i: &'ast Label) {
+ visit_label(self, i)
+ }
+ fn visit_lifetime(&mut self, i: &'ast Lifetime) {
+ visit_lifetime(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_lifetime_def(&mut self, i: &'ast LifetimeDef) {
+ visit_lifetime_def(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_lit(&mut self, i: &'ast Lit) {
+ visit_lit(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_lit_bool(&mut self, i: &'ast LitBool) {
+ visit_lit_bool(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_lit_byte(&mut self, i: &'ast LitByte) {
+ visit_lit_byte(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_lit_byte_str(&mut self, i: &'ast LitByteStr) {
+ visit_lit_byte_str(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_lit_char(&mut self, i: &'ast LitChar) {
+ visit_lit_char(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_lit_float(&mut self, i: &'ast LitFloat) {
+ visit_lit_float(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_lit_int(&mut self, i: &'ast LitInt) {
+ visit_lit_int(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_lit_str(&mut self, i: &'ast LitStr) {
+ visit_lit_str(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_local(&mut self, i: &'ast Local) {
+ visit_local(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_macro(&mut self, i: &'ast Macro) {
+ visit_macro(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_macro_delimiter(&mut self, i: &'ast MacroDelimiter) {
+ visit_macro_delimiter(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_member(&mut self, i: &'ast Member) {
+ visit_member(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_meta(&mut self, i: &'ast Meta) {
+ visit_meta(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_meta_list(&mut self, i: &'ast MetaList) {
+ visit_meta_list(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_meta_name_value(&mut self, i: &'ast MetaNameValue) {
+ visit_meta_name_value(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_method_turbofish(&mut self, i: &'ast MethodTurbofish) {
+ visit_method_turbofish(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_nested_meta(&mut self, i: &'ast NestedMeta) {
+ visit_nested_meta(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_parenthesized_generic_arguments(&mut self, i: &'ast ParenthesizedGenericArguments) {
+ visit_parenthesized_generic_arguments(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat(&mut self, i: &'ast Pat) {
+ visit_pat(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_box(&mut self, i: &'ast PatBox) {
+ visit_pat_box(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_ident(&mut self, i: &'ast PatIdent) {
+ visit_pat_ident(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_lit(&mut self, i: &'ast PatLit) {
+ visit_pat_lit(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_macro(&mut self, i: &'ast PatMacro) {
+ visit_pat_macro(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_or(&mut self, i: &'ast PatOr) {
+ visit_pat_or(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_path(&mut self, i: &'ast PatPath) {
+ visit_pat_path(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_range(&mut self, i: &'ast PatRange) {
+ visit_pat_range(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_reference(&mut self, i: &'ast PatReference) {
+ visit_pat_reference(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_rest(&mut self, i: &'ast PatRest) {
+ visit_pat_rest(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_slice(&mut self, i: &'ast PatSlice) {
+ visit_pat_slice(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_struct(&mut self, i: &'ast PatStruct) {
+ visit_pat_struct(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_tuple(&mut self, i: &'ast PatTuple) {
+ visit_pat_tuple(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_tuple_struct(&mut self, i: &'ast PatTupleStruct) {
+ visit_pat_tuple_struct(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_type(&mut self, i: &'ast PatType) {
+ visit_pat_type(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_wild(&mut self, i: &'ast PatWild) {
+ visit_pat_wild(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_path(&mut self, i: &'ast Path) {
+ visit_path(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_path_arguments(&mut self, i: &'ast PathArguments) {
+ visit_path_arguments(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_path_segment(&mut self, i: &'ast PathSegment) {
+ visit_path_segment(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_predicate_eq(&mut self, i: &'ast PredicateEq) {
+ visit_predicate_eq(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_predicate_lifetime(&mut self, i: &'ast PredicateLifetime) {
+ visit_predicate_lifetime(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_predicate_type(&mut self, i: &'ast PredicateType) {
+ visit_predicate_type(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_qself(&mut self, i: &'ast QSelf) {
+ visit_qself(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_range_limits(&mut self, i: &'ast RangeLimits) {
+ visit_range_limits(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_receiver(&mut self, i: &'ast Receiver) {
+ visit_receiver(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_return_type(&mut self, i: &'ast ReturnType) {
+ visit_return_type(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_signature(&mut self, i: &'ast Signature) {
+ visit_signature(self, i)
+ }
+ fn visit_span(&mut self, i: &Span) {
+ visit_span(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_stmt(&mut self, i: &'ast Stmt) {
+ visit_stmt(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_trait_bound(&mut self, i: &'ast TraitBound) {
+ visit_trait_bound(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_trait_bound_modifier(&mut self, i: &'ast TraitBoundModifier) {
+ visit_trait_bound_modifier(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_trait_item(&mut self, i: &'ast TraitItem) {
+ visit_trait_item(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_trait_item_const(&mut self, i: &'ast TraitItemConst) {
+ visit_trait_item_const(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_trait_item_macro(&mut self, i: &'ast TraitItemMacro) {
+ visit_trait_item_macro(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_trait_item_method(&mut self, i: &'ast TraitItemMethod) {
+ visit_trait_item_method(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_trait_item_type(&mut self, i: &'ast TraitItemType) {
+ visit_trait_item_type(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type(&mut self, i: &'ast Type) {
+ visit_type(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_array(&mut self, i: &'ast TypeArray) {
+ visit_type_array(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_bare_fn(&mut self, i: &'ast TypeBareFn) {
+ visit_type_bare_fn(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_group(&mut self, i: &'ast TypeGroup) {
+ visit_type_group(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_impl_trait(&mut self, i: &'ast TypeImplTrait) {
+ visit_type_impl_trait(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_infer(&mut self, i: &'ast TypeInfer) {
+ visit_type_infer(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_macro(&mut self, i: &'ast TypeMacro) {
+ visit_type_macro(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_never(&mut self, i: &'ast TypeNever) {
+ visit_type_never(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_param(&mut self, i: &'ast TypeParam) {
+ visit_type_param(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_param_bound(&mut self, i: &'ast TypeParamBound) {
+ visit_type_param_bound(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_paren(&mut self, i: &'ast TypeParen) {
+ visit_type_paren(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_path(&mut self, i: &'ast TypePath) {
+ visit_type_path(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_ptr(&mut self, i: &'ast TypePtr) {
+ visit_type_ptr(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_reference(&mut self, i: &'ast TypeReference) {
+ visit_type_reference(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_slice(&mut self, i: &'ast TypeSlice) {
+ visit_type_slice(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_trait_object(&mut self, i: &'ast TypeTraitObject) {
+ visit_type_trait_object(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_tuple(&mut self, i: &'ast TypeTuple) {
+ visit_type_tuple(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_un_op(&mut self, i: &'ast UnOp) {
+ visit_un_op(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_use_glob(&mut self, i: &'ast UseGlob) {
+ visit_use_glob(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_use_group(&mut self, i: &'ast UseGroup) {
+ visit_use_group(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_use_name(&mut self, i: &'ast UseName) {
+ visit_use_name(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_use_path(&mut self, i: &'ast UsePath) {
+ visit_use_path(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_use_rename(&mut self, i: &'ast UseRename) {
+ visit_use_rename(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_use_tree(&mut self, i: &'ast UseTree) {
+ visit_use_tree(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_variadic(&mut self, i: &'ast Variadic) {
+ visit_variadic(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_variant(&mut self, i: &'ast Variant) {
+ visit_variant(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_vis_crate(&mut self, i: &'ast VisCrate) {
+ visit_vis_crate(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_vis_public(&mut self, i: &'ast VisPublic) {
+ visit_vis_public(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_vis_restricted(&mut self, i: &'ast VisRestricted) {
+ visit_vis_restricted(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_visibility(&mut self, i: &'ast Visibility) {
+ visit_visibility(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_where_clause(&mut self, i: &'ast WhereClause) {
+ visit_where_clause(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_where_predicate(&mut self, i: &'ast WherePredicate) {
+ visit_where_predicate(self, i)
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_abi<'ast, V>(v: &mut V, node: &'ast Abi)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.extern_token.span);
+ if let Some(it) = &node.name {
+ v.visit_lit_str(it)
+ };
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_angle_bracketed_generic_arguments<'ast, V>(
+ v: &mut V,
+ node: &'ast AngleBracketedGenericArguments,
+) where
+ V: Visit<'ast> + ?Sized,
+{
+ if let Some(it) = &node.colon2_token {
+ tokens_helper(v, &it.spans)
+ };
+ tokens_helper(v, &node.lt_token.spans);
+ for el in Punctuated::pairs(&node.args) {
+ let (it, p) = el.into_tuple();
+ v.visit_generic_argument(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+ tokens_helper(v, &node.gt_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_arm<'ast, V>(v: &mut V, node: &'ast Arm)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_pat(&node.pat);
+ if let Some(it) = &node.guard {
+ tokens_helper(v, &(it).0.span);
+ v.visit_expr(&*(it).1);
+ };
+ tokens_helper(v, &node.fat_arrow_token.spans);
+ v.visit_expr(&*node.body);
+ if let Some(it) = &node.comma {
+ tokens_helper(v, &it.spans)
+ };
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_attr_style<'ast, V>(v: &mut V, node: &'ast AttrStyle)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ AttrStyle::Outer => {}
+ AttrStyle::Inner(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_attribute<'ast, V>(v: &mut V, node: &'ast Attribute)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.pound_token.spans);
+ v.visit_attr_style(&node.style);
+ tokens_helper(v, &node.bracket_token.span);
+ v.visit_path(&node.path);
+ skip!(node.tokens);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_bare_fn_arg<'ast, V>(v: &mut V, node: &'ast BareFnArg)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ if let Some(it) = &node.name {
+ v.visit_ident(&(it).0);
+ tokens_helper(v, &(it).1.spans);
+ };
+ v.visit_type(&node.ty);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_bin_op<'ast, V>(v: &mut V, node: &'ast BinOp)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ BinOp::Add(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::Sub(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::Mul(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::Div(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::Rem(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::And(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::Or(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::BitXor(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::BitAnd(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::BitOr(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::Shl(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::Shr(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::Eq(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::Lt(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::Le(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::Ne(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::Ge(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::Gt(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::AddEq(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::SubEq(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::MulEq(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::DivEq(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::RemEq(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::BitXorEq(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::BitAndEq(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::BitOrEq(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::ShlEq(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::ShrEq(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_binding<'ast, V>(v: &mut V, node: &'ast Binding)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ v.visit_ident(&node.ident);
+ tokens_helper(v, &node.eq_token.spans);
+ v.visit_type(&node.ty);
+}
+#[cfg(feature = "full")]
+pub fn visit_block<'ast, V>(v: &mut V, node: &'ast Block)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.brace_token.span);
+ for it in &node.stmts {
+ v.visit_stmt(it)
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_bound_lifetimes<'ast, V>(v: &mut V, node: &'ast BoundLifetimes)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.for_token.span);
+ tokens_helper(v, &node.lt_token.spans);
+ for el in Punctuated::pairs(&node.lifetimes) {
+ let (it, p) = el.into_tuple();
+ v.visit_lifetime_def(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+ tokens_helper(v, &node.gt_token.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_const_param<'ast, V>(v: &mut V, node: &'ast ConstParam)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ tokens_helper(v, &node.const_token.span);
+ v.visit_ident(&node.ident);
+ tokens_helper(v, &node.colon_token.spans);
+ v.visit_type(&node.ty);
+ if let Some(it) = &node.eq_token {
+ tokens_helper(v, &it.spans)
+ };
+ if let Some(it) = &node.default {
+ v.visit_expr(it)
+ };
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_constraint<'ast, V>(v: &mut V, node: &'ast Constraint)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ v.visit_ident(&node.ident);
+ tokens_helper(v, &node.colon_token.spans);
+ for el in Punctuated::pairs(&node.bounds) {
+ let (it, p) = el.into_tuple();
+ v.visit_type_param_bound(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(feature = "derive")]
+pub fn visit_data<'ast, V>(v: &mut V, node: &'ast Data)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ Data::Struct(_binding_0) => {
+ v.visit_data_struct(_binding_0);
+ }
+ Data::Enum(_binding_0) => {
+ v.visit_data_enum(_binding_0);
+ }
+ Data::Union(_binding_0) => {
+ v.visit_data_union(_binding_0);
+ }
+ }
+}
+#[cfg(feature = "derive")]
+pub fn visit_data_enum<'ast, V>(v: &mut V, node: &'ast DataEnum)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.enum_token.span);
+ tokens_helper(v, &node.brace_token.span);
+ for el in Punctuated::pairs(&node.variants) {
+ let (it, p) = el.into_tuple();
+ v.visit_variant(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(feature = "derive")]
+pub fn visit_data_struct<'ast, V>(v: &mut V, node: &'ast DataStruct)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.struct_token.span);
+ v.visit_fields(&node.fields);
+ if let Some(it) = &node.semi_token {
+ tokens_helper(v, &it.spans)
+ };
+}
+#[cfg(feature = "derive")]
+pub fn visit_data_union<'ast, V>(v: &mut V, node: &'ast DataUnion)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.union_token.span);
+ v.visit_fields_named(&node.fields);
+}
+#[cfg(feature = "derive")]
+pub fn visit_derive_input<'ast, V>(v: &mut V, node: &'ast DeriveInput)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_visibility(&node.vis);
+ v.visit_ident(&node.ident);
+ v.visit_generics(&node.generics);
+ v.visit_data(&node.data);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr<'ast, V>(v: &mut V, node: &'ast Expr)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ Expr::Array(_binding_0) => {
+ full!(v.visit_expr_array(_binding_0));
+ }
+ Expr::Assign(_binding_0) => {
+ full!(v.visit_expr_assign(_binding_0));
+ }
+ Expr::AssignOp(_binding_0) => {
+ full!(v.visit_expr_assign_op(_binding_0));
+ }
+ Expr::Async(_binding_0) => {
+ full!(v.visit_expr_async(_binding_0));
+ }
+ Expr::Await(_binding_0) => {
+ full!(v.visit_expr_await(_binding_0));
+ }
+ Expr::Binary(_binding_0) => {
+ v.visit_expr_binary(_binding_0);
+ }
+ Expr::Block(_binding_0) => {
+ full!(v.visit_expr_block(_binding_0));
+ }
+ Expr::Box(_binding_0) => {
+ full!(v.visit_expr_box(_binding_0));
+ }
+ Expr::Break(_binding_0) => {
+ full!(v.visit_expr_break(_binding_0));
+ }
+ Expr::Call(_binding_0) => {
+ v.visit_expr_call(_binding_0);
+ }
+ Expr::Cast(_binding_0) => {
+ v.visit_expr_cast(_binding_0);
+ }
+ Expr::Closure(_binding_0) => {
+ full!(v.visit_expr_closure(_binding_0));
+ }
+ Expr::Continue(_binding_0) => {
+ full!(v.visit_expr_continue(_binding_0));
+ }
+ Expr::Field(_binding_0) => {
+ v.visit_expr_field(_binding_0);
+ }
+ Expr::ForLoop(_binding_0) => {
+ full!(v.visit_expr_for_loop(_binding_0));
+ }
+ Expr::Group(_binding_0) => {
+ full!(v.visit_expr_group(_binding_0));
+ }
+ Expr::If(_binding_0) => {
+ full!(v.visit_expr_if(_binding_0));
+ }
+ Expr::Index(_binding_0) => {
+ v.visit_expr_index(_binding_0);
+ }
+ Expr::Let(_binding_0) => {
+ full!(v.visit_expr_let(_binding_0));
+ }
+ Expr::Lit(_binding_0) => {
+ v.visit_expr_lit(_binding_0);
+ }
+ Expr::Loop(_binding_0) => {
+ full!(v.visit_expr_loop(_binding_0));
+ }
+ Expr::Macro(_binding_0) => {
+ full!(v.visit_expr_macro(_binding_0));
+ }
+ Expr::Match(_binding_0) => {
+ full!(v.visit_expr_match(_binding_0));
+ }
+ Expr::MethodCall(_binding_0) => {
+ full!(v.visit_expr_method_call(_binding_0));
+ }
+ Expr::Paren(_binding_0) => {
+ v.visit_expr_paren(_binding_0);
+ }
+ Expr::Path(_binding_0) => {
+ v.visit_expr_path(_binding_0);
+ }
+ Expr::Range(_binding_0) => {
+ full!(v.visit_expr_range(_binding_0));
+ }
+ Expr::Reference(_binding_0) => {
+ full!(v.visit_expr_reference(_binding_0));
+ }
+ Expr::Repeat(_binding_0) => {
+ full!(v.visit_expr_repeat(_binding_0));
+ }
+ Expr::Return(_binding_0) => {
+ full!(v.visit_expr_return(_binding_0));
+ }
+ Expr::Struct(_binding_0) => {
+ full!(v.visit_expr_struct(_binding_0));
+ }
+ Expr::Try(_binding_0) => {
+ full!(v.visit_expr_try(_binding_0));
+ }
+ Expr::TryBlock(_binding_0) => {
+ full!(v.visit_expr_try_block(_binding_0));
+ }
+ Expr::Tuple(_binding_0) => {
+ full!(v.visit_expr_tuple(_binding_0));
+ }
+ Expr::Type(_binding_0) => {
+ full!(v.visit_expr_type(_binding_0));
+ }
+ Expr::Unary(_binding_0) => {
+ v.visit_expr_unary(_binding_0);
+ }
+ Expr::Unsafe(_binding_0) => {
+ full!(v.visit_expr_unsafe(_binding_0));
+ }
+ Expr::Verbatim(_binding_0) => {
+ skip!(_binding_0);
+ }
+ Expr::While(_binding_0) => {
+ full!(v.visit_expr_while(_binding_0));
+ }
+ Expr::Yield(_binding_0) => {
+ full!(v.visit_expr_yield(_binding_0));
+ }
+ _ => unreachable!(),
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_array<'ast, V>(v: &mut V, node: &'ast ExprArray)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ tokens_helper(v, &node.bracket_token.span);
+ for el in Punctuated::pairs(&node.elems) {
+ let (it, p) = el.into_tuple();
+ v.visit_expr(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_assign<'ast, V>(v: &mut V, node: &'ast ExprAssign)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_expr(&*node.left);
+ tokens_helper(v, &node.eq_token.spans);
+ v.visit_expr(&*node.right);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_assign_op<'ast, V>(v: &mut V, node: &'ast ExprAssignOp)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_expr(&*node.left);
+ v.visit_bin_op(&node.op);
+ v.visit_expr(&*node.right);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_async<'ast, V>(v: &mut V, node: &'ast ExprAsync)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ tokens_helper(v, &node.async_token.span);
+ if let Some(it) = &node.capture {
+ tokens_helper(v, &it.span)
+ };
+ v.visit_block(&node.block);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_await<'ast, V>(v: &mut V, node: &'ast ExprAwait)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_expr(&*node.base);
+ tokens_helper(v, &node.dot_token.spans);
+ tokens_helper(v, &node.await_token.span);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr_binary<'ast, V>(v: &mut V, node: &'ast ExprBinary)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_expr(&*node.left);
+ v.visit_bin_op(&node.op);
+ v.visit_expr(&*node.right);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_block<'ast, V>(v: &mut V, node: &'ast ExprBlock)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ if let Some(it) = &node.label {
+ v.visit_label(it)
+ };
+ v.visit_block(&node.block);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_box<'ast, V>(v: &mut V, node: &'ast ExprBox)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ tokens_helper(v, &node.box_token.span);
+ v.visit_expr(&*node.expr);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_break<'ast, V>(v: &mut V, node: &'ast ExprBreak)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ tokens_helper(v, &node.break_token.span);
+ if let Some(it) = &node.label {
+ v.visit_lifetime(it)
+ };
+ if let Some(it) = &node.expr {
+ v.visit_expr(&**it)
+ };
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr_call<'ast, V>(v: &mut V, node: &'ast ExprCall)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_expr(&*node.func);
+ tokens_helper(v, &node.paren_token.span);
+ for el in Punctuated::pairs(&node.args) {
+ let (it, p) = el.into_tuple();
+ v.visit_expr(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr_cast<'ast, V>(v: &mut V, node: &'ast ExprCast)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_expr(&*node.expr);
+ tokens_helper(v, &node.as_token.span);
+ v.visit_type(&*node.ty);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_closure<'ast, V>(v: &mut V, node: &'ast ExprClosure)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ if let Some(it) = &node.asyncness {
+ tokens_helper(v, &it.span)
+ };
+ if let Some(it) = &node.movability {
+ tokens_helper(v, &it.span)
+ };
+ if let Some(it) = &node.capture {
+ tokens_helper(v, &it.span)
+ };
+ tokens_helper(v, &node.or1_token.spans);
+ for el in Punctuated::pairs(&node.inputs) {
+ let (it, p) = el.into_tuple();
+ v.visit_pat(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+ tokens_helper(v, &node.or2_token.spans);
+ v.visit_return_type(&node.output);
+ v.visit_expr(&*node.body);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_continue<'ast, V>(v: &mut V, node: &'ast ExprContinue)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ tokens_helper(v, &node.continue_token.span);
+ if let Some(it) = &node.label {
+ v.visit_lifetime(it)
+ };
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr_field<'ast, V>(v: &mut V, node: &'ast ExprField)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_expr(&*node.base);
+ tokens_helper(v, &node.dot_token.spans);
+ v.visit_member(&node.member);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_for_loop<'ast, V>(v: &mut V, node: &'ast ExprForLoop)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ if let Some(it) = &node.label {
+ v.visit_label(it)
+ };
+ tokens_helper(v, &node.for_token.span);
+ v.visit_pat(&node.pat);
+ tokens_helper(v, &node.in_token.span);
+ v.visit_expr(&*node.expr);
+ v.visit_block(&node.body);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_group<'ast, V>(v: &mut V, node: &'ast ExprGroup)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ tokens_helper(v, &node.group_token.span);
+ v.visit_expr(&*node.expr);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_if<'ast, V>(v: &mut V, node: &'ast ExprIf)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ tokens_helper(v, &node.if_token.span);
+ v.visit_expr(&*node.cond);
+ v.visit_block(&node.then_branch);
+ if let Some(it) = &node.else_branch {
+ tokens_helper(v, &(it).0.span);
+ v.visit_expr(&*(it).1);
+ };
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr_index<'ast, V>(v: &mut V, node: &'ast ExprIndex)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_expr(&*node.expr);
+ tokens_helper(v, &node.bracket_token.span);
+ v.visit_expr(&*node.index);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_let<'ast, V>(v: &mut V, node: &'ast ExprLet)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ tokens_helper(v, &node.let_token.span);
+ v.visit_pat(&node.pat);
+ tokens_helper(v, &node.eq_token.spans);
+ v.visit_expr(&*node.expr);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr_lit<'ast, V>(v: &mut V, node: &'ast ExprLit)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_lit(&node.lit);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_loop<'ast, V>(v: &mut V, node: &'ast ExprLoop)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ if let Some(it) = &node.label {
+ v.visit_label(it)
+ };
+ tokens_helper(v, &node.loop_token.span);
+ v.visit_block(&node.body);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_macro<'ast, V>(v: &mut V, node: &'ast ExprMacro)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_macro(&node.mac);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_match<'ast, V>(v: &mut V, node: &'ast ExprMatch)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ tokens_helper(v, &node.match_token.span);
+ v.visit_expr(&*node.expr);
+ tokens_helper(v, &node.brace_token.span);
+ for it in &node.arms {
+ v.visit_arm(it)
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_method_call<'ast, V>(v: &mut V, node: &'ast ExprMethodCall)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_expr(&*node.receiver);
+ tokens_helper(v, &node.dot_token.spans);
+ v.visit_ident(&node.method);
+ if let Some(it) = &node.turbofish {
+ v.visit_method_turbofish(it)
+ };
+ tokens_helper(v, &node.paren_token.span);
+ for el in Punctuated::pairs(&node.args) {
+ let (it, p) = el.into_tuple();
+ v.visit_expr(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr_paren<'ast, V>(v: &mut V, node: &'ast ExprParen)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ tokens_helper(v, &node.paren_token.span);
+ v.visit_expr(&*node.expr);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr_path<'ast, V>(v: &mut V, node: &'ast ExprPath)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ if let Some(it) = &node.qself {
+ v.visit_qself(it)
+ };
+ v.visit_path(&node.path);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_range<'ast, V>(v: &mut V, node: &'ast ExprRange)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ if let Some(it) = &node.from {
+ v.visit_expr(&**it)
+ };
+ v.visit_range_limits(&node.limits);
+ if let Some(it) = &node.to {
+ v.visit_expr(&**it)
+ };
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_reference<'ast, V>(v: &mut V, node: &'ast ExprReference)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ tokens_helper(v, &node.and_token.spans);
+ if let Some(it) = &node.mutability {
+ tokens_helper(v, &it.span)
+ };
+ v.visit_expr(&*node.expr);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_repeat<'ast, V>(v: &mut V, node: &'ast ExprRepeat)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ tokens_helper(v, &node.bracket_token.span);
+ v.visit_expr(&*node.expr);
+ tokens_helper(v, &node.semi_token.spans);
+ v.visit_expr(&*node.len);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_return<'ast, V>(v: &mut V, node: &'ast ExprReturn)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ tokens_helper(v, &node.return_token.span);
+ if let Some(it) = &node.expr {
+ v.visit_expr(&**it)
+ };
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_struct<'ast, V>(v: &mut V, node: &'ast ExprStruct)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_path(&node.path);
+ tokens_helper(v, &node.brace_token.span);
+ for el in Punctuated::pairs(&node.fields) {
+ let (it, p) = el.into_tuple();
+ v.visit_field_value(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+ if let Some(it) = &node.dot2_token {
+ tokens_helper(v, &it.spans)
+ };
+ if let Some(it) = &node.rest {
+ v.visit_expr(&**it)
+ };
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_try<'ast, V>(v: &mut V, node: &'ast ExprTry)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_expr(&*node.expr);
+ tokens_helper(v, &node.question_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_try_block<'ast, V>(v: &mut V, node: &'ast ExprTryBlock)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ tokens_helper(v, &node.try_token.span);
+ v.visit_block(&node.block);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_tuple<'ast, V>(v: &mut V, node: &'ast ExprTuple)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ tokens_helper(v, &node.paren_token.span);
+ for el in Punctuated::pairs(&node.elems) {
+ let (it, p) = el.into_tuple();
+ v.visit_expr(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_type<'ast, V>(v: &mut V, node: &'ast ExprType)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_expr(&*node.expr);
+ tokens_helper(v, &node.colon_token.spans);
+ v.visit_type(&*node.ty);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr_unary<'ast, V>(v: &mut V, node: &'ast ExprUnary)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_un_op(&node.op);
+ v.visit_expr(&*node.expr);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_unsafe<'ast, V>(v: &mut V, node: &'ast ExprUnsafe)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ tokens_helper(v, &node.unsafe_token.span);
+ v.visit_block(&node.block);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_while<'ast, V>(v: &mut V, node: &'ast ExprWhile)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ if let Some(it) = &node.label {
+ v.visit_label(it)
+ };
+ tokens_helper(v, &node.while_token.span);
+ v.visit_expr(&*node.cond);
+ v.visit_block(&node.body);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_yield<'ast, V>(v: &mut V, node: &'ast ExprYield)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ tokens_helper(v, &node.yield_token.span);
+ if let Some(it) = &node.expr {
+ v.visit_expr(&**it)
+ };
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_field<'ast, V>(v: &mut V, node: &'ast Field)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_visibility(&node.vis);
+ if let Some(it) = &node.ident {
+ v.visit_ident(it)
+ };
+ if let Some(it) = &node.colon_token {
+ tokens_helper(v, &it.spans)
+ };
+ v.visit_type(&node.ty);
+}
+#[cfg(feature = "full")]
+pub fn visit_field_pat<'ast, V>(v: &mut V, node: &'ast FieldPat)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_member(&node.member);
+ if let Some(it) = &node.colon_token {
+ tokens_helper(v, &it.spans)
+ };
+ v.visit_pat(&*node.pat);
+}
+#[cfg(feature = "full")]
+pub fn visit_field_value<'ast, V>(v: &mut V, node: &'ast FieldValue)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_member(&node.member);
+ if let Some(it) = &node.colon_token {
+ tokens_helper(v, &it.spans)
+ };
+ v.visit_expr(&node.expr);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_fields<'ast, V>(v: &mut V, node: &'ast Fields)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ Fields::Named(_binding_0) => {
+ v.visit_fields_named(_binding_0);
+ }
+ Fields::Unnamed(_binding_0) => {
+ v.visit_fields_unnamed(_binding_0);
+ }
+ Fields::Unit => {}
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_fields_named<'ast, V>(v: &mut V, node: &'ast FieldsNamed)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.brace_token.span);
+ for el in Punctuated::pairs(&node.named) {
+ let (it, p) = el.into_tuple();
+ v.visit_field(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_fields_unnamed<'ast, V>(v: &mut V, node: &'ast FieldsUnnamed)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.paren_token.span);
+ for el in Punctuated::pairs(&node.unnamed) {
+ let (it, p) = el.into_tuple();
+ v.visit_field(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_file<'ast, V>(v: &mut V, node: &'ast File)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ skip!(node.shebang);
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ for it in &node.items {
+ v.visit_item(it)
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_fn_arg<'ast, V>(v: &mut V, node: &'ast FnArg)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ FnArg::Receiver(_binding_0) => {
+ v.visit_receiver(_binding_0);
+ }
+ FnArg::Typed(_binding_0) => {
+ v.visit_pat_type(_binding_0);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_foreign_item<'ast, V>(v: &mut V, node: &'ast ForeignItem)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ ForeignItem::Fn(_binding_0) => {
+ v.visit_foreign_item_fn(_binding_0);
+ }
+ ForeignItem::Static(_binding_0) => {
+ v.visit_foreign_item_static(_binding_0);
+ }
+ ForeignItem::Type(_binding_0) => {
+ v.visit_foreign_item_type(_binding_0);
+ }
+ ForeignItem::Macro(_binding_0) => {
+ v.visit_foreign_item_macro(_binding_0);
+ }
+ ForeignItem::Verbatim(_binding_0) => {
+ skip!(_binding_0);
+ }
+ _ => unreachable!(),
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_foreign_item_fn<'ast, V>(v: &mut V, node: &'ast ForeignItemFn)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_visibility(&node.vis);
+ v.visit_signature(&node.sig);
+ tokens_helper(v, &node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_foreign_item_macro<'ast, V>(v: &mut V, node: &'ast ForeignItemMacro)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_macro(&node.mac);
+ if let Some(it) = &node.semi_token {
+ tokens_helper(v, &it.spans)
+ };
+}
+#[cfg(feature = "full")]
+pub fn visit_foreign_item_static<'ast, V>(v: &mut V, node: &'ast ForeignItemStatic)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_visibility(&node.vis);
+ tokens_helper(v, &node.static_token.span);
+ if let Some(it) = &node.mutability {
+ tokens_helper(v, &it.span)
+ };
+ v.visit_ident(&node.ident);
+ tokens_helper(v, &node.colon_token.spans);
+ v.visit_type(&*node.ty);
+ tokens_helper(v, &node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_foreign_item_type<'ast, V>(v: &mut V, node: &'ast ForeignItemType)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_visibility(&node.vis);
+ tokens_helper(v, &node.type_token.span);
+ v.visit_ident(&node.ident);
+ tokens_helper(v, &node.semi_token.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_generic_argument<'ast, V>(v: &mut V, node: &'ast GenericArgument)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ GenericArgument::Lifetime(_binding_0) => {
+ v.visit_lifetime(_binding_0);
+ }
+ GenericArgument::Type(_binding_0) => {
+ v.visit_type(_binding_0);
+ }
+ GenericArgument::Binding(_binding_0) => {
+ v.visit_binding(_binding_0);
+ }
+ GenericArgument::Constraint(_binding_0) => {
+ v.visit_constraint(_binding_0);
+ }
+ GenericArgument::Const(_binding_0) => {
+ v.visit_expr(_binding_0);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_generic_method_argument<'ast, V>(v: &mut V, node: &'ast GenericMethodArgument)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ GenericMethodArgument::Type(_binding_0) => {
+ v.visit_type(_binding_0);
+ }
+ GenericMethodArgument::Const(_binding_0) => {
+ v.visit_expr(_binding_0);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_generic_param<'ast, V>(v: &mut V, node: &'ast GenericParam)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ GenericParam::Type(_binding_0) => {
+ v.visit_type_param(_binding_0);
+ }
+ GenericParam::Lifetime(_binding_0) => {
+ v.visit_lifetime_def(_binding_0);
+ }
+ GenericParam::Const(_binding_0) => {
+ v.visit_const_param(_binding_0);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_generics<'ast, V>(v: &mut V, node: &'ast Generics)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ if let Some(it) = &node.lt_token {
+ tokens_helper(v, &it.spans)
+ };
+ for el in Punctuated::pairs(&node.params) {
+ let (it, p) = el.into_tuple();
+ v.visit_generic_param(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+ if let Some(it) = &node.gt_token {
+ tokens_helper(v, &it.spans)
+ };
+ if let Some(it) = &node.where_clause {
+ v.visit_where_clause(it)
+ };
+}
+pub fn visit_ident<'ast, V>(v: &mut V, node: &'ast Ident)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ v.visit_span(&node.span());
+}
+#[cfg(feature = "full")]
+pub fn visit_impl_item<'ast, V>(v: &mut V, node: &'ast ImplItem)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ ImplItem::Const(_binding_0) => {
+ v.visit_impl_item_const(_binding_0);
+ }
+ ImplItem::Method(_binding_0) => {
+ v.visit_impl_item_method(_binding_0);
+ }
+ ImplItem::Type(_binding_0) => {
+ v.visit_impl_item_type(_binding_0);
+ }
+ ImplItem::Macro(_binding_0) => {
+ v.visit_impl_item_macro(_binding_0);
+ }
+ ImplItem::Verbatim(_binding_0) => {
+ skip!(_binding_0);
+ }
+ _ => unreachable!(),
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_impl_item_const<'ast, V>(v: &mut V, node: &'ast ImplItemConst)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_visibility(&node.vis);
+ if let Some(it) = &node.defaultness {
+ tokens_helper(v, &it.span)
+ };
+ tokens_helper(v, &node.const_token.span);
+ v.visit_ident(&node.ident);
+ tokens_helper(v, &node.colon_token.spans);
+ v.visit_type(&node.ty);
+ tokens_helper(v, &node.eq_token.spans);
+ v.visit_expr(&node.expr);
+ tokens_helper(v, &node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_impl_item_macro<'ast, V>(v: &mut V, node: &'ast ImplItemMacro)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_macro(&node.mac);
+ if let Some(it) = &node.semi_token {
+ tokens_helper(v, &it.spans)
+ };
+}
+#[cfg(feature = "full")]
+pub fn visit_impl_item_method<'ast, V>(v: &mut V, node: &'ast ImplItemMethod)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_visibility(&node.vis);
+ if let Some(it) = &node.defaultness {
+ tokens_helper(v, &it.span)
+ };
+ v.visit_signature(&node.sig);
+ v.visit_block(&node.block);
+}
+#[cfg(feature = "full")]
+pub fn visit_impl_item_type<'ast, V>(v: &mut V, node: &'ast ImplItemType)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_visibility(&node.vis);
+ if let Some(it) = &node.defaultness {
+ tokens_helper(v, &it.span)
+ };
+ tokens_helper(v, &node.type_token.span);
+ v.visit_ident(&node.ident);
+ v.visit_generics(&node.generics);
+ tokens_helper(v, &node.eq_token.spans);
+ v.visit_type(&node.ty);
+ tokens_helper(v, &node.semi_token.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_index<'ast, V>(v: &mut V, node: &'ast Index)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ skip!(node.index);
+ v.visit_span(&node.span);
+}
+#[cfg(feature = "full")]
+pub fn visit_item<'ast, V>(v: &mut V, node: &'ast Item)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ Item::Const(_binding_0) => {
+ v.visit_item_const(_binding_0);
+ }
+ Item::Enum(_binding_0) => {
+ v.visit_item_enum(_binding_0);
+ }
+ Item::ExternCrate(_binding_0) => {
+ v.visit_item_extern_crate(_binding_0);
+ }
+ Item::Fn(_binding_0) => {
+ v.visit_item_fn(_binding_0);
+ }
+ Item::ForeignMod(_binding_0) => {
+ v.visit_item_foreign_mod(_binding_0);
+ }
+ Item::Impl(_binding_0) => {
+ v.visit_item_impl(_binding_0);
+ }
+ Item::Macro(_binding_0) => {
+ v.visit_item_macro(_binding_0);
+ }
+ Item::Macro2(_binding_0) => {
+ v.visit_item_macro2(_binding_0);
+ }
+ Item::Mod(_binding_0) => {
+ v.visit_item_mod(_binding_0);
+ }
+ Item::Static(_binding_0) => {
+ v.visit_item_static(_binding_0);
+ }
+ Item::Struct(_binding_0) => {
+ v.visit_item_struct(_binding_0);
+ }
+ Item::Trait(_binding_0) => {
+ v.visit_item_trait(_binding_0);
+ }
+ Item::TraitAlias(_binding_0) => {
+ v.visit_item_trait_alias(_binding_0);
+ }
+ Item::Type(_binding_0) => {
+ v.visit_item_type(_binding_0);
+ }
+ Item::Union(_binding_0) => {
+ v.visit_item_union(_binding_0);
+ }
+ Item::Use(_binding_0) => {
+ v.visit_item_use(_binding_0);
+ }
+ Item::Verbatim(_binding_0) => {
+ skip!(_binding_0);
+ }
+ _ => unreachable!(),
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_item_const<'ast, V>(v: &mut V, node: &'ast ItemConst)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_visibility(&node.vis);
+ tokens_helper(v, &node.const_token.span);
+ v.visit_ident(&node.ident);
+ tokens_helper(v, &node.colon_token.spans);
+ v.visit_type(&*node.ty);
+ tokens_helper(v, &node.eq_token.spans);
+ v.visit_expr(&*node.expr);
+ tokens_helper(v, &node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_item_enum<'ast, V>(v: &mut V, node: &'ast ItemEnum)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_visibility(&node.vis);
+ tokens_helper(v, &node.enum_token.span);
+ v.visit_ident(&node.ident);
+ v.visit_generics(&node.generics);
+ tokens_helper(v, &node.brace_token.span);
+ for el in Punctuated::pairs(&node.variants) {
+ let (it, p) = el.into_tuple();
+ v.visit_variant(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_item_extern_crate<'ast, V>(v: &mut V, node: &'ast ItemExternCrate)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_visibility(&node.vis);
+ tokens_helper(v, &node.extern_token.span);
+ tokens_helper(v, &node.crate_token.span);
+ v.visit_ident(&node.ident);
+ if let Some(it) = &node.rename {
+ tokens_helper(v, &(it).0.span);
+ v.visit_ident(&(it).1);
+ };
+ tokens_helper(v, &node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_item_fn<'ast, V>(v: &mut V, node: &'ast ItemFn)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_visibility(&node.vis);
+ v.visit_signature(&node.sig);
+ v.visit_block(&*node.block);
+}
+#[cfg(feature = "full")]
+pub fn visit_item_foreign_mod<'ast, V>(v: &mut V, node: &'ast ItemForeignMod)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_abi(&node.abi);
+ tokens_helper(v, &node.brace_token.span);
+ for it in &node.items {
+ v.visit_foreign_item(it)
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_item_impl<'ast, V>(v: &mut V, node: &'ast ItemImpl)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ if let Some(it) = &node.defaultness {
+ tokens_helper(v, &it.span)
+ };
+ if let Some(it) = &node.unsafety {
+ tokens_helper(v, &it.span)
+ };
+ tokens_helper(v, &node.impl_token.span);
+ v.visit_generics(&node.generics);
+ if let Some(it) = &node.trait_ {
+ if let Some(it) = &(it).0 {
+ tokens_helper(v, &it.spans)
+ };
+ v.visit_path(&(it).1);
+ tokens_helper(v, &(it).2.span);
+ };
+ v.visit_type(&*node.self_ty);
+ tokens_helper(v, &node.brace_token.span);
+ for it in &node.items {
+ v.visit_impl_item(it)
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_item_macro<'ast, V>(v: &mut V, node: &'ast ItemMacro)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ if let Some(it) = &node.ident {
+ v.visit_ident(it)
+ };
+ v.visit_macro(&node.mac);
+ if let Some(it) = &node.semi_token {
+ tokens_helper(v, &it.spans)
+ };
+}
+#[cfg(feature = "full")]
+pub fn visit_item_macro2<'ast, V>(v: &mut V, node: &'ast ItemMacro2)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_visibility(&node.vis);
+ tokens_helper(v, &node.macro_token.span);
+ v.visit_ident(&node.ident);
+ skip!(node.rules);
+}
+#[cfg(feature = "full")]
+pub fn visit_item_mod<'ast, V>(v: &mut V, node: &'ast ItemMod)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_visibility(&node.vis);
+ tokens_helper(v, &node.mod_token.span);
+ v.visit_ident(&node.ident);
+ if let Some(it) = &node.content {
+ tokens_helper(v, &(it).0.span);
+ for it in &(it).1 {
+ v.visit_item(it)
+ }
+ };
+ if let Some(it) = &node.semi {
+ tokens_helper(v, &it.spans)
+ };
+}
+#[cfg(feature = "full")]
+pub fn visit_item_static<'ast, V>(v: &mut V, node: &'ast ItemStatic)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_visibility(&node.vis);
+ tokens_helper(v, &node.static_token.span);
+ if let Some(it) = &node.mutability {
+ tokens_helper(v, &it.span)
+ };
+ v.visit_ident(&node.ident);
+ tokens_helper(v, &node.colon_token.spans);
+ v.visit_type(&*node.ty);
+ tokens_helper(v, &node.eq_token.spans);
+ v.visit_expr(&*node.expr);
+ tokens_helper(v, &node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_item_struct<'ast, V>(v: &mut V, node: &'ast ItemStruct)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_visibility(&node.vis);
+ tokens_helper(v, &node.struct_token.span);
+ v.visit_ident(&node.ident);
+ v.visit_generics(&node.generics);
+ v.visit_fields(&node.fields);
+ if let Some(it) = &node.semi_token {
+ tokens_helper(v, &it.spans)
+ };
+}
+#[cfg(feature = "full")]
+pub fn visit_item_trait<'ast, V>(v: &mut V, node: &'ast ItemTrait)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_visibility(&node.vis);
+ if let Some(it) = &node.unsafety {
+ tokens_helper(v, &it.span)
+ };
+ if let Some(it) = &node.auto_token {
+ tokens_helper(v, &it.span)
+ };
+ tokens_helper(v, &node.trait_token.span);
+ v.visit_ident(&node.ident);
+ v.visit_generics(&node.generics);
+ if let Some(it) = &node.colon_token {
+ tokens_helper(v, &it.spans)
+ };
+ for el in Punctuated::pairs(&node.supertraits) {
+ let (it, p) = el.into_tuple();
+ v.visit_type_param_bound(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+ tokens_helper(v, &node.brace_token.span);
+ for it in &node.items {
+ v.visit_trait_item(it)
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_item_trait_alias<'ast, V>(v: &mut V, node: &'ast ItemTraitAlias)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_visibility(&node.vis);
+ tokens_helper(v, &node.trait_token.span);
+ v.visit_ident(&node.ident);
+ v.visit_generics(&node.generics);
+ tokens_helper(v, &node.eq_token.spans);
+ for el in Punctuated::pairs(&node.bounds) {
+ let (it, p) = el.into_tuple();
+ v.visit_type_param_bound(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+ tokens_helper(v, &node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_item_type<'ast, V>(v: &mut V, node: &'ast ItemType)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_visibility(&node.vis);
+ tokens_helper(v, &node.type_token.span);
+ v.visit_ident(&node.ident);
+ v.visit_generics(&node.generics);
+ tokens_helper(v, &node.eq_token.spans);
+ v.visit_type(&*node.ty);
+ tokens_helper(v, &node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_item_union<'ast, V>(v: &mut V, node: &'ast ItemUnion)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_visibility(&node.vis);
+ tokens_helper(v, &node.union_token.span);
+ v.visit_ident(&node.ident);
+ v.visit_generics(&node.generics);
+ v.visit_fields_named(&node.fields);
+}
+#[cfg(feature = "full")]
+pub fn visit_item_use<'ast, V>(v: &mut V, node: &'ast ItemUse)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_visibility(&node.vis);
+ tokens_helper(v, &node.use_token.span);
+ if let Some(it) = &node.leading_colon {
+ tokens_helper(v, &it.spans)
+ };
+ v.visit_use_tree(&node.tree);
+ tokens_helper(v, &node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_label<'ast, V>(v: &mut V, node: &'ast Label)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ v.visit_lifetime(&node.name);
+ tokens_helper(v, &node.colon_token.spans);
+}
+pub fn visit_lifetime<'ast, V>(v: &mut V, node: &'ast Lifetime)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ v.visit_span(&node.apostrophe);
+ v.visit_ident(&node.ident);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_lifetime_def<'ast, V>(v: &mut V, node: &'ast LifetimeDef)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_lifetime(&node.lifetime);
+ if let Some(it) = &node.colon_token {
+ tokens_helper(v, &it.spans)
+ };
+ for el in Punctuated::pairs(&node.bounds) {
+ let (it, p) = el.into_tuple();
+ v.visit_lifetime(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_lit<'ast, V>(v: &mut V, node: &'ast Lit)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ Lit::Str(_binding_0) => {
+ v.visit_lit_str(_binding_0);
+ }
+ Lit::ByteStr(_binding_0) => {
+ v.visit_lit_byte_str(_binding_0);
+ }
+ Lit::Byte(_binding_0) => {
+ v.visit_lit_byte(_binding_0);
+ }
+ Lit::Char(_binding_0) => {
+ v.visit_lit_char(_binding_0);
+ }
+ Lit::Int(_binding_0) => {
+ v.visit_lit_int(_binding_0);
+ }
+ Lit::Float(_binding_0) => {
+ v.visit_lit_float(_binding_0);
+ }
+ Lit::Bool(_binding_0) => {
+ v.visit_lit_bool(_binding_0);
+ }
+ Lit::Verbatim(_binding_0) => {
+ skip!(_binding_0);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_lit_bool<'ast, V>(v: &mut V, node: &'ast LitBool)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ skip!(node.value);
+ v.visit_span(&node.span);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_lit_byte<'ast, V>(v: &mut V, node: &'ast LitByte)
+where
+ V: Visit<'ast> + ?Sized,
+{
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_lit_byte_str<'ast, V>(v: &mut V, node: &'ast LitByteStr)
+where
+ V: Visit<'ast> + ?Sized,
+{
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_lit_char<'ast, V>(v: &mut V, node: &'ast LitChar)
+where
+ V: Visit<'ast> + ?Sized,
+{
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_lit_float<'ast, V>(v: &mut V, node: &'ast LitFloat)
+where
+ V: Visit<'ast> + ?Sized,
+{
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_lit_int<'ast, V>(v: &mut V, node: &'ast LitInt)
+where
+ V: Visit<'ast> + ?Sized,
+{
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_lit_str<'ast, V>(v: &mut V, node: &'ast LitStr)
+where
+ V: Visit<'ast> + ?Sized,
+{
+}
+#[cfg(feature = "full")]
+pub fn visit_local<'ast, V>(v: &mut V, node: &'ast Local)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ tokens_helper(v, &node.let_token.span);
+ v.visit_pat(&node.pat);
+ if let Some(it) = &node.init {
+ tokens_helper(v, &(it).0.spans);
+ v.visit_expr(&*(it).1);
+ };
+ tokens_helper(v, &node.semi_token.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_macro<'ast, V>(v: &mut V, node: &'ast Macro)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ v.visit_path(&node.path);
+ tokens_helper(v, &node.bang_token.spans);
+ v.visit_macro_delimiter(&node.delimiter);
+ skip!(node.tokens);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_macro_delimiter<'ast, V>(v: &mut V, node: &'ast MacroDelimiter)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ MacroDelimiter::Paren(_binding_0) => {
+ tokens_helper(v, &_binding_0.span);
+ }
+ MacroDelimiter::Brace(_binding_0) => {
+ tokens_helper(v, &_binding_0.span);
+ }
+ MacroDelimiter::Bracket(_binding_0) => {
+ tokens_helper(v, &_binding_0.span);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_member<'ast, V>(v: &mut V, node: &'ast Member)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ Member::Named(_binding_0) => {
+ v.visit_ident(_binding_0);
+ }
+ Member::Unnamed(_binding_0) => {
+ v.visit_index(_binding_0);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_meta<'ast, V>(v: &mut V, node: &'ast Meta)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ Meta::Path(_binding_0) => {
+ v.visit_path(_binding_0);
+ }
+ Meta::List(_binding_0) => {
+ v.visit_meta_list(_binding_0);
+ }
+ Meta::NameValue(_binding_0) => {
+ v.visit_meta_name_value(_binding_0);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_meta_list<'ast, V>(v: &mut V, node: &'ast MetaList)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ v.visit_path(&node.path);
+ tokens_helper(v, &node.paren_token.span);
+ for el in Punctuated::pairs(&node.nested) {
+ let (it, p) = el.into_tuple();
+ v.visit_nested_meta(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_meta_name_value<'ast, V>(v: &mut V, node: &'ast MetaNameValue)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ v.visit_path(&node.path);
+ tokens_helper(v, &node.eq_token.spans);
+ v.visit_lit(&node.lit);
+}
+#[cfg(feature = "full")]
+pub fn visit_method_turbofish<'ast, V>(v: &mut V, node: &'ast MethodTurbofish)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.colon2_token.spans);
+ tokens_helper(v, &node.lt_token.spans);
+ for el in Punctuated::pairs(&node.args) {
+ let (it, p) = el.into_tuple();
+ v.visit_generic_method_argument(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+ tokens_helper(v, &node.gt_token.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_nested_meta<'ast, V>(v: &mut V, node: &'ast NestedMeta)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ NestedMeta::Meta(_binding_0) => {
+ v.visit_meta(_binding_0);
+ }
+ NestedMeta::Lit(_binding_0) => {
+ v.visit_lit(_binding_0);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_parenthesized_generic_arguments<'ast, V>(
+ v: &mut V,
+ node: &'ast ParenthesizedGenericArguments,
+) where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.paren_token.span);
+ for el in Punctuated::pairs(&node.inputs) {
+ let (it, p) = el.into_tuple();
+ v.visit_type(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+ v.visit_return_type(&node.output);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat<'ast, V>(v: &mut V, node: &'ast Pat)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ Pat::Box(_binding_0) => {
+ v.visit_pat_box(_binding_0);
+ }
+ Pat::Ident(_binding_0) => {
+ v.visit_pat_ident(_binding_0);
+ }
+ Pat::Lit(_binding_0) => {
+ v.visit_pat_lit(_binding_0);
+ }
+ Pat::Macro(_binding_0) => {
+ v.visit_pat_macro(_binding_0);
+ }
+ Pat::Or(_binding_0) => {
+ v.visit_pat_or(_binding_0);
+ }
+ Pat::Path(_binding_0) => {
+ v.visit_pat_path(_binding_0);
+ }
+ Pat::Range(_binding_0) => {
+ v.visit_pat_range(_binding_0);
+ }
+ Pat::Reference(_binding_0) => {
+ v.visit_pat_reference(_binding_0);
+ }
+ Pat::Rest(_binding_0) => {
+ v.visit_pat_rest(_binding_0);
+ }
+ Pat::Slice(_binding_0) => {
+ v.visit_pat_slice(_binding_0);
+ }
+ Pat::Struct(_binding_0) => {
+ v.visit_pat_struct(_binding_0);
+ }
+ Pat::Tuple(_binding_0) => {
+ v.visit_pat_tuple(_binding_0);
+ }
+ Pat::TupleStruct(_binding_0) => {
+ v.visit_pat_tuple_struct(_binding_0);
+ }
+ Pat::Type(_binding_0) => {
+ v.visit_pat_type(_binding_0);
+ }
+ Pat::Verbatim(_binding_0) => {
+ skip!(_binding_0);
+ }
+ Pat::Wild(_binding_0) => {
+ v.visit_pat_wild(_binding_0);
+ }
+ _ => unreachable!(),
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_box<'ast, V>(v: &mut V, node: &'ast PatBox)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ tokens_helper(v, &node.box_token.span);
+ v.visit_pat(&*node.pat);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_ident<'ast, V>(v: &mut V, node: &'ast PatIdent)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ if let Some(it) = &node.by_ref {
+ tokens_helper(v, &it.span)
+ };
+ if let Some(it) = &node.mutability {
+ tokens_helper(v, &it.span)
+ };
+ v.visit_ident(&node.ident);
+ if let Some(it) = &node.subpat {
+ tokens_helper(v, &(it).0.spans);
+ v.visit_pat(&*(it).1);
+ };
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_lit<'ast, V>(v: &mut V, node: &'ast PatLit)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_expr(&*node.expr);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_macro<'ast, V>(v: &mut V, node: &'ast PatMacro)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_macro(&node.mac);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_or<'ast, V>(v: &mut V, node: &'ast PatOr)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ if let Some(it) = &node.leading_vert {
+ tokens_helper(v, &it.spans)
+ };
+ for el in Punctuated::pairs(&node.cases) {
+ let (it, p) = el.into_tuple();
+ v.visit_pat(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_path<'ast, V>(v: &mut V, node: &'ast PatPath)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ if let Some(it) = &node.qself {
+ v.visit_qself(it)
+ };
+ v.visit_path(&node.path);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_range<'ast, V>(v: &mut V, node: &'ast PatRange)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_expr(&*node.lo);
+ v.visit_range_limits(&node.limits);
+ v.visit_expr(&*node.hi);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_reference<'ast, V>(v: &mut V, node: &'ast PatReference)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ tokens_helper(v, &node.and_token.spans);
+ if let Some(it) = &node.mutability {
+ tokens_helper(v, &it.span)
+ };
+ v.visit_pat(&*node.pat);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_rest<'ast, V>(v: &mut V, node: &'ast PatRest)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ tokens_helper(v, &node.dot2_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_slice<'ast, V>(v: &mut V, node: &'ast PatSlice)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ tokens_helper(v, &node.bracket_token.span);
+ for el in Punctuated::pairs(&node.elems) {
+ let (it, p) = el.into_tuple();
+ v.visit_pat(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_struct<'ast, V>(v: &mut V, node: &'ast PatStruct)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_path(&node.path);
+ tokens_helper(v, &node.brace_token.span);
+ for el in Punctuated::pairs(&node.fields) {
+ let (it, p) = el.into_tuple();
+ v.visit_field_pat(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+ if let Some(it) = &node.dot2_token {
+ tokens_helper(v, &it.spans)
+ };
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_tuple<'ast, V>(v: &mut V, node: &'ast PatTuple)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ tokens_helper(v, &node.paren_token.span);
+ for el in Punctuated::pairs(&node.elems) {
+ let (it, p) = el.into_tuple();
+ v.visit_pat(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_tuple_struct<'ast, V>(v: &mut V, node: &'ast PatTupleStruct)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_path(&node.path);
+ v.visit_pat_tuple(&node.pat);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_type<'ast, V>(v: &mut V, node: &'ast PatType)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_pat(&*node.pat);
+ tokens_helper(v, &node.colon_token.spans);
+ v.visit_type(&*node.ty);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_wild<'ast, V>(v: &mut V, node: &'ast PatWild)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ tokens_helper(v, &node.underscore_token.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_path<'ast, V>(v: &mut V, node: &'ast Path)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ if let Some(it) = &node.leading_colon {
+ tokens_helper(v, &it.spans)
+ };
+ for el in Punctuated::pairs(&node.segments) {
+ let (it, p) = el.into_tuple();
+ v.visit_path_segment(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_path_arguments<'ast, V>(v: &mut V, node: &'ast PathArguments)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ PathArguments::None => {}
+ PathArguments::AngleBracketed(_binding_0) => {
+ v.visit_angle_bracketed_generic_arguments(_binding_0);
+ }
+ PathArguments::Parenthesized(_binding_0) => {
+ v.visit_parenthesized_generic_arguments(_binding_0);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_path_segment<'ast, V>(v: &mut V, node: &'ast PathSegment)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ v.visit_ident(&node.ident);
+ v.visit_path_arguments(&node.arguments);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_predicate_eq<'ast, V>(v: &mut V, node: &'ast PredicateEq)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ v.visit_type(&node.lhs_ty);
+ tokens_helper(v, &node.eq_token.spans);
+ v.visit_type(&node.rhs_ty);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_predicate_lifetime<'ast, V>(v: &mut V, node: &'ast PredicateLifetime)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ v.visit_lifetime(&node.lifetime);
+ tokens_helper(v, &node.colon_token.spans);
+ for el in Punctuated::pairs(&node.bounds) {
+ let (it, p) = el.into_tuple();
+ v.visit_lifetime(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_predicate_type<'ast, V>(v: &mut V, node: &'ast PredicateType)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ if let Some(it) = &node.lifetimes {
+ v.visit_bound_lifetimes(it)
+ };
+ v.visit_type(&node.bounded_ty);
+ tokens_helper(v, &node.colon_token.spans);
+ for el in Punctuated::pairs(&node.bounds) {
+ let (it, p) = el.into_tuple();
+ v.visit_type_param_bound(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_qself<'ast, V>(v: &mut V, node: &'ast QSelf)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.lt_token.spans);
+ v.visit_type(&*node.ty);
+ skip!(node.position);
+ if let Some(it) = &node.as_token {
+ tokens_helper(v, &it.span)
+ };
+ tokens_helper(v, &node.gt_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_range_limits<'ast, V>(v: &mut V, node: &'ast RangeLimits)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ RangeLimits::HalfOpen(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ RangeLimits::Closed(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_receiver<'ast, V>(v: &mut V, node: &'ast Receiver)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ if let Some(it) = &node.reference {
+ tokens_helper(v, &(it).0.spans);
+ if let Some(it) = &(it).1 {
+ v.visit_lifetime(it)
+ };
+ };
+ if let Some(it) = &node.mutability {
+ tokens_helper(v, &it.span)
+ };
+ tokens_helper(v, &node.self_token.span);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_return_type<'ast, V>(v: &mut V, node: &'ast ReturnType)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ ReturnType::Default => {}
+ ReturnType::Type(_binding_0, _binding_1) => {
+ tokens_helper(v, &_binding_0.spans);
+ v.visit_type(&**_binding_1);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_signature<'ast, V>(v: &mut V, node: &'ast Signature)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ if let Some(it) = &node.constness {
+ tokens_helper(v, &it.span)
+ };
+ if let Some(it) = &node.asyncness {
+ tokens_helper(v, &it.span)
+ };
+ if let Some(it) = &node.unsafety {
+ tokens_helper(v, &it.span)
+ };
+ if let Some(it) = &node.abi {
+ v.visit_abi(it)
+ };
+ tokens_helper(v, &node.fn_token.span);
+ v.visit_ident(&node.ident);
+ v.visit_generics(&node.generics);
+ tokens_helper(v, &node.paren_token.span);
+ for el in Punctuated::pairs(&node.inputs) {
+ let (it, p) = el.into_tuple();
+ v.visit_fn_arg(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+ if let Some(it) = &node.variadic {
+ v.visit_variadic(it)
+ };
+ v.visit_return_type(&node.output);
+}
+pub fn visit_span<'ast, V>(v: &mut V, node: &Span)
+where
+ V: Visit<'ast> + ?Sized,
+{
+}
+#[cfg(feature = "full")]
+pub fn visit_stmt<'ast, V>(v: &mut V, node: &'ast Stmt)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ Stmt::Local(_binding_0) => {
+ v.visit_local(_binding_0);
+ }
+ Stmt::Item(_binding_0) => {
+ v.visit_item(_binding_0);
+ }
+ Stmt::Expr(_binding_0) => {
+ v.visit_expr(_binding_0);
+ }
+ Stmt::Semi(_binding_0, _binding_1) => {
+ v.visit_expr(_binding_0);
+ tokens_helper(v, &_binding_1.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_trait_bound<'ast, V>(v: &mut V, node: &'ast TraitBound)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ if let Some(it) = &node.paren_token {
+ tokens_helper(v, &it.span)
+ };
+ v.visit_trait_bound_modifier(&node.modifier);
+ if let Some(it) = &node.lifetimes {
+ v.visit_bound_lifetimes(it)
+ };
+ v.visit_path(&node.path);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_trait_bound_modifier<'ast, V>(v: &mut V, node: &'ast TraitBoundModifier)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ TraitBoundModifier::None => {}
+ TraitBoundModifier::Maybe(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_trait_item<'ast, V>(v: &mut V, node: &'ast TraitItem)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ TraitItem::Const(_binding_0) => {
+ v.visit_trait_item_const(_binding_0);
+ }
+ TraitItem::Method(_binding_0) => {
+ v.visit_trait_item_method(_binding_0);
+ }
+ TraitItem::Type(_binding_0) => {
+ v.visit_trait_item_type(_binding_0);
+ }
+ TraitItem::Macro(_binding_0) => {
+ v.visit_trait_item_macro(_binding_0);
+ }
+ TraitItem::Verbatim(_binding_0) => {
+ skip!(_binding_0);
+ }
+ _ => unreachable!(),
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_trait_item_const<'ast, V>(v: &mut V, node: &'ast TraitItemConst)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ tokens_helper(v, &node.const_token.span);
+ v.visit_ident(&node.ident);
+ tokens_helper(v, &node.colon_token.spans);
+ v.visit_type(&node.ty);
+ if let Some(it) = &node.default {
+ tokens_helper(v, &(it).0.spans);
+ v.visit_expr(&(it).1);
+ };
+ tokens_helper(v, &node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_trait_item_macro<'ast, V>(v: &mut V, node: &'ast TraitItemMacro)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_macro(&node.mac);
+ if let Some(it) = &node.semi_token {
+ tokens_helper(v, &it.spans)
+ };
+}
+#[cfg(feature = "full")]
+pub fn visit_trait_item_method<'ast, V>(v: &mut V, node: &'ast TraitItemMethod)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_signature(&node.sig);
+ if let Some(it) = &node.default {
+ v.visit_block(it)
+ };
+ if let Some(it) = &node.semi_token {
+ tokens_helper(v, &it.spans)
+ };
+}
+#[cfg(feature = "full")]
+pub fn visit_trait_item_type<'ast, V>(v: &mut V, node: &'ast TraitItemType)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ tokens_helper(v, &node.type_token.span);
+ v.visit_ident(&node.ident);
+ v.visit_generics(&node.generics);
+ if let Some(it) = &node.colon_token {
+ tokens_helper(v, &it.spans)
+ };
+ for el in Punctuated::pairs(&node.bounds) {
+ let (it, p) = el.into_tuple();
+ v.visit_type_param_bound(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+ if let Some(it) = &node.default {
+ tokens_helper(v, &(it).0.spans);
+ v.visit_type(&(it).1);
+ };
+ tokens_helper(v, &node.semi_token.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type<'ast, V>(v: &mut V, node: &'ast Type)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ Type::Array(_binding_0) => {
+ v.visit_type_array(_binding_0);
+ }
+ Type::BareFn(_binding_0) => {
+ v.visit_type_bare_fn(_binding_0);
+ }
+ Type::Group(_binding_0) => {
+ v.visit_type_group(_binding_0);
+ }
+ Type::ImplTrait(_binding_0) => {
+ v.visit_type_impl_trait(_binding_0);
+ }
+ Type::Infer(_binding_0) => {
+ v.visit_type_infer(_binding_0);
+ }
+ Type::Macro(_binding_0) => {
+ v.visit_type_macro(_binding_0);
+ }
+ Type::Never(_binding_0) => {
+ v.visit_type_never(_binding_0);
+ }
+ Type::Paren(_binding_0) => {
+ v.visit_type_paren(_binding_0);
+ }
+ Type::Path(_binding_0) => {
+ v.visit_type_path(_binding_0);
+ }
+ Type::Ptr(_binding_0) => {
+ v.visit_type_ptr(_binding_0);
+ }
+ Type::Reference(_binding_0) => {
+ v.visit_type_reference(_binding_0);
+ }
+ Type::Slice(_binding_0) => {
+ v.visit_type_slice(_binding_0);
+ }
+ Type::TraitObject(_binding_0) => {
+ v.visit_type_trait_object(_binding_0);
+ }
+ Type::Tuple(_binding_0) => {
+ v.visit_type_tuple(_binding_0);
+ }
+ Type::Verbatim(_binding_0) => {
+ skip!(_binding_0);
+ }
+ _ => unreachable!(),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_array<'ast, V>(v: &mut V, node: &'ast TypeArray)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.bracket_token.span);
+ v.visit_type(&*node.elem);
+ tokens_helper(v, &node.semi_token.spans);
+ v.visit_expr(&node.len);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_bare_fn<'ast, V>(v: &mut V, node: &'ast TypeBareFn)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ if let Some(it) = &node.lifetimes {
+ v.visit_bound_lifetimes(it)
+ };
+ if let Some(it) = &node.unsafety {
+ tokens_helper(v, &it.span)
+ };
+ if let Some(it) = &node.abi {
+ v.visit_abi(it)
+ };
+ tokens_helper(v, &node.fn_token.span);
+ tokens_helper(v, &node.paren_token.span);
+ for el in Punctuated::pairs(&node.inputs) {
+ let (it, p) = el.into_tuple();
+ v.visit_bare_fn_arg(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+ if let Some(it) = &node.variadic {
+ v.visit_variadic(it)
+ };
+ v.visit_return_type(&node.output);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_group<'ast, V>(v: &mut V, node: &'ast TypeGroup)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.group_token.span);
+ v.visit_type(&*node.elem);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_impl_trait<'ast, V>(v: &mut V, node: &'ast TypeImplTrait)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.impl_token.span);
+ for el in Punctuated::pairs(&node.bounds) {
+ let (it, p) = el.into_tuple();
+ v.visit_type_param_bound(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_infer<'ast, V>(v: &mut V, node: &'ast TypeInfer)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.underscore_token.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_macro<'ast, V>(v: &mut V, node: &'ast TypeMacro)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ v.visit_macro(&node.mac);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_never<'ast, V>(v: &mut V, node: &'ast TypeNever)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.bang_token.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_param<'ast, V>(v: &mut V, node: &'ast TypeParam)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_ident(&node.ident);
+ if let Some(it) = &node.colon_token {
+ tokens_helper(v, &it.spans)
+ };
+ for el in Punctuated::pairs(&node.bounds) {
+ let (it, p) = el.into_tuple();
+ v.visit_type_param_bound(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+ if let Some(it) = &node.eq_token {
+ tokens_helper(v, &it.spans)
+ };
+ if let Some(it) = &node.default {
+ v.visit_type(it)
+ };
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_param_bound<'ast, V>(v: &mut V, node: &'ast TypeParamBound)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ TypeParamBound::Trait(_binding_0) => {
+ v.visit_trait_bound(_binding_0);
+ }
+ TypeParamBound::Lifetime(_binding_0) => {
+ v.visit_lifetime(_binding_0);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_paren<'ast, V>(v: &mut V, node: &'ast TypeParen)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.paren_token.span);
+ v.visit_type(&*node.elem);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_path<'ast, V>(v: &mut V, node: &'ast TypePath)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ if let Some(it) = &node.qself {
+ v.visit_qself(it)
+ };
+ v.visit_path(&node.path);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_ptr<'ast, V>(v: &mut V, node: &'ast TypePtr)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.star_token.spans);
+ if let Some(it) = &node.const_token {
+ tokens_helper(v, &it.span)
+ };
+ if let Some(it) = &node.mutability {
+ tokens_helper(v, &it.span)
+ };
+ v.visit_type(&*node.elem);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_reference<'ast, V>(v: &mut V, node: &'ast TypeReference)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.and_token.spans);
+ if let Some(it) = &node.lifetime {
+ v.visit_lifetime(it)
+ };
+ if let Some(it) = &node.mutability {
+ tokens_helper(v, &it.span)
+ };
+ v.visit_type(&*node.elem);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_slice<'ast, V>(v: &mut V, node: &'ast TypeSlice)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.bracket_token.span);
+ v.visit_type(&*node.elem);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_trait_object<'ast, V>(v: &mut V, node: &'ast TypeTraitObject)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ if let Some(it) = &node.dyn_token {
+ tokens_helper(v, &it.span)
+ };
+ for el in Punctuated::pairs(&node.bounds) {
+ let (it, p) = el.into_tuple();
+ v.visit_type_param_bound(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_tuple<'ast, V>(v: &mut V, node: &'ast TypeTuple)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.paren_token.span);
+ for el in Punctuated::pairs(&node.elems) {
+ let (it, p) = el.into_tuple();
+ v.visit_type(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_un_op<'ast, V>(v: &mut V, node: &'ast UnOp)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ UnOp::Deref(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ UnOp::Not(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ UnOp::Neg(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_use_glob<'ast, V>(v: &mut V, node: &'ast UseGlob)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.star_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_use_group<'ast, V>(v: &mut V, node: &'ast UseGroup)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.brace_token.span);
+ for el in Punctuated::pairs(&node.items) {
+ let (it, p) = el.into_tuple();
+ v.visit_use_tree(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_use_name<'ast, V>(v: &mut V, node: &'ast UseName)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ v.visit_ident(&node.ident);
+}
+#[cfg(feature = "full")]
+pub fn visit_use_path<'ast, V>(v: &mut V, node: &'ast UsePath)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ v.visit_ident(&node.ident);
+ tokens_helper(v, &node.colon2_token.spans);
+ v.visit_use_tree(&*node.tree);
+}
+#[cfg(feature = "full")]
+pub fn visit_use_rename<'ast, V>(v: &mut V, node: &'ast UseRename)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ v.visit_ident(&node.ident);
+ tokens_helper(v, &node.as_token.span);
+ v.visit_ident(&node.rename);
+}
+#[cfg(feature = "full")]
+pub fn visit_use_tree<'ast, V>(v: &mut V, node: &'ast UseTree)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ UseTree::Path(_binding_0) => {
+ v.visit_use_path(_binding_0);
+ }
+ UseTree::Name(_binding_0) => {
+ v.visit_use_name(_binding_0);
+ }
+ UseTree::Rename(_binding_0) => {
+ v.visit_use_rename(_binding_0);
+ }
+ UseTree::Glob(_binding_0) => {
+ v.visit_use_glob(_binding_0);
+ }
+ UseTree::Group(_binding_0) => {
+ v.visit_use_group(_binding_0);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_variadic<'ast, V>(v: &mut V, node: &'ast Variadic)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ tokens_helper(v, &node.dots.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_variant<'ast, V>(v: &mut V, node: &'ast Variant)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it)
+ }
+ v.visit_ident(&node.ident);
+ v.visit_fields(&node.fields);
+ if let Some(it) = &node.discriminant {
+ tokens_helper(v, &(it).0.spans);
+ v.visit_expr(&(it).1);
+ };
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_vis_crate<'ast, V>(v: &mut V, node: &'ast VisCrate)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.crate_token.span);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_vis_public<'ast, V>(v: &mut V, node: &'ast VisPublic)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.pub_token.span);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_vis_restricted<'ast, V>(v: &mut V, node: &'ast VisRestricted)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.pub_token.span);
+ tokens_helper(v, &node.paren_token.span);
+ if let Some(it) = &node.in_token {
+ tokens_helper(v, &it.span)
+ };
+ v.visit_path(&*node.path);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_visibility<'ast, V>(v: &mut V, node: &'ast Visibility)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ Visibility::Public(_binding_0) => {
+ v.visit_vis_public(_binding_0);
+ }
+ Visibility::Crate(_binding_0) => {
+ v.visit_vis_crate(_binding_0);
+ }
+ Visibility::Restricted(_binding_0) => {
+ v.visit_vis_restricted(_binding_0);
+ }
+ Visibility::Inherited => {}
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_where_clause<'ast, V>(v: &mut V, node: &'ast WhereClause)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.where_token.span);
+ for el in Punctuated::pairs(&node.predicates) {
+ let (it, p) = el.into_tuple();
+ v.visit_where_predicate(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_where_predicate<'ast, V>(v: &mut V, node: &'ast WherePredicate)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ WherePredicate::Type(_binding_0) => {
+ v.visit_predicate_type(_binding_0);
+ }
+ WherePredicate::Lifetime(_binding_0) => {
+ v.visit_predicate_lifetime(_binding_0);
+ }
+ WherePredicate::Eq(_binding_0) => {
+ v.visit_predicate_eq(_binding_0);
+ }
+ }
+}
diff --git a/syn/src/gen/visit_mut.rs b/syn/src/gen/visit_mut.rs
new file mode 100644
index 0000000..5cddb82
--- /dev/null
+++ b/syn/src/gen/visit_mut.rs
@@ -0,0 +1,3798 @@
+// This file is @generated by syn-internal-codegen.
+// It is not intended for manual editing.
+
+#![allow(unused_variables)]
+#[cfg(any(feature = "full", feature = "derive"))]
+use crate::gen::helper::visit_mut::*;
+#[cfg(any(feature = "full", feature = "derive"))]
+use crate::punctuated::Punctuated;
+use crate::*;
+use proc_macro2::Span;
+#[cfg(feature = "full")]
+macro_rules! full {
+ ($e:expr) => {
+ $e
+ };
+}
+#[cfg(all(feature = "derive", not(feature = "full")))]
+macro_rules! full {
+ ($e:expr) => {
+ unreachable!()
+ };
+}
+#[cfg(any(feature = "full", feature = "derive"))]
+macro_rules! skip {
+ ($($tt:tt)*) => {};
+}
+/// Syntax tree traversal to mutate an exclusive borrow of a syntax tree in
+/// place.
+///
+/// See the [module documentation] for details.
+///
+/// [module documentation]: self
+///
+/// *This trait is available if Syn is built with the `"visit-mut"` feature.*
+pub trait VisitMut {
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_abi_mut(&mut self, i: &mut Abi) {
+ visit_abi_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_angle_bracketed_generic_arguments_mut(
+ &mut self,
+ i: &mut AngleBracketedGenericArguments,
+ ) {
+ visit_angle_bracketed_generic_arguments_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_arm_mut(&mut self, i: &mut Arm) {
+ visit_arm_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_attr_style_mut(&mut self, i: &mut AttrStyle) {
+ visit_attr_style_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_attribute_mut(&mut self, i: &mut Attribute) {
+ visit_attribute_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_bare_fn_arg_mut(&mut self, i: &mut BareFnArg) {
+ visit_bare_fn_arg_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_bin_op_mut(&mut self, i: &mut BinOp) {
+ visit_bin_op_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_binding_mut(&mut self, i: &mut Binding) {
+ visit_binding_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_block_mut(&mut self, i: &mut Block) {
+ visit_block_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_bound_lifetimes_mut(&mut self, i: &mut BoundLifetimes) {
+ visit_bound_lifetimes_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_const_param_mut(&mut self, i: &mut ConstParam) {
+ visit_const_param_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_constraint_mut(&mut self, i: &mut Constraint) {
+ visit_constraint_mut(self, i)
+ }
+ #[cfg(feature = "derive")]
+ fn visit_data_mut(&mut self, i: &mut Data) {
+ visit_data_mut(self, i)
+ }
+ #[cfg(feature = "derive")]
+ fn visit_data_enum_mut(&mut self, i: &mut DataEnum) {
+ visit_data_enum_mut(self, i)
+ }
+ #[cfg(feature = "derive")]
+ fn visit_data_struct_mut(&mut self, i: &mut DataStruct) {
+ visit_data_struct_mut(self, i)
+ }
+ #[cfg(feature = "derive")]
+ fn visit_data_union_mut(&mut self, i: &mut DataUnion) {
+ visit_data_union_mut(self, i)
+ }
+ #[cfg(feature = "derive")]
+ fn visit_derive_input_mut(&mut self, i: &mut DeriveInput) {
+ visit_derive_input_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr_mut(&mut self, i: &mut Expr) {
+ visit_expr_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_array_mut(&mut self, i: &mut ExprArray) {
+ visit_expr_array_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_assign_mut(&mut self, i: &mut ExprAssign) {
+ visit_expr_assign_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_assign_op_mut(&mut self, i: &mut ExprAssignOp) {
+ visit_expr_assign_op_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_async_mut(&mut self, i: &mut ExprAsync) {
+ visit_expr_async_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_await_mut(&mut self, i: &mut ExprAwait) {
+ visit_expr_await_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr_binary_mut(&mut self, i: &mut ExprBinary) {
+ visit_expr_binary_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_block_mut(&mut self, i: &mut ExprBlock) {
+ visit_expr_block_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_box_mut(&mut self, i: &mut ExprBox) {
+ visit_expr_box_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_break_mut(&mut self, i: &mut ExprBreak) {
+ visit_expr_break_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr_call_mut(&mut self, i: &mut ExprCall) {
+ visit_expr_call_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr_cast_mut(&mut self, i: &mut ExprCast) {
+ visit_expr_cast_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_closure_mut(&mut self, i: &mut ExprClosure) {
+ visit_expr_closure_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_continue_mut(&mut self, i: &mut ExprContinue) {
+ visit_expr_continue_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr_field_mut(&mut self, i: &mut ExprField) {
+ visit_expr_field_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_for_loop_mut(&mut self, i: &mut ExprForLoop) {
+ visit_expr_for_loop_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_group_mut(&mut self, i: &mut ExprGroup) {
+ visit_expr_group_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_if_mut(&mut self, i: &mut ExprIf) {
+ visit_expr_if_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr_index_mut(&mut self, i: &mut ExprIndex) {
+ visit_expr_index_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_let_mut(&mut self, i: &mut ExprLet) {
+ visit_expr_let_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr_lit_mut(&mut self, i: &mut ExprLit) {
+ visit_expr_lit_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_loop_mut(&mut self, i: &mut ExprLoop) {
+ visit_expr_loop_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_macro_mut(&mut self, i: &mut ExprMacro) {
+ visit_expr_macro_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_match_mut(&mut self, i: &mut ExprMatch) {
+ visit_expr_match_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_method_call_mut(&mut self, i: &mut ExprMethodCall) {
+ visit_expr_method_call_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr_paren_mut(&mut self, i: &mut ExprParen) {
+ visit_expr_paren_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr_path_mut(&mut self, i: &mut ExprPath) {
+ visit_expr_path_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_range_mut(&mut self, i: &mut ExprRange) {
+ visit_expr_range_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_reference_mut(&mut self, i: &mut ExprReference) {
+ visit_expr_reference_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_repeat_mut(&mut self, i: &mut ExprRepeat) {
+ visit_expr_repeat_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_return_mut(&mut self, i: &mut ExprReturn) {
+ visit_expr_return_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_struct_mut(&mut self, i: &mut ExprStruct) {
+ visit_expr_struct_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_try_mut(&mut self, i: &mut ExprTry) {
+ visit_expr_try_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_try_block_mut(&mut self, i: &mut ExprTryBlock) {
+ visit_expr_try_block_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_tuple_mut(&mut self, i: &mut ExprTuple) {
+ visit_expr_tuple_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_type_mut(&mut self, i: &mut ExprType) {
+ visit_expr_type_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr_unary_mut(&mut self, i: &mut ExprUnary) {
+ visit_expr_unary_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_unsafe_mut(&mut self, i: &mut ExprUnsafe) {
+ visit_expr_unsafe_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_while_mut(&mut self, i: &mut ExprWhile) {
+ visit_expr_while_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_yield_mut(&mut self, i: &mut ExprYield) {
+ visit_expr_yield_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_field_mut(&mut self, i: &mut Field) {
+ visit_field_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_field_pat_mut(&mut self, i: &mut FieldPat) {
+ visit_field_pat_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_field_value_mut(&mut self, i: &mut FieldValue) {
+ visit_field_value_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_fields_mut(&mut self, i: &mut Fields) {
+ visit_fields_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_fields_named_mut(&mut self, i: &mut FieldsNamed) {
+ visit_fields_named_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_fields_unnamed_mut(&mut self, i: &mut FieldsUnnamed) {
+ visit_fields_unnamed_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_file_mut(&mut self, i: &mut File) {
+ visit_file_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_fn_arg_mut(&mut self, i: &mut FnArg) {
+ visit_fn_arg_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_foreign_item_mut(&mut self, i: &mut ForeignItem) {
+ visit_foreign_item_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_foreign_item_fn_mut(&mut self, i: &mut ForeignItemFn) {
+ visit_foreign_item_fn_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_foreign_item_macro_mut(&mut self, i: &mut ForeignItemMacro) {
+ visit_foreign_item_macro_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_foreign_item_static_mut(&mut self, i: &mut ForeignItemStatic) {
+ visit_foreign_item_static_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_foreign_item_type_mut(&mut self, i: &mut ForeignItemType) {
+ visit_foreign_item_type_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_generic_argument_mut(&mut self, i: &mut GenericArgument) {
+ visit_generic_argument_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_generic_method_argument_mut(&mut self, i: &mut GenericMethodArgument) {
+ visit_generic_method_argument_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_generic_param_mut(&mut self, i: &mut GenericParam) {
+ visit_generic_param_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_generics_mut(&mut self, i: &mut Generics) {
+ visit_generics_mut(self, i)
+ }
+ fn visit_ident_mut(&mut self, i: &mut Ident) {
+ visit_ident_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_impl_item_mut(&mut self, i: &mut ImplItem) {
+ visit_impl_item_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_impl_item_const_mut(&mut self, i: &mut ImplItemConst) {
+ visit_impl_item_const_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_impl_item_macro_mut(&mut self, i: &mut ImplItemMacro) {
+ visit_impl_item_macro_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_impl_item_method_mut(&mut self, i: &mut ImplItemMethod) {
+ visit_impl_item_method_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_impl_item_type_mut(&mut self, i: &mut ImplItemType) {
+ visit_impl_item_type_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_index_mut(&mut self, i: &mut Index) {
+ visit_index_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_mut(&mut self, i: &mut Item) {
+ visit_item_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_const_mut(&mut self, i: &mut ItemConst) {
+ visit_item_const_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_enum_mut(&mut self, i: &mut ItemEnum) {
+ visit_item_enum_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_extern_crate_mut(&mut self, i: &mut ItemExternCrate) {
+ visit_item_extern_crate_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_fn_mut(&mut self, i: &mut ItemFn) {
+ visit_item_fn_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_foreign_mod_mut(&mut self, i: &mut ItemForeignMod) {
+ visit_item_foreign_mod_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_impl_mut(&mut self, i: &mut ItemImpl) {
+ visit_item_impl_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_macro_mut(&mut self, i: &mut ItemMacro) {
+ visit_item_macro_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_macro2_mut(&mut self, i: &mut ItemMacro2) {
+ visit_item_macro2_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_mod_mut(&mut self, i: &mut ItemMod) {
+ visit_item_mod_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_static_mut(&mut self, i: &mut ItemStatic) {
+ visit_item_static_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_struct_mut(&mut self, i: &mut ItemStruct) {
+ visit_item_struct_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_trait_mut(&mut self, i: &mut ItemTrait) {
+ visit_item_trait_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_trait_alias_mut(&mut self, i: &mut ItemTraitAlias) {
+ visit_item_trait_alias_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_type_mut(&mut self, i: &mut ItemType) {
+ visit_item_type_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_union_mut(&mut self, i: &mut ItemUnion) {
+ visit_item_union_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_use_mut(&mut self, i: &mut ItemUse) {
+ visit_item_use_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_label_mut(&mut self, i: &mut Label) {
+ visit_label_mut(self, i)
+ }
+ fn visit_lifetime_mut(&mut self, i: &mut Lifetime) {
+ visit_lifetime_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_lifetime_def_mut(&mut self, i: &mut LifetimeDef) {
+ visit_lifetime_def_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_lit_mut(&mut self, i: &mut Lit) {
+ visit_lit_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_lit_bool_mut(&mut self, i: &mut LitBool) {
+ visit_lit_bool_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_lit_byte_mut(&mut self, i: &mut LitByte) {
+ visit_lit_byte_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_lit_byte_str_mut(&mut self, i: &mut LitByteStr) {
+ visit_lit_byte_str_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_lit_char_mut(&mut self, i: &mut LitChar) {
+ visit_lit_char_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_lit_float_mut(&mut self, i: &mut LitFloat) {
+ visit_lit_float_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_lit_int_mut(&mut self, i: &mut LitInt) {
+ visit_lit_int_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_lit_str_mut(&mut self, i: &mut LitStr) {
+ visit_lit_str_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_local_mut(&mut self, i: &mut Local) {
+ visit_local_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_macro_mut(&mut self, i: &mut Macro) {
+ visit_macro_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_macro_delimiter_mut(&mut self, i: &mut MacroDelimiter) {
+ visit_macro_delimiter_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_member_mut(&mut self, i: &mut Member) {
+ visit_member_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_meta_mut(&mut self, i: &mut Meta) {
+ visit_meta_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_meta_list_mut(&mut self, i: &mut MetaList) {
+ visit_meta_list_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_meta_name_value_mut(&mut self, i: &mut MetaNameValue) {
+ visit_meta_name_value_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_method_turbofish_mut(&mut self, i: &mut MethodTurbofish) {
+ visit_method_turbofish_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_nested_meta_mut(&mut self, i: &mut NestedMeta) {
+ visit_nested_meta_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_parenthesized_generic_arguments_mut(&mut self, i: &mut ParenthesizedGenericArguments) {
+ visit_parenthesized_generic_arguments_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_mut(&mut self, i: &mut Pat) {
+ visit_pat_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_box_mut(&mut self, i: &mut PatBox) {
+ visit_pat_box_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_ident_mut(&mut self, i: &mut PatIdent) {
+ visit_pat_ident_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_lit_mut(&mut self, i: &mut PatLit) {
+ visit_pat_lit_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_macro_mut(&mut self, i: &mut PatMacro) {
+ visit_pat_macro_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_or_mut(&mut self, i: &mut PatOr) {
+ visit_pat_or_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_path_mut(&mut self, i: &mut PatPath) {
+ visit_pat_path_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_range_mut(&mut self, i: &mut PatRange) {
+ visit_pat_range_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_reference_mut(&mut self, i: &mut PatReference) {
+ visit_pat_reference_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_rest_mut(&mut self, i: &mut PatRest) {
+ visit_pat_rest_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_slice_mut(&mut self, i: &mut PatSlice) {
+ visit_pat_slice_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_struct_mut(&mut self, i: &mut PatStruct) {
+ visit_pat_struct_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_tuple_mut(&mut self, i: &mut PatTuple) {
+ visit_pat_tuple_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_tuple_struct_mut(&mut self, i: &mut PatTupleStruct) {
+ visit_pat_tuple_struct_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_type_mut(&mut self, i: &mut PatType) {
+ visit_pat_type_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_wild_mut(&mut self, i: &mut PatWild) {
+ visit_pat_wild_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_path_mut(&mut self, i: &mut Path) {
+ visit_path_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_path_arguments_mut(&mut self, i: &mut PathArguments) {
+ visit_path_arguments_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_path_segment_mut(&mut self, i: &mut PathSegment) {
+ visit_path_segment_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_predicate_eq_mut(&mut self, i: &mut PredicateEq) {
+ visit_predicate_eq_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_predicate_lifetime_mut(&mut self, i: &mut PredicateLifetime) {
+ visit_predicate_lifetime_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_predicate_type_mut(&mut self, i: &mut PredicateType) {
+ visit_predicate_type_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_qself_mut(&mut self, i: &mut QSelf) {
+ visit_qself_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_range_limits_mut(&mut self, i: &mut RangeLimits) {
+ visit_range_limits_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_receiver_mut(&mut self, i: &mut Receiver) {
+ visit_receiver_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_return_type_mut(&mut self, i: &mut ReturnType) {
+ visit_return_type_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_signature_mut(&mut self, i: &mut Signature) {
+ visit_signature_mut(self, i)
+ }
+ fn visit_span_mut(&mut self, i: &mut Span) {
+ visit_span_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_stmt_mut(&mut self, i: &mut Stmt) {
+ visit_stmt_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_trait_bound_mut(&mut self, i: &mut TraitBound) {
+ visit_trait_bound_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_trait_bound_modifier_mut(&mut self, i: &mut TraitBoundModifier) {
+ visit_trait_bound_modifier_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_trait_item_mut(&mut self, i: &mut TraitItem) {
+ visit_trait_item_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_trait_item_const_mut(&mut self, i: &mut TraitItemConst) {
+ visit_trait_item_const_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_trait_item_macro_mut(&mut self, i: &mut TraitItemMacro) {
+ visit_trait_item_macro_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_trait_item_method_mut(&mut self, i: &mut TraitItemMethod) {
+ visit_trait_item_method_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_trait_item_type_mut(&mut self, i: &mut TraitItemType) {
+ visit_trait_item_type_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_mut(&mut self, i: &mut Type) {
+ visit_type_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_array_mut(&mut self, i: &mut TypeArray) {
+ visit_type_array_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_bare_fn_mut(&mut self, i: &mut TypeBareFn) {
+ visit_type_bare_fn_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_group_mut(&mut self, i: &mut TypeGroup) {
+ visit_type_group_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_impl_trait_mut(&mut self, i: &mut TypeImplTrait) {
+ visit_type_impl_trait_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_infer_mut(&mut self, i: &mut TypeInfer) {
+ visit_type_infer_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_macro_mut(&mut self, i: &mut TypeMacro) {
+ visit_type_macro_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_never_mut(&mut self, i: &mut TypeNever) {
+ visit_type_never_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_param_mut(&mut self, i: &mut TypeParam) {
+ visit_type_param_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_param_bound_mut(&mut self, i: &mut TypeParamBound) {
+ visit_type_param_bound_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_paren_mut(&mut self, i: &mut TypeParen) {
+ visit_type_paren_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_path_mut(&mut self, i: &mut TypePath) {
+ visit_type_path_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_ptr_mut(&mut self, i: &mut TypePtr) {
+ visit_type_ptr_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_reference_mut(&mut self, i: &mut TypeReference) {
+ visit_type_reference_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_slice_mut(&mut self, i: &mut TypeSlice) {
+ visit_type_slice_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_trait_object_mut(&mut self, i: &mut TypeTraitObject) {
+ visit_type_trait_object_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_tuple_mut(&mut self, i: &mut TypeTuple) {
+ visit_type_tuple_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_un_op_mut(&mut self, i: &mut UnOp) {
+ visit_un_op_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_use_glob_mut(&mut self, i: &mut UseGlob) {
+ visit_use_glob_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_use_group_mut(&mut self, i: &mut UseGroup) {
+ visit_use_group_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_use_name_mut(&mut self, i: &mut UseName) {
+ visit_use_name_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_use_path_mut(&mut self, i: &mut UsePath) {
+ visit_use_path_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_use_rename_mut(&mut self, i: &mut UseRename) {
+ visit_use_rename_mut(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn visit_use_tree_mut(&mut self, i: &mut UseTree) {
+ visit_use_tree_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_variadic_mut(&mut self, i: &mut Variadic) {
+ visit_variadic_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_variant_mut(&mut self, i: &mut Variant) {
+ visit_variant_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_vis_crate_mut(&mut self, i: &mut VisCrate) {
+ visit_vis_crate_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_vis_public_mut(&mut self, i: &mut VisPublic) {
+ visit_vis_public_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_vis_restricted_mut(&mut self, i: &mut VisRestricted) {
+ visit_vis_restricted_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_visibility_mut(&mut self, i: &mut Visibility) {
+ visit_visibility_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_where_clause_mut(&mut self, i: &mut WhereClause) {
+ visit_where_clause_mut(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_where_predicate_mut(&mut self, i: &mut WherePredicate) {
+ visit_where_predicate_mut(self, i)
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_abi_mut<V>(v: &mut V, node: &mut Abi)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.extern_token.span);
+ if let Some(it) = &mut node.name {
+ v.visit_lit_str_mut(it)
+ };
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_angle_bracketed_generic_arguments_mut<V>(
+ v: &mut V,
+ node: &mut AngleBracketedGenericArguments,
+) where
+ V: VisitMut + ?Sized,
+{
+ if let Some(it) = &mut node.colon2_token {
+ tokens_helper(v, &mut it.spans)
+ };
+ tokens_helper(v, &mut node.lt_token.spans);
+ for el in Punctuated::pairs_mut(&mut node.args) {
+ let (it, p) = el.into_tuple();
+ v.visit_generic_argument_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+ tokens_helper(v, &mut node.gt_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_arm_mut<V>(v: &mut V, node: &mut Arm)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_pat_mut(&mut node.pat);
+ if let Some(it) = &mut node.guard {
+ tokens_helper(v, &mut (it).0.span);
+ v.visit_expr_mut(&mut *(it).1);
+ };
+ tokens_helper(v, &mut node.fat_arrow_token.spans);
+ v.visit_expr_mut(&mut *node.body);
+ if let Some(it) = &mut node.comma {
+ tokens_helper(v, &mut it.spans)
+ };
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_attr_style_mut<V>(v: &mut V, node: &mut AttrStyle)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ AttrStyle::Outer => {}
+ AttrStyle::Inner(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_attribute_mut<V>(v: &mut V, node: &mut Attribute)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.pound_token.spans);
+ v.visit_attr_style_mut(&mut node.style);
+ tokens_helper(v, &mut node.bracket_token.span);
+ v.visit_path_mut(&mut node.path);
+ skip!(node.tokens);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_bare_fn_arg_mut<V>(v: &mut V, node: &mut BareFnArg)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ if let Some(it) = &mut node.name {
+ v.visit_ident_mut(&mut (it).0);
+ tokens_helper(v, &mut (it).1.spans);
+ };
+ v.visit_type_mut(&mut node.ty);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_bin_op_mut<V>(v: &mut V, node: &mut BinOp)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ BinOp::Add(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::Sub(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::Mul(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::Div(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::Rem(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::And(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::Or(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::BitXor(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::BitAnd(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::BitOr(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::Shl(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::Shr(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::Eq(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::Lt(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::Le(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::Ne(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::Ge(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::Gt(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::AddEq(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::SubEq(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::MulEq(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::DivEq(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::RemEq(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::BitXorEq(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::BitAndEq(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::BitOrEq(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::ShlEq(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::ShrEq(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_binding_mut<V>(v: &mut V, node: &mut Binding)
+where
+ V: VisitMut + ?Sized,
+{
+ v.visit_ident_mut(&mut node.ident);
+ tokens_helper(v, &mut node.eq_token.spans);
+ v.visit_type_mut(&mut node.ty);
+}
+#[cfg(feature = "full")]
+pub fn visit_block_mut<V>(v: &mut V, node: &mut Block)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.brace_token.span);
+ for it in &mut node.stmts {
+ v.visit_stmt_mut(it)
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_bound_lifetimes_mut<V>(v: &mut V, node: &mut BoundLifetimes)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.for_token.span);
+ tokens_helper(v, &mut node.lt_token.spans);
+ for el in Punctuated::pairs_mut(&mut node.lifetimes) {
+ let (it, p) = el.into_tuple();
+ v.visit_lifetime_def_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+ tokens_helper(v, &mut node.gt_token.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_const_param_mut<V>(v: &mut V, node: &mut ConstParam)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ tokens_helper(v, &mut node.const_token.span);
+ v.visit_ident_mut(&mut node.ident);
+ tokens_helper(v, &mut node.colon_token.spans);
+ v.visit_type_mut(&mut node.ty);
+ if let Some(it) = &mut node.eq_token {
+ tokens_helper(v, &mut it.spans)
+ };
+ if let Some(it) = &mut node.default {
+ v.visit_expr_mut(it)
+ };
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_constraint_mut<V>(v: &mut V, node: &mut Constraint)
+where
+ V: VisitMut + ?Sized,
+{
+ v.visit_ident_mut(&mut node.ident);
+ tokens_helper(v, &mut node.colon_token.spans);
+ for el in Punctuated::pairs_mut(&mut node.bounds) {
+ let (it, p) = el.into_tuple();
+ v.visit_type_param_bound_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(feature = "derive")]
+pub fn visit_data_mut<V>(v: &mut V, node: &mut Data)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ Data::Struct(_binding_0) => {
+ v.visit_data_struct_mut(_binding_0);
+ }
+ Data::Enum(_binding_0) => {
+ v.visit_data_enum_mut(_binding_0);
+ }
+ Data::Union(_binding_0) => {
+ v.visit_data_union_mut(_binding_0);
+ }
+ }
+}
+#[cfg(feature = "derive")]
+pub fn visit_data_enum_mut<V>(v: &mut V, node: &mut DataEnum)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.enum_token.span);
+ tokens_helper(v, &mut node.brace_token.span);
+ for el in Punctuated::pairs_mut(&mut node.variants) {
+ let (it, p) = el.into_tuple();
+ v.visit_variant_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(feature = "derive")]
+pub fn visit_data_struct_mut<V>(v: &mut V, node: &mut DataStruct)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.struct_token.span);
+ v.visit_fields_mut(&mut node.fields);
+ if let Some(it) = &mut node.semi_token {
+ tokens_helper(v, &mut it.spans)
+ };
+}
+#[cfg(feature = "derive")]
+pub fn visit_data_union_mut<V>(v: &mut V, node: &mut DataUnion)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.union_token.span);
+ v.visit_fields_named_mut(&mut node.fields);
+}
+#[cfg(feature = "derive")]
+pub fn visit_derive_input_mut<V>(v: &mut V, node: &mut DeriveInput)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ v.visit_ident_mut(&mut node.ident);
+ v.visit_generics_mut(&mut node.generics);
+ v.visit_data_mut(&mut node.data);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr_mut<V>(v: &mut V, node: &mut Expr)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ Expr::Array(_binding_0) => {
+ full!(v.visit_expr_array_mut(_binding_0));
+ }
+ Expr::Assign(_binding_0) => {
+ full!(v.visit_expr_assign_mut(_binding_0));
+ }
+ Expr::AssignOp(_binding_0) => {
+ full!(v.visit_expr_assign_op_mut(_binding_0));
+ }
+ Expr::Async(_binding_0) => {
+ full!(v.visit_expr_async_mut(_binding_0));
+ }
+ Expr::Await(_binding_0) => {
+ full!(v.visit_expr_await_mut(_binding_0));
+ }
+ Expr::Binary(_binding_0) => {
+ v.visit_expr_binary_mut(_binding_0);
+ }
+ Expr::Block(_binding_0) => {
+ full!(v.visit_expr_block_mut(_binding_0));
+ }
+ Expr::Box(_binding_0) => {
+ full!(v.visit_expr_box_mut(_binding_0));
+ }
+ Expr::Break(_binding_0) => {
+ full!(v.visit_expr_break_mut(_binding_0));
+ }
+ Expr::Call(_binding_0) => {
+ v.visit_expr_call_mut(_binding_0);
+ }
+ Expr::Cast(_binding_0) => {
+ v.visit_expr_cast_mut(_binding_0);
+ }
+ Expr::Closure(_binding_0) => {
+ full!(v.visit_expr_closure_mut(_binding_0));
+ }
+ Expr::Continue(_binding_0) => {
+ full!(v.visit_expr_continue_mut(_binding_0));
+ }
+ Expr::Field(_binding_0) => {
+ v.visit_expr_field_mut(_binding_0);
+ }
+ Expr::ForLoop(_binding_0) => {
+ full!(v.visit_expr_for_loop_mut(_binding_0));
+ }
+ Expr::Group(_binding_0) => {
+ full!(v.visit_expr_group_mut(_binding_0));
+ }
+ Expr::If(_binding_0) => {
+ full!(v.visit_expr_if_mut(_binding_0));
+ }
+ Expr::Index(_binding_0) => {
+ v.visit_expr_index_mut(_binding_0);
+ }
+ Expr::Let(_binding_0) => {
+ full!(v.visit_expr_let_mut(_binding_0));
+ }
+ Expr::Lit(_binding_0) => {
+ v.visit_expr_lit_mut(_binding_0);
+ }
+ Expr::Loop(_binding_0) => {
+ full!(v.visit_expr_loop_mut(_binding_0));
+ }
+ Expr::Macro(_binding_0) => {
+ full!(v.visit_expr_macro_mut(_binding_0));
+ }
+ Expr::Match(_binding_0) => {
+ full!(v.visit_expr_match_mut(_binding_0));
+ }
+ Expr::MethodCall(_binding_0) => {
+ full!(v.visit_expr_method_call_mut(_binding_0));
+ }
+ Expr::Paren(_binding_0) => {
+ v.visit_expr_paren_mut(_binding_0);
+ }
+ Expr::Path(_binding_0) => {
+ v.visit_expr_path_mut(_binding_0);
+ }
+ Expr::Range(_binding_0) => {
+ full!(v.visit_expr_range_mut(_binding_0));
+ }
+ Expr::Reference(_binding_0) => {
+ full!(v.visit_expr_reference_mut(_binding_0));
+ }
+ Expr::Repeat(_binding_0) => {
+ full!(v.visit_expr_repeat_mut(_binding_0));
+ }
+ Expr::Return(_binding_0) => {
+ full!(v.visit_expr_return_mut(_binding_0));
+ }
+ Expr::Struct(_binding_0) => {
+ full!(v.visit_expr_struct_mut(_binding_0));
+ }
+ Expr::Try(_binding_0) => {
+ full!(v.visit_expr_try_mut(_binding_0));
+ }
+ Expr::TryBlock(_binding_0) => {
+ full!(v.visit_expr_try_block_mut(_binding_0));
+ }
+ Expr::Tuple(_binding_0) => {
+ full!(v.visit_expr_tuple_mut(_binding_0));
+ }
+ Expr::Type(_binding_0) => {
+ full!(v.visit_expr_type_mut(_binding_0));
+ }
+ Expr::Unary(_binding_0) => {
+ v.visit_expr_unary_mut(_binding_0);
+ }
+ Expr::Unsafe(_binding_0) => {
+ full!(v.visit_expr_unsafe_mut(_binding_0));
+ }
+ Expr::Verbatim(_binding_0) => {
+ skip!(_binding_0);
+ }
+ Expr::While(_binding_0) => {
+ full!(v.visit_expr_while_mut(_binding_0));
+ }
+ Expr::Yield(_binding_0) => {
+ full!(v.visit_expr_yield_mut(_binding_0));
+ }
+ _ => unreachable!(),
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_array_mut<V>(v: &mut V, node: &mut ExprArray)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ tokens_helper(v, &mut node.bracket_token.span);
+ for el in Punctuated::pairs_mut(&mut node.elems) {
+ let (it, p) = el.into_tuple();
+ v.visit_expr_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_assign_mut<V>(v: &mut V, node: &mut ExprAssign)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_expr_mut(&mut *node.left);
+ tokens_helper(v, &mut node.eq_token.spans);
+ v.visit_expr_mut(&mut *node.right);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_assign_op_mut<V>(v: &mut V, node: &mut ExprAssignOp)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_expr_mut(&mut *node.left);
+ v.visit_bin_op_mut(&mut node.op);
+ v.visit_expr_mut(&mut *node.right);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_async_mut<V>(v: &mut V, node: &mut ExprAsync)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ tokens_helper(v, &mut node.async_token.span);
+ if let Some(it) = &mut node.capture {
+ tokens_helper(v, &mut it.span)
+ };
+ v.visit_block_mut(&mut node.block);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_await_mut<V>(v: &mut V, node: &mut ExprAwait)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_expr_mut(&mut *node.base);
+ tokens_helper(v, &mut node.dot_token.spans);
+ tokens_helper(v, &mut node.await_token.span);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr_binary_mut<V>(v: &mut V, node: &mut ExprBinary)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_expr_mut(&mut *node.left);
+ v.visit_bin_op_mut(&mut node.op);
+ v.visit_expr_mut(&mut *node.right);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_block_mut<V>(v: &mut V, node: &mut ExprBlock)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ if let Some(it) = &mut node.label {
+ v.visit_label_mut(it)
+ };
+ v.visit_block_mut(&mut node.block);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_box_mut<V>(v: &mut V, node: &mut ExprBox)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ tokens_helper(v, &mut node.box_token.span);
+ v.visit_expr_mut(&mut *node.expr);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_break_mut<V>(v: &mut V, node: &mut ExprBreak)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ tokens_helper(v, &mut node.break_token.span);
+ if let Some(it) = &mut node.label {
+ v.visit_lifetime_mut(it)
+ };
+ if let Some(it) = &mut node.expr {
+ v.visit_expr_mut(&mut **it)
+ };
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr_call_mut<V>(v: &mut V, node: &mut ExprCall)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_expr_mut(&mut *node.func);
+ tokens_helper(v, &mut node.paren_token.span);
+ for el in Punctuated::pairs_mut(&mut node.args) {
+ let (it, p) = el.into_tuple();
+ v.visit_expr_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr_cast_mut<V>(v: &mut V, node: &mut ExprCast)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_expr_mut(&mut *node.expr);
+ tokens_helper(v, &mut node.as_token.span);
+ v.visit_type_mut(&mut *node.ty);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_closure_mut<V>(v: &mut V, node: &mut ExprClosure)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ if let Some(it) = &mut node.asyncness {
+ tokens_helper(v, &mut it.span)
+ };
+ if let Some(it) = &mut node.movability {
+ tokens_helper(v, &mut it.span)
+ };
+ if let Some(it) = &mut node.capture {
+ tokens_helper(v, &mut it.span)
+ };
+ tokens_helper(v, &mut node.or1_token.spans);
+ for el in Punctuated::pairs_mut(&mut node.inputs) {
+ let (it, p) = el.into_tuple();
+ v.visit_pat_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+ tokens_helper(v, &mut node.or2_token.spans);
+ v.visit_return_type_mut(&mut node.output);
+ v.visit_expr_mut(&mut *node.body);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_continue_mut<V>(v: &mut V, node: &mut ExprContinue)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ tokens_helper(v, &mut node.continue_token.span);
+ if let Some(it) = &mut node.label {
+ v.visit_lifetime_mut(it)
+ };
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr_field_mut<V>(v: &mut V, node: &mut ExprField)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_expr_mut(&mut *node.base);
+ tokens_helper(v, &mut node.dot_token.spans);
+ v.visit_member_mut(&mut node.member);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_for_loop_mut<V>(v: &mut V, node: &mut ExprForLoop)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ if let Some(it) = &mut node.label {
+ v.visit_label_mut(it)
+ };
+ tokens_helper(v, &mut node.for_token.span);
+ v.visit_pat_mut(&mut node.pat);
+ tokens_helper(v, &mut node.in_token.span);
+ v.visit_expr_mut(&mut *node.expr);
+ v.visit_block_mut(&mut node.body);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_group_mut<V>(v: &mut V, node: &mut ExprGroup)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ tokens_helper(v, &mut node.group_token.span);
+ v.visit_expr_mut(&mut *node.expr);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_if_mut<V>(v: &mut V, node: &mut ExprIf)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ tokens_helper(v, &mut node.if_token.span);
+ v.visit_expr_mut(&mut *node.cond);
+ v.visit_block_mut(&mut node.then_branch);
+ if let Some(it) = &mut node.else_branch {
+ tokens_helper(v, &mut (it).0.span);
+ v.visit_expr_mut(&mut *(it).1);
+ };
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr_index_mut<V>(v: &mut V, node: &mut ExprIndex)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_expr_mut(&mut *node.expr);
+ tokens_helper(v, &mut node.bracket_token.span);
+ v.visit_expr_mut(&mut *node.index);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_let_mut<V>(v: &mut V, node: &mut ExprLet)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ tokens_helper(v, &mut node.let_token.span);
+ v.visit_pat_mut(&mut node.pat);
+ tokens_helper(v, &mut node.eq_token.spans);
+ v.visit_expr_mut(&mut *node.expr);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr_lit_mut<V>(v: &mut V, node: &mut ExprLit)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_lit_mut(&mut node.lit);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_loop_mut<V>(v: &mut V, node: &mut ExprLoop)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ if let Some(it) = &mut node.label {
+ v.visit_label_mut(it)
+ };
+ tokens_helper(v, &mut node.loop_token.span);
+ v.visit_block_mut(&mut node.body);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_macro_mut<V>(v: &mut V, node: &mut ExprMacro)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_macro_mut(&mut node.mac);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_match_mut<V>(v: &mut V, node: &mut ExprMatch)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ tokens_helper(v, &mut node.match_token.span);
+ v.visit_expr_mut(&mut *node.expr);
+ tokens_helper(v, &mut node.brace_token.span);
+ for it in &mut node.arms {
+ v.visit_arm_mut(it)
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_method_call_mut<V>(v: &mut V, node: &mut ExprMethodCall)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_expr_mut(&mut *node.receiver);
+ tokens_helper(v, &mut node.dot_token.spans);
+ v.visit_ident_mut(&mut node.method);
+ if let Some(it) = &mut node.turbofish {
+ v.visit_method_turbofish_mut(it)
+ };
+ tokens_helper(v, &mut node.paren_token.span);
+ for el in Punctuated::pairs_mut(&mut node.args) {
+ let (it, p) = el.into_tuple();
+ v.visit_expr_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr_paren_mut<V>(v: &mut V, node: &mut ExprParen)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ tokens_helper(v, &mut node.paren_token.span);
+ v.visit_expr_mut(&mut *node.expr);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr_path_mut<V>(v: &mut V, node: &mut ExprPath)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ if let Some(it) = &mut node.qself {
+ v.visit_qself_mut(it)
+ };
+ v.visit_path_mut(&mut node.path);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_range_mut<V>(v: &mut V, node: &mut ExprRange)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ if let Some(it) = &mut node.from {
+ v.visit_expr_mut(&mut **it)
+ };
+ v.visit_range_limits_mut(&mut node.limits);
+ if let Some(it) = &mut node.to {
+ v.visit_expr_mut(&mut **it)
+ };
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_reference_mut<V>(v: &mut V, node: &mut ExprReference)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ tokens_helper(v, &mut node.and_token.spans);
+ if let Some(it) = &mut node.mutability {
+ tokens_helper(v, &mut it.span)
+ };
+ v.visit_expr_mut(&mut *node.expr);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_repeat_mut<V>(v: &mut V, node: &mut ExprRepeat)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ tokens_helper(v, &mut node.bracket_token.span);
+ v.visit_expr_mut(&mut *node.expr);
+ tokens_helper(v, &mut node.semi_token.spans);
+ v.visit_expr_mut(&mut *node.len);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_return_mut<V>(v: &mut V, node: &mut ExprReturn)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ tokens_helper(v, &mut node.return_token.span);
+ if let Some(it) = &mut node.expr {
+ v.visit_expr_mut(&mut **it)
+ };
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_struct_mut<V>(v: &mut V, node: &mut ExprStruct)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_path_mut(&mut node.path);
+ tokens_helper(v, &mut node.brace_token.span);
+ for el in Punctuated::pairs_mut(&mut node.fields) {
+ let (it, p) = el.into_tuple();
+ v.visit_field_value_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+ if let Some(it) = &mut node.dot2_token {
+ tokens_helper(v, &mut it.spans)
+ };
+ if let Some(it) = &mut node.rest {
+ v.visit_expr_mut(&mut **it)
+ };
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_try_mut<V>(v: &mut V, node: &mut ExprTry)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_expr_mut(&mut *node.expr);
+ tokens_helper(v, &mut node.question_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_try_block_mut<V>(v: &mut V, node: &mut ExprTryBlock)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ tokens_helper(v, &mut node.try_token.span);
+ v.visit_block_mut(&mut node.block);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_tuple_mut<V>(v: &mut V, node: &mut ExprTuple)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ tokens_helper(v, &mut node.paren_token.span);
+ for el in Punctuated::pairs_mut(&mut node.elems) {
+ let (it, p) = el.into_tuple();
+ v.visit_expr_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_type_mut<V>(v: &mut V, node: &mut ExprType)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_expr_mut(&mut *node.expr);
+ tokens_helper(v, &mut node.colon_token.spans);
+ v.visit_type_mut(&mut *node.ty);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr_unary_mut<V>(v: &mut V, node: &mut ExprUnary)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_un_op_mut(&mut node.op);
+ v.visit_expr_mut(&mut *node.expr);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_unsafe_mut<V>(v: &mut V, node: &mut ExprUnsafe)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ tokens_helper(v, &mut node.unsafe_token.span);
+ v.visit_block_mut(&mut node.block);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_while_mut<V>(v: &mut V, node: &mut ExprWhile)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ if let Some(it) = &mut node.label {
+ v.visit_label_mut(it)
+ };
+ tokens_helper(v, &mut node.while_token.span);
+ v.visit_expr_mut(&mut *node.cond);
+ v.visit_block_mut(&mut node.body);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_yield_mut<V>(v: &mut V, node: &mut ExprYield)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ tokens_helper(v, &mut node.yield_token.span);
+ if let Some(it) = &mut node.expr {
+ v.visit_expr_mut(&mut **it)
+ };
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_field_mut<V>(v: &mut V, node: &mut Field)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ if let Some(it) = &mut node.ident {
+ v.visit_ident_mut(it)
+ };
+ if let Some(it) = &mut node.colon_token {
+ tokens_helper(v, &mut it.spans)
+ };
+ v.visit_type_mut(&mut node.ty);
+}
+#[cfg(feature = "full")]
+pub fn visit_field_pat_mut<V>(v: &mut V, node: &mut FieldPat)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_member_mut(&mut node.member);
+ if let Some(it) = &mut node.colon_token {
+ tokens_helper(v, &mut it.spans)
+ };
+ v.visit_pat_mut(&mut *node.pat);
+}
+#[cfg(feature = "full")]
+pub fn visit_field_value_mut<V>(v: &mut V, node: &mut FieldValue)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_member_mut(&mut node.member);
+ if let Some(it) = &mut node.colon_token {
+ tokens_helper(v, &mut it.spans)
+ };
+ v.visit_expr_mut(&mut node.expr);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_fields_mut<V>(v: &mut V, node: &mut Fields)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ Fields::Named(_binding_0) => {
+ v.visit_fields_named_mut(_binding_0);
+ }
+ Fields::Unnamed(_binding_0) => {
+ v.visit_fields_unnamed_mut(_binding_0);
+ }
+ Fields::Unit => {}
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_fields_named_mut<V>(v: &mut V, node: &mut FieldsNamed)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.brace_token.span);
+ for el in Punctuated::pairs_mut(&mut node.named) {
+ let (it, p) = el.into_tuple();
+ v.visit_field_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_fields_unnamed_mut<V>(v: &mut V, node: &mut FieldsUnnamed)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.paren_token.span);
+ for el in Punctuated::pairs_mut(&mut node.unnamed) {
+ let (it, p) = el.into_tuple();
+ v.visit_field_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_file_mut<V>(v: &mut V, node: &mut File)
+where
+ V: VisitMut + ?Sized,
+{
+ skip!(node.shebang);
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ for it in &mut node.items {
+ v.visit_item_mut(it)
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_fn_arg_mut<V>(v: &mut V, node: &mut FnArg)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ FnArg::Receiver(_binding_0) => {
+ v.visit_receiver_mut(_binding_0);
+ }
+ FnArg::Typed(_binding_0) => {
+ v.visit_pat_type_mut(_binding_0);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_foreign_item_mut<V>(v: &mut V, node: &mut ForeignItem)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ ForeignItem::Fn(_binding_0) => {
+ v.visit_foreign_item_fn_mut(_binding_0);
+ }
+ ForeignItem::Static(_binding_0) => {
+ v.visit_foreign_item_static_mut(_binding_0);
+ }
+ ForeignItem::Type(_binding_0) => {
+ v.visit_foreign_item_type_mut(_binding_0);
+ }
+ ForeignItem::Macro(_binding_0) => {
+ v.visit_foreign_item_macro_mut(_binding_0);
+ }
+ ForeignItem::Verbatim(_binding_0) => {
+ skip!(_binding_0);
+ }
+ _ => unreachable!(),
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_foreign_item_fn_mut<V>(v: &mut V, node: &mut ForeignItemFn)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ v.visit_signature_mut(&mut node.sig);
+ tokens_helper(v, &mut node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_foreign_item_macro_mut<V>(v: &mut V, node: &mut ForeignItemMacro)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_macro_mut(&mut node.mac);
+ if let Some(it) = &mut node.semi_token {
+ tokens_helper(v, &mut it.spans)
+ };
+}
+#[cfg(feature = "full")]
+pub fn visit_foreign_item_static_mut<V>(v: &mut V, node: &mut ForeignItemStatic)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ tokens_helper(v, &mut node.static_token.span);
+ if let Some(it) = &mut node.mutability {
+ tokens_helper(v, &mut it.span)
+ };
+ v.visit_ident_mut(&mut node.ident);
+ tokens_helper(v, &mut node.colon_token.spans);
+ v.visit_type_mut(&mut *node.ty);
+ tokens_helper(v, &mut node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_foreign_item_type_mut<V>(v: &mut V, node: &mut ForeignItemType)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ tokens_helper(v, &mut node.type_token.span);
+ v.visit_ident_mut(&mut node.ident);
+ tokens_helper(v, &mut node.semi_token.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_generic_argument_mut<V>(v: &mut V, node: &mut GenericArgument)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ GenericArgument::Lifetime(_binding_0) => {
+ v.visit_lifetime_mut(_binding_0);
+ }
+ GenericArgument::Type(_binding_0) => {
+ v.visit_type_mut(_binding_0);
+ }
+ GenericArgument::Binding(_binding_0) => {
+ v.visit_binding_mut(_binding_0);
+ }
+ GenericArgument::Constraint(_binding_0) => {
+ v.visit_constraint_mut(_binding_0);
+ }
+ GenericArgument::Const(_binding_0) => {
+ v.visit_expr_mut(_binding_0);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_generic_method_argument_mut<V>(v: &mut V, node: &mut GenericMethodArgument)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ GenericMethodArgument::Type(_binding_0) => {
+ v.visit_type_mut(_binding_0);
+ }
+ GenericMethodArgument::Const(_binding_0) => {
+ v.visit_expr_mut(_binding_0);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_generic_param_mut<V>(v: &mut V, node: &mut GenericParam)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ GenericParam::Type(_binding_0) => {
+ v.visit_type_param_mut(_binding_0);
+ }
+ GenericParam::Lifetime(_binding_0) => {
+ v.visit_lifetime_def_mut(_binding_0);
+ }
+ GenericParam::Const(_binding_0) => {
+ v.visit_const_param_mut(_binding_0);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_generics_mut<V>(v: &mut V, node: &mut Generics)
+where
+ V: VisitMut + ?Sized,
+{
+ if let Some(it) = &mut node.lt_token {
+ tokens_helper(v, &mut it.spans)
+ };
+ for el in Punctuated::pairs_mut(&mut node.params) {
+ let (it, p) = el.into_tuple();
+ v.visit_generic_param_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+ if let Some(it) = &mut node.gt_token {
+ tokens_helper(v, &mut it.spans)
+ };
+ if let Some(it) = &mut node.where_clause {
+ v.visit_where_clause_mut(it)
+ };
+}
+pub fn visit_ident_mut<V>(v: &mut V, node: &mut Ident)
+where
+ V: VisitMut + ?Sized,
+{
+ let mut span = node.span();
+ v.visit_span_mut(&mut span);
+ node.set_span(span);
+}
+#[cfg(feature = "full")]
+pub fn visit_impl_item_mut<V>(v: &mut V, node: &mut ImplItem)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ ImplItem::Const(_binding_0) => {
+ v.visit_impl_item_const_mut(_binding_0);
+ }
+ ImplItem::Method(_binding_0) => {
+ v.visit_impl_item_method_mut(_binding_0);
+ }
+ ImplItem::Type(_binding_0) => {
+ v.visit_impl_item_type_mut(_binding_0);
+ }
+ ImplItem::Macro(_binding_0) => {
+ v.visit_impl_item_macro_mut(_binding_0);
+ }
+ ImplItem::Verbatim(_binding_0) => {
+ skip!(_binding_0);
+ }
+ _ => unreachable!(),
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_impl_item_const_mut<V>(v: &mut V, node: &mut ImplItemConst)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ if let Some(it) = &mut node.defaultness {
+ tokens_helper(v, &mut it.span)
+ };
+ tokens_helper(v, &mut node.const_token.span);
+ v.visit_ident_mut(&mut node.ident);
+ tokens_helper(v, &mut node.colon_token.spans);
+ v.visit_type_mut(&mut node.ty);
+ tokens_helper(v, &mut node.eq_token.spans);
+ v.visit_expr_mut(&mut node.expr);
+ tokens_helper(v, &mut node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_impl_item_macro_mut<V>(v: &mut V, node: &mut ImplItemMacro)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_macro_mut(&mut node.mac);
+ if let Some(it) = &mut node.semi_token {
+ tokens_helper(v, &mut it.spans)
+ };
+}
+#[cfg(feature = "full")]
+pub fn visit_impl_item_method_mut<V>(v: &mut V, node: &mut ImplItemMethod)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ if let Some(it) = &mut node.defaultness {
+ tokens_helper(v, &mut it.span)
+ };
+ v.visit_signature_mut(&mut node.sig);
+ v.visit_block_mut(&mut node.block);
+}
+#[cfg(feature = "full")]
+pub fn visit_impl_item_type_mut<V>(v: &mut V, node: &mut ImplItemType)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ if let Some(it) = &mut node.defaultness {
+ tokens_helper(v, &mut it.span)
+ };
+ tokens_helper(v, &mut node.type_token.span);
+ v.visit_ident_mut(&mut node.ident);
+ v.visit_generics_mut(&mut node.generics);
+ tokens_helper(v, &mut node.eq_token.spans);
+ v.visit_type_mut(&mut node.ty);
+ tokens_helper(v, &mut node.semi_token.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_index_mut<V>(v: &mut V, node: &mut Index)
+where
+ V: VisitMut + ?Sized,
+{
+ skip!(node.index);
+ v.visit_span_mut(&mut node.span);
+}
+#[cfg(feature = "full")]
+pub fn visit_item_mut<V>(v: &mut V, node: &mut Item)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ Item::Const(_binding_0) => {
+ v.visit_item_const_mut(_binding_0);
+ }
+ Item::Enum(_binding_0) => {
+ v.visit_item_enum_mut(_binding_0);
+ }
+ Item::ExternCrate(_binding_0) => {
+ v.visit_item_extern_crate_mut(_binding_0);
+ }
+ Item::Fn(_binding_0) => {
+ v.visit_item_fn_mut(_binding_0);
+ }
+ Item::ForeignMod(_binding_0) => {
+ v.visit_item_foreign_mod_mut(_binding_0);
+ }
+ Item::Impl(_binding_0) => {
+ v.visit_item_impl_mut(_binding_0);
+ }
+ Item::Macro(_binding_0) => {
+ v.visit_item_macro_mut(_binding_0);
+ }
+ Item::Macro2(_binding_0) => {
+ v.visit_item_macro2_mut(_binding_0);
+ }
+ Item::Mod(_binding_0) => {
+ v.visit_item_mod_mut(_binding_0);
+ }
+ Item::Static(_binding_0) => {
+ v.visit_item_static_mut(_binding_0);
+ }
+ Item::Struct(_binding_0) => {
+ v.visit_item_struct_mut(_binding_0);
+ }
+ Item::Trait(_binding_0) => {
+ v.visit_item_trait_mut(_binding_0);
+ }
+ Item::TraitAlias(_binding_0) => {
+ v.visit_item_trait_alias_mut(_binding_0);
+ }
+ Item::Type(_binding_0) => {
+ v.visit_item_type_mut(_binding_0);
+ }
+ Item::Union(_binding_0) => {
+ v.visit_item_union_mut(_binding_0);
+ }
+ Item::Use(_binding_0) => {
+ v.visit_item_use_mut(_binding_0);
+ }
+ Item::Verbatim(_binding_0) => {
+ skip!(_binding_0);
+ }
+ _ => unreachable!(),
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_item_const_mut<V>(v: &mut V, node: &mut ItemConst)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ tokens_helper(v, &mut node.const_token.span);
+ v.visit_ident_mut(&mut node.ident);
+ tokens_helper(v, &mut node.colon_token.spans);
+ v.visit_type_mut(&mut *node.ty);
+ tokens_helper(v, &mut node.eq_token.spans);
+ v.visit_expr_mut(&mut *node.expr);
+ tokens_helper(v, &mut node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_item_enum_mut<V>(v: &mut V, node: &mut ItemEnum)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ tokens_helper(v, &mut node.enum_token.span);
+ v.visit_ident_mut(&mut node.ident);
+ v.visit_generics_mut(&mut node.generics);
+ tokens_helper(v, &mut node.brace_token.span);
+ for el in Punctuated::pairs_mut(&mut node.variants) {
+ let (it, p) = el.into_tuple();
+ v.visit_variant_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_item_extern_crate_mut<V>(v: &mut V, node: &mut ItemExternCrate)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ tokens_helper(v, &mut node.extern_token.span);
+ tokens_helper(v, &mut node.crate_token.span);
+ v.visit_ident_mut(&mut node.ident);
+ if let Some(it) = &mut node.rename {
+ tokens_helper(v, &mut (it).0.span);
+ v.visit_ident_mut(&mut (it).1);
+ };
+ tokens_helper(v, &mut node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_item_fn_mut<V>(v: &mut V, node: &mut ItemFn)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ v.visit_signature_mut(&mut node.sig);
+ v.visit_block_mut(&mut *node.block);
+}
+#[cfg(feature = "full")]
+pub fn visit_item_foreign_mod_mut<V>(v: &mut V, node: &mut ItemForeignMod)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_abi_mut(&mut node.abi);
+ tokens_helper(v, &mut node.brace_token.span);
+ for it in &mut node.items {
+ v.visit_foreign_item_mut(it)
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_item_impl_mut<V>(v: &mut V, node: &mut ItemImpl)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ if let Some(it) = &mut node.defaultness {
+ tokens_helper(v, &mut it.span)
+ };
+ if let Some(it) = &mut node.unsafety {
+ tokens_helper(v, &mut it.span)
+ };
+ tokens_helper(v, &mut node.impl_token.span);
+ v.visit_generics_mut(&mut node.generics);
+ if let Some(it) = &mut node.trait_ {
+ if let Some(it) = &mut (it).0 {
+ tokens_helper(v, &mut it.spans)
+ };
+ v.visit_path_mut(&mut (it).1);
+ tokens_helper(v, &mut (it).2.span);
+ };
+ v.visit_type_mut(&mut *node.self_ty);
+ tokens_helper(v, &mut node.brace_token.span);
+ for it in &mut node.items {
+ v.visit_impl_item_mut(it)
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_item_macro_mut<V>(v: &mut V, node: &mut ItemMacro)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ if let Some(it) = &mut node.ident {
+ v.visit_ident_mut(it)
+ };
+ v.visit_macro_mut(&mut node.mac);
+ if let Some(it) = &mut node.semi_token {
+ tokens_helper(v, &mut it.spans)
+ };
+}
+#[cfg(feature = "full")]
+pub fn visit_item_macro2_mut<V>(v: &mut V, node: &mut ItemMacro2)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ tokens_helper(v, &mut node.macro_token.span);
+ v.visit_ident_mut(&mut node.ident);
+ skip!(node.rules);
+}
+#[cfg(feature = "full")]
+pub fn visit_item_mod_mut<V>(v: &mut V, node: &mut ItemMod)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ tokens_helper(v, &mut node.mod_token.span);
+ v.visit_ident_mut(&mut node.ident);
+ if let Some(it) = &mut node.content {
+ tokens_helper(v, &mut (it).0.span);
+ for it in &mut (it).1 {
+ v.visit_item_mut(it)
+ }
+ };
+ if let Some(it) = &mut node.semi {
+ tokens_helper(v, &mut it.spans)
+ };
+}
+#[cfg(feature = "full")]
+pub fn visit_item_static_mut<V>(v: &mut V, node: &mut ItemStatic)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ tokens_helper(v, &mut node.static_token.span);
+ if let Some(it) = &mut node.mutability {
+ tokens_helper(v, &mut it.span)
+ };
+ v.visit_ident_mut(&mut node.ident);
+ tokens_helper(v, &mut node.colon_token.spans);
+ v.visit_type_mut(&mut *node.ty);
+ tokens_helper(v, &mut node.eq_token.spans);
+ v.visit_expr_mut(&mut *node.expr);
+ tokens_helper(v, &mut node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_item_struct_mut<V>(v: &mut V, node: &mut ItemStruct)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ tokens_helper(v, &mut node.struct_token.span);
+ v.visit_ident_mut(&mut node.ident);
+ v.visit_generics_mut(&mut node.generics);
+ v.visit_fields_mut(&mut node.fields);
+ if let Some(it) = &mut node.semi_token {
+ tokens_helper(v, &mut it.spans)
+ };
+}
+#[cfg(feature = "full")]
+pub fn visit_item_trait_mut<V>(v: &mut V, node: &mut ItemTrait)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ if let Some(it) = &mut node.unsafety {
+ tokens_helper(v, &mut it.span)
+ };
+ if let Some(it) = &mut node.auto_token {
+ tokens_helper(v, &mut it.span)
+ };
+ tokens_helper(v, &mut node.trait_token.span);
+ v.visit_ident_mut(&mut node.ident);
+ v.visit_generics_mut(&mut node.generics);
+ if let Some(it) = &mut node.colon_token {
+ tokens_helper(v, &mut it.spans)
+ };
+ for el in Punctuated::pairs_mut(&mut node.supertraits) {
+ let (it, p) = el.into_tuple();
+ v.visit_type_param_bound_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+ tokens_helper(v, &mut node.brace_token.span);
+ for it in &mut node.items {
+ v.visit_trait_item_mut(it)
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_item_trait_alias_mut<V>(v: &mut V, node: &mut ItemTraitAlias)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ tokens_helper(v, &mut node.trait_token.span);
+ v.visit_ident_mut(&mut node.ident);
+ v.visit_generics_mut(&mut node.generics);
+ tokens_helper(v, &mut node.eq_token.spans);
+ for el in Punctuated::pairs_mut(&mut node.bounds) {
+ let (it, p) = el.into_tuple();
+ v.visit_type_param_bound_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+ tokens_helper(v, &mut node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_item_type_mut<V>(v: &mut V, node: &mut ItemType)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ tokens_helper(v, &mut node.type_token.span);
+ v.visit_ident_mut(&mut node.ident);
+ v.visit_generics_mut(&mut node.generics);
+ tokens_helper(v, &mut node.eq_token.spans);
+ v.visit_type_mut(&mut *node.ty);
+ tokens_helper(v, &mut node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_item_union_mut<V>(v: &mut V, node: &mut ItemUnion)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ tokens_helper(v, &mut node.union_token.span);
+ v.visit_ident_mut(&mut node.ident);
+ v.visit_generics_mut(&mut node.generics);
+ v.visit_fields_named_mut(&mut node.fields);
+}
+#[cfg(feature = "full")]
+pub fn visit_item_use_mut<V>(v: &mut V, node: &mut ItemUse)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ tokens_helper(v, &mut node.use_token.span);
+ if let Some(it) = &mut node.leading_colon {
+ tokens_helper(v, &mut it.spans)
+ };
+ v.visit_use_tree_mut(&mut node.tree);
+ tokens_helper(v, &mut node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_label_mut<V>(v: &mut V, node: &mut Label)
+where
+ V: VisitMut + ?Sized,
+{
+ v.visit_lifetime_mut(&mut node.name);
+ tokens_helper(v, &mut node.colon_token.spans);
+}
+pub fn visit_lifetime_mut<V>(v: &mut V, node: &mut Lifetime)
+where
+ V: VisitMut + ?Sized,
+{
+ v.visit_span_mut(&mut node.apostrophe);
+ v.visit_ident_mut(&mut node.ident);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_lifetime_def_mut<V>(v: &mut V, node: &mut LifetimeDef)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_lifetime_mut(&mut node.lifetime);
+ if let Some(it) = &mut node.colon_token {
+ tokens_helper(v, &mut it.spans)
+ };
+ for el in Punctuated::pairs_mut(&mut node.bounds) {
+ let (it, p) = el.into_tuple();
+ v.visit_lifetime_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_lit_mut<V>(v: &mut V, node: &mut Lit)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ Lit::Str(_binding_0) => {
+ v.visit_lit_str_mut(_binding_0);
+ }
+ Lit::ByteStr(_binding_0) => {
+ v.visit_lit_byte_str_mut(_binding_0);
+ }
+ Lit::Byte(_binding_0) => {
+ v.visit_lit_byte_mut(_binding_0);
+ }
+ Lit::Char(_binding_0) => {
+ v.visit_lit_char_mut(_binding_0);
+ }
+ Lit::Int(_binding_0) => {
+ v.visit_lit_int_mut(_binding_0);
+ }
+ Lit::Float(_binding_0) => {
+ v.visit_lit_float_mut(_binding_0);
+ }
+ Lit::Bool(_binding_0) => {
+ v.visit_lit_bool_mut(_binding_0);
+ }
+ Lit::Verbatim(_binding_0) => {
+ skip!(_binding_0);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_lit_bool_mut<V>(v: &mut V, node: &mut LitBool)
+where
+ V: VisitMut + ?Sized,
+{
+ skip!(node.value);
+ v.visit_span_mut(&mut node.span);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_lit_byte_mut<V>(v: &mut V, node: &mut LitByte)
+where
+ V: VisitMut + ?Sized,
+{
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_lit_byte_str_mut<V>(v: &mut V, node: &mut LitByteStr)
+where
+ V: VisitMut + ?Sized,
+{
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_lit_char_mut<V>(v: &mut V, node: &mut LitChar)
+where
+ V: VisitMut + ?Sized,
+{
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_lit_float_mut<V>(v: &mut V, node: &mut LitFloat)
+where
+ V: VisitMut + ?Sized,
+{
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_lit_int_mut<V>(v: &mut V, node: &mut LitInt)
+where
+ V: VisitMut + ?Sized,
+{
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_lit_str_mut<V>(v: &mut V, node: &mut LitStr)
+where
+ V: VisitMut + ?Sized,
+{
+}
+#[cfg(feature = "full")]
+pub fn visit_local_mut<V>(v: &mut V, node: &mut Local)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ tokens_helper(v, &mut node.let_token.span);
+ v.visit_pat_mut(&mut node.pat);
+ if let Some(it) = &mut node.init {
+ tokens_helper(v, &mut (it).0.spans);
+ v.visit_expr_mut(&mut *(it).1);
+ };
+ tokens_helper(v, &mut node.semi_token.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_macro_mut<V>(v: &mut V, node: &mut Macro)
+where
+ V: VisitMut + ?Sized,
+{
+ v.visit_path_mut(&mut node.path);
+ tokens_helper(v, &mut node.bang_token.spans);
+ v.visit_macro_delimiter_mut(&mut node.delimiter);
+ skip!(node.tokens);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_macro_delimiter_mut<V>(v: &mut V, node: &mut MacroDelimiter)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ MacroDelimiter::Paren(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.span);
+ }
+ MacroDelimiter::Brace(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.span);
+ }
+ MacroDelimiter::Bracket(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.span);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_member_mut<V>(v: &mut V, node: &mut Member)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ Member::Named(_binding_0) => {
+ v.visit_ident_mut(_binding_0);
+ }
+ Member::Unnamed(_binding_0) => {
+ v.visit_index_mut(_binding_0);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_meta_mut<V>(v: &mut V, node: &mut Meta)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ Meta::Path(_binding_0) => {
+ v.visit_path_mut(_binding_0);
+ }
+ Meta::List(_binding_0) => {
+ v.visit_meta_list_mut(_binding_0);
+ }
+ Meta::NameValue(_binding_0) => {
+ v.visit_meta_name_value_mut(_binding_0);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_meta_list_mut<V>(v: &mut V, node: &mut MetaList)
+where
+ V: VisitMut + ?Sized,
+{
+ v.visit_path_mut(&mut node.path);
+ tokens_helper(v, &mut node.paren_token.span);
+ for el in Punctuated::pairs_mut(&mut node.nested) {
+ let (it, p) = el.into_tuple();
+ v.visit_nested_meta_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_meta_name_value_mut<V>(v: &mut V, node: &mut MetaNameValue)
+where
+ V: VisitMut + ?Sized,
+{
+ v.visit_path_mut(&mut node.path);
+ tokens_helper(v, &mut node.eq_token.spans);
+ v.visit_lit_mut(&mut node.lit);
+}
+#[cfg(feature = "full")]
+pub fn visit_method_turbofish_mut<V>(v: &mut V, node: &mut MethodTurbofish)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.colon2_token.spans);
+ tokens_helper(v, &mut node.lt_token.spans);
+ for el in Punctuated::pairs_mut(&mut node.args) {
+ let (it, p) = el.into_tuple();
+ v.visit_generic_method_argument_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+ tokens_helper(v, &mut node.gt_token.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_nested_meta_mut<V>(v: &mut V, node: &mut NestedMeta)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ NestedMeta::Meta(_binding_0) => {
+ v.visit_meta_mut(_binding_0);
+ }
+ NestedMeta::Lit(_binding_0) => {
+ v.visit_lit_mut(_binding_0);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_parenthesized_generic_arguments_mut<V>(
+ v: &mut V,
+ node: &mut ParenthesizedGenericArguments,
+) where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.paren_token.span);
+ for el in Punctuated::pairs_mut(&mut node.inputs) {
+ let (it, p) = el.into_tuple();
+ v.visit_type_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+ v.visit_return_type_mut(&mut node.output);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_mut<V>(v: &mut V, node: &mut Pat)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ Pat::Box(_binding_0) => {
+ v.visit_pat_box_mut(_binding_0);
+ }
+ Pat::Ident(_binding_0) => {
+ v.visit_pat_ident_mut(_binding_0);
+ }
+ Pat::Lit(_binding_0) => {
+ v.visit_pat_lit_mut(_binding_0);
+ }
+ Pat::Macro(_binding_0) => {
+ v.visit_pat_macro_mut(_binding_0);
+ }
+ Pat::Or(_binding_0) => {
+ v.visit_pat_or_mut(_binding_0);
+ }
+ Pat::Path(_binding_0) => {
+ v.visit_pat_path_mut(_binding_0);
+ }
+ Pat::Range(_binding_0) => {
+ v.visit_pat_range_mut(_binding_0);
+ }
+ Pat::Reference(_binding_0) => {
+ v.visit_pat_reference_mut(_binding_0);
+ }
+ Pat::Rest(_binding_0) => {
+ v.visit_pat_rest_mut(_binding_0);
+ }
+ Pat::Slice(_binding_0) => {
+ v.visit_pat_slice_mut(_binding_0);
+ }
+ Pat::Struct(_binding_0) => {
+ v.visit_pat_struct_mut(_binding_0);
+ }
+ Pat::Tuple(_binding_0) => {
+ v.visit_pat_tuple_mut(_binding_0);
+ }
+ Pat::TupleStruct(_binding_0) => {
+ v.visit_pat_tuple_struct_mut(_binding_0);
+ }
+ Pat::Type(_binding_0) => {
+ v.visit_pat_type_mut(_binding_0);
+ }
+ Pat::Verbatim(_binding_0) => {
+ skip!(_binding_0);
+ }
+ Pat::Wild(_binding_0) => {
+ v.visit_pat_wild_mut(_binding_0);
+ }
+ _ => unreachable!(),
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_box_mut<V>(v: &mut V, node: &mut PatBox)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ tokens_helper(v, &mut node.box_token.span);
+ v.visit_pat_mut(&mut *node.pat);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_ident_mut<V>(v: &mut V, node: &mut PatIdent)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ if let Some(it) = &mut node.by_ref {
+ tokens_helper(v, &mut it.span)
+ };
+ if let Some(it) = &mut node.mutability {
+ tokens_helper(v, &mut it.span)
+ };
+ v.visit_ident_mut(&mut node.ident);
+ if let Some(it) = &mut node.subpat {
+ tokens_helper(v, &mut (it).0.spans);
+ v.visit_pat_mut(&mut *(it).1);
+ };
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_lit_mut<V>(v: &mut V, node: &mut PatLit)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_expr_mut(&mut *node.expr);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_macro_mut<V>(v: &mut V, node: &mut PatMacro)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_macro_mut(&mut node.mac);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_or_mut<V>(v: &mut V, node: &mut PatOr)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ if let Some(it) = &mut node.leading_vert {
+ tokens_helper(v, &mut it.spans)
+ };
+ for el in Punctuated::pairs_mut(&mut node.cases) {
+ let (it, p) = el.into_tuple();
+ v.visit_pat_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_path_mut<V>(v: &mut V, node: &mut PatPath)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ if let Some(it) = &mut node.qself {
+ v.visit_qself_mut(it)
+ };
+ v.visit_path_mut(&mut node.path);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_range_mut<V>(v: &mut V, node: &mut PatRange)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_expr_mut(&mut *node.lo);
+ v.visit_range_limits_mut(&mut node.limits);
+ v.visit_expr_mut(&mut *node.hi);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_reference_mut<V>(v: &mut V, node: &mut PatReference)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ tokens_helper(v, &mut node.and_token.spans);
+ if let Some(it) = &mut node.mutability {
+ tokens_helper(v, &mut it.span)
+ };
+ v.visit_pat_mut(&mut *node.pat);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_rest_mut<V>(v: &mut V, node: &mut PatRest)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ tokens_helper(v, &mut node.dot2_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_slice_mut<V>(v: &mut V, node: &mut PatSlice)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ tokens_helper(v, &mut node.bracket_token.span);
+ for el in Punctuated::pairs_mut(&mut node.elems) {
+ let (it, p) = el.into_tuple();
+ v.visit_pat_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_struct_mut<V>(v: &mut V, node: &mut PatStruct)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_path_mut(&mut node.path);
+ tokens_helper(v, &mut node.brace_token.span);
+ for el in Punctuated::pairs_mut(&mut node.fields) {
+ let (it, p) = el.into_tuple();
+ v.visit_field_pat_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+ if let Some(it) = &mut node.dot2_token {
+ tokens_helper(v, &mut it.spans)
+ };
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_tuple_mut<V>(v: &mut V, node: &mut PatTuple)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ tokens_helper(v, &mut node.paren_token.span);
+ for el in Punctuated::pairs_mut(&mut node.elems) {
+ let (it, p) = el.into_tuple();
+ v.visit_pat_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_tuple_struct_mut<V>(v: &mut V, node: &mut PatTupleStruct)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_path_mut(&mut node.path);
+ v.visit_pat_tuple_mut(&mut node.pat);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_type_mut<V>(v: &mut V, node: &mut PatType)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_pat_mut(&mut *node.pat);
+ tokens_helper(v, &mut node.colon_token.spans);
+ v.visit_type_mut(&mut *node.ty);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_wild_mut<V>(v: &mut V, node: &mut PatWild)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ tokens_helper(v, &mut node.underscore_token.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_path_mut<V>(v: &mut V, node: &mut Path)
+where
+ V: VisitMut + ?Sized,
+{
+ if let Some(it) = &mut node.leading_colon {
+ tokens_helper(v, &mut it.spans)
+ };
+ for el in Punctuated::pairs_mut(&mut node.segments) {
+ let (it, p) = el.into_tuple();
+ v.visit_path_segment_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_path_arguments_mut<V>(v: &mut V, node: &mut PathArguments)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ PathArguments::None => {}
+ PathArguments::AngleBracketed(_binding_0) => {
+ v.visit_angle_bracketed_generic_arguments_mut(_binding_0);
+ }
+ PathArguments::Parenthesized(_binding_0) => {
+ v.visit_parenthesized_generic_arguments_mut(_binding_0);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_path_segment_mut<V>(v: &mut V, node: &mut PathSegment)
+where
+ V: VisitMut + ?Sized,
+{
+ v.visit_ident_mut(&mut node.ident);
+ v.visit_path_arguments_mut(&mut node.arguments);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_predicate_eq_mut<V>(v: &mut V, node: &mut PredicateEq)
+where
+ V: VisitMut + ?Sized,
+{
+ v.visit_type_mut(&mut node.lhs_ty);
+ tokens_helper(v, &mut node.eq_token.spans);
+ v.visit_type_mut(&mut node.rhs_ty);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_predicate_lifetime_mut<V>(v: &mut V, node: &mut PredicateLifetime)
+where
+ V: VisitMut + ?Sized,
+{
+ v.visit_lifetime_mut(&mut node.lifetime);
+ tokens_helper(v, &mut node.colon_token.spans);
+ for el in Punctuated::pairs_mut(&mut node.bounds) {
+ let (it, p) = el.into_tuple();
+ v.visit_lifetime_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_predicate_type_mut<V>(v: &mut V, node: &mut PredicateType)
+where
+ V: VisitMut + ?Sized,
+{
+ if let Some(it) = &mut node.lifetimes {
+ v.visit_bound_lifetimes_mut(it)
+ };
+ v.visit_type_mut(&mut node.bounded_ty);
+ tokens_helper(v, &mut node.colon_token.spans);
+ for el in Punctuated::pairs_mut(&mut node.bounds) {
+ let (it, p) = el.into_tuple();
+ v.visit_type_param_bound_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_qself_mut<V>(v: &mut V, node: &mut QSelf)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.lt_token.spans);
+ v.visit_type_mut(&mut *node.ty);
+ skip!(node.position);
+ if let Some(it) = &mut node.as_token {
+ tokens_helper(v, &mut it.span)
+ };
+ tokens_helper(v, &mut node.gt_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_range_limits_mut<V>(v: &mut V, node: &mut RangeLimits)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ RangeLimits::HalfOpen(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ RangeLimits::Closed(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_receiver_mut<V>(v: &mut V, node: &mut Receiver)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ if let Some(it) = &mut node.reference {
+ tokens_helper(v, &mut (it).0.spans);
+ if let Some(it) = &mut (it).1 {
+ v.visit_lifetime_mut(it)
+ };
+ };
+ if let Some(it) = &mut node.mutability {
+ tokens_helper(v, &mut it.span)
+ };
+ tokens_helper(v, &mut node.self_token.span);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_return_type_mut<V>(v: &mut V, node: &mut ReturnType)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ ReturnType::Default => {}
+ ReturnType::Type(_binding_0, _binding_1) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ v.visit_type_mut(&mut **_binding_1);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_signature_mut<V>(v: &mut V, node: &mut Signature)
+where
+ V: VisitMut + ?Sized,
+{
+ if let Some(it) = &mut node.constness {
+ tokens_helper(v, &mut it.span)
+ };
+ if let Some(it) = &mut node.asyncness {
+ tokens_helper(v, &mut it.span)
+ };
+ if let Some(it) = &mut node.unsafety {
+ tokens_helper(v, &mut it.span)
+ };
+ if let Some(it) = &mut node.abi {
+ v.visit_abi_mut(it)
+ };
+ tokens_helper(v, &mut node.fn_token.span);
+ v.visit_ident_mut(&mut node.ident);
+ v.visit_generics_mut(&mut node.generics);
+ tokens_helper(v, &mut node.paren_token.span);
+ for el in Punctuated::pairs_mut(&mut node.inputs) {
+ let (it, p) = el.into_tuple();
+ v.visit_fn_arg_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+ if let Some(it) = &mut node.variadic {
+ v.visit_variadic_mut(it)
+ };
+ v.visit_return_type_mut(&mut node.output);
+}
+pub fn visit_span_mut<V>(v: &mut V, node: &mut Span)
+where
+ V: VisitMut + ?Sized,
+{
+}
+#[cfg(feature = "full")]
+pub fn visit_stmt_mut<V>(v: &mut V, node: &mut Stmt)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ Stmt::Local(_binding_0) => {
+ v.visit_local_mut(_binding_0);
+ }
+ Stmt::Item(_binding_0) => {
+ v.visit_item_mut(_binding_0);
+ }
+ Stmt::Expr(_binding_0) => {
+ v.visit_expr_mut(_binding_0);
+ }
+ Stmt::Semi(_binding_0, _binding_1) => {
+ v.visit_expr_mut(_binding_0);
+ tokens_helper(v, &mut _binding_1.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_trait_bound_mut<V>(v: &mut V, node: &mut TraitBound)
+where
+ V: VisitMut + ?Sized,
+{
+ if let Some(it) = &mut node.paren_token {
+ tokens_helper(v, &mut it.span)
+ };
+ v.visit_trait_bound_modifier_mut(&mut node.modifier);
+ if let Some(it) = &mut node.lifetimes {
+ v.visit_bound_lifetimes_mut(it)
+ };
+ v.visit_path_mut(&mut node.path);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_trait_bound_modifier_mut<V>(v: &mut V, node: &mut TraitBoundModifier)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ TraitBoundModifier::None => {}
+ TraitBoundModifier::Maybe(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_trait_item_mut<V>(v: &mut V, node: &mut TraitItem)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ TraitItem::Const(_binding_0) => {
+ v.visit_trait_item_const_mut(_binding_0);
+ }
+ TraitItem::Method(_binding_0) => {
+ v.visit_trait_item_method_mut(_binding_0);
+ }
+ TraitItem::Type(_binding_0) => {
+ v.visit_trait_item_type_mut(_binding_0);
+ }
+ TraitItem::Macro(_binding_0) => {
+ v.visit_trait_item_macro_mut(_binding_0);
+ }
+ TraitItem::Verbatim(_binding_0) => {
+ skip!(_binding_0);
+ }
+ _ => unreachable!(),
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_trait_item_const_mut<V>(v: &mut V, node: &mut TraitItemConst)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ tokens_helper(v, &mut node.const_token.span);
+ v.visit_ident_mut(&mut node.ident);
+ tokens_helper(v, &mut node.colon_token.spans);
+ v.visit_type_mut(&mut node.ty);
+ if let Some(it) = &mut node.default {
+ tokens_helper(v, &mut (it).0.spans);
+ v.visit_expr_mut(&mut (it).1);
+ };
+ tokens_helper(v, &mut node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_trait_item_macro_mut<V>(v: &mut V, node: &mut TraitItemMacro)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_macro_mut(&mut node.mac);
+ if let Some(it) = &mut node.semi_token {
+ tokens_helper(v, &mut it.spans)
+ };
+}
+#[cfg(feature = "full")]
+pub fn visit_trait_item_method_mut<V>(v: &mut V, node: &mut TraitItemMethod)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_signature_mut(&mut node.sig);
+ if let Some(it) = &mut node.default {
+ v.visit_block_mut(it)
+ };
+ if let Some(it) = &mut node.semi_token {
+ tokens_helper(v, &mut it.spans)
+ };
+}
+#[cfg(feature = "full")]
+pub fn visit_trait_item_type_mut<V>(v: &mut V, node: &mut TraitItemType)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ tokens_helper(v, &mut node.type_token.span);
+ v.visit_ident_mut(&mut node.ident);
+ v.visit_generics_mut(&mut node.generics);
+ if let Some(it) = &mut node.colon_token {
+ tokens_helper(v, &mut it.spans)
+ };
+ for el in Punctuated::pairs_mut(&mut node.bounds) {
+ let (it, p) = el.into_tuple();
+ v.visit_type_param_bound_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+ if let Some(it) = &mut node.default {
+ tokens_helper(v, &mut (it).0.spans);
+ v.visit_type_mut(&mut (it).1);
+ };
+ tokens_helper(v, &mut node.semi_token.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_mut<V>(v: &mut V, node: &mut Type)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ Type::Array(_binding_0) => {
+ v.visit_type_array_mut(_binding_0);
+ }
+ Type::BareFn(_binding_0) => {
+ v.visit_type_bare_fn_mut(_binding_0);
+ }
+ Type::Group(_binding_0) => {
+ v.visit_type_group_mut(_binding_0);
+ }
+ Type::ImplTrait(_binding_0) => {
+ v.visit_type_impl_trait_mut(_binding_0);
+ }
+ Type::Infer(_binding_0) => {
+ v.visit_type_infer_mut(_binding_0);
+ }
+ Type::Macro(_binding_0) => {
+ v.visit_type_macro_mut(_binding_0);
+ }
+ Type::Never(_binding_0) => {
+ v.visit_type_never_mut(_binding_0);
+ }
+ Type::Paren(_binding_0) => {
+ v.visit_type_paren_mut(_binding_0);
+ }
+ Type::Path(_binding_0) => {
+ v.visit_type_path_mut(_binding_0);
+ }
+ Type::Ptr(_binding_0) => {
+ v.visit_type_ptr_mut(_binding_0);
+ }
+ Type::Reference(_binding_0) => {
+ v.visit_type_reference_mut(_binding_0);
+ }
+ Type::Slice(_binding_0) => {
+ v.visit_type_slice_mut(_binding_0);
+ }
+ Type::TraitObject(_binding_0) => {
+ v.visit_type_trait_object_mut(_binding_0);
+ }
+ Type::Tuple(_binding_0) => {
+ v.visit_type_tuple_mut(_binding_0);
+ }
+ Type::Verbatim(_binding_0) => {
+ skip!(_binding_0);
+ }
+ _ => unreachable!(),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_array_mut<V>(v: &mut V, node: &mut TypeArray)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.bracket_token.span);
+ v.visit_type_mut(&mut *node.elem);
+ tokens_helper(v, &mut node.semi_token.spans);
+ v.visit_expr_mut(&mut node.len);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_bare_fn_mut<V>(v: &mut V, node: &mut TypeBareFn)
+where
+ V: VisitMut + ?Sized,
+{
+ if let Some(it) = &mut node.lifetimes {
+ v.visit_bound_lifetimes_mut(it)
+ };
+ if let Some(it) = &mut node.unsafety {
+ tokens_helper(v, &mut it.span)
+ };
+ if let Some(it) = &mut node.abi {
+ v.visit_abi_mut(it)
+ };
+ tokens_helper(v, &mut node.fn_token.span);
+ tokens_helper(v, &mut node.paren_token.span);
+ for el in Punctuated::pairs_mut(&mut node.inputs) {
+ let (it, p) = el.into_tuple();
+ v.visit_bare_fn_arg_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+ if let Some(it) = &mut node.variadic {
+ v.visit_variadic_mut(it)
+ };
+ v.visit_return_type_mut(&mut node.output);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_group_mut<V>(v: &mut V, node: &mut TypeGroup)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.group_token.span);
+ v.visit_type_mut(&mut *node.elem);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_impl_trait_mut<V>(v: &mut V, node: &mut TypeImplTrait)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.impl_token.span);
+ for el in Punctuated::pairs_mut(&mut node.bounds) {
+ let (it, p) = el.into_tuple();
+ v.visit_type_param_bound_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_infer_mut<V>(v: &mut V, node: &mut TypeInfer)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.underscore_token.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_macro_mut<V>(v: &mut V, node: &mut TypeMacro)
+where
+ V: VisitMut + ?Sized,
+{
+ v.visit_macro_mut(&mut node.mac);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_never_mut<V>(v: &mut V, node: &mut TypeNever)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.bang_token.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_param_mut<V>(v: &mut V, node: &mut TypeParam)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_ident_mut(&mut node.ident);
+ if let Some(it) = &mut node.colon_token {
+ tokens_helper(v, &mut it.spans)
+ };
+ for el in Punctuated::pairs_mut(&mut node.bounds) {
+ let (it, p) = el.into_tuple();
+ v.visit_type_param_bound_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+ if let Some(it) = &mut node.eq_token {
+ tokens_helper(v, &mut it.spans)
+ };
+ if let Some(it) = &mut node.default {
+ v.visit_type_mut(it)
+ };
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_param_bound_mut<V>(v: &mut V, node: &mut TypeParamBound)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ TypeParamBound::Trait(_binding_0) => {
+ v.visit_trait_bound_mut(_binding_0);
+ }
+ TypeParamBound::Lifetime(_binding_0) => {
+ v.visit_lifetime_mut(_binding_0);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_paren_mut<V>(v: &mut V, node: &mut TypeParen)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.paren_token.span);
+ v.visit_type_mut(&mut *node.elem);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_path_mut<V>(v: &mut V, node: &mut TypePath)
+where
+ V: VisitMut + ?Sized,
+{
+ if let Some(it) = &mut node.qself {
+ v.visit_qself_mut(it)
+ };
+ v.visit_path_mut(&mut node.path);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_ptr_mut<V>(v: &mut V, node: &mut TypePtr)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.star_token.spans);
+ if let Some(it) = &mut node.const_token {
+ tokens_helper(v, &mut it.span)
+ };
+ if let Some(it) = &mut node.mutability {
+ tokens_helper(v, &mut it.span)
+ };
+ v.visit_type_mut(&mut *node.elem);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_reference_mut<V>(v: &mut V, node: &mut TypeReference)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.and_token.spans);
+ if let Some(it) = &mut node.lifetime {
+ v.visit_lifetime_mut(it)
+ };
+ if let Some(it) = &mut node.mutability {
+ tokens_helper(v, &mut it.span)
+ };
+ v.visit_type_mut(&mut *node.elem);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_slice_mut<V>(v: &mut V, node: &mut TypeSlice)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.bracket_token.span);
+ v.visit_type_mut(&mut *node.elem);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_trait_object_mut<V>(v: &mut V, node: &mut TypeTraitObject)
+where
+ V: VisitMut + ?Sized,
+{
+ if let Some(it) = &mut node.dyn_token {
+ tokens_helper(v, &mut it.span)
+ };
+ for el in Punctuated::pairs_mut(&mut node.bounds) {
+ let (it, p) = el.into_tuple();
+ v.visit_type_param_bound_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_tuple_mut<V>(v: &mut V, node: &mut TypeTuple)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.paren_token.span);
+ for el in Punctuated::pairs_mut(&mut node.elems) {
+ let (it, p) = el.into_tuple();
+ v.visit_type_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_un_op_mut<V>(v: &mut V, node: &mut UnOp)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ UnOp::Deref(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ UnOp::Not(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ UnOp::Neg(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_use_glob_mut<V>(v: &mut V, node: &mut UseGlob)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.star_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_use_group_mut<V>(v: &mut V, node: &mut UseGroup)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.brace_token.span);
+ for el in Punctuated::pairs_mut(&mut node.items) {
+ let (it, p) = el.into_tuple();
+ v.visit_use_tree_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_use_name_mut<V>(v: &mut V, node: &mut UseName)
+where
+ V: VisitMut + ?Sized,
+{
+ v.visit_ident_mut(&mut node.ident);
+}
+#[cfg(feature = "full")]
+pub fn visit_use_path_mut<V>(v: &mut V, node: &mut UsePath)
+where
+ V: VisitMut + ?Sized,
+{
+ v.visit_ident_mut(&mut node.ident);
+ tokens_helper(v, &mut node.colon2_token.spans);
+ v.visit_use_tree_mut(&mut *node.tree);
+}
+#[cfg(feature = "full")]
+pub fn visit_use_rename_mut<V>(v: &mut V, node: &mut UseRename)
+where
+ V: VisitMut + ?Sized,
+{
+ v.visit_ident_mut(&mut node.ident);
+ tokens_helper(v, &mut node.as_token.span);
+ v.visit_ident_mut(&mut node.rename);
+}
+#[cfg(feature = "full")]
+pub fn visit_use_tree_mut<V>(v: &mut V, node: &mut UseTree)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ UseTree::Path(_binding_0) => {
+ v.visit_use_path_mut(_binding_0);
+ }
+ UseTree::Name(_binding_0) => {
+ v.visit_use_name_mut(_binding_0);
+ }
+ UseTree::Rename(_binding_0) => {
+ v.visit_use_rename_mut(_binding_0);
+ }
+ UseTree::Glob(_binding_0) => {
+ v.visit_use_glob_mut(_binding_0);
+ }
+ UseTree::Group(_binding_0) => {
+ v.visit_use_group_mut(_binding_0);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_variadic_mut<V>(v: &mut V, node: &mut Variadic)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ tokens_helper(v, &mut node.dots.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_variant_mut<V>(v: &mut V, node: &mut Variant)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it)
+ }
+ v.visit_ident_mut(&mut node.ident);
+ v.visit_fields_mut(&mut node.fields);
+ if let Some(it) = &mut node.discriminant {
+ tokens_helper(v, &mut (it).0.spans);
+ v.visit_expr_mut(&mut (it).1);
+ };
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_vis_crate_mut<V>(v: &mut V, node: &mut VisCrate)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.crate_token.span);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_vis_public_mut<V>(v: &mut V, node: &mut VisPublic)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.pub_token.span);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_vis_restricted_mut<V>(v: &mut V, node: &mut VisRestricted)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.pub_token.span);
+ tokens_helper(v, &mut node.paren_token.span);
+ if let Some(it) = &mut node.in_token {
+ tokens_helper(v, &mut it.span)
+ };
+ v.visit_path_mut(&mut *node.path);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_visibility_mut<V>(v: &mut V, node: &mut Visibility)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ Visibility::Public(_binding_0) => {
+ v.visit_vis_public_mut(_binding_0);
+ }
+ Visibility::Crate(_binding_0) => {
+ v.visit_vis_crate_mut(_binding_0);
+ }
+ Visibility::Restricted(_binding_0) => {
+ v.visit_vis_restricted_mut(_binding_0);
+ }
+ Visibility::Inherited => {}
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_where_clause_mut<V>(v: &mut V, node: &mut WhereClause)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.where_token.span);
+ for el in Punctuated::pairs_mut(&mut node.predicates) {
+ let (it, p) = el.into_tuple();
+ v.visit_where_predicate_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_where_predicate_mut<V>(v: &mut V, node: &mut WherePredicate)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ WherePredicate::Type(_binding_0) => {
+ v.visit_predicate_type_mut(_binding_0);
+ }
+ WherePredicate::Lifetime(_binding_0) => {
+ v.visit_predicate_lifetime_mut(_binding_0);
+ }
+ WherePredicate::Eq(_binding_0) => {
+ v.visit_predicate_eq_mut(_binding_0);
+ }
+ }
+}