From a990de90fe41456a23e58bd087d2f107d321f3a1 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Fri, 19 Jul 2024 16:37:58 +0400 Subject: Deleted vendor folder --- vendor/syn/src/gen/clone.rs | 2181 ---------------------- vendor/syn/src/gen/debug.rs | 3052 ------------------------------- vendor/syn/src/gen/eq.rs | 2148 ---------------------- vendor/syn/src/gen/fold.rs | 3459 ----------------------------------- vendor/syn/src/gen/hash.rs | 2804 ---------------------------- vendor/syn/src/gen/visit.rs | 3844 -------------------------------------- vendor/syn/src/gen/visit_mut.rs | 3847 --------------------------------------- 7 files changed, 21335 deletions(-) delete mode 100644 vendor/syn/src/gen/clone.rs delete mode 100644 vendor/syn/src/gen/debug.rs delete mode 100644 vendor/syn/src/gen/eq.rs delete mode 100644 vendor/syn/src/gen/fold.rs delete mode 100644 vendor/syn/src/gen/hash.rs delete mode 100644 vendor/syn/src/gen/visit.rs delete mode 100644 vendor/syn/src/gen/visit_mut.rs (limited to 'vendor/syn/src/gen') diff --git a/vendor/syn/src/gen/clone.rs b/vendor/syn/src/gen/clone.rs deleted file mode 100644 index 9593679..0000000 --- a/vendor/syn/src/gen/clone.rs +++ /dev/null @@ -1,2181 +0,0 @@ -// This file is @generated by syn-internal-codegen. -// It is not intended for manual editing. - -#![allow(clippy::clone_on_copy, clippy::expl_impl_clone_on_copy)] -use crate::*; -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for Abi { - fn clone(&self) -> Self { - Abi { - extern_token: self.extern_token.clone(), - name: self.name.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for AngleBracketedGenericArguments { - fn clone(&self) -> Self { - AngleBracketedGenericArguments { - colon2_token: self.colon2_token.clone(), - lt_token: self.lt_token.clone(), - args: self.args.clone(), - gt_token: self.gt_token.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for Arm { - fn clone(&self) -> Self { - Arm { - attrs: self.attrs.clone(), - pat: self.pat.clone(), - guard: self.guard.clone(), - fat_arrow_token: self.fat_arrow_token.clone(), - body: self.body.clone(), - comma: self.comma.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for AssocConst { - fn clone(&self) -> Self { - AssocConst { - ident: self.ident.clone(), - generics: self.generics.clone(), - eq_token: self.eq_token.clone(), - value: self.value.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for AssocType { - fn clone(&self) -> Self { - AssocType { - ident: self.ident.clone(), - generics: self.generics.clone(), - eq_token: self.eq_token.clone(), - ty: self.ty.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Copy for AttrStyle {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for AttrStyle { - fn clone(&self) -> Self { - *self - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for Attribute { - fn clone(&self) -> Self { - Attribute { - pound_token: self.pound_token.clone(), - style: self.style.clone(), - bracket_token: self.bracket_token.clone(), - meta: self.meta.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for BareFnArg { - fn clone(&self) -> Self { - BareFnArg { - attrs: self.attrs.clone(), - name: self.name.clone(), - ty: self.ty.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for BareVariadic { - fn clone(&self) -> Self { - BareVariadic { - attrs: self.attrs.clone(), - name: self.name.clone(), - dots: self.dots.clone(), - comma: self.comma.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Copy for BinOp {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for BinOp { - fn clone(&self) -> Self { - *self - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for Block { - fn clone(&self) -> Self { - Block { - brace_token: self.brace_token.clone(), - stmts: self.stmts.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for BoundLifetimes { - fn clone(&self) -> Self { - BoundLifetimes { - for_token: self.for_token.clone(), - lt_token: self.lt_token.clone(), - lifetimes: self.lifetimes.clone(), - gt_token: self.gt_token.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ConstParam { - fn clone(&self) -> Self { - ConstParam { - attrs: self.attrs.clone(), - const_token: self.const_token.clone(), - ident: self.ident.clone(), - colon_token: self.colon_token.clone(), - ty: self.ty.clone(), - eq_token: self.eq_token.clone(), - default: self.default.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for Constraint { - fn clone(&self) -> Self { - Constraint { - ident: self.ident.clone(), - generics: self.generics.clone(), - colon_token: self.colon_token.clone(), - bounds: self.bounds.clone(), - } - } -} -#[cfg(feature = "derive")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for Data { - fn clone(&self) -> Self { - match self { - Data::Struct(v0) => Data::Struct(v0.clone()), - Data::Enum(v0) => Data::Enum(v0.clone()), - Data::Union(v0) => Data::Union(v0.clone()), - } - } -} -#[cfg(feature = "derive")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for DataEnum { - fn clone(&self) -> Self { - DataEnum { - enum_token: self.enum_token.clone(), - brace_token: self.brace_token.clone(), - variants: self.variants.clone(), - } - } -} -#[cfg(feature = "derive")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for DataStruct { - fn clone(&self) -> Self { - DataStruct { - struct_token: self.struct_token.clone(), - fields: self.fields.clone(), - semi_token: self.semi_token.clone(), - } - } -} -#[cfg(feature = "derive")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for DataUnion { - fn clone(&self) -> Self { - DataUnion { - union_token: self.union_token.clone(), - fields: self.fields.clone(), - } - } -} -#[cfg(feature = "derive")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for DeriveInput { - fn clone(&self) -> Self { - DeriveInput { - attrs: self.attrs.clone(), - vis: self.vis.clone(), - ident: self.ident.clone(), - generics: self.generics.clone(), - data: self.data.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for Expr { - fn clone(&self) -> Self { - match self { - #[cfg(feature = "full")] - Expr::Array(v0) => Expr::Array(v0.clone()), - #[cfg(feature = "full")] - Expr::Assign(v0) => Expr::Assign(v0.clone()), - #[cfg(feature = "full")] - Expr::Async(v0) => Expr::Async(v0.clone()), - #[cfg(feature = "full")] - Expr::Await(v0) => Expr::Await(v0.clone()), - Expr::Binary(v0) => Expr::Binary(v0.clone()), - #[cfg(feature = "full")] - Expr::Block(v0) => Expr::Block(v0.clone()), - #[cfg(feature = "full")] - Expr::Break(v0) => Expr::Break(v0.clone()), - Expr::Call(v0) => Expr::Call(v0.clone()), - Expr::Cast(v0) => Expr::Cast(v0.clone()), - #[cfg(feature = "full")] - Expr::Closure(v0) => Expr::Closure(v0.clone()), - #[cfg(feature = "full")] - Expr::Const(v0) => Expr::Const(v0.clone()), - #[cfg(feature = "full")] - Expr::Continue(v0) => Expr::Continue(v0.clone()), - Expr::Field(v0) => Expr::Field(v0.clone()), - #[cfg(feature = "full")] - Expr::ForLoop(v0) => Expr::ForLoop(v0.clone()), - Expr::Group(v0) => Expr::Group(v0.clone()), - #[cfg(feature = "full")] - Expr::If(v0) => Expr::If(v0.clone()), - Expr::Index(v0) => Expr::Index(v0.clone()), - #[cfg(feature = "full")] - Expr::Infer(v0) => Expr::Infer(v0.clone()), - #[cfg(feature = "full")] - Expr::Let(v0) => Expr::Let(v0.clone()), - Expr::Lit(v0) => Expr::Lit(v0.clone()), - #[cfg(feature = "full")] - Expr::Loop(v0) => Expr::Loop(v0.clone()), - Expr::Macro(v0) => Expr::Macro(v0.clone()), - #[cfg(feature = "full")] - Expr::Match(v0) => Expr::Match(v0.clone()), - Expr::MethodCall(v0) => Expr::MethodCall(v0.clone()), - Expr::Paren(v0) => Expr::Paren(v0.clone()), - Expr::Path(v0) => Expr::Path(v0.clone()), - #[cfg(feature = "full")] - Expr::Range(v0) => Expr::Range(v0.clone()), - Expr::Reference(v0) => Expr::Reference(v0.clone()), - #[cfg(feature = "full")] - Expr::Repeat(v0) => Expr::Repeat(v0.clone()), - #[cfg(feature = "full")] - Expr::Return(v0) => Expr::Return(v0.clone()), - Expr::Struct(v0) => Expr::Struct(v0.clone()), - #[cfg(feature = "full")] - Expr::Try(v0) => Expr::Try(v0.clone()), - #[cfg(feature = "full")] - Expr::TryBlock(v0) => Expr::TryBlock(v0.clone()), - #[cfg(feature = "full")] - Expr::Tuple(v0) => Expr::Tuple(v0.clone()), - Expr::Unary(v0) => Expr::Unary(v0.clone()), - #[cfg(feature = "full")] - Expr::Unsafe(v0) => Expr::Unsafe(v0.clone()), - Expr::Verbatim(v0) => Expr::Verbatim(v0.clone()), - #[cfg(feature = "full")] - Expr::While(v0) => Expr::While(v0.clone()), - #[cfg(feature = "full")] - Expr::Yield(v0) => Expr::Yield(v0.clone()), - #[cfg(not(feature = "full"))] - _ => unreachable!(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ExprArray { - fn clone(&self) -> Self { - ExprArray { - attrs: self.attrs.clone(), - bracket_token: self.bracket_token.clone(), - elems: self.elems.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ExprAssign { - fn clone(&self) -> Self { - ExprAssign { - attrs: self.attrs.clone(), - left: self.left.clone(), - eq_token: self.eq_token.clone(), - right: self.right.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ExprAsync { - fn clone(&self) -> Self { - ExprAsync { - attrs: self.attrs.clone(), - async_token: self.async_token.clone(), - capture: self.capture.clone(), - block: self.block.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ExprAwait { - fn clone(&self) -> Self { - ExprAwait { - attrs: self.attrs.clone(), - base: self.base.clone(), - dot_token: self.dot_token.clone(), - await_token: self.await_token.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ExprBinary { - fn clone(&self) -> Self { - ExprBinary { - attrs: self.attrs.clone(), - left: self.left.clone(), - op: self.op.clone(), - right: self.right.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ExprBlock { - fn clone(&self) -> Self { - ExprBlock { - attrs: self.attrs.clone(), - label: self.label.clone(), - block: self.block.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ExprBreak { - fn clone(&self) -> Self { - ExprBreak { - attrs: self.attrs.clone(), - break_token: self.break_token.clone(), - label: self.label.clone(), - expr: self.expr.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ExprCall { - fn clone(&self) -> Self { - ExprCall { - attrs: self.attrs.clone(), - func: self.func.clone(), - paren_token: self.paren_token.clone(), - args: self.args.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ExprCast { - fn clone(&self) -> Self { - ExprCast { - attrs: self.attrs.clone(), - expr: self.expr.clone(), - as_token: self.as_token.clone(), - ty: self.ty.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ExprClosure { - fn clone(&self) -> Self { - ExprClosure { - attrs: self.attrs.clone(), - lifetimes: self.lifetimes.clone(), - constness: self.constness.clone(), - movability: self.movability.clone(), - asyncness: self.asyncness.clone(), - capture: self.capture.clone(), - or1_token: self.or1_token.clone(), - inputs: self.inputs.clone(), - or2_token: self.or2_token.clone(), - output: self.output.clone(), - body: self.body.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ExprConst { - fn clone(&self) -> Self { - ExprConst { - attrs: self.attrs.clone(), - const_token: self.const_token.clone(), - block: self.block.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ExprContinue { - fn clone(&self) -> Self { - ExprContinue { - attrs: self.attrs.clone(), - continue_token: self.continue_token.clone(), - label: self.label.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ExprField { - fn clone(&self) -> Self { - ExprField { - attrs: self.attrs.clone(), - base: self.base.clone(), - dot_token: self.dot_token.clone(), - member: self.member.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ExprForLoop { - fn clone(&self) -> Self { - ExprForLoop { - attrs: self.attrs.clone(), - label: self.label.clone(), - for_token: self.for_token.clone(), - pat: self.pat.clone(), - in_token: self.in_token.clone(), - expr: self.expr.clone(), - body: self.body.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ExprGroup { - fn clone(&self) -> Self { - ExprGroup { - attrs: self.attrs.clone(), - group_token: self.group_token.clone(), - expr: self.expr.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ExprIf { - fn clone(&self) -> Self { - ExprIf { - attrs: self.attrs.clone(), - if_token: self.if_token.clone(), - cond: self.cond.clone(), - then_branch: self.then_branch.clone(), - else_branch: self.else_branch.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ExprIndex { - fn clone(&self) -> Self { - ExprIndex { - attrs: self.attrs.clone(), - expr: self.expr.clone(), - bracket_token: self.bracket_token.clone(), - index: self.index.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ExprInfer { - fn clone(&self) -> Self { - ExprInfer { - attrs: self.attrs.clone(), - underscore_token: self.underscore_token.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ExprLet { - fn clone(&self) -> Self { - ExprLet { - attrs: self.attrs.clone(), - let_token: self.let_token.clone(), - pat: self.pat.clone(), - eq_token: self.eq_token.clone(), - expr: self.expr.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ExprLit { - fn clone(&self) -> Self { - ExprLit { - attrs: self.attrs.clone(), - lit: self.lit.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ExprLoop { - fn clone(&self) -> Self { - ExprLoop { - attrs: self.attrs.clone(), - label: self.label.clone(), - loop_token: self.loop_token.clone(), - body: self.body.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ExprMacro { - fn clone(&self) -> Self { - ExprMacro { - attrs: self.attrs.clone(), - mac: self.mac.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ExprMatch { - fn clone(&self) -> Self { - ExprMatch { - attrs: self.attrs.clone(), - match_token: self.match_token.clone(), - expr: self.expr.clone(), - brace_token: self.brace_token.clone(), - arms: self.arms.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ExprMethodCall { - fn clone(&self) -> Self { - ExprMethodCall { - attrs: self.attrs.clone(), - receiver: self.receiver.clone(), - dot_token: self.dot_token.clone(), - method: self.method.clone(), - turbofish: self.turbofish.clone(), - paren_token: self.paren_token.clone(), - args: self.args.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ExprParen { - fn clone(&self) -> Self { - ExprParen { - attrs: self.attrs.clone(), - paren_token: self.paren_token.clone(), - expr: self.expr.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ExprPath { - fn clone(&self) -> Self { - ExprPath { - attrs: self.attrs.clone(), - qself: self.qself.clone(), - path: self.path.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ExprRange { - fn clone(&self) -> Self { - ExprRange { - attrs: self.attrs.clone(), - start: self.start.clone(), - limits: self.limits.clone(), - end: self.end.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ExprReference { - fn clone(&self) -> Self { - ExprReference { - attrs: self.attrs.clone(), - and_token: self.and_token.clone(), - mutability: self.mutability.clone(), - expr: self.expr.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ExprRepeat { - fn clone(&self) -> Self { - ExprRepeat { - attrs: self.attrs.clone(), - bracket_token: self.bracket_token.clone(), - expr: self.expr.clone(), - semi_token: self.semi_token.clone(), - len: self.len.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ExprReturn { - fn clone(&self) -> Self { - ExprReturn { - attrs: self.attrs.clone(), - return_token: self.return_token.clone(), - expr: self.expr.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ExprStruct { - fn clone(&self) -> Self { - ExprStruct { - attrs: self.attrs.clone(), - qself: self.qself.clone(), - path: self.path.clone(), - brace_token: self.brace_token.clone(), - fields: self.fields.clone(), - dot2_token: self.dot2_token.clone(), - rest: self.rest.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ExprTry { - fn clone(&self) -> Self { - ExprTry { - attrs: self.attrs.clone(), - expr: self.expr.clone(), - question_token: self.question_token.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ExprTryBlock { - fn clone(&self) -> Self { - ExprTryBlock { - attrs: self.attrs.clone(), - try_token: self.try_token.clone(), - block: self.block.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ExprTuple { - fn clone(&self) -> Self { - ExprTuple { - attrs: self.attrs.clone(), - paren_token: self.paren_token.clone(), - elems: self.elems.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ExprUnary { - fn clone(&self) -> Self { - ExprUnary { - attrs: self.attrs.clone(), - op: self.op.clone(), - expr: self.expr.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ExprUnsafe { - fn clone(&self) -> Self { - ExprUnsafe { - attrs: self.attrs.clone(), - unsafe_token: self.unsafe_token.clone(), - block: self.block.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ExprWhile { - fn clone(&self) -> Self { - ExprWhile { - attrs: self.attrs.clone(), - label: self.label.clone(), - while_token: self.while_token.clone(), - cond: self.cond.clone(), - body: self.body.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ExprYield { - fn clone(&self) -> Self { - ExprYield { - attrs: self.attrs.clone(), - yield_token: self.yield_token.clone(), - expr: self.expr.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for Field { - fn clone(&self) -> Self { - Field { - attrs: self.attrs.clone(), - vis: self.vis.clone(), - mutability: self.mutability.clone(), - ident: self.ident.clone(), - colon_token: self.colon_token.clone(), - ty: self.ty.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for FieldMutability { - fn clone(&self) -> Self { - match self { - FieldMutability::None => FieldMutability::None, - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for FieldPat { - fn clone(&self) -> Self { - FieldPat { - attrs: self.attrs.clone(), - member: self.member.clone(), - colon_token: self.colon_token.clone(), - pat: self.pat.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for FieldValue { - fn clone(&self) -> Self { - FieldValue { - attrs: self.attrs.clone(), - member: self.member.clone(), - colon_token: self.colon_token.clone(), - expr: self.expr.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for Fields { - fn clone(&self) -> Self { - match self { - Fields::Named(v0) => Fields::Named(v0.clone()), - Fields::Unnamed(v0) => Fields::Unnamed(v0.clone()), - Fields::Unit => Fields::Unit, - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for FieldsNamed { - fn clone(&self) -> Self { - FieldsNamed { - brace_token: self.brace_token.clone(), - named: self.named.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for FieldsUnnamed { - fn clone(&self) -> Self { - FieldsUnnamed { - paren_token: self.paren_token.clone(), - unnamed: self.unnamed.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for File { - fn clone(&self) -> Self { - File { - shebang: self.shebang.clone(), - attrs: self.attrs.clone(), - items: self.items.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for FnArg { - fn clone(&self) -> Self { - match self { - FnArg::Receiver(v0) => FnArg::Receiver(v0.clone()), - FnArg::Typed(v0) => FnArg::Typed(v0.clone()), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ForeignItem { - fn clone(&self) -> Self { - match self { - ForeignItem::Fn(v0) => ForeignItem::Fn(v0.clone()), - ForeignItem::Static(v0) => ForeignItem::Static(v0.clone()), - ForeignItem::Type(v0) => ForeignItem::Type(v0.clone()), - ForeignItem::Macro(v0) => ForeignItem::Macro(v0.clone()), - ForeignItem::Verbatim(v0) => ForeignItem::Verbatim(v0.clone()), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ForeignItemFn { - fn clone(&self) -> Self { - ForeignItemFn { - attrs: self.attrs.clone(), - vis: self.vis.clone(), - sig: self.sig.clone(), - semi_token: self.semi_token.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ForeignItemMacro { - fn clone(&self) -> Self { - ForeignItemMacro { - attrs: self.attrs.clone(), - mac: self.mac.clone(), - semi_token: self.semi_token.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ForeignItemStatic { - fn clone(&self) -> Self { - ForeignItemStatic { - attrs: self.attrs.clone(), - vis: self.vis.clone(), - static_token: self.static_token.clone(), - mutability: self.mutability.clone(), - ident: self.ident.clone(), - colon_token: self.colon_token.clone(), - ty: self.ty.clone(), - semi_token: self.semi_token.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ForeignItemType { - fn clone(&self) -> Self { - ForeignItemType { - attrs: self.attrs.clone(), - vis: self.vis.clone(), - type_token: self.type_token.clone(), - ident: self.ident.clone(), - generics: self.generics.clone(), - semi_token: self.semi_token.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for GenericArgument { - fn clone(&self) -> Self { - match self { - GenericArgument::Lifetime(v0) => GenericArgument::Lifetime(v0.clone()), - GenericArgument::Type(v0) => GenericArgument::Type(v0.clone()), - GenericArgument::Const(v0) => GenericArgument::Const(v0.clone()), - GenericArgument::AssocType(v0) => GenericArgument::AssocType(v0.clone()), - GenericArgument::AssocConst(v0) => GenericArgument::AssocConst(v0.clone()), - GenericArgument::Constraint(v0) => GenericArgument::Constraint(v0.clone()), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for GenericParam { - fn clone(&self) -> Self { - match self { - GenericParam::Lifetime(v0) => GenericParam::Lifetime(v0.clone()), - GenericParam::Type(v0) => GenericParam::Type(v0.clone()), - GenericParam::Const(v0) => GenericParam::Const(v0.clone()), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for Generics { - fn clone(&self) -> Self { - Generics { - lt_token: self.lt_token.clone(), - params: self.params.clone(), - gt_token: self.gt_token.clone(), - where_clause: self.where_clause.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ImplItem { - fn clone(&self) -> Self { - match self { - ImplItem::Const(v0) => ImplItem::Const(v0.clone()), - ImplItem::Fn(v0) => ImplItem::Fn(v0.clone()), - ImplItem::Type(v0) => ImplItem::Type(v0.clone()), - ImplItem::Macro(v0) => ImplItem::Macro(v0.clone()), - ImplItem::Verbatim(v0) => ImplItem::Verbatim(v0.clone()), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ImplItemConst { - fn clone(&self) -> Self { - ImplItemConst { - attrs: self.attrs.clone(), - vis: self.vis.clone(), - defaultness: self.defaultness.clone(), - const_token: self.const_token.clone(), - ident: self.ident.clone(), - generics: self.generics.clone(), - colon_token: self.colon_token.clone(), - ty: self.ty.clone(), - eq_token: self.eq_token.clone(), - expr: self.expr.clone(), - semi_token: self.semi_token.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ImplItemFn { - fn clone(&self) -> Self { - ImplItemFn { - attrs: self.attrs.clone(), - vis: self.vis.clone(), - defaultness: self.defaultness.clone(), - sig: self.sig.clone(), - block: self.block.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ImplItemMacro { - fn clone(&self) -> Self { - ImplItemMacro { - attrs: self.attrs.clone(), - mac: self.mac.clone(), - semi_token: self.semi_token.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ImplItemType { - fn clone(&self) -> Self { - ImplItemType { - attrs: self.attrs.clone(), - vis: self.vis.clone(), - defaultness: self.defaultness.clone(), - type_token: self.type_token.clone(), - ident: self.ident.clone(), - generics: self.generics.clone(), - eq_token: self.eq_token.clone(), - ty: self.ty.clone(), - semi_token: self.semi_token.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ImplRestriction { - fn clone(&self) -> Self { - match *self {} - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for Index { - fn clone(&self) -> Self { - Index { - index: self.index.clone(), - span: self.span.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for Item { - fn clone(&self) -> Self { - match self { - Item::Const(v0) => Item::Const(v0.clone()), - Item::Enum(v0) => Item::Enum(v0.clone()), - Item::ExternCrate(v0) => Item::ExternCrate(v0.clone()), - Item::Fn(v0) => Item::Fn(v0.clone()), - Item::ForeignMod(v0) => Item::ForeignMod(v0.clone()), - Item::Impl(v0) => Item::Impl(v0.clone()), - Item::Macro(v0) => Item::Macro(v0.clone()), - Item::Mod(v0) => Item::Mod(v0.clone()), - Item::Static(v0) => Item::Static(v0.clone()), - Item::Struct(v0) => Item::Struct(v0.clone()), - Item::Trait(v0) => Item::Trait(v0.clone()), - Item::TraitAlias(v0) => Item::TraitAlias(v0.clone()), - Item::Type(v0) => Item::Type(v0.clone()), - Item::Union(v0) => Item::Union(v0.clone()), - Item::Use(v0) => Item::Use(v0.clone()), - Item::Verbatim(v0) => Item::Verbatim(v0.clone()), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ItemConst { - fn clone(&self) -> Self { - ItemConst { - attrs: self.attrs.clone(), - vis: self.vis.clone(), - const_token: self.const_token.clone(), - ident: self.ident.clone(), - generics: self.generics.clone(), - colon_token: self.colon_token.clone(), - ty: self.ty.clone(), - eq_token: self.eq_token.clone(), - expr: self.expr.clone(), - semi_token: self.semi_token.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ItemEnum { - fn clone(&self) -> Self { - ItemEnum { - attrs: self.attrs.clone(), - vis: self.vis.clone(), - enum_token: self.enum_token.clone(), - ident: self.ident.clone(), - generics: self.generics.clone(), - brace_token: self.brace_token.clone(), - variants: self.variants.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ItemExternCrate { - fn clone(&self) -> Self { - ItemExternCrate { - attrs: self.attrs.clone(), - vis: self.vis.clone(), - extern_token: self.extern_token.clone(), - crate_token: self.crate_token.clone(), - ident: self.ident.clone(), - rename: self.rename.clone(), - semi_token: self.semi_token.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ItemFn { - fn clone(&self) -> Self { - ItemFn { - attrs: self.attrs.clone(), - vis: self.vis.clone(), - sig: self.sig.clone(), - block: self.block.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ItemForeignMod { - fn clone(&self) -> Self { - ItemForeignMod { - attrs: self.attrs.clone(), - unsafety: self.unsafety.clone(), - abi: self.abi.clone(), - brace_token: self.brace_token.clone(), - items: self.items.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ItemImpl { - fn clone(&self) -> Self { - ItemImpl { - attrs: self.attrs.clone(), - defaultness: self.defaultness.clone(), - unsafety: self.unsafety.clone(), - impl_token: self.impl_token.clone(), - generics: self.generics.clone(), - trait_: self.trait_.clone(), - self_ty: self.self_ty.clone(), - brace_token: self.brace_token.clone(), - items: self.items.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ItemMacro { - fn clone(&self) -> Self { - ItemMacro { - attrs: self.attrs.clone(), - ident: self.ident.clone(), - mac: self.mac.clone(), - semi_token: self.semi_token.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ItemMod { - fn clone(&self) -> Self { - ItemMod { - attrs: self.attrs.clone(), - vis: self.vis.clone(), - unsafety: self.unsafety.clone(), - mod_token: self.mod_token.clone(), - ident: self.ident.clone(), - content: self.content.clone(), - semi: self.semi.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ItemStatic { - fn clone(&self) -> Self { - ItemStatic { - attrs: self.attrs.clone(), - vis: self.vis.clone(), - static_token: self.static_token.clone(), - mutability: self.mutability.clone(), - ident: self.ident.clone(), - colon_token: self.colon_token.clone(), - ty: self.ty.clone(), - eq_token: self.eq_token.clone(), - expr: self.expr.clone(), - semi_token: self.semi_token.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ItemStruct { - fn clone(&self) -> Self { - ItemStruct { - attrs: self.attrs.clone(), - vis: self.vis.clone(), - struct_token: self.struct_token.clone(), - ident: self.ident.clone(), - generics: self.generics.clone(), - fields: self.fields.clone(), - semi_token: self.semi_token.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ItemTrait { - fn clone(&self) -> Self { - ItemTrait { - attrs: self.attrs.clone(), - vis: self.vis.clone(), - unsafety: self.unsafety.clone(), - auto_token: self.auto_token.clone(), - restriction: self.restriction.clone(), - trait_token: self.trait_token.clone(), - ident: self.ident.clone(), - generics: self.generics.clone(), - colon_token: self.colon_token.clone(), - supertraits: self.supertraits.clone(), - brace_token: self.brace_token.clone(), - items: self.items.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ItemTraitAlias { - fn clone(&self) -> Self { - ItemTraitAlias { - attrs: self.attrs.clone(), - vis: self.vis.clone(), - trait_token: self.trait_token.clone(), - ident: self.ident.clone(), - generics: self.generics.clone(), - eq_token: self.eq_token.clone(), - bounds: self.bounds.clone(), - semi_token: self.semi_token.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ItemType { - fn clone(&self) -> Self { - ItemType { - attrs: self.attrs.clone(), - vis: self.vis.clone(), - type_token: self.type_token.clone(), - ident: self.ident.clone(), - generics: self.generics.clone(), - eq_token: self.eq_token.clone(), - ty: self.ty.clone(), - semi_token: self.semi_token.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ItemUnion { - fn clone(&self) -> Self { - ItemUnion { - attrs: self.attrs.clone(), - vis: self.vis.clone(), - union_token: self.union_token.clone(), - ident: self.ident.clone(), - generics: self.generics.clone(), - fields: self.fields.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ItemUse { - fn clone(&self) -> Self { - ItemUse { - attrs: self.attrs.clone(), - vis: self.vis.clone(), - use_token: self.use_token.clone(), - leading_colon: self.leading_colon.clone(), - tree: self.tree.clone(), - semi_token: self.semi_token.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for Label { - fn clone(&self) -> Self { - Label { - name: self.name.clone(), - colon_token: self.colon_token.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for LifetimeParam { - fn clone(&self) -> Self { - LifetimeParam { - attrs: self.attrs.clone(), - lifetime: self.lifetime.clone(), - colon_token: self.colon_token.clone(), - bounds: self.bounds.clone(), - } - } -} -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for Lit { - fn clone(&self) -> Self { - match self { - Lit::Str(v0) => Lit::Str(v0.clone()), - Lit::ByteStr(v0) => Lit::ByteStr(v0.clone()), - Lit::Byte(v0) => Lit::Byte(v0.clone()), - Lit::Char(v0) => Lit::Char(v0.clone()), - Lit::Int(v0) => Lit::Int(v0.clone()), - Lit::Float(v0) => Lit::Float(v0.clone()), - Lit::Bool(v0) => Lit::Bool(v0.clone()), - Lit::Verbatim(v0) => Lit::Verbatim(v0.clone()), - } - } -} -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for LitBool { - fn clone(&self) -> Self { - LitBool { - value: self.value.clone(), - span: self.span.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for Local { - fn clone(&self) -> Self { - Local { - attrs: self.attrs.clone(), - let_token: self.let_token.clone(), - pat: self.pat.clone(), - init: self.init.clone(), - semi_token: self.semi_token.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for LocalInit { - fn clone(&self) -> Self { - LocalInit { - eq_token: self.eq_token.clone(), - expr: self.expr.clone(), - diverge: self.diverge.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for Macro { - fn clone(&self) -> Self { - Macro { - path: self.path.clone(), - bang_token: self.bang_token.clone(), - delimiter: self.delimiter.clone(), - tokens: self.tokens.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for MacroDelimiter { - fn clone(&self) -> Self { - match self { - MacroDelimiter::Paren(v0) => MacroDelimiter::Paren(v0.clone()), - MacroDelimiter::Brace(v0) => MacroDelimiter::Brace(v0.clone()), - MacroDelimiter::Bracket(v0) => MacroDelimiter::Bracket(v0.clone()), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for Member { - fn clone(&self) -> Self { - match self { - Member::Named(v0) => Member::Named(v0.clone()), - Member::Unnamed(v0) => Member::Unnamed(v0.clone()), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for Meta { - fn clone(&self) -> Self { - match self { - Meta::Path(v0) => Meta::Path(v0.clone()), - Meta::List(v0) => Meta::List(v0.clone()), - Meta::NameValue(v0) => Meta::NameValue(v0.clone()), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for MetaList { - fn clone(&self) -> Self { - MetaList { - path: self.path.clone(), - delimiter: self.delimiter.clone(), - tokens: self.tokens.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for MetaNameValue { - fn clone(&self) -> Self { - MetaNameValue { - path: self.path.clone(), - eq_token: self.eq_token.clone(), - value: self.value.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ParenthesizedGenericArguments { - fn clone(&self) -> Self { - ParenthesizedGenericArguments { - paren_token: self.paren_token.clone(), - inputs: self.inputs.clone(), - output: self.output.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for Pat { - fn clone(&self) -> Self { - match self { - Pat::Const(v0) => Pat::Const(v0.clone()), - Pat::Ident(v0) => Pat::Ident(v0.clone()), - Pat::Lit(v0) => Pat::Lit(v0.clone()), - Pat::Macro(v0) => Pat::Macro(v0.clone()), - Pat::Or(v0) => Pat::Or(v0.clone()), - Pat::Paren(v0) => Pat::Paren(v0.clone()), - Pat::Path(v0) => Pat::Path(v0.clone()), - Pat::Range(v0) => Pat::Range(v0.clone()), - Pat::Reference(v0) => Pat::Reference(v0.clone()), - Pat::Rest(v0) => Pat::Rest(v0.clone()), - Pat::Slice(v0) => Pat::Slice(v0.clone()), - Pat::Struct(v0) => Pat::Struct(v0.clone()), - Pat::Tuple(v0) => Pat::Tuple(v0.clone()), - Pat::TupleStruct(v0) => Pat::TupleStruct(v0.clone()), - Pat::Type(v0) => Pat::Type(v0.clone()), - Pat::Verbatim(v0) => Pat::Verbatim(v0.clone()), - Pat::Wild(v0) => Pat::Wild(v0.clone()), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for PatIdent { - fn clone(&self) -> Self { - PatIdent { - attrs: self.attrs.clone(), - by_ref: self.by_ref.clone(), - mutability: self.mutability.clone(), - ident: self.ident.clone(), - subpat: self.subpat.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for PatOr { - fn clone(&self) -> Self { - PatOr { - attrs: self.attrs.clone(), - leading_vert: self.leading_vert.clone(), - cases: self.cases.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for PatParen { - fn clone(&self) -> Self { - PatParen { - attrs: self.attrs.clone(), - paren_token: self.paren_token.clone(), - pat: self.pat.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for PatReference { - fn clone(&self) -> Self { - PatReference { - attrs: self.attrs.clone(), - and_token: self.and_token.clone(), - mutability: self.mutability.clone(), - pat: self.pat.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for PatRest { - fn clone(&self) -> Self { - PatRest { - attrs: self.attrs.clone(), - dot2_token: self.dot2_token.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for PatSlice { - fn clone(&self) -> Self { - PatSlice { - attrs: self.attrs.clone(), - bracket_token: self.bracket_token.clone(), - elems: self.elems.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for PatStruct { - fn clone(&self) -> Self { - PatStruct { - attrs: self.attrs.clone(), - qself: self.qself.clone(), - path: self.path.clone(), - brace_token: self.brace_token.clone(), - fields: self.fields.clone(), - rest: self.rest.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for PatTuple { - fn clone(&self) -> Self { - PatTuple { - attrs: self.attrs.clone(), - paren_token: self.paren_token.clone(), - elems: self.elems.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for PatTupleStruct { - fn clone(&self) -> Self { - PatTupleStruct { - attrs: self.attrs.clone(), - qself: self.qself.clone(), - path: self.path.clone(), - paren_token: self.paren_token.clone(), - elems: self.elems.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for PatType { - fn clone(&self) -> Self { - PatType { - attrs: self.attrs.clone(), - pat: self.pat.clone(), - colon_token: self.colon_token.clone(), - ty: self.ty.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for PatWild { - fn clone(&self) -> Self { - PatWild { - attrs: self.attrs.clone(), - underscore_token: self.underscore_token.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for Path { - fn clone(&self) -> Self { - Path { - leading_colon: self.leading_colon.clone(), - segments: self.segments.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for PathArguments { - fn clone(&self) -> Self { - match self { - PathArguments::None => PathArguments::None, - PathArguments::AngleBracketed(v0) => { - PathArguments::AngleBracketed(v0.clone()) - } - PathArguments::Parenthesized(v0) => PathArguments::Parenthesized(v0.clone()), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for PathSegment { - fn clone(&self) -> Self { - PathSegment { - ident: self.ident.clone(), - arguments: self.arguments.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for PredicateLifetime { - fn clone(&self) -> Self { - PredicateLifetime { - lifetime: self.lifetime.clone(), - colon_token: self.colon_token.clone(), - bounds: self.bounds.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for PredicateType { - fn clone(&self) -> Self { - PredicateType { - lifetimes: self.lifetimes.clone(), - bounded_ty: self.bounded_ty.clone(), - colon_token: self.colon_token.clone(), - bounds: self.bounds.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for QSelf { - fn clone(&self) -> Self { - QSelf { - lt_token: self.lt_token.clone(), - ty: self.ty.clone(), - position: self.position.clone(), - as_token: self.as_token.clone(), - gt_token: self.gt_token.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Copy for RangeLimits {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for RangeLimits { - fn clone(&self) -> Self { - *self - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for Receiver { - fn clone(&self) -> Self { - Receiver { - attrs: self.attrs.clone(), - reference: self.reference.clone(), - mutability: self.mutability.clone(), - self_token: self.self_token.clone(), - colon_token: self.colon_token.clone(), - ty: self.ty.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for ReturnType { - fn clone(&self) -> Self { - match self { - ReturnType::Default => ReturnType::Default, - ReturnType::Type(v0, v1) => ReturnType::Type(v0.clone(), v1.clone()), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for Signature { - fn clone(&self) -> Self { - Signature { - constness: self.constness.clone(), - asyncness: self.asyncness.clone(), - unsafety: self.unsafety.clone(), - abi: self.abi.clone(), - fn_token: self.fn_token.clone(), - ident: self.ident.clone(), - generics: self.generics.clone(), - paren_token: self.paren_token.clone(), - inputs: self.inputs.clone(), - variadic: self.variadic.clone(), - output: self.output.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for StaticMutability { - fn clone(&self) -> Self { - match self { - StaticMutability::Mut(v0) => StaticMutability::Mut(v0.clone()), - StaticMutability::None => StaticMutability::None, - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for Stmt { - fn clone(&self) -> Self { - match self { - Stmt::Local(v0) => Stmt::Local(v0.clone()), - Stmt::Item(v0) => Stmt::Item(v0.clone()), - Stmt::Expr(v0, v1) => Stmt::Expr(v0.clone(), v1.clone()), - Stmt::Macro(v0) => Stmt::Macro(v0.clone()), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for StmtMacro { - fn clone(&self) -> Self { - StmtMacro { - attrs: self.attrs.clone(), - mac: self.mac.clone(), - semi_token: self.semi_token.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for TraitBound { - fn clone(&self) -> Self { - TraitBound { - paren_token: self.paren_token.clone(), - modifier: self.modifier.clone(), - lifetimes: self.lifetimes.clone(), - path: self.path.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Copy for TraitBoundModifier {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for TraitBoundModifier { - fn clone(&self) -> Self { - *self - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for TraitItem { - fn clone(&self) -> Self { - match self { - TraitItem::Const(v0) => TraitItem::Const(v0.clone()), - TraitItem::Fn(v0) => TraitItem::Fn(v0.clone()), - TraitItem::Type(v0) => TraitItem::Type(v0.clone()), - TraitItem::Macro(v0) => TraitItem::Macro(v0.clone()), - TraitItem::Verbatim(v0) => TraitItem::Verbatim(v0.clone()), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for TraitItemConst { - fn clone(&self) -> Self { - TraitItemConst { - attrs: self.attrs.clone(), - const_token: self.const_token.clone(), - ident: self.ident.clone(), - generics: self.generics.clone(), - colon_token: self.colon_token.clone(), - ty: self.ty.clone(), - default: self.default.clone(), - semi_token: self.semi_token.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for TraitItemFn { - fn clone(&self) -> Self { - TraitItemFn { - attrs: self.attrs.clone(), - sig: self.sig.clone(), - default: self.default.clone(), - semi_token: self.semi_token.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for TraitItemMacro { - fn clone(&self) -> Self { - TraitItemMacro { - attrs: self.attrs.clone(), - mac: self.mac.clone(), - semi_token: self.semi_token.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for TraitItemType { - fn clone(&self) -> Self { - TraitItemType { - attrs: self.attrs.clone(), - type_token: self.type_token.clone(), - ident: self.ident.clone(), - generics: self.generics.clone(), - colon_token: self.colon_token.clone(), - bounds: self.bounds.clone(), - default: self.default.clone(), - semi_token: self.semi_token.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for Type { - fn clone(&self) -> Self { - match self { - Type::Array(v0) => Type::Array(v0.clone()), - Type::BareFn(v0) => Type::BareFn(v0.clone()), - Type::Group(v0) => Type::Group(v0.clone()), - Type::ImplTrait(v0) => Type::ImplTrait(v0.clone()), - Type::Infer(v0) => Type::Infer(v0.clone()), - Type::Macro(v0) => Type::Macro(v0.clone()), - Type::Never(v0) => Type::Never(v0.clone()), - Type::Paren(v0) => Type::Paren(v0.clone()), - Type::Path(v0) => Type::Path(v0.clone()), - Type::Ptr(v0) => Type::Ptr(v0.clone()), - Type::Reference(v0) => Type::Reference(v0.clone()), - Type::Slice(v0) => Type::Slice(v0.clone()), - Type::TraitObject(v0) => Type::TraitObject(v0.clone()), - Type::Tuple(v0) => Type::Tuple(v0.clone()), - Type::Verbatim(v0) => Type::Verbatim(v0.clone()), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for TypeArray { - fn clone(&self) -> Self { - TypeArray { - bracket_token: self.bracket_token.clone(), - elem: self.elem.clone(), - semi_token: self.semi_token.clone(), - len: self.len.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for TypeBareFn { - fn clone(&self) -> Self { - TypeBareFn { - lifetimes: self.lifetimes.clone(), - unsafety: self.unsafety.clone(), - abi: self.abi.clone(), - fn_token: self.fn_token.clone(), - paren_token: self.paren_token.clone(), - inputs: self.inputs.clone(), - variadic: self.variadic.clone(), - output: self.output.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for TypeGroup { - fn clone(&self) -> Self { - TypeGroup { - group_token: self.group_token.clone(), - elem: self.elem.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for TypeImplTrait { - fn clone(&self) -> Self { - TypeImplTrait { - impl_token: self.impl_token.clone(), - bounds: self.bounds.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for TypeInfer { - fn clone(&self) -> Self { - TypeInfer { - underscore_token: self.underscore_token.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for TypeMacro { - fn clone(&self) -> Self { - TypeMacro { mac: self.mac.clone() } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for TypeNever { - fn clone(&self) -> Self { - TypeNever { - bang_token: self.bang_token.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for TypeParam { - fn clone(&self) -> Self { - TypeParam { - attrs: self.attrs.clone(), - ident: self.ident.clone(), - colon_token: self.colon_token.clone(), - bounds: self.bounds.clone(), - eq_token: self.eq_token.clone(), - default: self.default.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for TypeParamBound { - fn clone(&self) -> Self { - match self { - TypeParamBound::Trait(v0) => TypeParamBound::Trait(v0.clone()), - TypeParamBound::Lifetime(v0) => TypeParamBound::Lifetime(v0.clone()), - TypeParamBound::Verbatim(v0) => TypeParamBound::Verbatim(v0.clone()), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for TypeParen { - fn clone(&self) -> Self { - TypeParen { - paren_token: self.paren_token.clone(), - elem: self.elem.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for TypePath { - fn clone(&self) -> Self { - TypePath { - qself: self.qself.clone(), - path: self.path.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for TypePtr { - fn clone(&self) -> Self { - TypePtr { - star_token: self.star_token.clone(), - const_token: self.const_token.clone(), - mutability: self.mutability.clone(), - elem: self.elem.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for TypeReference { - fn clone(&self) -> Self { - TypeReference { - and_token: self.and_token.clone(), - lifetime: self.lifetime.clone(), - mutability: self.mutability.clone(), - elem: self.elem.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for TypeSlice { - fn clone(&self) -> Self { - TypeSlice { - bracket_token: self.bracket_token.clone(), - elem: self.elem.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for TypeTraitObject { - fn clone(&self) -> Self { - TypeTraitObject { - dyn_token: self.dyn_token.clone(), - bounds: self.bounds.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for TypeTuple { - fn clone(&self) -> Self { - TypeTuple { - paren_token: self.paren_token.clone(), - elems: self.elems.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Copy for UnOp {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for UnOp { - fn clone(&self) -> Self { - *self - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for UseGlob { - fn clone(&self) -> Self { - UseGlob { - star_token: self.star_token.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for UseGroup { - fn clone(&self) -> Self { - UseGroup { - brace_token: self.brace_token.clone(), - items: self.items.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for UseName { - fn clone(&self) -> Self { - UseName { - ident: self.ident.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for UsePath { - fn clone(&self) -> Self { - UsePath { - ident: self.ident.clone(), - colon2_token: self.colon2_token.clone(), - tree: self.tree.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for UseRename { - fn clone(&self) -> Self { - UseRename { - ident: self.ident.clone(), - as_token: self.as_token.clone(), - rename: self.rename.clone(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for UseTree { - fn clone(&self) -> Self { - match self { - UseTree::Path(v0) => UseTree::Path(v0.clone()), - UseTree::Name(v0) => UseTree::Name(v0.clone()), - UseTree::Rename(v0) => UseTree::Rename(v0.clone()), - UseTree::Glob(v0) => UseTree::Glob(v0.clone()), - UseTree::Group(v0) => UseTree::Group(v0.clone()), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for Variadic { - fn clone(&self) -> Self { - Variadic { - attrs: self.attrs.clone(), - pat: self.pat.clone(), - dots: self.dots.clone(), - comma: self.comma.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for Variant { - fn clone(&self) -> Self { - Variant { - attrs: self.attrs.clone(), - ident: self.ident.clone(), - fields: self.fields.clone(), - discriminant: self.discriminant.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for VisRestricted { - fn clone(&self) -> Self { - VisRestricted { - pub_token: self.pub_token.clone(), - paren_token: self.paren_token.clone(), - in_token: self.in_token.clone(), - path: self.path.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for Visibility { - fn clone(&self) -> Self { - match self { - Visibility::Public(v0) => Visibility::Public(v0.clone()), - Visibility::Restricted(v0) => Visibility::Restricted(v0.clone()), - Visibility::Inherited => Visibility::Inherited, - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for WhereClause { - fn clone(&self) -> Self { - WhereClause { - where_token: self.where_token.clone(), - predicates: self.predicates.clone(), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))] -impl Clone for WherePredicate { - fn clone(&self) -> Self { - match self { - WherePredicate::Lifetime(v0) => WherePredicate::Lifetime(v0.clone()), - WherePredicate::Type(v0) => WherePredicate::Type(v0.clone()), - } - } -} diff --git a/vendor/syn/src/gen/debug.rs b/vendor/syn/src/gen/debug.rs deleted file mode 100644 index 553497b..0000000 --- a/vendor/syn/src/gen/debug.rs +++ /dev/null @@ -1,3052 +0,0 @@ -// This file is @generated by syn-internal-codegen. -// It is not intended for manual editing. - -use crate::*; -use std::fmt::{self, Debug}; -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for Abi { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut formatter = formatter.debug_struct("Abi"); - formatter.field("extern_token", &self.extern_token); - formatter.field("name", &self.name); - formatter.finish() - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for AngleBracketedGenericArguments { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl AngleBracketedGenericArguments { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("colon2_token", &self.colon2_token); - formatter.field("lt_token", &self.lt_token); - formatter.field("args", &self.args); - formatter.field("gt_token", &self.gt_token); - formatter.finish() - } - } - self.debug(formatter, "AngleBracketedGenericArguments") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for Arm { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut formatter = formatter.debug_struct("Arm"); - formatter.field("attrs", &self.attrs); - formatter.field("pat", &self.pat); - formatter.field("guard", &self.guard); - formatter.field("fat_arrow_token", &self.fat_arrow_token); - formatter.field("body", &self.body); - formatter.field("comma", &self.comma); - formatter.finish() - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for AssocConst { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut formatter = formatter.debug_struct("AssocConst"); - formatter.field("ident", &self.ident); - formatter.field("generics", &self.generics); - formatter.field("eq_token", &self.eq_token); - formatter.field("value", &self.value); - formatter.finish() - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for AssocType { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut formatter = formatter.debug_struct("AssocType"); - formatter.field("ident", &self.ident); - formatter.field("generics", &self.generics); - formatter.field("eq_token", &self.eq_token); - formatter.field("ty", &self.ty); - formatter.finish() - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for AttrStyle { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("AttrStyle::")?; - match self { - AttrStyle::Outer => formatter.write_str("Outer"), - AttrStyle::Inner(v0) => { - let mut formatter = formatter.debug_tuple("Inner"); - formatter.field(v0); - formatter.finish() - } - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for Attribute { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut formatter = formatter.debug_struct("Attribute"); - formatter.field("pound_token", &self.pound_token); - formatter.field("style", &self.style); - formatter.field("bracket_token", &self.bracket_token); - formatter.field("meta", &self.meta); - formatter.finish() - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for BareFnArg { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut formatter = formatter.debug_struct("BareFnArg"); - formatter.field("attrs", &self.attrs); - formatter.field("name", &self.name); - formatter.field("ty", &self.ty); - formatter.finish() - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for BareVariadic { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut formatter = formatter.debug_struct("BareVariadic"); - formatter.field("attrs", &self.attrs); - formatter.field("name", &self.name); - formatter.field("dots", &self.dots); - formatter.field("comma", &self.comma); - formatter.finish() - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for BinOp { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("BinOp::")?; - match self { - BinOp::Add(v0) => { - let mut formatter = formatter.debug_tuple("Add"); - formatter.field(v0); - formatter.finish() - } - BinOp::Sub(v0) => { - let mut formatter = formatter.debug_tuple("Sub"); - formatter.field(v0); - formatter.finish() - } - BinOp::Mul(v0) => { - let mut formatter = formatter.debug_tuple("Mul"); - formatter.field(v0); - formatter.finish() - } - BinOp::Div(v0) => { - let mut formatter = formatter.debug_tuple("Div"); - formatter.field(v0); - formatter.finish() - } - BinOp::Rem(v0) => { - let mut formatter = formatter.debug_tuple("Rem"); - formatter.field(v0); - formatter.finish() - } - BinOp::And(v0) => { - let mut formatter = formatter.debug_tuple("And"); - formatter.field(v0); - formatter.finish() - } - BinOp::Or(v0) => { - let mut formatter = formatter.debug_tuple("Or"); - formatter.field(v0); - formatter.finish() - } - BinOp::BitXor(v0) => { - let mut formatter = formatter.debug_tuple("BitXor"); - formatter.field(v0); - formatter.finish() - } - BinOp::BitAnd(v0) => { - let mut formatter = formatter.debug_tuple("BitAnd"); - formatter.field(v0); - formatter.finish() - } - BinOp::BitOr(v0) => { - let mut formatter = formatter.debug_tuple("BitOr"); - formatter.field(v0); - formatter.finish() - } - BinOp::Shl(v0) => { - let mut formatter = formatter.debug_tuple("Shl"); - formatter.field(v0); - formatter.finish() - } - BinOp::Shr(v0) => { - let mut formatter = formatter.debug_tuple("Shr"); - formatter.field(v0); - formatter.finish() - } - BinOp::Eq(v0) => { - let mut formatter = formatter.debug_tuple("Eq"); - formatter.field(v0); - formatter.finish() - } - BinOp::Lt(v0) => { - let mut formatter = formatter.debug_tuple("Lt"); - formatter.field(v0); - formatter.finish() - } - BinOp::Le(v0) => { - let mut formatter = formatter.debug_tuple("Le"); - formatter.field(v0); - formatter.finish() - } - BinOp::Ne(v0) => { - let mut formatter = formatter.debug_tuple("Ne"); - formatter.field(v0); - formatter.finish() - } - BinOp::Ge(v0) => { - let mut formatter = formatter.debug_tuple("Ge"); - formatter.field(v0); - formatter.finish() - } - BinOp::Gt(v0) => { - let mut formatter = formatter.debug_tuple("Gt"); - formatter.field(v0); - formatter.finish() - } - BinOp::AddAssign(v0) => { - let mut formatter = formatter.debug_tuple("AddAssign"); - formatter.field(v0); - formatter.finish() - } - BinOp::SubAssign(v0) => { - let mut formatter = formatter.debug_tuple("SubAssign"); - formatter.field(v0); - formatter.finish() - } - BinOp::MulAssign(v0) => { - let mut formatter = formatter.debug_tuple("MulAssign"); - formatter.field(v0); - formatter.finish() - } - BinOp::DivAssign(v0) => { - let mut formatter = formatter.debug_tuple("DivAssign"); - formatter.field(v0); - formatter.finish() - } - BinOp::RemAssign(v0) => { - let mut formatter = formatter.debug_tuple("RemAssign"); - formatter.field(v0); - formatter.finish() - } - BinOp::BitXorAssign(v0) => { - let mut formatter = formatter.debug_tuple("BitXorAssign"); - formatter.field(v0); - formatter.finish() - } - BinOp::BitAndAssign(v0) => { - let mut formatter = formatter.debug_tuple("BitAndAssign"); - formatter.field(v0); - formatter.finish() - } - BinOp::BitOrAssign(v0) => { - let mut formatter = formatter.debug_tuple("BitOrAssign"); - formatter.field(v0); - formatter.finish() - } - BinOp::ShlAssign(v0) => { - let mut formatter = formatter.debug_tuple("ShlAssign"); - formatter.field(v0); - formatter.finish() - } - BinOp::ShrAssign(v0) => { - let mut formatter = formatter.debug_tuple("ShrAssign"); - formatter.field(v0); - formatter.finish() - } - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for Block { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut formatter = formatter.debug_struct("Block"); - formatter.field("brace_token", &self.brace_token); - formatter.field("stmts", &self.stmts); - formatter.finish() - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for BoundLifetimes { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut formatter = formatter.debug_struct("BoundLifetimes"); - formatter.field("for_token", &self.for_token); - formatter.field("lt_token", &self.lt_token); - formatter.field("lifetimes", &self.lifetimes); - formatter.field("gt_token", &self.gt_token); - formatter.finish() - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ConstParam { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut formatter = formatter.debug_struct("ConstParam"); - formatter.field("attrs", &self.attrs); - formatter.field("const_token", &self.const_token); - formatter.field("ident", &self.ident); - formatter.field("colon_token", &self.colon_token); - formatter.field("ty", &self.ty); - formatter.field("eq_token", &self.eq_token); - formatter.field("default", &self.default); - formatter.finish() - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for Constraint { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut formatter = formatter.debug_struct("Constraint"); - formatter.field("ident", &self.ident); - formatter.field("generics", &self.generics); - formatter.field("colon_token", &self.colon_token); - formatter.field("bounds", &self.bounds); - formatter.finish() - } -} -#[cfg(feature = "derive")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for Data { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("Data::")?; - match self { - Data::Struct(v0) => v0.debug(formatter, "Struct"), - Data::Enum(v0) => v0.debug(formatter, "Enum"), - Data::Union(v0) => v0.debug(formatter, "Union"), - } - } -} -#[cfg(feature = "derive")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for DataEnum { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl DataEnum { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("enum_token", &self.enum_token); - formatter.field("brace_token", &self.brace_token); - formatter.field("variants", &self.variants); - formatter.finish() - } - } - self.debug(formatter, "DataEnum") - } -} -#[cfg(feature = "derive")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for DataStruct { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl DataStruct { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("struct_token", &self.struct_token); - formatter.field("fields", &self.fields); - formatter.field("semi_token", &self.semi_token); - formatter.finish() - } - } - self.debug(formatter, "DataStruct") - } -} -#[cfg(feature = "derive")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for DataUnion { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl DataUnion { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("union_token", &self.union_token); - formatter.field("fields", &self.fields); - formatter.finish() - } - } - self.debug(formatter, "DataUnion") - } -} -#[cfg(feature = "derive")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for DeriveInput { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut formatter = formatter.debug_struct("DeriveInput"); - formatter.field("attrs", &self.attrs); - formatter.field("vis", &self.vis); - formatter.field("ident", &self.ident); - formatter.field("generics", &self.generics); - formatter.field("data", &self.data); - formatter.finish() - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for Expr { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("Expr::")?; - match self { - #[cfg(feature = "full")] - Expr::Array(v0) => v0.debug(formatter, "Array"), - #[cfg(feature = "full")] - Expr::Assign(v0) => v0.debug(formatter, "Assign"), - #[cfg(feature = "full")] - Expr::Async(v0) => v0.debug(formatter, "Async"), - #[cfg(feature = "full")] - Expr::Await(v0) => v0.debug(formatter, "Await"), - Expr::Binary(v0) => v0.debug(formatter, "Binary"), - #[cfg(feature = "full")] - Expr::Block(v0) => v0.debug(formatter, "Block"), - #[cfg(feature = "full")] - Expr::Break(v0) => v0.debug(formatter, "Break"), - Expr::Call(v0) => v0.debug(formatter, "Call"), - Expr::Cast(v0) => v0.debug(formatter, "Cast"), - #[cfg(feature = "full")] - Expr::Closure(v0) => v0.debug(formatter, "Closure"), - #[cfg(feature = "full")] - Expr::Const(v0) => v0.debug(formatter, "Const"), - #[cfg(feature = "full")] - Expr::Continue(v0) => v0.debug(formatter, "Continue"), - Expr::Field(v0) => v0.debug(formatter, "Field"), - #[cfg(feature = "full")] - Expr::ForLoop(v0) => v0.debug(formatter, "ForLoop"), - Expr::Group(v0) => v0.debug(formatter, "Group"), - #[cfg(feature = "full")] - Expr::If(v0) => v0.debug(formatter, "If"), - Expr::Index(v0) => v0.debug(formatter, "Index"), - #[cfg(feature = "full")] - Expr::Infer(v0) => v0.debug(formatter, "Infer"), - #[cfg(feature = "full")] - Expr::Let(v0) => v0.debug(formatter, "Let"), - Expr::Lit(v0) => v0.debug(formatter, "Lit"), - #[cfg(feature = "full")] - Expr::Loop(v0) => v0.debug(formatter, "Loop"), - Expr::Macro(v0) => v0.debug(formatter, "Macro"), - #[cfg(feature = "full")] - Expr::Match(v0) => v0.debug(formatter, "Match"), - Expr::MethodCall(v0) => v0.debug(formatter, "MethodCall"), - Expr::Paren(v0) => v0.debug(formatter, "Paren"), - Expr::Path(v0) => v0.debug(formatter, "Path"), - #[cfg(feature = "full")] - Expr::Range(v0) => v0.debug(formatter, "Range"), - Expr::Reference(v0) => v0.debug(formatter, "Reference"), - #[cfg(feature = "full")] - Expr::Repeat(v0) => v0.debug(formatter, "Repeat"), - #[cfg(feature = "full")] - Expr::Return(v0) => v0.debug(formatter, "Return"), - Expr::Struct(v0) => v0.debug(formatter, "Struct"), - #[cfg(feature = "full")] - Expr::Try(v0) => v0.debug(formatter, "Try"), - #[cfg(feature = "full")] - Expr::TryBlock(v0) => v0.debug(formatter, "TryBlock"), - #[cfg(feature = "full")] - Expr::Tuple(v0) => v0.debug(formatter, "Tuple"), - Expr::Unary(v0) => v0.debug(formatter, "Unary"), - #[cfg(feature = "full")] - Expr::Unsafe(v0) => v0.debug(formatter, "Unsafe"), - Expr::Verbatim(v0) => { - let mut formatter = formatter.debug_tuple("Verbatim"); - formatter.field(v0); - formatter.finish() - } - #[cfg(feature = "full")] - Expr::While(v0) => v0.debug(formatter, "While"), - #[cfg(feature = "full")] - Expr::Yield(v0) => v0.debug(formatter, "Yield"), - #[cfg(not(feature = "full"))] - _ => unreachable!(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ExprArray { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ExprArray { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("bracket_token", &self.bracket_token); - formatter.field("elems", &self.elems); - formatter.finish() - } - } - self.debug(formatter, "ExprArray") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ExprAssign { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ExprAssign { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("left", &self.left); - formatter.field("eq_token", &self.eq_token); - formatter.field("right", &self.right); - formatter.finish() - } - } - self.debug(formatter, "ExprAssign") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ExprAsync { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ExprAsync { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("async_token", &self.async_token); - formatter.field("capture", &self.capture); - formatter.field("block", &self.block); - formatter.finish() - } - } - self.debug(formatter, "ExprAsync") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ExprAwait { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ExprAwait { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("base", &self.base); - formatter.field("dot_token", &self.dot_token); - formatter.field("await_token", &self.await_token); - formatter.finish() - } - } - self.debug(formatter, "ExprAwait") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ExprBinary { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ExprBinary { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("left", &self.left); - formatter.field("op", &self.op); - formatter.field("right", &self.right); - formatter.finish() - } - } - self.debug(formatter, "ExprBinary") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ExprBlock { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ExprBlock { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("label", &self.label); - formatter.field("block", &self.block); - formatter.finish() - } - } - self.debug(formatter, "ExprBlock") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ExprBreak { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ExprBreak { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("break_token", &self.break_token); - formatter.field("label", &self.label); - formatter.field("expr", &self.expr); - formatter.finish() - } - } - self.debug(formatter, "ExprBreak") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ExprCall { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ExprCall { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("func", &self.func); - formatter.field("paren_token", &self.paren_token); - formatter.field("args", &self.args); - formatter.finish() - } - } - self.debug(formatter, "ExprCall") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ExprCast { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ExprCast { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("expr", &self.expr); - formatter.field("as_token", &self.as_token); - formatter.field("ty", &self.ty); - formatter.finish() - } - } - self.debug(formatter, "ExprCast") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ExprClosure { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ExprClosure { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("lifetimes", &self.lifetimes); - formatter.field("constness", &self.constness); - formatter.field("movability", &self.movability); - formatter.field("asyncness", &self.asyncness); - formatter.field("capture", &self.capture); - formatter.field("or1_token", &self.or1_token); - formatter.field("inputs", &self.inputs); - formatter.field("or2_token", &self.or2_token); - formatter.field("output", &self.output); - formatter.field("body", &self.body); - formatter.finish() - } - } - self.debug(formatter, "ExprClosure") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ExprConst { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ExprConst { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("const_token", &self.const_token); - formatter.field("block", &self.block); - formatter.finish() - } - } - self.debug(formatter, "ExprConst") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ExprContinue { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ExprContinue { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("continue_token", &self.continue_token); - formatter.field("label", &self.label); - formatter.finish() - } - } - self.debug(formatter, "ExprContinue") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ExprField { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ExprField { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("base", &self.base); - formatter.field("dot_token", &self.dot_token); - formatter.field("member", &self.member); - formatter.finish() - } - } - self.debug(formatter, "ExprField") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ExprForLoop { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ExprForLoop { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("label", &self.label); - formatter.field("for_token", &self.for_token); - formatter.field("pat", &self.pat); - formatter.field("in_token", &self.in_token); - formatter.field("expr", &self.expr); - formatter.field("body", &self.body); - formatter.finish() - } - } - self.debug(formatter, "ExprForLoop") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ExprGroup { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ExprGroup { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("group_token", &self.group_token); - formatter.field("expr", &self.expr); - formatter.finish() - } - } - self.debug(formatter, "ExprGroup") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ExprIf { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ExprIf { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("if_token", &self.if_token); - formatter.field("cond", &self.cond); - formatter.field("then_branch", &self.then_branch); - formatter.field("else_branch", &self.else_branch); - formatter.finish() - } - } - self.debug(formatter, "ExprIf") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ExprIndex { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ExprIndex { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("expr", &self.expr); - formatter.field("bracket_token", &self.bracket_token); - formatter.field("index", &self.index); - formatter.finish() - } - } - self.debug(formatter, "ExprIndex") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ExprInfer { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ExprInfer { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("underscore_token", &self.underscore_token); - formatter.finish() - } - } - self.debug(formatter, "ExprInfer") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ExprLet { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ExprLet { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("let_token", &self.let_token); - formatter.field("pat", &self.pat); - formatter.field("eq_token", &self.eq_token); - formatter.field("expr", &self.expr); - formatter.finish() - } - } - self.debug(formatter, "ExprLet") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ExprLit { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ExprLit { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("lit", &self.lit); - formatter.finish() - } - } - self.debug(formatter, "ExprLit") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ExprLoop { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ExprLoop { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("label", &self.label); - formatter.field("loop_token", &self.loop_token); - formatter.field("body", &self.body); - formatter.finish() - } - } - self.debug(formatter, "ExprLoop") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ExprMacro { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ExprMacro { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("mac", &self.mac); - formatter.finish() - } - } - self.debug(formatter, "ExprMacro") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ExprMatch { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ExprMatch { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("match_token", &self.match_token); - formatter.field("expr", &self.expr); - formatter.field("brace_token", &self.brace_token); - formatter.field("arms", &self.arms); - formatter.finish() - } - } - self.debug(formatter, "ExprMatch") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ExprMethodCall { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ExprMethodCall { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("receiver", &self.receiver); - formatter.field("dot_token", &self.dot_token); - formatter.field("method", &self.method); - formatter.field("turbofish", &self.turbofish); - formatter.field("paren_token", &self.paren_token); - formatter.field("args", &self.args); - formatter.finish() - } - } - self.debug(formatter, "ExprMethodCall") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ExprParen { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ExprParen { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("paren_token", &self.paren_token); - formatter.field("expr", &self.expr); - formatter.finish() - } - } - self.debug(formatter, "ExprParen") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ExprPath { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ExprPath { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("qself", &self.qself); - formatter.field("path", &self.path); - formatter.finish() - } - } - self.debug(formatter, "ExprPath") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ExprRange { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ExprRange { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("start", &self.start); - formatter.field("limits", &self.limits); - formatter.field("end", &self.end); - formatter.finish() - } - } - self.debug(formatter, "ExprRange") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ExprReference { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ExprReference { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("and_token", &self.and_token); - formatter.field("mutability", &self.mutability); - formatter.field("expr", &self.expr); - formatter.finish() - } - } - self.debug(formatter, "ExprReference") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ExprRepeat { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ExprRepeat { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("bracket_token", &self.bracket_token); - formatter.field("expr", &self.expr); - formatter.field("semi_token", &self.semi_token); - formatter.field("len", &self.len); - formatter.finish() - } - } - self.debug(formatter, "ExprRepeat") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ExprReturn { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ExprReturn { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("return_token", &self.return_token); - formatter.field("expr", &self.expr); - formatter.finish() - } - } - self.debug(formatter, "ExprReturn") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ExprStruct { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ExprStruct { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("qself", &self.qself); - formatter.field("path", &self.path); - formatter.field("brace_token", &self.brace_token); - formatter.field("fields", &self.fields); - formatter.field("dot2_token", &self.dot2_token); - formatter.field("rest", &self.rest); - formatter.finish() - } - } - self.debug(formatter, "ExprStruct") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ExprTry { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ExprTry { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("expr", &self.expr); - formatter.field("question_token", &self.question_token); - formatter.finish() - } - } - self.debug(formatter, "ExprTry") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ExprTryBlock { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ExprTryBlock { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("try_token", &self.try_token); - formatter.field("block", &self.block); - formatter.finish() - } - } - self.debug(formatter, "ExprTryBlock") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ExprTuple { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ExprTuple { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("paren_token", &self.paren_token); - formatter.field("elems", &self.elems); - formatter.finish() - } - } - self.debug(formatter, "ExprTuple") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ExprUnary { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ExprUnary { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("op", &self.op); - formatter.field("expr", &self.expr); - formatter.finish() - } - } - self.debug(formatter, "ExprUnary") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ExprUnsafe { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ExprUnsafe { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("unsafe_token", &self.unsafe_token); - formatter.field("block", &self.block); - formatter.finish() - } - } - self.debug(formatter, "ExprUnsafe") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ExprWhile { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ExprWhile { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("label", &self.label); - formatter.field("while_token", &self.while_token); - formatter.field("cond", &self.cond); - formatter.field("body", &self.body); - formatter.finish() - } - } - self.debug(formatter, "ExprWhile") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ExprYield { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ExprYield { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("yield_token", &self.yield_token); - formatter.field("expr", &self.expr); - formatter.finish() - } - } - self.debug(formatter, "ExprYield") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for Field { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut formatter = formatter.debug_struct("Field"); - formatter.field("attrs", &self.attrs); - formatter.field("vis", &self.vis); - formatter.field("mutability", &self.mutability); - formatter.field("ident", &self.ident); - formatter.field("colon_token", &self.colon_token); - formatter.field("ty", &self.ty); - formatter.finish() - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for FieldMutability { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("FieldMutability::")?; - match self { - FieldMutability::None => formatter.write_str("None"), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for FieldPat { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut formatter = formatter.debug_struct("FieldPat"); - formatter.field("attrs", &self.attrs); - formatter.field("member", &self.member); - formatter.field("colon_token", &self.colon_token); - formatter.field("pat", &self.pat); - formatter.finish() - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for FieldValue { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut formatter = formatter.debug_struct("FieldValue"); - formatter.field("attrs", &self.attrs); - formatter.field("member", &self.member); - formatter.field("colon_token", &self.colon_token); - formatter.field("expr", &self.expr); - formatter.finish() - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for Fields { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("Fields::")?; - match self { - Fields::Named(v0) => v0.debug(formatter, "Named"), - Fields::Unnamed(v0) => v0.debug(formatter, "Unnamed"), - Fields::Unit => formatter.write_str("Unit"), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for FieldsNamed { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl FieldsNamed { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("brace_token", &self.brace_token); - formatter.field("named", &self.named); - formatter.finish() - } - } - self.debug(formatter, "FieldsNamed") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for FieldsUnnamed { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl FieldsUnnamed { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("paren_token", &self.paren_token); - formatter.field("unnamed", &self.unnamed); - formatter.finish() - } - } - self.debug(formatter, "FieldsUnnamed") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for File { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut formatter = formatter.debug_struct("File"); - formatter.field("shebang", &self.shebang); - formatter.field("attrs", &self.attrs); - formatter.field("items", &self.items); - formatter.finish() - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for FnArg { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("FnArg::")?; - match self { - FnArg::Receiver(v0) => { - let mut formatter = formatter.debug_tuple("Receiver"); - formatter.field(v0); - formatter.finish() - } - FnArg::Typed(v0) => { - let mut formatter = formatter.debug_tuple("Typed"); - formatter.field(v0); - formatter.finish() - } - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ForeignItem { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("ForeignItem::")?; - match self { - ForeignItem::Fn(v0) => v0.debug(formatter, "Fn"), - ForeignItem::Static(v0) => v0.debug(formatter, "Static"), - ForeignItem::Type(v0) => v0.debug(formatter, "Type"), - ForeignItem::Macro(v0) => v0.debug(formatter, "Macro"), - ForeignItem::Verbatim(v0) => { - let mut formatter = formatter.debug_tuple("Verbatim"); - formatter.field(v0); - formatter.finish() - } - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ForeignItemFn { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ForeignItemFn { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("vis", &self.vis); - formatter.field("sig", &self.sig); - formatter.field("semi_token", &self.semi_token); - formatter.finish() - } - } - self.debug(formatter, "ForeignItemFn") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ForeignItemMacro { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ForeignItemMacro { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("mac", &self.mac); - formatter.field("semi_token", &self.semi_token); - formatter.finish() - } - } - self.debug(formatter, "ForeignItemMacro") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ForeignItemStatic { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ForeignItemStatic { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("vis", &self.vis); - formatter.field("static_token", &self.static_token); - formatter.field("mutability", &self.mutability); - formatter.field("ident", &self.ident); - formatter.field("colon_token", &self.colon_token); - formatter.field("ty", &self.ty); - formatter.field("semi_token", &self.semi_token); - formatter.finish() - } - } - self.debug(formatter, "ForeignItemStatic") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ForeignItemType { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ForeignItemType { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("vis", &self.vis); - formatter.field("type_token", &self.type_token); - formatter.field("ident", &self.ident); - formatter.field("generics", &self.generics); - formatter.field("semi_token", &self.semi_token); - formatter.finish() - } - } - self.debug(formatter, "ForeignItemType") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for GenericArgument { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("GenericArgument::")?; - match self { - GenericArgument::Lifetime(v0) => { - let mut formatter = formatter.debug_tuple("Lifetime"); - formatter.field(v0); - formatter.finish() - } - GenericArgument::Type(v0) => { - let mut formatter = formatter.debug_tuple("Type"); - formatter.field(v0); - formatter.finish() - } - GenericArgument::Const(v0) => { - let mut formatter = formatter.debug_tuple("Const"); - formatter.field(v0); - formatter.finish() - } - GenericArgument::AssocType(v0) => { - let mut formatter = formatter.debug_tuple("AssocType"); - formatter.field(v0); - formatter.finish() - } - GenericArgument::AssocConst(v0) => { - let mut formatter = formatter.debug_tuple("AssocConst"); - formatter.field(v0); - formatter.finish() - } - GenericArgument::Constraint(v0) => { - let mut formatter = formatter.debug_tuple("Constraint"); - formatter.field(v0); - formatter.finish() - } - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for GenericParam { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("GenericParam::")?; - match self { - GenericParam::Lifetime(v0) => { - let mut formatter = formatter.debug_tuple("Lifetime"); - formatter.field(v0); - formatter.finish() - } - GenericParam::Type(v0) => { - let mut formatter = formatter.debug_tuple("Type"); - formatter.field(v0); - formatter.finish() - } - GenericParam::Const(v0) => { - let mut formatter = formatter.debug_tuple("Const"); - formatter.field(v0); - formatter.finish() - } - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for Generics { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut formatter = formatter.debug_struct("Generics"); - formatter.field("lt_token", &self.lt_token); - formatter.field("params", &self.params); - formatter.field("gt_token", &self.gt_token); - formatter.field("where_clause", &self.where_clause); - formatter.finish() - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ImplItem { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("ImplItem::")?; - match self { - ImplItem::Const(v0) => v0.debug(formatter, "Const"), - ImplItem::Fn(v0) => v0.debug(formatter, "Fn"), - ImplItem::Type(v0) => v0.debug(formatter, "Type"), - ImplItem::Macro(v0) => v0.debug(formatter, "Macro"), - ImplItem::Verbatim(v0) => { - let mut formatter = formatter.debug_tuple("Verbatim"); - formatter.field(v0); - formatter.finish() - } - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ImplItemConst { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ImplItemConst { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("vis", &self.vis); - formatter.field("defaultness", &self.defaultness); - formatter.field("const_token", &self.const_token); - formatter.field("ident", &self.ident); - formatter.field("generics", &self.generics); - formatter.field("colon_token", &self.colon_token); - formatter.field("ty", &self.ty); - formatter.field("eq_token", &self.eq_token); - formatter.field("expr", &self.expr); - formatter.field("semi_token", &self.semi_token); - formatter.finish() - } - } - self.debug(formatter, "ImplItemConst") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ImplItemFn { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ImplItemFn { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("vis", &self.vis); - formatter.field("defaultness", &self.defaultness); - formatter.field("sig", &self.sig); - formatter.field("block", &self.block); - formatter.finish() - } - } - self.debug(formatter, "ImplItemFn") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ImplItemMacro { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ImplItemMacro { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("mac", &self.mac); - formatter.field("semi_token", &self.semi_token); - formatter.finish() - } - } - self.debug(formatter, "ImplItemMacro") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ImplItemType { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ImplItemType { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("vis", &self.vis); - formatter.field("defaultness", &self.defaultness); - formatter.field("type_token", &self.type_token); - formatter.field("ident", &self.ident); - formatter.field("generics", &self.generics); - formatter.field("eq_token", &self.eq_token); - formatter.field("ty", &self.ty); - formatter.field("semi_token", &self.semi_token); - formatter.finish() - } - } - self.debug(formatter, "ImplItemType") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ImplRestriction { - fn fmt(&self, _formatter: &mut fmt::Formatter) -> fmt::Result { - match *self {} - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for Index { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut formatter = formatter.debug_struct("Index"); - formatter.field("index", &self.index); - formatter.field("span", &self.span); - formatter.finish() - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for Item { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("Item::")?; - match self { - Item::Const(v0) => v0.debug(formatter, "Const"), - Item::Enum(v0) => v0.debug(formatter, "Enum"), - Item::ExternCrate(v0) => v0.debug(formatter, "ExternCrate"), - Item::Fn(v0) => v0.debug(formatter, "Fn"), - Item::ForeignMod(v0) => v0.debug(formatter, "ForeignMod"), - Item::Impl(v0) => v0.debug(formatter, "Impl"), - Item::Macro(v0) => v0.debug(formatter, "Macro"), - Item::Mod(v0) => v0.debug(formatter, "Mod"), - Item::Static(v0) => v0.debug(formatter, "Static"), - Item::Struct(v0) => v0.debug(formatter, "Struct"), - Item::Trait(v0) => v0.debug(formatter, "Trait"), - Item::TraitAlias(v0) => v0.debug(formatter, "TraitAlias"), - Item::Type(v0) => v0.debug(formatter, "Type"), - Item::Union(v0) => v0.debug(formatter, "Union"), - Item::Use(v0) => v0.debug(formatter, "Use"), - Item::Verbatim(v0) => { - let mut formatter = formatter.debug_tuple("Verbatim"); - formatter.field(v0); - formatter.finish() - } - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ItemConst { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ItemConst { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("vis", &self.vis); - formatter.field("const_token", &self.const_token); - formatter.field("ident", &self.ident); - formatter.field("generics", &self.generics); - formatter.field("colon_token", &self.colon_token); - formatter.field("ty", &self.ty); - formatter.field("eq_token", &self.eq_token); - formatter.field("expr", &self.expr); - formatter.field("semi_token", &self.semi_token); - formatter.finish() - } - } - self.debug(formatter, "ItemConst") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ItemEnum { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ItemEnum { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("vis", &self.vis); - formatter.field("enum_token", &self.enum_token); - formatter.field("ident", &self.ident); - formatter.field("generics", &self.generics); - formatter.field("brace_token", &self.brace_token); - formatter.field("variants", &self.variants); - formatter.finish() - } - } - self.debug(formatter, "ItemEnum") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ItemExternCrate { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ItemExternCrate { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("vis", &self.vis); - formatter.field("extern_token", &self.extern_token); - formatter.field("crate_token", &self.crate_token); - formatter.field("ident", &self.ident); - formatter.field("rename", &self.rename); - formatter.field("semi_token", &self.semi_token); - formatter.finish() - } - } - self.debug(formatter, "ItemExternCrate") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ItemFn { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ItemFn { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("vis", &self.vis); - formatter.field("sig", &self.sig); - formatter.field("block", &self.block); - formatter.finish() - } - } - self.debug(formatter, "ItemFn") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ItemForeignMod { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ItemForeignMod { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("unsafety", &self.unsafety); - formatter.field("abi", &self.abi); - formatter.field("brace_token", &self.brace_token); - formatter.field("items", &self.items); - formatter.finish() - } - } - self.debug(formatter, "ItemForeignMod") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ItemImpl { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ItemImpl { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("defaultness", &self.defaultness); - formatter.field("unsafety", &self.unsafety); - formatter.field("impl_token", &self.impl_token); - formatter.field("generics", &self.generics); - formatter.field("trait_", &self.trait_); - formatter.field("self_ty", &self.self_ty); - formatter.field("brace_token", &self.brace_token); - formatter.field("items", &self.items); - formatter.finish() - } - } - self.debug(formatter, "ItemImpl") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ItemMacro { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ItemMacro { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("ident", &self.ident); - formatter.field("mac", &self.mac); - formatter.field("semi_token", &self.semi_token); - formatter.finish() - } - } - self.debug(formatter, "ItemMacro") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ItemMod { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ItemMod { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("vis", &self.vis); - formatter.field("unsafety", &self.unsafety); - formatter.field("mod_token", &self.mod_token); - formatter.field("ident", &self.ident); - formatter.field("content", &self.content); - formatter.field("semi", &self.semi); - formatter.finish() - } - } - self.debug(formatter, "ItemMod") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ItemStatic { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ItemStatic { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("vis", &self.vis); - formatter.field("static_token", &self.static_token); - formatter.field("mutability", &self.mutability); - formatter.field("ident", &self.ident); - formatter.field("colon_token", &self.colon_token); - formatter.field("ty", &self.ty); - formatter.field("eq_token", &self.eq_token); - formatter.field("expr", &self.expr); - formatter.field("semi_token", &self.semi_token); - formatter.finish() - } - } - self.debug(formatter, "ItemStatic") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ItemStruct { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ItemStruct { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("vis", &self.vis); - formatter.field("struct_token", &self.struct_token); - formatter.field("ident", &self.ident); - formatter.field("generics", &self.generics); - formatter.field("fields", &self.fields); - formatter.field("semi_token", &self.semi_token); - formatter.finish() - } - } - self.debug(formatter, "ItemStruct") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ItemTrait { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ItemTrait { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("vis", &self.vis); - formatter.field("unsafety", &self.unsafety); - formatter.field("auto_token", &self.auto_token); - formatter.field("restriction", &self.restriction); - formatter.field("trait_token", &self.trait_token); - formatter.field("ident", &self.ident); - formatter.field("generics", &self.generics); - formatter.field("colon_token", &self.colon_token); - formatter.field("supertraits", &self.supertraits); - formatter.field("brace_token", &self.brace_token); - formatter.field("items", &self.items); - formatter.finish() - } - } - self.debug(formatter, "ItemTrait") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ItemTraitAlias { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ItemTraitAlias { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("vis", &self.vis); - formatter.field("trait_token", &self.trait_token); - formatter.field("ident", &self.ident); - formatter.field("generics", &self.generics); - formatter.field("eq_token", &self.eq_token); - formatter.field("bounds", &self.bounds); - formatter.field("semi_token", &self.semi_token); - formatter.finish() - } - } - self.debug(formatter, "ItemTraitAlias") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ItemType { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ItemType { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("vis", &self.vis); - formatter.field("type_token", &self.type_token); - formatter.field("ident", &self.ident); - formatter.field("generics", &self.generics); - formatter.field("eq_token", &self.eq_token); - formatter.field("ty", &self.ty); - formatter.field("semi_token", &self.semi_token); - formatter.finish() - } - } - self.debug(formatter, "ItemType") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ItemUnion { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ItemUnion { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("vis", &self.vis); - formatter.field("union_token", &self.union_token); - formatter.field("ident", &self.ident); - formatter.field("generics", &self.generics); - formatter.field("fields", &self.fields); - formatter.finish() - } - } - self.debug(formatter, "ItemUnion") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ItemUse { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ItemUse { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("vis", &self.vis); - formatter.field("use_token", &self.use_token); - formatter.field("leading_colon", &self.leading_colon); - formatter.field("tree", &self.tree); - formatter.field("semi_token", &self.semi_token); - formatter.finish() - } - } - self.debug(formatter, "ItemUse") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for Label { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut formatter = formatter.debug_struct("Label"); - formatter.field("name", &self.name); - formatter.field("colon_token", &self.colon_token); - formatter.finish() - } -} -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for Lifetime { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl Lifetime { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("apostrophe", &self.apostrophe); - formatter.field("ident", &self.ident); - formatter.finish() - } - } - self.debug(formatter, "Lifetime") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for LifetimeParam { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut formatter = formatter.debug_struct("LifetimeParam"); - formatter.field("attrs", &self.attrs); - formatter.field("lifetime", &self.lifetime); - formatter.field("colon_token", &self.colon_token); - formatter.field("bounds", &self.bounds); - formatter.finish() - } -} -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for Lit { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("Lit::")?; - match self { - Lit::Str(v0) => v0.debug(formatter, "Str"), - Lit::ByteStr(v0) => v0.debug(formatter, "ByteStr"), - Lit::Byte(v0) => v0.debug(formatter, "Byte"), - Lit::Char(v0) => v0.debug(formatter, "Char"), - Lit::Int(v0) => v0.debug(formatter, "Int"), - Lit::Float(v0) => v0.debug(formatter, "Float"), - Lit::Bool(v0) => v0.debug(formatter, "Bool"), - Lit::Verbatim(v0) => { - let mut formatter = formatter.debug_tuple("Verbatim"); - formatter.field(v0); - formatter.finish() - } - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for Local { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl Local { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("let_token", &self.let_token); - formatter.field("pat", &self.pat); - formatter.field("init", &self.init); - formatter.field("semi_token", &self.semi_token); - formatter.finish() - } - } - self.debug(formatter, "Local") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for LocalInit { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut formatter = formatter.debug_struct("LocalInit"); - formatter.field("eq_token", &self.eq_token); - formatter.field("expr", &self.expr); - formatter.field("diverge", &self.diverge); - formatter.finish() - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for Macro { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut formatter = formatter.debug_struct("Macro"); - formatter.field("path", &self.path); - formatter.field("bang_token", &self.bang_token); - formatter.field("delimiter", &self.delimiter); - formatter.field("tokens", &self.tokens); - formatter.finish() - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for MacroDelimiter { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("MacroDelimiter::")?; - match self { - MacroDelimiter::Paren(v0) => { - let mut formatter = formatter.debug_tuple("Paren"); - formatter.field(v0); - formatter.finish() - } - MacroDelimiter::Brace(v0) => { - let mut formatter = formatter.debug_tuple("Brace"); - formatter.field(v0); - formatter.finish() - } - MacroDelimiter::Bracket(v0) => { - let mut formatter = formatter.debug_tuple("Bracket"); - formatter.field(v0); - formatter.finish() - } - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for Member { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("Member::")?; - match self { - Member::Named(v0) => { - let mut formatter = formatter.debug_tuple("Named"); - formatter.field(v0); - formatter.finish() - } - Member::Unnamed(v0) => { - let mut formatter = formatter.debug_tuple("Unnamed"); - formatter.field(v0); - formatter.finish() - } - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for Meta { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("Meta::")?; - match self { - Meta::Path(v0) => v0.debug(formatter, "Path"), - Meta::List(v0) => v0.debug(formatter, "List"), - Meta::NameValue(v0) => v0.debug(formatter, "NameValue"), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for MetaList { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl MetaList { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("path", &self.path); - formatter.field("delimiter", &self.delimiter); - formatter.field("tokens", &self.tokens); - formatter.finish() - } - } - self.debug(formatter, "MetaList") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for MetaNameValue { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl MetaNameValue { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("path", &self.path); - formatter.field("eq_token", &self.eq_token); - formatter.field("value", &self.value); - formatter.finish() - } - } - self.debug(formatter, "MetaNameValue") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ParenthesizedGenericArguments { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl ParenthesizedGenericArguments { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("paren_token", &self.paren_token); - formatter.field("inputs", &self.inputs); - formatter.field("output", &self.output); - formatter.finish() - } - } - self.debug(formatter, "ParenthesizedGenericArguments") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for Pat { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("Pat::")?; - match self { - Pat::Const(v0) => v0.debug(formatter, "Const"), - Pat::Ident(v0) => v0.debug(formatter, "Ident"), - Pat::Lit(v0) => v0.debug(formatter, "Lit"), - Pat::Macro(v0) => v0.debug(formatter, "Macro"), - Pat::Or(v0) => v0.debug(formatter, "Or"), - Pat::Paren(v0) => v0.debug(formatter, "Paren"), - Pat::Path(v0) => v0.debug(formatter, "Path"), - Pat::Range(v0) => v0.debug(formatter, "Range"), - Pat::Reference(v0) => v0.debug(formatter, "Reference"), - Pat::Rest(v0) => v0.debug(formatter, "Rest"), - Pat::Slice(v0) => v0.debug(formatter, "Slice"), - Pat::Struct(v0) => v0.debug(formatter, "Struct"), - Pat::Tuple(v0) => v0.debug(formatter, "Tuple"), - Pat::TupleStruct(v0) => v0.debug(formatter, "TupleStruct"), - Pat::Type(v0) => v0.debug(formatter, "Type"), - Pat::Verbatim(v0) => { - let mut formatter = formatter.debug_tuple("Verbatim"); - formatter.field(v0); - formatter.finish() - } - Pat::Wild(v0) => v0.debug(formatter, "Wild"), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for PatIdent { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl PatIdent { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("by_ref", &self.by_ref); - formatter.field("mutability", &self.mutability); - formatter.field("ident", &self.ident); - formatter.field("subpat", &self.subpat); - formatter.finish() - } - } - self.debug(formatter, "PatIdent") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for PatOr { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl PatOr { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("leading_vert", &self.leading_vert); - formatter.field("cases", &self.cases); - formatter.finish() - } - } - self.debug(formatter, "PatOr") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for PatParen { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl PatParen { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("paren_token", &self.paren_token); - formatter.field("pat", &self.pat); - formatter.finish() - } - } - self.debug(formatter, "PatParen") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for PatReference { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl PatReference { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("and_token", &self.and_token); - formatter.field("mutability", &self.mutability); - formatter.field("pat", &self.pat); - formatter.finish() - } - } - self.debug(formatter, "PatReference") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for PatRest { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl PatRest { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("dot2_token", &self.dot2_token); - formatter.finish() - } - } - self.debug(formatter, "PatRest") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for PatSlice { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl PatSlice { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("bracket_token", &self.bracket_token); - formatter.field("elems", &self.elems); - formatter.finish() - } - } - self.debug(formatter, "PatSlice") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for PatStruct { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl PatStruct { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("qself", &self.qself); - formatter.field("path", &self.path); - formatter.field("brace_token", &self.brace_token); - formatter.field("fields", &self.fields); - formatter.field("rest", &self.rest); - formatter.finish() - } - } - self.debug(formatter, "PatStruct") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for PatTuple { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl PatTuple { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("paren_token", &self.paren_token); - formatter.field("elems", &self.elems); - formatter.finish() - } - } - self.debug(formatter, "PatTuple") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for PatTupleStruct { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl PatTupleStruct { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("qself", &self.qself); - formatter.field("path", &self.path); - formatter.field("paren_token", &self.paren_token); - formatter.field("elems", &self.elems); - formatter.finish() - } - } - self.debug(formatter, "PatTupleStruct") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for PatType { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl PatType { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("pat", &self.pat); - formatter.field("colon_token", &self.colon_token); - formatter.field("ty", &self.ty); - formatter.finish() - } - } - self.debug(formatter, "PatType") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for PatWild { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl PatWild { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("underscore_token", &self.underscore_token); - formatter.finish() - } - } - self.debug(formatter, "PatWild") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for Path { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl Path { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("leading_colon", &self.leading_colon); - formatter.field("segments", &self.segments); - formatter.finish() - } - } - self.debug(formatter, "Path") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for PathArguments { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("PathArguments::")?; - match self { - PathArguments::None => formatter.write_str("None"), - PathArguments::AngleBracketed(v0) => v0.debug(formatter, "AngleBracketed"), - PathArguments::Parenthesized(v0) => v0.debug(formatter, "Parenthesized"), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for PathSegment { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut formatter = formatter.debug_struct("PathSegment"); - formatter.field("ident", &self.ident); - formatter.field("arguments", &self.arguments); - formatter.finish() - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for PredicateLifetime { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut formatter = formatter.debug_struct("PredicateLifetime"); - formatter.field("lifetime", &self.lifetime); - formatter.field("colon_token", &self.colon_token); - formatter.field("bounds", &self.bounds); - formatter.finish() - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for PredicateType { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut formatter = formatter.debug_struct("PredicateType"); - formatter.field("lifetimes", &self.lifetimes); - formatter.field("bounded_ty", &self.bounded_ty); - formatter.field("colon_token", &self.colon_token); - formatter.field("bounds", &self.bounds); - formatter.finish() - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for QSelf { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut formatter = formatter.debug_struct("QSelf"); - formatter.field("lt_token", &self.lt_token); - formatter.field("ty", &self.ty); - formatter.field("position", &self.position); - formatter.field("as_token", &self.as_token); - formatter.field("gt_token", &self.gt_token); - formatter.finish() - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for RangeLimits { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("RangeLimits::")?; - match self { - RangeLimits::HalfOpen(v0) => { - let mut formatter = formatter.debug_tuple("HalfOpen"); - formatter.field(v0); - formatter.finish() - } - RangeLimits::Closed(v0) => { - let mut formatter = formatter.debug_tuple("Closed"); - formatter.field(v0); - formatter.finish() - } - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for Receiver { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut formatter = formatter.debug_struct("Receiver"); - formatter.field("attrs", &self.attrs); - formatter.field("reference", &self.reference); - formatter.field("mutability", &self.mutability); - formatter.field("self_token", &self.self_token); - formatter.field("colon_token", &self.colon_token); - formatter.field("ty", &self.ty); - formatter.finish() - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for ReturnType { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("ReturnType::")?; - match self { - ReturnType::Default => formatter.write_str("Default"), - ReturnType::Type(v0, v1) => { - let mut formatter = formatter.debug_tuple("Type"); - formatter.field(v0); - formatter.field(v1); - formatter.finish() - } - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for Signature { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut formatter = formatter.debug_struct("Signature"); - formatter.field("constness", &self.constness); - formatter.field("asyncness", &self.asyncness); - formatter.field("unsafety", &self.unsafety); - formatter.field("abi", &self.abi); - formatter.field("fn_token", &self.fn_token); - formatter.field("ident", &self.ident); - formatter.field("generics", &self.generics); - formatter.field("paren_token", &self.paren_token); - formatter.field("inputs", &self.inputs); - formatter.field("variadic", &self.variadic); - formatter.field("output", &self.output); - formatter.finish() - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for StaticMutability { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("StaticMutability::")?; - match self { - StaticMutability::Mut(v0) => { - let mut formatter = formatter.debug_tuple("Mut"); - formatter.field(v0); - formatter.finish() - } - StaticMutability::None => formatter.write_str("None"), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for Stmt { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("Stmt::")?; - match self { - Stmt::Local(v0) => v0.debug(formatter, "Local"), - Stmt::Item(v0) => { - let mut formatter = formatter.debug_tuple("Item"); - formatter.field(v0); - formatter.finish() - } - Stmt::Expr(v0, v1) => { - let mut formatter = formatter.debug_tuple("Expr"); - formatter.field(v0); - formatter.field(v1); - formatter.finish() - } - Stmt::Macro(v0) => v0.debug(formatter, "Macro"), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for StmtMacro { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl StmtMacro { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("mac", &self.mac); - formatter.field("semi_token", &self.semi_token); - formatter.finish() - } - } - self.debug(formatter, "StmtMacro") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for TraitBound { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut formatter = formatter.debug_struct("TraitBound"); - formatter.field("paren_token", &self.paren_token); - formatter.field("modifier", &self.modifier); - formatter.field("lifetimes", &self.lifetimes); - formatter.field("path", &self.path); - formatter.finish() - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for TraitBoundModifier { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("TraitBoundModifier::")?; - match self { - TraitBoundModifier::None => formatter.write_str("None"), - TraitBoundModifier::Maybe(v0) => { - let mut formatter = formatter.debug_tuple("Maybe"); - formatter.field(v0); - formatter.finish() - } - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for TraitItem { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("TraitItem::")?; - match self { - TraitItem::Const(v0) => v0.debug(formatter, "Const"), - TraitItem::Fn(v0) => v0.debug(formatter, "Fn"), - TraitItem::Type(v0) => v0.debug(formatter, "Type"), - TraitItem::Macro(v0) => v0.debug(formatter, "Macro"), - TraitItem::Verbatim(v0) => { - let mut formatter = formatter.debug_tuple("Verbatim"); - formatter.field(v0); - formatter.finish() - } - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for TraitItemConst { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl TraitItemConst { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("const_token", &self.const_token); - formatter.field("ident", &self.ident); - formatter.field("generics", &self.generics); - formatter.field("colon_token", &self.colon_token); - formatter.field("ty", &self.ty); - formatter.field("default", &self.default); - formatter.field("semi_token", &self.semi_token); - formatter.finish() - } - } - self.debug(formatter, "TraitItemConst") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for TraitItemFn { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl TraitItemFn { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("sig", &self.sig); - formatter.field("default", &self.default); - formatter.field("semi_token", &self.semi_token); - formatter.finish() - } - } - self.debug(formatter, "TraitItemFn") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for TraitItemMacro { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl TraitItemMacro { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("mac", &self.mac); - formatter.field("semi_token", &self.semi_token); - formatter.finish() - } - } - self.debug(formatter, "TraitItemMacro") - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for TraitItemType { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl TraitItemType { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("attrs", &self.attrs); - formatter.field("type_token", &self.type_token); - formatter.field("ident", &self.ident); - formatter.field("generics", &self.generics); - formatter.field("colon_token", &self.colon_token); - formatter.field("bounds", &self.bounds); - formatter.field("default", &self.default); - formatter.field("semi_token", &self.semi_token); - formatter.finish() - } - } - self.debug(formatter, "TraitItemType") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for Type { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("Type::")?; - match self { - Type::Array(v0) => v0.debug(formatter, "Array"), - Type::BareFn(v0) => v0.debug(formatter, "BareFn"), - Type::Group(v0) => v0.debug(formatter, "Group"), - Type::ImplTrait(v0) => v0.debug(formatter, "ImplTrait"), - Type::Infer(v0) => v0.debug(formatter, "Infer"), - Type::Macro(v0) => v0.debug(formatter, "Macro"), - Type::Never(v0) => v0.debug(formatter, "Never"), - Type::Paren(v0) => v0.debug(formatter, "Paren"), - Type::Path(v0) => v0.debug(formatter, "Path"), - Type::Ptr(v0) => v0.debug(formatter, "Ptr"), - Type::Reference(v0) => v0.debug(formatter, "Reference"), - Type::Slice(v0) => v0.debug(formatter, "Slice"), - Type::TraitObject(v0) => v0.debug(formatter, "TraitObject"), - Type::Tuple(v0) => v0.debug(formatter, "Tuple"), - Type::Verbatim(v0) => { - let mut formatter = formatter.debug_tuple("Verbatim"); - formatter.field(v0); - formatter.finish() - } - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for TypeArray { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl TypeArray { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("bracket_token", &self.bracket_token); - formatter.field("elem", &self.elem); - formatter.field("semi_token", &self.semi_token); - formatter.field("len", &self.len); - formatter.finish() - } - } - self.debug(formatter, "TypeArray") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for TypeBareFn { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl TypeBareFn { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("lifetimes", &self.lifetimes); - formatter.field("unsafety", &self.unsafety); - formatter.field("abi", &self.abi); - formatter.field("fn_token", &self.fn_token); - formatter.field("paren_token", &self.paren_token); - formatter.field("inputs", &self.inputs); - formatter.field("variadic", &self.variadic); - formatter.field("output", &self.output); - formatter.finish() - } - } - self.debug(formatter, "TypeBareFn") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for TypeGroup { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl TypeGroup { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("group_token", &self.group_token); - formatter.field("elem", &self.elem); - formatter.finish() - } - } - self.debug(formatter, "TypeGroup") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for TypeImplTrait { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl TypeImplTrait { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("impl_token", &self.impl_token); - formatter.field("bounds", &self.bounds); - formatter.finish() - } - } - self.debug(formatter, "TypeImplTrait") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for TypeInfer { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl TypeInfer { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("underscore_token", &self.underscore_token); - formatter.finish() - } - } - self.debug(formatter, "TypeInfer") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for TypeMacro { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl TypeMacro { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("mac", &self.mac); - formatter.finish() - } - } - self.debug(formatter, "TypeMacro") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for TypeNever { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl TypeNever { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("bang_token", &self.bang_token); - formatter.finish() - } - } - self.debug(formatter, "TypeNever") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for TypeParam { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut formatter = formatter.debug_struct("TypeParam"); - formatter.field("attrs", &self.attrs); - formatter.field("ident", &self.ident); - formatter.field("colon_token", &self.colon_token); - formatter.field("bounds", &self.bounds); - formatter.field("eq_token", &self.eq_token); - formatter.field("default", &self.default); - formatter.finish() - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for TypeParamBound { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("TypeParamBound::")?; - match self { - TypeParamBound::Trait(v0) => { - let mut formatter = formatter.debug_tuple("Trait"); - formatter.field(v0); - formatter.finish() - } - TypeParamBound::Lifetime(v0) => v0.debug(formatter, "Lifetime"), - TypeParamBound::Verbatim(v0) => { - let mut formatter = formatter.debug_tuple("Verbatim"); - formatter.field(v0); - formatter.finish() - } - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for TypeParen { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl TypeParen { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("paren_token", &self.paren_token); - formatter.field("elem", &self.elem); - formatter.finish() - } - } - self.debug(formatter, "TypeParen") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for TypePath { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl TypePath { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("qself", &self.qself); - formatter.field("path", &self.path); - formatter.finish() - } - } - self.debug(formatter, "TypePath") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for TypePtr { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl TypePtr { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("star_token", &self.star_token); - formatter.field("const_token", &self.const_token); - formatter.field("mutability", &self.mutability); - formatter.field("elem", &self.elem); - formatter.finish() - } - } - self.debug(formatter, "TypePtr") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for TypeReference { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl TypeReference { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("and_token", &self.and_token); - formatter.field("lifetime", &self.lifetime); - formatter.field("mutability", &self.mutability); - formatter.field("elem", &self.elem); - formatter.finish() - } - } - self.debug(formatter, "TypeReference") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for TypeSlice { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl TypeSlice { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("bracket_token", &self.bracket_token); - formatter.field("elem", &self.elem); - formatter.finish() - } - } - self.debug(formatter, "TypeSlice") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for TypeTraitObject { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl TypeTraitObject { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("dyn_token", &self.dyn_token); - formatter.field("bounds", &self.bounds); - formatter.finish() - } - } - self.debug(formatter, "TypeTraitObject") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for TypeTuple { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl TypeTuple { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("paren_token", &self.paren_token); - formatter.field("elems", &self.elems); - formatter.finish() - } - } - self.debug(formatter, "TypeTuple") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for UnOp { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("UnOp::")?; - match self { - UnOp::Deref(v0) => { - let mut formatter = formatter.debug_tuple("Deref"); - formatter.field(v0); - formatter.finish() - } - UnOp::Not(v0) => { - let mut formatter = formatter.debug_tuple("Not"); - formatter.field(v0); - formatter.finish() - } - UnOp::Neg(v0) => { - let mut formatter = formatter.debug_tuple("Neg"); - formatter.field(v0); - formatter.finish() - } - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for UseGlob { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut formatter = formatter.debug_struct("UseGlob"); - formatter.field("star_token", &self.star_token); - formatter.finish() - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for UseGroup { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut formatter = formatter.debug_struct("UseGroup"); - formatter.field("brace_token", &self.brace_token); - formatter.field("items", &self.items); - formatter.finish() - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for UseName { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut formatter = formatter.debug_struct("UseName"); - formatter.field("ident", &self.ident); - formatter.finish() - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for UsePath { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut formatter = formatter.debug_struct("UsePath"); - formatter.field("ident", &self.ident); - formatter.field("colon2_token", &self.colon2_token); - formatter.field("tree", &self.tree); - formatter.finish() - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for UseRename { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut formatter = formatter.debug_struct("UseRename"); - formatter.field("ident", &self.ident); - formatter.field("as_token", &self.as_token); - formatter.field("rename", &self.rename); - formatter.finish() - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for UseTree { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("UseTree::")?; - match self { - UseTree::Path(v0) => { - let mut formatter = formatter.debug_tuple("Path"); - formatter.field(v0); - formatter.finish() - } - UseTree::Name(v0) => { - let mut formatter = formatter.debug_tuple("Name"); - formatter.field(v0); - formatter.finish() - } - UseTree::Rename(v0) => { - let mut formatter = formatter.debug_tuple("Rename"); - formatter.field(v0); - formatter.finish() - } - UseTree::Glob(v0) => { - let mut formatter = formatter.debug_tuple("Glob"); - formatter.field(v0); - formatter.finish() - } - UseTree::Group(v0) => { - let mut formatter = formatter.debug_tuple("Group"); - formatter.field(v0); - formatter.finish() - } - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for Variadic { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut formatter = formatter.debug_struct("Variadic"); - formatter.field("attrs", &self.attrs); - formatter.field("pat", &self.pat); - formatter.field("dots", &self.dots); - formatter.field("comma", &self.comma); - formatter.finish() - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for Variant { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut formatter = formatter.debug_struct("Variant"); - formatter.field("attrs", &self.attrs); - formatter.field("ident", &self.ident); - formatter.field("fields", &self.fields); - formatter.field("discriminant", &self.discriminant); - formatter.finish() - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for VisRestricted { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - impl VisRestricted { - fn debug(&self, formatter: &mut fmt::Formatter, name: &str) -> fmt::Result { - let mut formatter = formatter.debug_struct(name); - formatter.field("pub_token", &self.pub_token); - formatter.field("paren_token", &self.paren_token); - formatter.field("in_token", &self.in_token); - formatter.field("path", &self.path); - formatter.finish() - } - } - self.debug(formatter, "VisRestricted") - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for Visibility { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("Visibility::")?; - match self { - Visibility::Public(v0) => { - let mut formatter = formatter.debug_tuple("Public"); - formatter.field(v0); - formatter.finish() - } - Visibility::Restricted(v0) => v0.debug(formatter, "Restricted"), - Visibility::Inherited => formatter.write_str("Inherited"), - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for WhereClause { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - let mut formatter = formatter.debug_struct("WhereClause"); - formatter.field("where_token", &self.where_token); - formatter.field("predicates", &self.predicates); - formatter.finish() - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Debug for WherePredicate { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("WherePredicate::")?; - match self { - WherePredicate::Lifetime(v0) => { - let mut formatter = formatter.debug_tuple("Lifetime"); - formatter.field(v0); - formatter.finish() - } - WherePredicate::Type(v0) => { - let mut formatter = formatter.debug_tuple("Type"); - formatter.field(v0); - formatter.finish() - } - } - } -} diff --git a/vendor/syn/src/gen/eq.rs b/vendor/syn/src/gen/eq.rs deleted file mode 100644 index a1fb3b4..0000000 --- a/vendor/syn/src/gen/eq.rs +++ /dev/null @@ -1,2148 +0,0 @@ -// This file is @generated by syn-internal-codegen. -// It is not intended for manual editing. - -#[cfg(any(feature = "derive", feature = "full"))] -use crate::tt::TokenStreamHelper; -use crate::*; -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for Abi {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for Abi { - fn eq(&self, other: &Self) -> bool { - self.name == other.name - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for AngleBracketedGenericArguments {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for AngleBracketedGenericArguments { - fn eq(&self, other: &Self) -> bool { - self.colon2_token == other.colon2_token && self.args == other.args - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for Arm {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for Arm { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.pat == other.pat && self.guard == other.guard - && self.body == other.body && self.comma == other.comma - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for AssocConst {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for AssocConst { - fn eq(&self, other: &Self) -> bool { - self.ident == other.ident && self.generics == other.generics - && self.value == other.value - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for AssocType {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for AssocType { - fn eq(&self, other: &Self) -> bool { - self.ident == other.ident && self.generics == other.generics - && self.ty == other.ty - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for AttrStyle {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for AttrStyle { - fn eq(&self, other: &Self) -> bool { - match (self, other) { - (AttrStyle::Outer, AttrStyle::Outer) => true, - (AttrStyle::Inner(_), AttrStyle::Inner(_)) => true, - _ => false, - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for Attribute {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for Attribute { - fn eq(&self, other: &Self) -> bool { - self.style == other.style && self.meta == other.meta - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for BareFnArg {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for BareFnArg { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.name == other.name && self.ty == other.ty - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for BareVariadic {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for BareVariadic { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.name == other.name && self.comma == other.comma - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for BinOp {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for BinOp { - fn eq(&self, other: &Self) -> bool { - match (self, other) { - (BinOp::Add(_), BinOp::Add(_)) => true, - (BinOp::Sub(_), BinOp::Sub(_)) => true, - (BinOp::Mul(_), BinOp::Mul(_)) => true, - (BinOp::Div(_), BinOp::Div(_)) => true, - (BinOp::Rem(_), BinOp::Rem(_)) => true, - (BinOp::And(_), BinOp::And(_)) => true, - (BinOp::Or(_), BinOp::Or(_)) => true, - (BinOp::BitXor(_), BinOp::BitXor(_)) => true, - (BinOp::BitAnd(_), BinOp::BitAnd(_)) => true, - (BinOp::BitOr(_), BinOp::BitOr(_)) => true, - (BinOp::Shl(_), BinOp::Shl(_)) => true, - (BinOp::Shr(_), BinOp::Shr(_)) => true, - (BinOp::Eq(_), BinOp::Eq(_)) => true, - (BinOp::Lt(_), BinOp::Lt(_)) => true, - (BinOp::Le(_), BinOp::Le(_)) => true, - (BinOp::Ne(_), BinOp::Ne(_)) => true, - (BinOp::Ge(_), BinOp::Ge(_)) => true, - (BinOp::Gt(_), BinOp::Gt(_)) => true, - (BinOp::AddAssign(_), BinOp::AddAssign(_)) => true, - (BinOp::SubAssign(_), BinOp::SubAssign(_)) => true, - (BinOp::MulAssign(_), BinOp::MulAssign(_)) => true, - (BinOp::DivAssign(_), BinOp::DivAssign(_)) => true, - (BinOp::RemAssign(_), BinOp::RemAssign(_)) => true, - (BinOp::BitXorAssign(_), BinOp::BitXorAssign(_)) => true, - (BinOp::BitAndAssign(_), BinOp::BitAndAssign(_)) => true, - (BinOp::BitOrAssign(_), BinOp::BitOrAssign(_)) => true, - (BinOp::ShlAssign(_), BinOp::ShlAssign(_)) => true, - (BinOp::ShrAssign(_), BinOp::ShrAssign(_)) => true, - _ => false, - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for Block {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for Block { - fn eq(&self, other: &Self) -> bool { - self.stmts == other.stmts - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for BoundLifetimes {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for BoundLifetimes { - fn eq(&self, other: &Self) -> bool { - self.lifetimes == other.lifetimes - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ConstParam {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ConstParam { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.ident == other.ident && self.ty == other.ty - && self.eq_token == other.eq_token && self.default == other.default - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for Constraint {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for Constraint { - fn eq(&self, other: &Self) -> bool { - self.ident == other.ident && self.generics == other.generics - && self.bounds == other.bounds - } -} -#[cfg(feature = "derive")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for Data {} -#[cfg(feature = "derive")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for Data { - fn eq(&self, other: &Self) -> bool { - match (self, other) { - (Data::Struct(self0), Data::Struct(other0)) => self0 == other0, - (Data::Enum(self0), Data::Enum(other0)) => self0 == other0, - (Data::Union(self0), Data::Union(other0)) => self0 == other0, - _ => false, - } - } -} -#[cfg(feature = "derive")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for DataEnum {} -#[cfg(feature = "derive")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for DataEnum { - fn eq(&self, other: &Self) -> bool { - self.variants == other.variants - } -} -#[cfg(feature = "derive")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for DataStruct {} -#[cfg(feature = "derive")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for DataStruct { - fn eq(&self, other: &Self) -> bool { - self.fields == other.fields && self.semi_token == other.semi_token - } -} -#[cfg(feature = "derive")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for DataUnion {} -#[cfg(feature = "derive")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for DataUnion { - fn eq(&self, other: &Self) -> bool { - self.fields == other.fields - } -} -#[cfg(feature = "derive")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for DeriveInput {} -#[cfg(feature = "derive")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for DeriveInput { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.vis == other.vis && self.ident == other.ident - && self.generics == other.generics && self.data == other.data - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for Expr {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for Expr { - fn eq(&self, other: &Self) -> bool { - match (self, other) { - #[cfg(feature = "full")] - (Expr::Array(self0), Expr::Array(other0)) => self0 == other0, - #[cfg(feature = "full")] - (Expr::Assign(self0), Expr::Assign(other0)) => self0 == other0, - #[cfg(feature = "full")] - (Expr::Async(self0), Expr::Async(other0)) => self0 == other0, - #[cfg(feature = "full")] - (Expr::Await(self0), Expr::Await(other0)) => self0 == other0, - (Expr::Binary(self0), Expr::Binary(other0)) => self0 == other0, - #[cfg(feature = "full")] - (Expr::Block(self0), Expr::Block(other0)) => self0 == other0, - #[cfg(feature = "full")] - (Expr::Break(self0), Expr::Break(other0)) => self0 == other0, - (Expr::Call(self0), Expr::Call(other0)) => self0 == other0, - (Expr::Cast(self0), Expr::Cast(other0)) => self0 == other0, - #[cfg(feature = "full")] - (Expr::Closure(self0), Expr::Closure(other0)) => self0 == other0, - #[cfg(feature = "full")] - (Expr::Const(self0), Expr::Const(other0)) => self0 == other0, - #[cfg(feature = "full")] - (Expr::Continue(self0), Expr::Continue(other0)) => self0 == other0, - (Expr::Field(self0), Expr::Field(other0)) => self0 == other0, - #[cfg(feature = "full")] - (Expr::ForLoop(self0), Expr::ForLoop(other0)) => self0 == other0, - (Expr::Group(self0), Expr::Group(other0)) => self0 == other0, - #[cfg(feature = "full")] - (Expr::If(self0), Expr::If(other0)) => self0 == other0, - (Expr::Index(self0), Expr::Index(other0)) => self0 == other0, - #[cfg(feature = "full")] - (Expr::Infer(self0), Expr::Infer(other0)) => self0 == other0, - #[cfg(feature = "full")] - (Expr::Let(self0), Expr::Let(other0)) => self0 == other0, - (Expr::Lit(self0), Expr::Lit(other0)) => self0 == other0, - #[cfg(feature = "full")] - (Expr::Loop(self0), Expr::Loop(other0)) => self0 == other0, - (Expr::Macro(self0), Expr::Macro(other0)) => self0 == other0, - #[cfg(feature = "full")] - (Expr::Match(self0), Expr::Match(other0)) => self0 == other0, - (Expr::MethodCall(self0), Expr::MethodCall(other0)) => self0 == other0, - (Expr::Paren(self0), Expr::Paren(other0)) => self0 == other0, - (Expr::Path(self0), Expr::Path(other0)) => self0 == other0, - #[cfg(feature = "full")] - (Expr::Range(self0), Expr::Range(other0)) => self0 == other0, - (Expr::Reference(self0), Expr::Reference(other0)) => self0 == other0, - #[cfg(feature = "full")] - (Expr::Repeat(self0), Expr::Repeat(other0)) => self0 == other0, - #[cfg(feature = "full")] - (Expr::Return(self0), Expr::Return(other0)) => self0 == other0, - (Expr::Struct(self0), Expr::Struct(other0)) => self0 == other0, - #[cfg(feature = "full")] - (Expr::Try(self0), Expr::Try(other0)) => self0 == other0, - #[cfg(feature = "full")] - (Expr::TryBlock(self0), Expr::TryBlock(other0)) => self0 == other0, - #[cfg(feature = "full")] - (Expr::Tuple(self0), Expr::Tuple(other0)) => self0 == other0, - (Expr::Unary(self0), Expr::Unary(other0)) => self0 == other0, - #[cfg(feature = "full")] - (Expr::Unsafe(self0), Expr::Unsafe(other0)) => self0 == other0, - (Expr::Verbatim(self0), Expr::Verbatim(other0)) => { - TokenStreamHelper(self0) == TokenStreamHelper(other0) - } - #[cfg(feature = "full")] - (Expr::While(self0), Expr::While(other0)) => self0 == other0, - #[cfg(feature = "full")] - (Expr::Yield(self0), Expr::Yield(other0)) => self0 == other0, - _ => false, - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ExprArray {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ExprArray { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.elems == other.elems - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ExprAssign {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ExprAssign { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.left == other.left && self.right == other.right - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ExprAsync {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ExprAsync { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.capture == other.capture - && self.block == other.block - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ExprAwait {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ExprAwait { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.base == other.base - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ExprBinary {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ExprBinary { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.left == other.left && self.op == other.op - && self.right == other.right - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ExprBlock {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ExprBlock { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.label == other.label - && self.block == other.block - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ExprBreak {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ExprBreak { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.label == other.label && self.expr == other.expr - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ExprCall {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ExprCall { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.func == other.func && self.args == other.args - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ExprCast {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ExprCast { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.expr == other.expr && self.ty == other.ty - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ExprClosure {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ExprClosure { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.lifetimes == other.lifetimes - && self.constness == other.constness && self.movability == other.movability - && self.asyncness == other.asyncness && self.capture == other.capture - && self.inputs == other.inputs && self.output == other.output - && self.body == other.body - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ExprConst {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ExprConst { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.block == other.block - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ExprContinue {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ExprContinue { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.label == other.label - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ExprField {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ExprField { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.base == other.base - && self.member == other.member - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ExprForLoop {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ExprForLoop { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.label == other.label && self.pat == other.pat - && self.expr == other.expr && self.body == other.body - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ExprGroup {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ExprGroup { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.expr == other.expr - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ExprIf {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ExprIf { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.cond == other.cond - && self.then_branch == other.then_branch - && self.else_branch == other.else_branch - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ExprIndex {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ExprIndex { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.expr == other.expr && self.index == other.index - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ExprInfer {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ExprInfer { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ExprLet {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ExprLet { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.pat == other.pat && self.expr == other.expr - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ExprLit {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ExprLit { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.lit == other.lit - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ExprLoop {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ExprLoop { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.label == other.label && self.body == other.body - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ExprMacro {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ExprMacro { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.mac == other.mac - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ExprMatch {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ExprMatch { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.expr == other.expr && self.arms == other.arms - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ExprMethodCall {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ExprMethodCall { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.receiver == other.receiver - && self.method == other.method && self.turbofish == other.turbofish - && self.args == other.args - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ExprParen {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ExprParen { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.expr == other.expr - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ExprPath {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ExprPath { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.qself == other.qself && self.path == other.path - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ExprRange {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ExprRange { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.start == other.start - && self.limits == other.limits && self.end == other.end - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ExprReference {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ExprReference { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.mutability == other.mutability - && self.expr == other.expr - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ExprRepeat {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ExprRepeat { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.expr == other.expr && self.len == other.len - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ExprReturn {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ExprReturn { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.expr == other.expr - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ExprStruct {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ExprStruct { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.qself == other.qself && self.path == other.path - && self.fields == other.fields && self.dot2_token == other.dot2_token - && self.rest == other.rest - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ExprTry {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ExprTry { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.expr == other.expr - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ExprTryBlock {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ExprTryBlock { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.block == other.block - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ExprTuple {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ExprTuple { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.elems == other.elems - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ExprUnary {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ExprUnary { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.op == other.op && self.expr == other.expr - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ExprUnsafe {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ExprUnsafe { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.block == other.block - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ExprWhile {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ExprWhile { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.label == other.label && self.cond == other.cond - && self.body == other.body - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ExprYield {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ExprYield { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.expr == other.expr - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for Field {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for Field { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.vis == other.vis - && self.mutability == other.mutability && self.ident == other.ident - && self.colon_token == other.colon_token && self.ty == other.ty - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for FieldMutability {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for FieldMutability { - fn eq(&self, other: &Self) -> bool { - match (self, other) { - (FieldMutability::None, FieldMutability::None) => true, - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for FieldPat {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for FieldPat { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.member == other.member - && self.colon_token == other.colon_token && self.pat == other.pat - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for FieldValue {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for FieldValue { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.member == other.member - && self.colon_token == other.colon_token && self.expr == other.expr - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for Fields {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for Fields { - fn eq(&self, other: &Self) -> bool { - match (self, other) { - (Fields::Named(self0), Fields::Named(other0)) => self0 == other0, - (Fields::Unnamed(self0), Fields::Unnamed(other0)) => self0 == other0, - (Fields::Unit, Fields::Unit) => true, - _ => false, - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for FieldsNamed {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for FieldsNamed { - fn eq(&self, other: &Self) -> bool { - self.named == other.named - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for FieldsUnnamed {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for FieldsUnnamed { - fn eq(&self, other: &Self) -> bool { - self.unnamed == other.unnamed - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for File {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for File { - fn eq(&self, other: &Self) -> bool { - self.shebang == other.shebang && self.attrs == other.attrs - && self.items == other.items - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for FnArg {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for FnArg { - fn eq(&self, other: &Self) -> bool { - match (self, other) { - (FnArg::Receiver(self0), FnArg::Receiver(other0)) => self0 == other0, - (FnArg::Typed(self0), FnArg::Typed(other0)) => self0 == other0, - _ => false, - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ForeignItem {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ForeignItem { - fn eq(&self, other: &Self) -> bool { - match (self, other) { - (ForeignItem::Fn(self0), ForeignItem::Fn(other0)) => self0 == other0, - (ForeignItem::Static(self0), ForeignItem::Static(other0)) => self0 == other0, - (ForeignItem::Type(self0), ForeignItem::Type(other0)) => self0 == other0, - (ForeignItem::Macro(self0), ForeignItem::Macro(other0)) => self0 == other0, - (ForeignItem::Verbatim(self0), ForeignItem::Verbatim(other0)) => { - TokenStreamHelper(self0) == TokenStreamHelper(other0) - } - _ => false, - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ForeignItemFn {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ForeignItemFn { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.vis == other.vis && self.sig == other.sig - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ForeignItemMacro {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ForeignItemMacro { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.mac == other.mac - && self.semi_token == other.semi_token - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ForeignItemStatic {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ForeignItemStatic { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.vis == other.vis - && self.mutability == other.mutability && self.ident == other.ident - && self.ty == other.ty - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ForeignItemType {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ForeignItemType { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.vis == other.vis && self.ident == other.ident - && self.generics == other.generics - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for GenericArgument {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for GenericArgument { - fn eq(&self, other: &Self) -> bool { - match (self, other) { - (GenericArgument::Lifetime(self0), GenericArgument::Lifetime(other0)) => { - self0 == other0 - } - (GenericArgument::Type(self0), GenericArgument::Type(other0)) => { - self0 == other0 - } - (GenericArgument::Const(self0), GenericArgument::Const(other0)) => { - self0 == other0 - } - (GenericArgument::AssocType(self0), GenericArgument::AssocType(other0)) => { - self0 == other0 - } - (GenericArgument::AssocConst(self0), GenericArgument::AssocConst(other0)) => { - self0 == other0 - } - (GenericArgument::Constraint(self0), GenericArgument::Constraint(other0)) => { - self0 == other0 - } - _ => false, - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for GenericParam {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for GenericParam { - fn eq(&self, other: &Self) -> bool { - match (self, other) { - (GenericParam::Lifetime(self0), GenericParam::Lifetime(other0)) => { - self0 == other0 - } - (GenericParam::Type(self0), GenericParam::Type(other0)) => self0 == other0, - (GenericParam::Const(self0), GenericParam::Const(other0)) => self0 == other0, - _ => false, - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for Generics {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for Generics { - fn eq(&self, other: &Self) -> bool { - self.lt_token == other.lt_token && self.params == other.params - && self.gt_token == other.gt_token && self.where_clause == other.where_clause - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ImplItem {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ImplItem { - fn eq(&self, other: &Self) -> bool { - match (self, other) { - (ImplItem::Const(self0), ImplItem::Const(other0)) => self0 == other0, - (ImplItem::Fn(self0), ImplItem::Fn(other0)) => self0 == other0, - (ImplItem::Type(self0), ImplItem::Type(other0)) => self0 == other0, - (ImplItem::Macro(self0), ImplItem::Macro(other0)) => self0 == other0, - (ImplItem::Verbatim(self0), ImplItem::Verbatim(other0)) => { - TokenStreamHelper(self0) == TokenStreamHelper(other0) - } - _ => false, - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ImplItemConst {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ImplItemConst { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.vis == other.vis - && self.defaultness == other.defaultness && self.ident == other.ident - && self.generics == other.generics && self.ty == other.ty - && self.expr == other.expr - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ImplItemFn {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ImplItemFn { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.vis == other.vis - && self.defaultness == other.defaultness && self.sig == other.sig - && self.block == other.block - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ImplItemMacro {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ImplItemMacro { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.mac == other.mac - && self.semi_token == other.semi_token - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ImplItemType {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ImplItemType { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.vis == other.vis - && self.defaultness == other.defaultness && self.ident == other.ident - && self.generics == other.generics && self.ty == other.ty - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ImplRestriction {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ImplRestriction { - fn eq(&self, _other: &Self) -> bool { - match *self {} - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for Item {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for Item { - fn eq(&self, other: &Self) -> bool { - match (self, other) { - (Item::Const(self0), Item::Const(other0)) => self0 == other0, - (Item::Enum(self0), Item::Enum(other0)) => self0 == other0, - (Item::ExternCrate(self0), Item::ExternCrate(other0)) => self0 == other0, - (Item::Fn(self0), Item::Fn(other0)) => self0 == other0, - (Item::ForeignMod(self0), Item::ForeignMod(other0)) => self0 == other0, - (Item::Impl(self0), Item::Impl(other0)) => self0 == other0, - (Item::Macro(self0), Item::Macro(other0)) => self0 == other0, - (Item::Mod(self0), Item::Mod(other0)) => self0 == other0, - (Item::Static(self0), Item::Static(other0)) => self0 == other0, - (Item::Struct(self0), Item::Struct(other0)) => self0 == other0, - (Item::Trait(self0), Item::Trait(other0)) => self0 == other0, - (Item::TraitAlias(self0), Item::TraitAlias(other0)) => self0 == other0, - (Item::Type(self0), Item::Type(other0)) => self0 == other0, - (Item::Union(self0), Item::Union(other0)) => self0 == other0, - (Item::Use(self0), Item::Use(other0)) => self0 == other0, - (Item::Verbatim(self0), Item::Verbatim(other0)) => { - TokenStreamHelper(self0) == TokenStreamHelper(other0) - } - _ => false, - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ItemConst {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ItemConst { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.vis == other.vis && self.ident == other.ident - && self.generics == other.generics && self.ty == other.ty - && self.expr == other.expr - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ItemEnum {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ItemEnum { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.vis == other.vis && self.ident == other.ident - && self.generics == other.generics && self.variants == other.variants - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ItemExternCrate {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ItemExternCrate { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.vis == other.vis && self.ident == other.ident - && self.rename == other.rename - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ItemFn {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ItemFn { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.vis == other.vis && self.sig == other.sig - && self.block == other.block - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ItemForeignMod {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ItemForeignMod { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.unsafety == other.unsafety - && self.abi == other.abi && self.items == other.items - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ItemImpl {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ItemImpl { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.defaultness == other.defaultness - && self.unsafety == other.unsafety && self.generics == other.generics - && self.trait_ == other.trait_ && self.self_ty == other.self_ty - && self.items == other.items - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ItemMacro {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ItemMacro { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.ident == other.ident && self.mac == other.mac - && self.semi_token == other.semi_token - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ItemMod {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ItemMod { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.vis == other.vis - && self.unsafety == other.unsafety && self.ident == other.ident - && self.content == other.content && self.semi == other.semi - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ItemStatic {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ItemStatic { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.vis == other.vis - && self.mutability == other.mutability && self.ident == other.ident - && self.ty == other.ty && self.expr == other.expr - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ItemStruct {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ItemStruct { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.vis == other.vis && self.ident == other.ident - && self.generics == other.generics && self.fields == other.fields - && self.semi_token == other.semi_token - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ItemTrait {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ItemTrait { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.vis == other.vis - && self.unsafety == other.unsafety && self.auto_token == other.auto_token - && self.restriction == other.restriction && self.ident == other.ident - && self.generics == other.generics && self.colon_token == other.colon_token - && self.supertraits == other.supertraits && self.items == other.items - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ItemTraitAlias {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ItemTraitAlias { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.vis == other.vis && self.ident == other.ident - && self.generics == other.generics && self.bounds == other.bounds - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ItemType {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ItemType { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.vis == other.vis && self.ident == other.ident - && self.generics == other.generics && self.ty == other.ty - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ItemUnion {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ItemUnion { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.vis == other.vis && self.ident == other.ident - && self.generics == other.generics && self.fields == other.fields - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ItemUse {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ItemUse { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.vis == other.vis - && self.leading_colon == other.leading_colon && self.tree == other.tree - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for Label {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for Label { - fn eq(&self, other: &Self) -> bool { - self.name == other.name - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for LifetimeParam {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for LifetimeParam { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.lifetime == other.lifetime - && self.colon_token == other.colon_token && self.bounds == other.bounds - } -} -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for Lit {} -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for Lit { - fn eq(&self, other: &Self) -> bool { - match (self, other) { - (Lit::Str(self0), Lit::Str(other0)) => self0 == other0, - (Lit::ByteStr(self0), Lit::ByteStr(other0)) => self0 == other0, - (Lit::Byte(self0), Lit::Byte(other0)) => self0 == other0, - (Lit::Char(self0), Lit::Char(other0)) => self0 == other0, - (Lit::Int(self0), Lit::Int(other0)) => self0 == other0, - (Lit::Float(self0), Lit::Float(other0)) => self0 == other0, - (Lit::Bool(self0), Lit::Bool(other0)) => self0 == other0, - (Lit::Verbatim(self0), Lit::Verbatim(other0)) => { - self0.to_string() == other0.to_string() - } - _ => false, - } - } -} -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for LitBool {} -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for LitBool { - fn eq(&self, other: &Self) -> bool { - self.value == other.value - } -} -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for LitByte {} -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for LitByteStr {} -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for LitChar {} -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for LitFloat {} -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for LitInt {} -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for LitStr {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for Local {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for Local { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.pat == other.pat && self.init == other.init - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for LocalInit {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for LocalInit { - fn eq(&self, other: &Self) -> bool { - self.expr == other.expr && self.diverge == other.diverge - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for Macro {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for Macro { - fn eq(&self, other: &Self) -> bool { - self.path == other.path && self.delimiter == other.delimiter - && TokenStreamHelper(&self.tokens) == TokenStreamHelper(&other.tokens) - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for MacroDelimiter {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for MacroDelimiter { - fn eq(&self, other: &Self) -> bool { - match (self, other) { - (MacroDelimiter::Paren(_), MacroDelimiter::Paren(_)) => true, - (MacroDelimiter::Brace(_), MacroDelimiter::Brace(_)) => true, - (MacroDelimiter::Bracket(_), MacroDelimiter::Bracket(_)) => true, - _ => false, - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for Meta {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for Meta { - fn eq(&self, other: &Self) -> bool { - match (self, other) { - (Meta::Path(self0), Meta::Path(other0)) => self0 == other0, - (Meta::List(self0), Meta::List(other0)) => self0 == other0, - (Meta::NameValue(self0), Meta::NameValue(other0)) => self0 == other0, - _ => false, - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for MetaList {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for MetaList { - fn eq(&self, other: &Self) -> bool { - self.path == other.path && self.delimiter == other.delimiter - && TokenStreamHelper(&self.tokens) == TokenStreamHelper(&other.tokens) - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for MetaNameValue {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for MetaNameValue { - fn eq(&self, other: &Self) -> bool { - self.path == other.path && self.value == other.value - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ParenthesizedGenericArguments {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ParenthesizedGenericArguments { - fn eq(&self, other: &Self) -> bool { - self.inputs == other.inputs && self.output == other.output - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for Pat {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for Pat { - fn eq(&self, other: &Self) -> bool { - match (self, other) { - (Pat::Const(self0), Pat::Const(other0)) => self0 == other0, - (Pat::Ident(self0), Pat::Ident(other0)) => self0 == other0, - (Pat::Lit(self0), Pat::Lit(other0)) => self0 == other0, - (Pat::Macro(self0), Pat::Macro(other0)) => self0 == other0, - (Pat::Or(self0), Pat::Or(other0)) => self0 == other0, - (Pat::Paren(self0), Pat::Paren(other0)) => self0 == other0, - (Pat::Path(self0), Pat::Path(other0)) => self0 == other0, - (Pat::Range(self0), Pat::Range(other0)) => self0 == other0, - (Pat::Reference(self0), Pat::Reference(other0)) => self0 == other0, - (Pat::Rest(self0), Pat::Rest(other0)) => self0 == other0, - (Pat::Slice(self0), Pat::Slice(other0)) => self0 == other0, - (Pat::Struct(self0), Pat::Struct(other0)) => self0 == other0, - (Pat::Tuple(self0), Pat::Tuple(other0)) => self0 == other0, - (Pat::TupleStruct(self0), Pat::TupleStruct(other0)) => self0 == other0, - (Pat::Type(self0), Pat::Type(other0)) => self0 == other0, - (Pat::Verbatim(self0), Pat::Verbatim(other0)) => { - TokenStreamHelper(self0) == TokenStreamHelper(other0) - } - (Pat::Wild(self0), Pat::Wild(other0)) => self0 == other0, - _ => false, - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for PatIdent {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for PatIdent { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.by_ref == other.by_ref - && self.mutability == other.mutability && self.ident == other.ident - && self.subpat == other.subpat - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for PatOr {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for PatOr { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.leading_vert == other.leading_vert - && self.cases == other.cases - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for PatParen {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for PatParen { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.pat == other.pat - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for PatReference {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for PatReference { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.mutability == other.mutability - && self.pat == other.pat - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for PatRest {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for PatRest { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for PatSlice {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for PatSlice { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.elems == other.elems - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for PatStruct {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for PatStruct { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.qself == other.qself && self.path == other.path - && self.fields == other.fields && self.rest == other.rest - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for PatTuple {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for PatTuple { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.elems == other.elems - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for PatTupleStruct {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for PatTupleStruct { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.qself == other.qself && self.path == other.path - && self.elems == other.elems - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for PatType {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for PatType { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.pat == other.pat && self.ty == other.ty - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for PatWild {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for PatWild { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for Path {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for Path { - fn eq(&self, other: &Self) -> bool { - self.leading_colon == other.leading_colon && self.segments == other.segments - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for PathArguments {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for PathArguments { - fn eq(&self, other: &Self) -> bool { - match (self, other) { - (PathArguments::None, PathArguments::None) => true, - ( - PathArguments::AngleBracketed(self0), - PathArguments::AngleBracketed(other0), - ) => self0 == other0, - ( - PathArguments::Parenthesized(self0), - PathArguments::Parenthesized(other0), - ) => self0 == other0, - _ => false, - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for PathSegment {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for PathSegment { - fn eq(&self, other: &Self) -> bool { - self.ident == other.ident && self.arguments == other.arguments - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for PredicateLifetime {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for PredicateLifetime { - fn eq(&self, other: &Self) -> bool { - self.lifetime == other.lifetime && self.bounds == other.bounds - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for PredicateType {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for PredicateType { - fn eq(&self, other: &Self) -> bool { - self.lifetimes == other.lifetimes && self.bounded_ty == other.bounded_ty - && self.bounds == other.bounds - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for QSelf {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for QSelf { - fn eq(&self, other: &Self) -> bool { - self.ty == other.ty && self.position == other.position - && self.as_token == other.as_token - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for RangeLimits {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for RangeLimits { - fn eq(&self, other: &Self) -> bool { - match (self, other) { - (RangeLimits::HalfOpen(_), RangeLimits::HalfOpen(_)) => true, - (RangeLimits::Closed(_), RangeLimits::Closed(_)) => true, - _ => false, - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for Receiver {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for Receiver { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.reference == other.reference - && self.mutability == other.mutability - && self.colon_token == other.colon_token && self.ty == other.ty - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for ReturnType {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for ReturnType { - fn eq(&self, other: &Self) -> bool { - match (self, other) { - (ReturnType::Default, ReturnType::Default) => true, - (ReturnType::Type(_, self1), ReturnType::Type(_, other1)) => self1 == other1, - _ => false, - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for Signature {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for Signature { - fn eq(&self, other: &Self) -> bool { - self.constness == other.constness && self.asyncness == other.asyncness - && self.unsafety == other.unsafety && self.abi == other.abi - && self.ident == other.ident && self.generics == other.generics - && self.inputs == other.inputs && self.variadic == other.variadic - && self.output == other.output - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for StaticMutability {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for StaticMutability { - fn eq(&self, other: &Self) -> bool { - match (self, other) { - (StaticMutability::Mut(_), StaticMutability::Mut(_)) => true, - (StaticMutability::None, StaticMutability::None) => true, - _ => false, - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for Stmt {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for Stmt { - fn eq(&self, other: &Self) -> bool { - match (self, other) { - (Stmt::Local(self0), Stmt::Local(other0)) => self0 == other0, - (Stmt::Item(self0), Stmt::Item(other0)) => self0 == other0, - (Stmt::Expr(self0, self1), Stmt::Expr(other0, other1)) => { - self0 == other0 && self1 == other1 - } - (Stmt::Macro(self0), Stmt::Macro(other0)) => self0 == other0, - _ => false, - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for StmtMacro {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for StmtMacro { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.mac == other.mac - && self.semi_token == other.semi_token - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for TraitBound {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for TraitBound { - fn eq(&self, other: &Self) -> bool { - self.paren_token == other.paren_token && self.modifier == other.modifier - && self.lifetimes == other.lifetimes && self.path == other.path - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for TraitBoundModifier {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for TraitBoundModifier { - fn eq(&self, other: &Self) -> bool { - match (self, other) { - (TraitBoundModifier::None, TraitBoundModifier::None) => true, - (TraitBoundModifier::Maybe(_), TraitBoundModifier::Maybe(_)) => true, - _ => false, - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for TraitItem {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for TraitItem { - fn eq(&self, other: &Self) -> bool { - match (self, other) { - (TraitItem::Const(self0), TraitItem::Const(other0)) => self0 == other0, - (TraitItem::Fn(self0), TraitItem::Fn(other0)) => self0 == other0, - (TraitItem::Type(self0), TraitItem::Type(other0)) => self0 == other0, - (TraitItem::Macro(self0), TraitItem::Macro(other0)) => self0 == other0, - (TraitItem::Verbatim(self0), TraitItem::Verbatim(other0)) => { - TokenStreamHelper(self0) == TokenStreamHelper(other0) - } - _ => false, - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for TraitItemConst {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for TraitItemConst { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.ident == other.ident - && self.generics == other.generics && self.ty == other.ty - && self.default == other.default - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for TraitItemFn {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for TraitItemFn { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.sig == other.sig - && self.default == other.default && self.semi_token == other.semi_token - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for TraitItemMacro {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for TraitItemMacro { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.mac == other.mac - && self.semi_token == other.semi_token - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for TraitItemType {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for TraitItemType { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.ident == other.ident - && self.generics == other.generics && self.colon_token == other.colon_token - && self.bounds == other.bounds && self.default == other.default - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for Type {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for Type { - fn eq(&self, other: &Self) -> bool { - match (self, other) { - (Type::Array(self0), Type::Array(other0)) => self0 == other0, - (Type::BareFn(self0), Type::BareFn(other0)) => self0 == other0, - (Type::Group(self0), Type::Group(other0)) => self0 == other0, - (Type::ImplTrait(self0), Type::ImplTrait(other0)) => self0 == other0, - (Type::Infer(self0), Type::Infer(other0)) => self0 == other0, - (Type::Macro(self0), Type::Macro(other0)) => self0 == other0, - (Type::Never(self0), Type::Never(other0)) => self0 == other0, - (Type::Paren(self0), Type::Paren(other0)) => self0 == other0, - (Type::Path(self0), Type::Path(other0)) => self0 == other0, - (Type::Ptr(self0), Type::Ptr(other0)) => self0 == other0, - (Type::Reference(self0), Type::Reference(other0)) => self0 == other0, - (Type::Slice(self0), Type::Slice(other0)) => self0 == other0, - (Type::TraitObject(self0), Type::TraitObject(other0)) => self0 == other0, - (Type::Tuple(self0), Type::Tuple(other0)) => self0 == other0, - (Type::Verbatim(self0), Type::Verbatim(other0)) => { - TokenStreamHelper(self0) == TokenStreamHelper(other0) - } - _ => false, - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for TypeArray {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for TypeArray { - fn eq(&self, other: &Self) -> bool { - self.elem == other.elem && self.len == other.len - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for TypeBareFn {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for TypeBareFn { - fn eq(&self, other: &Self) -> bool { - self.lifetimes == other.lifetimes && self.unsafety == other.unsafety - && self.abi == other.abi && self.inputs == other.inputs - && self.variadic == other.variadic && self.output == other.output - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for TypeGroup {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for TypeGroup { - fn eq(&self, other: &Self) -> bool { - self.elem == other.elem - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for TypeImplTrait {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for TypeImplTrait { - fn eq(&self, other: &Self) -> bool { - self.bounds == other.bounds - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for TypeInfer {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for TypeInfer { - fn eq(&self, _other: &Self) -> bool { - true - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for TypeMacro {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for TypeMacro { - fn eq(&self, other: &Self) -> bool { - self.mac == other.mac - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for TypeNever {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for TypeNever { - fn eq(&self, _other: &Self) -> bool { - true - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for TypeParam {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for TypeParam { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.ident == other.ident - && self.colon_token == other.colon_token && self.bounds == other.bounds - && self.eq_token == other.eq_token && self.default == other.default - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for TypeParamBound {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for TypeParamBound { - fn eq(&self, other: &Self) -> bool { - match (self, other) { - (TypeParamBound::Trait(self0), TypeParamBound::Trait(other0)) => { - self0 == other0 - } - (TypeParamBound::Lifetime(self0), TypeParamBound::Lifetime(other0)) => { - self0 == other0 - } - (TypeParamBound::Verbatim(self0), TypeParamBound::Verbatim(other0)) => { - TokenStreamHelper(self0) == TokenStreamHelper(other0) - } - _ => false, - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for TypeParen {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for TypeParen { - fn eq(&self, other: &Self) -> bool { - self.elem == other.elem - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for TypePath {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for TypePath { - fn eq(&self, other: &Self) -> bool { - self.qself == other.qself && self.path == other.path - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for TypePtr {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for TypePtr { - fn eq(&self, other: &Self) -> bool { - self.const_token == other.const_token && self.mutability == other.mutability - && self.elem == other.elem - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for TypeReference {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for TypeReference { - fn eq(&self, other: &Self) -> bool { - self.lifetime == other.lifetime && self.mutability == other.mutability - && self.elem == other.elem - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for TypeSlice {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for TypeSlice { - fn eq(&self, other: &Self) -> bool { - self.elem == other.elem - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for TypeTraitObject {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for TypeTraitObject { - fn eq(&self, other: &Self) -> bool { - self.dyn_token == other.dyn_token && self.bounds == other.bounds - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for TypeTuple {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for TypeTuple { - fn eq(&self, other: &Self) -> bool { - self.elems == other.elems - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for UnOp {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for UnOp { - fn eq(&self, other: &Self) -> bool { - match (self, other) { - (UnOp::Deref(_), UnOp::Deref(_)) => true, - (UnOp::Not(_), UnOp::Not(_)) => true, - (UnOp::Neg(_), UnOp::Neg(_)) => true, - _ => false, - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for UseGlob {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for UseGlob { - fn eq(&self, _other: &Self) -> bool { - true - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for UseGroup {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for UseGroup { - fn eq(&self, other: &Self) -> bool { - self.items == other.items - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for UseName {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for UseName { - fn eq(&self, other: &Self) -> bool { - self.ident == other.ident - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for UsePath {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for UsePath { - fn eq(&self, other: &Self) -> bool { - self.ident == other.ident && self.tree == other.tree - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for UseRename {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for UseRename { - fn eq(&self, other: &Self) -> bool { - self.ident == other.ident && self.rename == other.rename - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for UseTree {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for UseTree { - fn eq(&self, other: &Self) -> bool { - match (self, other) { - (UseTree::Path(self0), UseTree::Path(other0)) => self0 == other0, - (UseTree::Name(self0), UseTree::Name(other0)) => self0 == other0, - (UseTree::Rename(self0), UseTree::Rename(other0)) => self0 == other0, - (UseTree::Glob(self0), UseTree::Glob(other0)) => self0 == other0, - (UseTree::Group(self0), UseTree::Group(other0)) => self0 == other0, - _ => false, - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for Variadic {} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for Variadic { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.pat == other.pat && self.comma == other.comma - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for Variant {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for Variant { - fn eq(&self, other: &Self) -> bool { - self.attrs == other.attrs && self.ident == other.ident - && self.fields == other.fields && self.discriminant == other.discriminant - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for VisRestricted {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for VisRestricted { - fn eq(&self, other: &Self) -> bool { - self.in_token == other.in_token && self.path == other.path - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for Visibility {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for Visibility { - fn eq(&self, other: &Self) -> bool { - match (self, other) { - (Visibility::Public(_), Visibility::Public(_)) => true, - (Visibility::Restricted(self0), Visibility::Restricted(other0)) => { - self0 == other0 - } - (Visibility::Inherited, Visibility::Inherited) => true, - _ => false, - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for WhereClause {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for WhereClause { - fn eq(&self, other: &Self) -> bool { - self.predicates == other.predicates - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Eq for WherePredicate {} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl PartialEq for WherePredicate { - fn eq(&self, other: &Self) -> bool { - match (self, other) { - (WherePredicate::Lifetime(self0), WherePredicate::Lifetime(other0)) => { - self0 == other0 - } - (WherePredicate::Type(self0), WherePredicate::Type(other0)) => { - self0 == other0 - } - _ => false, - } - } -} diff --git a/vendor/syn/src/gen/fold.rs b/vendor/syn/src/gen/fold.rs deleted file mode 100644 index 6bd058b..0000000 --- a/vendor/syn/src/gen/fold.rs +++ /dev/null @@ -1,3459 +0,0 @@ -// This file is @generated by syn-internal-codegen. -// It is not intended for manual editing. - -#![allow(unreachable_code, unused_variables)] -#![allow( - clippy::match_wildcard_for_single_variants, - clippy::needless_match, - clippy::needless_pass_by_ref_mut, -)] -#[cfg(any(feature = "full", feature = "derive"))] -use crate::gen::helper::fold::*; -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 -pub trait Fold { - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_abi(&mut self, i: Abi) -> Abi { - fold_abi(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_arm(&mut self, i: Arm) -> Arm { - fold_arm(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_assoc_const(&mut self, i: AssocConst) -> AssocConst { - fold_assoc_const(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_assoc_type(&mut self, i: AssocType) -> AssocType { - fold_assoc_type(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_attribute(&mut self, i: Attribute) -> Attribute { - fold_attribute(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_bare_variadic(&mut self, i: BareVariadic) -> BareVariadic { - fold_bare_variadic(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_bin_op(&mut self, i: BinOp) -> BinOp { - fold_bin_op(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_block(&mut self, i: Block) -> Block { - fold_block(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_constraint(&mut self, i: Constraint) -> Constraint { - fold_constraint(self, i) - } - #[cfg(feature = "derive")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "derive")))] - fn fold_data(&mut self, i: Data) -> Data { - fold_data(self, i) - } - #[cfg(feature = "derive")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "derive")))] - fn fold_data_enum(&mut self, i: DataEnum) -> DataEnum { - fold_data_enum(self, i) - } - #[cfg(feature = "derive")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "derive")))] - fn fold_data_struct(&mut self, i: DataStruct) -> DataStruct { - fold_data_struct(self, i) - } - #[cfg(feature = "derive")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "derive")))] - fn fold_data_union(&mut self, i: DataUnion) -> DataUnion { - fold_data_union(self, i) - } - #[cfg(feature = "derive")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "derive")))] - fn fold_derive_input(&mut self, i: DeriveInput) -> DeriveInput { - fold_derive_input(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_expr(&mut self, i: Expr) -> Expr { - fold_expr(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_expr_array(&mut self, i: ExprArray) -> ExprArray { - fold_expr_array(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_expr_assign(&mut self, i: ExprAssign) -> ExprAssign { - fold_expr_assign(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_expr_async(&mut self, i: ExprAsync) -> ExprAsync { - fold_expr_async(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_expr_await(&mut self, i: ExprAwait) -> ExprAwait { - fold_expr_await(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_expr_binary(&mut self, i: ExprBinary) -> ExprBinary { - fold_expr_binary(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_expr_block(&mut self, i: ExprBlock) -> ExprBlock { - fold_expr_block(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_expr_break(&mut self, i: ExprBreak) -> ExprBreak { - fold_expr_break(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_expr_cast(&mut self, i: ExprCast) -> ExprCast { - fold_expr_cast(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_expr_closure(&mut self, i: ExprClosure) -> ExprClosure { - fold_expr_closure(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_expr_const(&mut self, i: ExprConst) -> ExprConst { - fold_expr_const(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_expr_continue(&mut self, i: ExprContinue) -> ExprContinue { - fold_expr_continue(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_expr_field(&mut self, i: ExprField) -> ExprField { - fold_expr_field(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_expr_for_loop(&mut self, i: ExprForLoop) -> ExprForLoop { - fold_expr_for_loop(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_expr_group(&mut self, i: ExprGroup) -> ExprGroup { - fold_expr_group(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_expr_if(&mut self, i: ExprIf) -> ExprIf { - fold_expr_if(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_expr_index(&mut self, i: ExprIndex) -> ExprIndex { - fold_expr_index(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_expr_infer(&mut self, i: ExprInfer) -> ExprInfer { - fold_expr_infer(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_expr_let(&mut self, i: ExprLet) -> ExprLet { - fold_expr_let(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_expr_lit(&mut self, i: ExprLit) -> ExprLit { - fold_expr_lit(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_expr_loop(&mut self, i: ExprLoop) -> ExprLoop { - fold_expr_loop(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_expr_macro(&mut self, i: ExprMacro) -> ExprMacro { - fold_expr_macro(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_expr_match(&mut self, i: ExprMatch) -> ExprMatch { - fold_expr_match(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_expr_method_call(&mut self, i: ExprMethodCall) -> ExprMethodCall { - fold_expr_method_call(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_expr_path(&mut self, i: ExprPath) -> ExprPath { - fold_expr_path(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_expr_range(&mut self, i: ExprRange) -> ExprRange { - fold_expr_range(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_expr_reference(&mut self, i: ExprReference) -> ExprReference { - fold_expr_reference(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_expr_repeat(&mut self, i: ExprRepeat) -> ExprRepeat { - fold_expr_repeat(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_expr_return(&mut self, i: ExprReturn) -> ExprReturn { - fold_expr_return(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_expr_struct(&mut self, i: ExprStruct) -> ExprStruct { - fold_expr_struct(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_expr_try(&mut self, i: ExprTry) -> ExprTry { - fold_expr_try(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_expr_try_block(&mut self, i: ExprTryBlock) -> ExprTryBlock { - fold_expr_try_block(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_expr_tuple(&mut self, i: ExprTuple) -> ExprTuple { - fold_expr_tuple(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_expr_unary(&mut self, i: ExprUnary) -> ExprUnary { - fold_expr_unary(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_expr_unsafe(&mut self, i: ExprUnsafe) -> ExprUnsafe { - fold_expr_unsafe(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_expr_while(&mut self, i: ExprWhile) -> ExprWhile { - fold_expr_while(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_expr_yield(&mut self, i: ExprYield) -> ExprYield { - fold_expr_yield(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_field(&mut self, i: Field) -> Field { - fold_field(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_field_mutability(&mut self, i: FieldMutability) -> FieldMutability { - fold_field_mutability(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_field_pat(&mut self, i: FieldPat) -> FieldPat { - fold_field_pat(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_field_value(&mut self, i: FieldValue) -> FieldValue { - fold_field_value(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_fields(&mut self, i: Fields) -> Fields { - fold_fields(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_fields_unnamed(&mut self, i: FieldsUnnamed) -> FieldsUnnamed { - fold_fields_unnamed(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_file(&mut self, i: File) -> File { - fold_file(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_fn_arg(&mut self, i: FnArg) -> FnArg { - fold_fn_arg(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_foreign_item(&mut self, i: ForeignItem) -> ForeignItem { - fold_foreign_item(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_foreign_item_fn(&mut self, i: ForeignItemFn) -> ForeignItemFn { - fold_foreign_item_fn(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_foreign_item_macro(&mut self, i: ForeignItemMacro) -> ForeignItemMacro { - fold_foreign_item_macro(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_foreign_item_static(&mut self, i: ForeignItemStatic) -> ForeignItemStatic { - fold_foreign_item_static(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_generic_argument(&mut self, i: GenericArgument) -> GenericArgument { - fold_generic_argument(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_impl_item(&mut self, i: ImplItem) -> ImplItem { - fold_impl_item(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_impl_item_const(&mut self, i: ImplItemConst) -> ImplItemConst { - fold_impl_item_const(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_impl_item_fn(&mut self, i: ImplItemFn) -> ImplItemFn { - fold_impl_item_fn(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_impl_item_macro(&mut self, i: ImplItemMacro) -> ImplItemMacro { - fold_impl_item_macro(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_impl_item_type(&mut self, i: ImplItemType) -> ImplItemType { - fold_impl_item_type(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_impl_restriction(&mut self, i: ImplRestriction) -> ImplRestriction { - fold_impl_restriction(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_index(&mut self, i: Index) -> Index { - fold_index(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_item(&mut self, i: Item) -> Item { - fold_item(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_item_const(&mut self, i: ItemConst) -> ItemConst { - fold_item_const(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_item_enum(&mut self, i: ItemEnum) -> ItemEnum { - fold_item_enum(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_item_extern_crate(&mut self, i: ItemExternCrate) -> ItemExternCrate { - fold_item_extern_crate(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_item_fn(&mut self, i: ItemFn) -> ItemFn { - fold_item_fn(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_item_foreign_mod(&mut self, i: ItemForeignMod) -> ItemForeignMod { - fold_item_foreign_mod(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_item_impl(&mut self, i: ItemImpl) -> ItemImpl { - fold_item_impl(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_item_macro(&mut self, i: ItemMacro) -> ItemMacro { - fold_item_macro(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_item_mod(&mut self, i: ItemMod) -> ItemMod { - fold_item_mod(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_item_static(&mut self, i: ItemStatic) -> ItemStatic { - fold_item_static(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_item_struct(&mut self, i: ItemStruct) -> ItemStruct { - fold_item_struct(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_item_trait(&mut self, i: ItemTrait) -> ItemTrait { - fold_item_trait(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_item_trait_alias(&mut self, i: ItemTraitAlias) -> ItemTraitAlias { - fold_item_trait_alias(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_item_type(&mut self, i: ItemType) -> ItemType { - fold_item_type(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_item_union(&mut self, i: ItemUnion) -> ItemUnion { - fold_item_union(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_item_use(&mut self, i: ItemUse) -> ItemUse { - fold_item_use(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_lifetime_param(&mut self, i: LifetimeParam) -> LifetimeParam { - fold_lifetime_param(self, i) - } - fn fold_lit(&mut self, i: Lit) -> Lit { - fold_lit(self, i) - } - fn fold_lit_bool(&mut self, i: LitBool) -> LitBool { - fold_lit_bool(self, i) - } - fn fold_lit_byte(&mut self, i: LitByte) -> LitByte { - fold_lit_byte(self, i) - } - fn fold_lit_byte_str(&mut self, i: LitByteStr) -> LitByteStr { - fold_lit_byte_str(self, i) - } - fn fold_lit_char(&mut self, i: LitChar) -> LitChar { - fold_lit_char(self, i) - } - fn fold_lit_float(&mut self, i: LitFloat) -> LitFloat { - fold_lit_float(self, i) - } - fn fold_lit_int(&mut self, i: LitInt) -> LitInt { - fold_lit_int(self, i) - } - fn fold_lit_str(&mut self, i: LitStr) -> LitStr { - fold_lit_str(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_local(&mut self, i: Local) -> Local { - fold_local(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_local_init(&mut self, i: LocalInit) -> LocalInit { - fold_local_init(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_macro(&mut self, i: Macro) -> Macro { - fold_macro(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_member(&mut self, i: Member) -> Member { - fold_member(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_meta(&mut self, i: Meta) -> Meta { - fold_meta(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_meta_name_value(&mut self, i: MetaNameValue) -> MetaNameValue { - fold_meta_name_value(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_pat(&mut self, i: Pat) -> Pat { - fold_pat(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_pat_ident(&mut self, i: PatIdent) -> PatIdent { - fold_pat_ident(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_pat_or(&mut self, i: PatOr) -> PatOr { - fold_pat_or(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_pat_paren(&mut self, i: PatParen) -> PatParen { - fold_pat_paren(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_pat_reference(&mut self, i: PatReference) -> PatReference { - fold_pat_reference(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_pat_rest(&mut self, i: PatRest) -> PatRest { - fold_pat_rest(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_pat_slice(&mut self, i: PatSlice) -> PatSlice { - fold_pat_slice(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_pat_struct(&mut self, i: PatStruct) -> PatStruct { - fold_pat_struct(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_pat_tuple(&mut self, i: PatTuple) -> PatTuple { - fold_pat_tuple(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_pat_tuple_struct(&mut self, i: PatTupleStruct) -> PatTupleStruct { - fold_pat_tuple_struct(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_pat_type(&mut self, i: PatType) -> PatType { - fold_pat_type(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_pat_wild(&mut self, i: PatWild) -> PatWild { - fold_pat_wild(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_path(&mut self, i: Path) -> Path { - fold_path(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_qself(&mut self, i: QSelf) -> QSelf { - fold_qself(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_range_limits(&mut self, i: RangeLimits) -> RangeLimits { - fold_range_limits(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_receiver(&mut self, i: Receiver) -> Receiver { - fold_receiver(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_return_type(&mut self, i: ReturnType) -> ReturnType { - fold_return_type(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(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")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_static_mutability(&mut self, i: StaticMutability) -> StaticMutability { - fold_static_mutability(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_stmt(&mut self, i: Stmt) -> Stmt { - fold_stmt(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_stmt_macro(&mut self, i: StmtMacro) -> StmtMacro { - fold_stmt_macro(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_trait_item(&mut self, i: TraitItem) -> TraitItem { - fold_trait_item(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_trait_item_const(&mut self, i: TraitItemConst) -> TraitItemConst { - fold_trait_item_const(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_trait_item_fn(&mut self, i: TraitItemFn) -> TraitItemFn { - fold_trait_item_fn(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_trait_item_macro(&mut self, i: TraitItemMacro) -> TraitItemMacro { - fold_trait_item_macro(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_type(&mut self, i: Type) -> Type { - fold_type(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_un_op(&mut self, i: UnOp) -> UnOp { - fold_un_op(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_use_glob(&mut self, i: UseGlob) -> UseGlob { - fold_use_glob(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_use_group(&mut self, i: UseGroup) -> UseGroup { - fold_use_group(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_use_name(&mut self, i: UseName) -> UseName { - fold_use_name(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_use_path(&mut self, i: UsePath) -> UsePath { - fold_use_path(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_use_rename(&mut self, i: UseRename) -> UseRename { - fold_use_rename(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_use_tree(&mut self, i: UseTree) -> UseTree { - fold_use_tree(self, i) - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn fold_variadic(&mut self, i: Variadic) -> Variadic { - fold_variadic(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_variant(&mut self, i: Variant) -> Variant { - fold_variant(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn fold_visibility(&mut self, i: Visibility) -> Visibility { - fold_visibility(self, i) - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_abi(f: &mut F, node: Abi) -> Abi -where - F: Fold + ?Sized, -{ - Abi { - extern_token: node.extern_token, - name: (node.name).map(|it| f.fold_lit_str(it)), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_angle_bracketed_generic_arguments( - f: &mut F, - node: AngleBracketedGenericArguments, -) -> AngleBracketedGenericArguments -where - F: Fold + ?Sized, -{ - AngleBracketedGenericArguments { - colon2_token: node.colon2_token, - lt_token: node.lt_token, - args: FoldHelper::lift(node.args, |it| f.fold_generic_argument(it)), - gt_token: node.gt_token, - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_arm(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| ((it).0, Box::new(f.fold_expr(*(it).1)))), - fat_arrow_token: node.fat_arrow_token, - body: Box::new(f.fold_expr(*node.body)), - comma: node.comma, - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_assoc_const(f: &mut F, node: AssocConst) -> AssocConst -where - F: Fold + ?Sized, -{ - AssocConst { - ident: f.fold_ident(node.ident), - generics: (node.generics).map(|it| f.fold_angle_bracketed_generic_arguments(it)), - eq_token: node.eq_token, - value: f.fold_expr(node.value), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_assoc_type(f: &mut F, node: AssocType) -> AssocType -where - F: Fold + ?Sized, -{ - AssocType { - ident: f.fold_ident(node.ident), - generics: (node.generics).map(|it| f.fold_angle_bracketed_generic_arguments(it)), - eq_token: node.eq_token, - ty: f.fold_type(node.ty), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_attr_style(f: &mut F, node: AttrStyle) -> AttrStyle -where - F: Fold + ?Sized, -{ - match node { - AttrStyle::Outer => AttrStyle::Outer, - AttrStyle::Inner(_binding_0) => AttrStyle::Inner(_binding_0), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_attribute(f: &mut F, node: Attribute) -> Attribute -where - F: Fold + ?Sized, -{ - Attribute { - pound_token: node.pound_token, - style: f.fold_attr_style(node.style), - bracket_token: node.bracket_token, - meta: f.fold_meta(node.meta), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_bare_fn_arg(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), (it).1)), - ty: f.fold_type(node.ty), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_bare_variadic(f: &mut F, node: BareVariadic) -> BareVariadic -where - F: Fold + ?Sized, -{ - BareVariadic { - attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)), - name: (node.name).map(|it| (f.fold_ident((it).0), (it).1)), - dots: node.dots, - comma: node.comma, - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_bin_op(f: &mut F, node: BinOp) -> BinOp -where - F: Fold + ?Sized, -{ - match node { - BinOp::Add(_binding_0) => BinOp::Add(_binding_0), - BinOp::Sub(_binding_0) => BinOp::Sub(_binding_0), - BinOp::Mul(_binding_0) => BinOp::Mul(_binding_0), - BinOp::Div(_binding_0) => BinOp::Div(_binding_0), - BinOp::Rem(_binding_0) => BinOp::Rem(_binding_0), - BinOp::And(_binding_0) => BinOp::And(_binding_0), - BinOp::Or(_binding_0) => BinOp::Or(_binding_0), - BinOp::BitXor(_binding_0) => BinOp::BitXor(_binding_0), - BinOp::BitAnd(_binding_0) => BinOp::BitAnd(_binding_0), - BinOp::BitOr(_binding_0) => BinOp::BitOr(_binding_0), - BinOp::Shl(_binding_0) => BinOp::Shl(_binding_0), - BinOp::Shr(_binding_0) => BinOp::Shr(_binding_0), - BinOp::Eq(_binding_0) => BinOp::Eq(_binding_0), - BinOp::Lt(_binding_0) => BinOp::Lt(_binding_0), - BinOp::Le(_binding_0) => BinOp::Le(_binding_0), - BinOp::Ne(_binding_0) => BinOp::Ne(_binding_0), - BinOp::Ge(_binding_0) => BinOp::Ge(_binding_0), - BinOp::Gt(_binding_0) => BinOp::Gt(_binding_0), - BinOp::AddAssign(_binding_0) => BinOp::AddAssign(_binding_0), - BinOp::SubAssign(_binding_0) => BinOp::SubAssign(_binding_0), - BinOp::MulAssign(_binding_0) => BinOp::MulAssign(_binding_0), - BinOp::DivAssign(_binding_0) => BinOp::DivAssign(_binding_0), - BinOp::RemAssign(_binding_0) => BinOp::RemAssign(_binding_0), - BinOp::BitXorAssign(_binding_0) => BinOp::BitXorAssign(_binding_0), - BinOp::BitAndAssign(_binding_0) => BinOp::BitAndAssign(_binding_0), - BinOp::BitOrAssign(_binding_0) => BinOp::BitOrAssign(_binding_0), - BinOp::ShlAssign(_binding_0) => BinOp::ShlAssign(_binding_0), - BinOp::ShrAssign(_binding_0) => BinOp::ShrAssign(_binding_0), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_block(f: &mut F, node: Block) -> Block -where - F: Fold + ?Sized, -{ - Block { - brace_token: node.brace_token, - stmts: FoldHelper::lift(node.stmts, |it| f.fold_stmt(it)), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_bound_lifetimes(f: &mut F, node: BoundLifetimes) -> BoundLifetimes -where - F: Fold + ?Sized, -{ - BoundLifetimes { - for_token: node.for_token, - lt_token: node.lt_token, - lifetimes: FoldHelper::lift(node.lifetimes, |it| f.fold_generic_param(it)), - gt_token: node.gt_token, - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_const_param(f: &mut F, node: ConstParam) -> ConstParam -where - F: Fold + ?Sized, -{ - ConstParam { - attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)), - const_token: node.const_token, - ident: f.fold_ident(node.ident), - colon_token: node.colon_token, - ty: f.fold_type(node.ty), - eq_token: node.eq_token, - default: (node.default).map(|it| f.fold_expr(it)), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_constraint(f: &mut F, node: Constraint) -> Constraint -where - F: Fold + ?Sized, -{ - Constraint { - ident: f.fold_ident(node.ident), - generics: (node.generics).map(|it| f.fold_angle_bracketed_generic_arguments(it)), - colon_token: node.colon_token, - bounds: FoldHelper::lift(node.bounds, |it| f.fold_type_param_bound(it)), - } -} -#[cfg(feature = "derive")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "derive")))] -pub fn fold_data(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")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "derive")))] -pub fn fold_data_enum(f: &mut F, node: DataEnum) -> DataEnum -where - F: Fold + ?Sized, -{ - DataEnum { - enum_token: node.enum_token, - brace_token: node.brace_token, - variants: FoldHelper::lift(node.variants, |it| f.fold_variant(it)), - } -} -#[cfg(feature = "derive")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "derive")))] -pub fn fold_data_struct(f: &mut F, node: DataStruct) -> DataStruct -where - F: Fold + ?Sized, -{ - DataStruct { - struct_token: node.struct_token, - fields: f.fold_fields(node.fields), - semi_token: node.semi_token, - } -} -#[cfg(feature = "derive")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "derive")))] -pub fn fold_data_union(f: &mut F, node: DataUnion) -> DataUnion -where - F: Fold + ?Sized, -{ - DataUnion { - union_token: node.union_token, - fields: f.fold_fields_named(node.fields), - } -} -#[cfg(feature = "derive")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "derive")))] -pub fn fold_derive_input(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"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_expr(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::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::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::Const(_binding_0) => Expr::Const(full!(f.fold_expr_const(_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(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::Infer(_binding_0) => Expr::Infer(full!(f.fold_expr_infer(_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(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(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(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(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::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))), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_expr_array(f: &mut F, node: ExprArray) -> ExprArray -where - F: Fold + ?Sized, -{ - ExprArray { - attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)), - bracket_token: node.bracket_token, - elems: FoldHelper::lift(node.elems, |it| f.fold_expr(it)), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_expr_assign(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: node.eq_token, - right: Box::new(f.fold_expr(*node.right)), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_expr_async(f: &mut F, node: ExprAsync) -> ExprAsync -where - F: Fold + ?Sized, -{ - ExprAsync { - attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)), - async_token: node.async_token, - capture: node.capture, - block: f.fold_block(node.block), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_expr_await(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: node.dot_token, - await_token: node.await_token, - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_expr_binary(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")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_expr_block(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")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_expr_break(f: &mut F, node: ExprBreak) -> ExprBreak -where - F: Fold + ?Sized, -{ - ExprBreak { - attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)), - break_token: node.break_token, - 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"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_expr_call(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: node.paren_token, - args: FoldHelper::lift(node.args, |it| f.fold_expr(it)), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_expr_cast(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: node.as_token, - ty: Box::new(f.fold_type(*node.ty)), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_expr_closure(f: &mut F, node: ExprClosure) -> ExprClosure -where - F: Fold + ?Sized, -{ - ExprClosure { - attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)), - lifetimes: (node.lifetimes).map(|it| f.fold_bound_lifetimes(it)), - constness: node.constness, - movability: node.movability, - asyncness: node.asyncness, - capture: node.capture, - or1_token: node.or1_token, - inputs: FoldHelper::lift(node.inputs, |it| f.fold_pat(it)), - or2_token: node.or2_token, - output: f.fold_return_type(node.output), - body: Box::new(f.fold_expr(*node.body)), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_expr_const(f: &mut F, node: ExprConst) -> ExprConst -where - F: Fold + ?Sized, -{ - ExprConst { - attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)), - const_token: node.const_token, - block: f.fold_block(node.block), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_expr_continue(f: &mut F, node: ExprContinue) -> ExprContinue -where - F: Fold + ?Sized, -{ - ExprContinue { - attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)), - continue_token: node.continue_token, - label: (node.label).map(|it| f.fold_lifetime(it)), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_expr_field(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: node.dot_token, - member: f.fold_member(node.member), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_expr_for_loop(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: node.for_token, - pat: Box::new(f.fold_pat(*node.pat)), - in_token: node.in_token, - expr: Box::new(f.fold_expr(*node.expr)), - body: f.fold_block(node.body), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_expr_group(f: &mut F, node: ExprGroup) -> ExprGroup -where - F: Fold + ?Sized, -{ - ExprGroup { - attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)), - group_token: node.group_token, - expr: Box::new(f.fold_expr(*node.expr)), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_expr_if(f: &mut F, node: ExprIf) -> ExprIf -where - F: Fold + ?Sized, -{ - ExprIf { - attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)), - if_token: node.if_token, - cond: Box::new(f.fold_expr(*node.cond)), - then_branch: f.fold_block(node.then_branch), - else_branch: (node.else_branch) - .map(|it| ((it).0, Box::new(f.fold_expr(*(it).1)))), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_expr_index(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: node.bracket_token, - index: Box::new(f.fold_expr(*node.index)), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_expr_infer(f: &mut F, node: ExprInfer) -> ExprInfer -where - F: Fold + ?Sized, -{ - ExprInfer { - attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)), - underscore_token: node.underscore_token, - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_expr_let(f: &mut F, node: ExprLet) -> ExprLet -where - F: Fold + ?Sized, -{ - ExprLet { - attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)), - let_token: node.let_token, - pat: Box::new(f.fold_pat(*node.pat)), - eq_token: node.eq_token, - expr: Box::new(f.fold_expr(*node.expr)), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_expr_lit(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")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_expr_loop(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: node.loop_token, - body: f.fold_block(node.body), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_expr_macro(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")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_expr_match(f: &mut F, node: ExprMatch) -> ExprMatch -where - F: Fold + ?Sized, -{ - ExprMatch { - attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)), - match_token: node.match_token, - expr: Box::new(f.fold_expr(*node.expr)), - brace_token: node.brace_token, - arms: FoldHelper::lift(node.arms, |it| f.fold_arm(it)), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_expr_method_call(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: node.dot_token, - method: f.fold_ident(node.method), - turbofish: (node.turbofish) - .map(|it| f.fold_angle_bracketed_generic_arguments(it)), - paren_token: node.paren_token, - args: FoldHelper::lift(node.args, |it| f.fold_expr(it)), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_expr_paren(f: &mut F, node: ExprParen) -> ExprParen -where - F: Fold + ?Sized, -{ - ExprParen { - attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)), - paren_token: node.paren_token, - expr: Box::new(f.fold_expr(*node.expr)), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_expr_path(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")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_expr_range(f: &mut F, node: ExprRange) -> ExprRange -where - F: Fold + ?Sized, -{ - ExprRange { - attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)), - start: (node.start).map(|it| Box::new(f.fold_expr(*it))), - limits: f.fold_range_limits(node.limits), - end: (node.end).map(|it| Box::new(f.fold_expr(*it))), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_expr_reference(f: &mut F, node: ExprReference) -> ExprReference -where - F: Fold + ?Sized, -{ - ExprReference { - attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)), - and_token: node.and_token, - mutability: node.mutability, - expr: Box::new(f.fold_expr(*node.expr)), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_expr_repeat(f: &mut F, node: ExprRepeat) -> ExprRepeat -where - F: Fold + ?Sized, -{ - ExprRepeat { - attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)), - bracket_token: node.bracket_token, - expr: Box::new(f.fold_expr(*node.expr)), - semi_token: node.semi_token, - len: Box::new(f.fold_expr(*node.len)), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_expr_return(f: &mut F, node: ExprReturn) -> ExprReturn -where - F: Fold + ?Sized, -{ - ExprReturn { - attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)), - return_token: node.return_token, - expr: (node.expr).map(|it| Box::new(f.fold_expr(*it))), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_expr_struct(f: &mut F, node: ExprStruct) -> ExprStruct -where - F: Fold + ?Sized, -{ - ExprStruct { - 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), - brace_token: node.brace_token, - fields: FoldHelper::lift(node.fields, |it| f.fold_field_value(it)), - dot2_token: node.dot2_token, - rest: (node.rest).map(|it| Box::new(f.fold_expr(*it))), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_expr_try(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: node.question_token, - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_expr_try_block(f: &mut F, node: ExprTryBlock) -> ExprTryBlock -where - F: Fold + ?Sized, -{ - ExprTryBlock { - attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)), - try_token: node.try_token, - block: f.fold_block(node.block), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_expr_tuple(f: &mut F, node: ExprTuple) -> ExprTuple -where - F: Fold + ?Sized, -{ - ExprTuple { - attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)), - paren_token: node.paren_token, - elems: FoldHelper::lift(node.elems, |it| f.fold_expr(it)), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_expr_unary(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")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_expr_unsafe(f: &mut F, node: ExprUnsafe) -> ExprUnsafe -where - F: Fold + ?Sized, -{ - ExprUnsafe { - attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)), - unsafe_token: node.unsafe_token, - block: f.fold_block(node.block), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_expr_while(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: node.while_token, - cond: Box::new(f.fold_expr(*node.cond)), - body: f.fold_block(node.body), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_expr_yield(f: &mut F, node: ExprYield) -> ExprYield -where - F: Fold + ?Sized, -{ - ExprYield { - attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)), - yield_token: node.yield_token, - expr: (node.expr).map(|it| Box::new(f.fold_expr(*it))), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_field(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), - mutability: f.fold_field_mutability(node.mutability), - ident: (node.ident).map(|it| f.fold_ident(it)), - colon_token: node.colon_token, - ty: f.fold_type(node.ty), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_field_mutability(f: &mut F, node: FieldMutability) -> FieldMutability -where - F: Fold + ?Sized, -{ - match node { - FieldMutability::None => FieldMutability::None, - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_field_pat(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, - pat: Box::new(f.fold_pat(*node.pat)), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_field_value(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, - expr: f.fold_expr(node.expr), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_fields(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"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_fields_named(f: &mut F, node: FieldsNamed) -> FieldsNamed -where - F: Fold + ?Sized, -{ - FieldsNamed { - brace_token: node.brace_token, - named: FoldHelper::lift(node.named, |it| f.fold_field(it)), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_fields_unnamed(f: &mut F, node: FieldsUnnamed) -> FieldsUnnamed -where - F: Fold + ?Sized, -{ - FieldsUnnamed { - paren_token: node.paren_token, - unnamed: FoldHelper::lift(node.unnamed, |it| f.fold_field(it)), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_file(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")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_fn_arg(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")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_foreign_item(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), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_foreign_item_fn(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: node.semi_token, - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_foreign_item_macro(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, - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_foreign_item_static( - 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: node.static_token, - mutability: f.fold_static_mutability(node.mutability), - ident: f.fold_ident(node.ident), - colon_token: node.colon_token, - ty: Box::new(f.fold_type(*node.ty)), - semi_token: node.semi_token, - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_foreign_item_type(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: node.type_token, - ident: f.fold_ident(node.ident), - generics: f.fold_generics(node.generics), - semi_token: node.semi_token, - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_generic_argument(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::Const(_binding_0) => { - GenericArgument::Const(f.fold_expr(_binding_0)) - } - GenericArgument::AssocType(_binding_0) => { - GenericArgument::AssocType(f.fold_assoc_type(_binding_0)) - } - GenericArgument::AssocConst(_binding_0) => { - GenericArgument::AssocConst(f.fold_assoc_const(_binding_0)) - } - GenericArgument::Constraint(_binding_0) => { - GenericArgument::Constraint(f.fold_constraint(_binding_0)) - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_generic_param(f: &mut F, node: GenericParam) -> GenericParam -where - F: Fold + ?Sized, -{ - match node { - GenericParam::Lifetime(_binding_0) => { - GenericParam::Lifetime(f.fold_lifetime_param(_binding_0)) - } - GenericParam::Type(_binding_0) => { - GenericParam::Type(f.fold_type_param(_binding_0)) - } - GenericParam::Const(_binding_0) => { - GenericParam::Const(f.fold_const_param(_binding_0)) - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_generics(f: &mut F, node: Generics) -> Generics -where - F: Fold + ?Sized, -{ - Generics { - lt_token: node.lt_token, - params: FoldHelper::lift(node.params, |it| f.fold_generic_param(it)), - gt_token: node.gt_token, - where_clause: (node.where_clause).map(|it| f.fold_where_clause(it)), - } -} -pub fn fold_ident(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")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_impl_item(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::Fn(_binding_0) => ImplItem::Fn(f.fold_impl_item_fn(_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), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_impl_item_const(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, - const_token: node.const_token, - ident: f.fold_ident(node.ident), - generics: f.fold_generics(node.generics), - colon_token: node.colon_token, - ty: f.fold_type(node.ty), - eq_token: node.eq_token, - expr: f.fold_expr(node.expr), - semi_token: node.semi_token, - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_impl_item_fn(f: &mut F, node: ImplItemFn) -> ImplItemFn -where - F: Fold + ?Sized, -{ - ImplItemFn { - attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)), - vis: f.fold_visibility(node.vis), - defaultness: node.defaultness, - sig: f.fold_signature(node.sig), - block: f.fold_block(node.block), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_impl_item_macro(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, - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_impl_item_type(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, - type_token: node.type_token, - ident: f.fold_ident(node.ident), - generics: f.fold_generics(node.generics), - eq_token: node.eq_token, - ty: f.fold_type(node.ty), - semi_token: node.semi_token, - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_impl_restriction(f: &mut F, node: ImplRestriction) -> ImplRestriction -where - F: Fold + ?Sized, -{ - match node {} -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_index(f: &mut F, node: Index) -> Index -where - F: Fold + ?Sized, -{ - Index { - index: node.index, - span: f.fold_span(node.span), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_item(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::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), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_item_const(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: node.const_token, - ident: f.fold_ident(node.ident), - generics: f.fold_generics(node.generics), - colon_token: node.colon_token, - ty: Box::new(f.fold_type(*node.ty)), - eq_token: node.eq_token, - expr: Box::new(f.fold_expr(*node.expr)), - semi_token: node.semi_token, - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_item_enum(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: node.enum_token, - ident: f.fold_ident(node.ident), - generics: f.fold_generics(node.generics), - brace_token: node.brace_token, - variants: FoldHelper::lift(node.variants, |it| f.fold_variant(it)), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_item_extern_crate(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: node.extern_token, - crate_token: node.crate_token, - ident: f.fold_ident(node.ident), - rename: (node.rename).map(|it| ((it).0, f.fold_ident((it).1))), - semi_token: node.semi_token, - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_item_fn(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")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_item_foreign_mod(f: &mut F, node: ItemForeignMod) -> ItemForeignMod -where - F: Fold + ?Sized, -{ - ItemForeignMod { - attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)), - unsafety: node.unsafety, - abi: f.fold_abi(node.abi), - brace_token: node.brace_token, - items: FoldHelper::lift(node.items, |it| f.fold_foreign_item(it)), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_item_impl(f: &mut F, node: ItemImpl) -> ItemImpl -where - F: Fold + ?Sized, -{ - ItemImpl { - attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)), - defaultness: node.defaultness, - unsafety: node.unsafety, - impl_token: node.impl_token, - generics: f.fold_generics(node.generics), - trait_: (node.trait_).map(|it| ((it).0, f.fold_path((it).1), (it).2)), - self_ty: Box::new(f.fold_type(*node.self_ty)), - brace_token: node.brace_token, - items: FoldHelper::lift(node.items, |it| f.fold_impl_item(it)), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_item_macro(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, - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_item_mod(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), - unsafety: node.unsafety, - mod_token: node.mod_token, - ident: f.fold_ident(node.ident), - content: (node.content) - .map(|it| ((it).0, FoldHelper::lift((it).1, |it| f.fold_item(it)))), - semi: node.semi, - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_item_static(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: node.static_token, - mutability: f.fold_static_mutability(node.mutability), - ident: f.fold_ident(node.ident), - colon_token: node.colon_token, - ty: Box::new(f.fold_type(*node.ty)), - eq_token: node.eq_token, - expr: Box::new(f.fold_expr(*node.expr)), - semi_token: node.semi_token, - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_item_struct(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: node.struct_token, - ident: f.fold_ident(node.ident), - generics: f.fold_generics(node.generics), - fields: f.fold_fields(node.fields), - semi_token: node.semi_token, - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_item_trait(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, - auto_token: node.auto_token, - restriction: (node.restriction).map(|it| f.fold_impl_restriction(it)), - trait_token: node.trait_token, - ident: f.fold_ident(node.ident), - generics: f.fold_generics(node.generics), - colon_token: node.colon_token, - supertraits: FoldHelper::lift( - node.supertraits, - |it| f.fold_type_param_bound(it), - ), - brace_token: node.brace_token, - items: FoldHelper::lift(node.items, |it| f.fold_trait_item(it)), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_item_trait_alias(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: node.trait_token, - ident: f.fold_ident(node.ident), - generics: f.fold_generics(node.generics), - eq_token: node.eq_token, - bounds: FoldHelper::lift(node.bounds, |it| f.fold_type_param_bound(it)), - semi_token: node.semi_token, - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_item_type(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: node.type_token, - ident: f.fold_ident(node.ident), - generics: f.fold_generics(node.generics), - eq_token: node.eq_token, - ty: Box::new(f.fold_type(*node.ty)), - semi_token: node.semi_token, - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_item_union(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: node.union_token, - ident: f.fold_ident(node.ident), - generics: f.fold_generics(node.generics), - fields: f.fold_fields_named(node.fields), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_item_use(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: node.use_token, - leading_colon: node.leading_colon, - tree: f.fold_use_tree(node.tree), - semi_token: node.semi_token, - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_label(f: &mut F, node: Label) -> Label -where - F: Fold + ?Sized, -{ - Label { - name: f.fold_lifetime(node.name), - colon_token: node.colon_token, - } -} -pub fn fold_lifetime(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"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_lifetime_param(f: &mut F, node: LifetimeParam) -> LifetimeParam -where - F: Fold + ?Sized, -{ - LifetimeParam { - attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)), - lifetime: f.fold_lifetime(node.lifetime), - colon_token: node.colon_token, - bounds: FoldHelper::lift(node.bounds, |it| f.fold_lifetime(it)), - } -} -pub fn fold_lit(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), - } -} -pub fn fold_lit_bool(f: &mut F, node: LitBool) -> LitBool -where - F: Fold + ?Sized, -{ - LitBool { - value: node.value, - span: f.fold_span(node.span), - } -} -pub fn fold_lit_byte(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 -} -pub fn fold_lit_byte_str(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 -} -pub fn fold_lit_char(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 -} -pub fn fold_lit_float(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 -} -pub fn fold_lit_int(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 -} -pub fn fold_lit_str(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")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_local(f: &mut F, node: Local) -> Local -where - F: Fold + ?Sized, -{ - Local { - attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)), - let_token: node.let_token, - pat: f.fold_pat(node.pat), - init: (node.init).map(|it| f.fold_local_init(it)), - semi_token: node.semi_token, - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_local_init(f: &mut F, node: LocalInit) -> LocalInit -where - F: Fold + ?Sized, -{ - LocalInit { - eq_token: node.eq_token, - expr: Box::new(f.fold_expr(*node.expr)), - diverge: (node.diverge).map(|it| ((it).0, Box::new(f.fold_expr(*(it).1)))), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_macro(f: &mut F, node: Macro) -> Macro -where - F: Fold + ?Sized, -{ - Macro { - path: f.fold_path(node.path), - bang_token: node.bang_token, - delimiter: f.fold_macro_delimiter(node.delimiter), - tokens: node.tokens, - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_macro_delimiter(f: &mut F, node: MacroDelimiter) -> MacroDelimiter -where - F: Fold + ?Sized, -{ - match node { - MacroDelimiter::Paren(_binding_0) => MacroDelimiter::Paren(_binding_0), - MacroDelimiter::Brace(_binding_0) => MacroDelimiter::Brace(_binding_0), - MacroDelimiter::Bracket(_binding_0) => MacroDelimiter::Bracket(_binding_0), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_member(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"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_meta(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"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_meta_list(f: &mut F, node: MetaList) -> MetaList -where - F: Fold + ?Sized, -{ - MetaList { - path: f.fold_path(node.path), - delimiter: f.fold_macro_delimiter(node.delimiter), - tokens: node.tokens, - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_meta_name_value(f: &mut F, node: MetaNameValue) -> MetaNameValue -where - F: Fold + ?Sized, -{ - MetaNameValue { - path: f.fold_path(node.path), - eq_token: node.eq_token, - value: f.fold_expr(node.value), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_parenthesized_generic_arguments( - f: &mut F, - node: ParenthesizedGenericArguments, -) -> ParenthesizedGenericArguments -where - F: Fold + ?Sized, -{ - ParenthesizedGenericArguments { - paren_token: node.paren_token, - inputs: FoldHelper::lift(node.inputs, |it| f.fold_type(it)), - output: f.fold_return_type(node.output), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_pat(f: &mut F, node: Pat) -> Pat -where - F: Fold + ?Sized, -{ - match node { - Pat::Const(_binding_0) => Pat::Const(f.fold_expr_const(_binding_0)), - Pat::Ident(_binding_0) => Pat::Ident(f.fold_pat_ident(_binding_0)), - Pat::Lit(_binding_0) => Pat::Lit(f.fold_expr_lit(_binding_0)), - Pat::Macro(_binding_0) => Pat::Macro(f.fold_expr_macro(_binding_0)), - Pat::Or(_binding_0) => Pat::Or(f.fold_pat_or(_binding_0)), - Pat::Paren(_binding_0) => Pat::Paren(f.fold_pat_paren(_binding_0)), - Pat::Path(_binding_0) => Pat::Path(f.fold_expr_path(_binding_0)), - Pat::Range(_binding_0) => Pat::Range(f.fold_expr_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)), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_pat_ident(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, - mutability: node.mutability, - ident: f.fold_ident(node.ident), - subpat: (node.subpat).map(|it| ((it).0, Box::new(f.fold_pat(*(it).1)))), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_pat_or(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, - cases: FoldHelper::lift(node.cases, |it| f.fold_pat(it)), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_pat_paren(f: &mut F, node: PatParen) -> PatParen -where - F: Fold + ?Sized, -{ - PatParen { - attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)), - paren_token: node.paren_token, - pat: Box::new(f.fold_pat(*node.pat)), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_pat_reference(f: &mut F, node: PatReference) -> PatReference -where - F: Fold + ?Sized, -{ - PatReference { - attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)), - and_token: node.and_token, - mutability: node.mutability, - pat: Box::new(f.fold_pat(*node.pat)), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_pat_rest(f: &mut F, node: PatRest) -> PatRest -where - F: Fold + ?Sized, -{ - PatRest { - attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)), - dot2_token: node.dot2_token, - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_pat_slice(f: &mut F, node: PatSlice) -> PatSlice -where - F: Fold + ?Sized, -{ - PatSlice { - attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)), - bracket_token: node.bracket_token, - elems: FoldHelper::lift(node.elems, |it| f.fold_pat(it)), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_pat_struct(f: &mut F, node: PatStruct) -> PatStruct -where - F: Fold + ?Sized, -{ - PatStruct { - 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), - brace_token: node.brace_token, - fields: FoldHelper::lift(node.fields, |it| f.fold_field_pat(it)), - rest: (node.rest).map(|it| f.fold_pat_rest(it)), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_pat_tuple(f: &mut F, node: PatTuple) -> PatTuple -where - F: Fold + ?Sized, -{ - PatTuple { - attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)), - paren_token: node.paren_token, - elems: FoldHelper::lift(node.elems, |it| f.fold_pat(it)), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_pat_tuple_struct(f: &mut F, node: PatTupleStruct) -> PatTupleStruct -where - F: Fold + ?Sized, -{ - PatTupleStruct { - 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), - paren_token: node.paren_token, - elems: FoldHelper::lift(node.elems, |it| f.fold_pat(it)), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_pat_type(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: node.colon_token, - ty: Box::new(f.fold_type(*node.ty)), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_pat_wild(f: &mut F, node: PatWild) -> PatWild -where - F: Fold + ?Sized, -{ - PatWild { - attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)), - underscore_token: node.underscore_token, - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_path(f: &mut F, node: Path) -> Path -where - F: Fold + ?Sized, -{ - Path { - leading_colon: node.leading_colon, - segments: FoldHelper::lift(node.segments, |it| f.fold_path_segment(it)), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_path_arguments(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"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_path_segment(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"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_predicate_lifetime( - f: &mut F, - node: PredicateLifetime, -) -> PredicateLifetime -where - F: Fold + ?Sized, -{ - PredicateLifetime { - lifetime: f.fold_lifetime(node.lifetime), - colon_token: node.colon_token, - bounds: FoldHelper::lift(node.bounds, |it| f.fold_lifetime(it)), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_predicate_type(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: node.colon_token, - bounds: FoldHelper::lift(node.bounds, |it| f.fold_type_param_bound(it)), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_qself(f: &mut F, node: QSelf) -> QSelf -where - F: Fold + ?Sized, -{ - QSelf { - lt_token: node.lt_token, - ty: Box::new(f.fold_type(*node.ty)), - position: node.position, - as_token: node.as_token, - gt_token: node.gt_token, - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_range_limits(f: &mut F, node: RangeLimits) -> RangeLimits -where - F: Fold + ?Sized, -{ - match node { - RangeLimits::HalfOpen(_binding_0) => RangeLimits::HalfOpen(_binding_0), - RangeLimits::Closed(_binding_0) => RangeLimits::Closed(_binding_0), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_receiver(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| ((it).0, ((it).1).map(|it| f.fold_lifetime(it)))), - mutability: node.mutability, - self_token: node.self_token, - colon_token: node.colon_token, - ty: Box::new(f.fold_type(*node.ty)), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_return_type(f: &mut F, node: ReturnType) -> ReturnType -where - F: Fold + ?Sized, -{ - match node { - ReturnType::Default => ReturnType::Default, - ReturnType::Type(_binding_0, _binding_1) => { - ReturnType::Type(_binding_0, Box::new(f.fold_type(*_binding_1))) - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_signature(f: &mut F, node: Signature) -> Signature -where - F: Fold + ?Sized, -{ - Signature { - constness: node.constness, - asyncness: node.asyncness, - unsafety: node.unsafety, - abi: (node.abi).map(|it| f.fold_abi(it)), - fn_token: node.fn_token, - ident: f.fold_ident(node.ident), - generics: f.fold_generics(node.generics), - paren_token: node.paren_token, - 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: &mut F, node: Span) -> Span -where - F: Fold + ?Sized, -{ - node -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_static_mutability(f: &mut F, node: StaticMutability) -> StaticMutability -where - F: Fold + ?Sized, -{ - match node { - StaticMutability::Mut(_binding_0) => StaticMutability::Mut(_binding_0), - StaticMutability::None => StaticMutability::None, - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_stmt(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, _binding_1) => { - Stmt::Expr(f.fold_expr(_binding_0), _binding_1) - } - Stmt::Macro(_binding_0) => Stmt::Macro(f.fold_stmt_macro(_binding_0)), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_stmt_macro(f: &mut F, node: StmtMacro) -> StmtMacro -where - F: Fold + ?Sized, -{ - StmtMacro { - attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)), - mac: f.fold_macro(node.mac), - semi_token: node.semi_token, - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_trait_bound(f: &mut F, node: TraitBound) -> TraitBound -where - F: Fold + ?Sized, -{ - TraitBound { - paren_token: node.paren_token, - 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"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_trait_bound_modifier( - f: &mut F, - node: TraitBoundModifier, -) -> TraitBoundModifier -where - F: Fold + ?Sized, -{ - match node { - TraitBoundModifier::None => TraitBoundModifier::None, - TraitBoundModifier::Maybe(_binding_0) => TraitBoundModifier::Maybe(_binding_0), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_trait_item(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::Fn(_binding_0) => TraitItem::Fn(f.fold_trait_item_fn(_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), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_trait_item_const(f: &mut F, node: TraitItemConst) -> TraitItemConst -where - F: Fold + ?Sized, -{ - TraitItemConst { - attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)), - const_token: node.const_token, - ident: f.fold_ident(node.ident), - generics: f.fold_generics(node.generics), - colon_token: node.colon_token, - ty: f.fold_type(node.ty), - default: (node.default).map(|it| ((it).0, f.fold_expr((it).1))), - semi_token: node.semi_token, - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_trait_item_fn(f: &mut F, node: TraitItemFn) -> TraitItemFn -where - F: Fold + ?Sized, -{ - TraitItemFn { - 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, - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_trait_item_macro(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, - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_trait_item_type(f: &mut F, node: TraitItemType) -> TraitItemType -where - F: Fold + ?Sized, -{ - TraitItemType { - attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)), - type_token: node.type_token, - ident: f.fold_ident(node.ident), - generics: f.fold_generics(node.generics), - colon_token: node.colon_token, - bounds: FoldHelper::lift(node.bounds, |it| f.fold_type_param_bound(it)), - default: (node.default).map(|it| ((it).0, f.fold_type((it).1))), - semi_token: node.semi_token, - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_type(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), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_type_array(f: &mut F, node: TypeArray) -> TypeArray -where - F: Fold + ?Sized, -{ - TypeArray { - bracket_token: node.bracket_token, - elem: Box::new(f.fold_type(*node.elem)), - semi_token: node.semi_token, - len: f.fold_expr(node.len), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_type_bare_fn(f: &mut F, node: TypeBareFn) -> TypeBareFn -where - F: Fold + ?Sized, -{ - TypeBareFn { - lifetimes: (node.lifetimes).map(|it| f.fold_bound_lifetimes(it)), - unsafety: node.unsafety, - abi: (node.abi).map(|it| f.fold_abi(it)), - fn_token: node.fn_token, - paren_token: node.paren_token, - inputs: FoldHelper::lift(node.inputs, |it| f.fold_bare_fn_arg(it)), - variadic: (node.variadic).map(|it| f.fold_bare_variadic(it)), - output: f.fold_return_type(node.output), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_type_group(f: &mut F, node: TypeGroup) -> TypeGroup -where - F: Fold + ?Sized, -{ - TypeGroup { - group_token: node.group_token, - elem: Box::new(f.fold_type(*node.elem)), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_type_impl_trait(f: &mut F, node: TypeImplTrait) -> TypeImplTrait -where - F: Fold + ?Sized, -{ - TypeImplTrait { - impl_token: node.impl_token, - bounds: FoldHelper::lift(node.bounds, |it| f.fold_type_param_bound(it)), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_type_infer(f: &mut F, node: TypeInfer) -> TypeInfer -where - F: Fold + ?Sized, -{ - TypeInfer { - underscore_token: node.underscore_token, - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_type_macro(f: &mut F, node: TypeMacro) -> TypeMacro -where - F: Fold + ?Sized, -{ - TypeMacro { - mac: f.fold_macro(node.mac), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_type_never(f: &mut F, node: TypeNever) -> TypeNever -where - F: Fold + ?Sized, -{ - TypeNever { - bang_token: node.bang_token, - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_type_param(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, - bounds: FoldHelper::lift(node.bounds, |it| f.fold_type_param_bound(it)), - eq_token: node.eq_token, - default: (node.default).map(|it| f.fold_type(it)), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_type_param_bound(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)) - } - TypeParamBound::Verbatim(_binding_0) => TypeParamBound::Verbatim(_binding_0), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_type_paren(f: &mut F, node: TypeParen) -> TypeParen -where - F: Fold + ?Sized, -{ - TypeParen { - paren_token: node.paren_token, - elem: Box::new(f.fold_type(*node.elem)), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_type_path(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"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_type_ptr(f: &mut F, node: TypePtr) -> TypePtr -where - F: Fold + ?Sized, -{ - TypePtr { - star_token: node.star_token, - const_token: node.const_token, - mutability: node.mutability, - elem: Box::new(f.fold_type(*node.elem)), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_type_reference(f: &mut F, node: TypeReference) -> TypeReference -where - F: Fold + ?Sized, -{ - TypeReference { - and_token: node.and_token, - lifetime: (node.lifetime).map(|it| f.fold_lifetime(it)), - mutability: node.mutability, - elem: Box::new(f.fold_type(*node.elem)), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_type_slice(f: &mut F, node: TypeSlice) -> TypeSlice -where - F: Fold + ?Sized, -{ - TypeSlice { - bracket_token: node.bracket_token, - elem: Box::new(f.fold_type(*node.elem)), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_type_trait_object(f: &mut F, node: TypeTraitObject) -> TypeTraitObject -where - F: Fold + ?Sized, -{ - TypeTraitObject { - dyn_token: node.dyn_token, - bounds: FoldHelper::lift(node.bounds, |it| f.fold_type_param_bound(it)), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_type_tuple(f: &mut F, node: TypeTuple) -> TypeTuple -where - F: Fold + ?Sized, -{ - TypeTuple { - paren_token: node.paren_token, - elems: FoldHelper::lift(node.elems, |it| f.fold_type(it)), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_un_op(f: &mut F, node: UnOp) -> UnOp -where - F: Fold + ?Sized, -{ - match node { - UnOp::Deref(_binding_0) => UnOp::Deref(_binding_0), - UnOp::Not(_binding_0) => UnOp::Not(_binding_0), - UnOp::Neg(_binding_0) => UnOp::Neg(_binding_0), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_use_glob(f: &mut F, node: UseGlob) -> UseGlob -where - F: Fold + ?Sized, -{ - UseGlob { - star_token: node.star_token, - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_use_group(f: &mut F, node: UseGroup) -> UseGroup -where - F: Fold + ?Sized, -{ - UseGroup { - brace_token: node.brace_token, - items: FoldHelper::lift(node.items, |it| f.fold_use_tree(it)), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_use_name(f: &mut F, node: UseName) -> UseName -where - F: Fold + ?Sized, -{ - UseName { - ident: f.fold_ident(node.ident), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_use_path(f: &mut F, node: UsePath) -> UsePath -where - F: Fold + ?Sized, -{ - UsePath { - ident: f.fold_ident(node.ident), - colon2_token: node.colon2_token, - tree: Box::new(f.fold_use_tree(*node.tree)), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_use_rename(f: &mut F, node: UseRename) -> UseRename -where - F: Fold + ?Sized, -{ - UseRename { - ident: f.fold_ident(node.ident), - as_token: node.as_token, - rename: f.fold_ident(node.rename), - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_use_tree(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(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn fold_variadic(f: &mut F, node: Variadic) -> Variadic -where - F: Fold + ?Sized, -{ - Variadic { - attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)), - pat: (node.pat).map(|it| (Box::new(f.fold_pat(*(it).0)), (it).1)), - dots: node.dots, - comma: node.comma, - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_variant(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| ((it).0, f.fold_expr((it).1))), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_vis_restricted(f: &mut F, node: VisRestricted) -> VisRestricted -where - F: Fold + ?Sized, -{ - VisRestricted { - pub_token: node.pub_token, - paren_token: node.paren_token, - in_token: node.in_token, - path: Box::new(f.fold_path(*node.path)), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_visibility(f: &mut F, node: Visibility) -> Visibility -where - F: Fold + ?Sized, -{ - match node { - Visibility::Public(_binding_0) => Visibility::Public(_binding_0), - Visibility::Restricted(_binding_0) => { - Visibility::Restricted(f.fold_vis_restricted(_binding_0)) - } - Visibility::Inherited => Visibility::Inherited, - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_where_clause(f: &mut F, node: WhereClause) -> WhereClause -where - F: Fold + ?Sized, -{ - WhereClause { - where_token: node.where_token, - predicates: FoldHelper::lift(node.predicates, |it| f.fold_where_predicate(it)), - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn fold_where_predicate(f: &mut F, node: WherePredicate) -> WherePredicate -where - F: Fold + ?Sized, -{ - match node { - WherePredicate::Lifetime(_binding_0) => { - WherePredicate::Lifetime(f.fold_predicate_lifetime(_binding_0)) - } - WherePredicate::Type(_binding_0) => { - WherePredicate::Type(f.fold_predicate_type(_binding_0)) - } - } -} diff --git a/vendor/syn/src/gen/hash.rs b/vendor/syn/src/gen/hash.rs deleted file mode 100644 index 1c75341..0000000 --- a/vendor/syn/src/gen/hash.rs +++ /dev/null @@ -1,2804 +0,0 @@ -// This file is @generated by syn-internal-codegen. -// It is not intended for manual editing. - -#[cfg(any(feature = "derive", feature = "full"))] -use crate::tt::TokenStreamHelper; -use crate::*; -use std::hash::{Hash, Hasher}; -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for Abi { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.name.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for AngleBracketedGenericArguments { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.colon2_token.hash(state); - self.args.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for Arm { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.pat.hash(state); - self.guard.hash(state); - self.body.hash(state); - self.comma.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for AssocConst { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.ident.hash(state); - self.generics.hash(state); - self.value.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for AssocType { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.ident.hash(state); - self.generics.hash(state); - self.ty.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for AttrStyle { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - match self { - AttrStyle::Outer => { - state.write_u8(0u8); - } - AttrStyle::Inner(_) => { - state.write_u8(1u8); - } - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for Attribute { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.style.hash(state); - self.meta.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for BareFnArg { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.name.hash(state); - self.ty.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for BareVariadic { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.name.hash(state); - self.comma.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for BinOp { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - match self { - BinOp::Add(_) => { - state.write_u8(0u8); - } - BinOp::Sub(_) => { - state.write_u8(1u8); - } - BinOp::Mul(_) => { - state.write_u8(2u8); - } - BinOp::Div(_) => { - state.write_u8(3u8); - } - BinOp::Rem(_) => { - state.write_u8(4u8); - } - BinOp::And(_) => { - state.write_u8(5u8); - } - BinOp::Or(_) => { - state.write_u8(6u8); - } - BinOp::BitXor(_) => { - state.write_u8(7u8); - } - BinOp::BitAnd(_) => { - state.write_u8(8u8); - } - BinOp::BitOr(_) => { - state.write_u8(9u8); - } - BinOp::Shl(_) => { - state.write_u8(10u8); - } - BinOp::Shr(_) => { - state.write_u8(11u8); - } - BinOp::Eq(_) => { - state.write_u8(12u8); - } - BinOp::Lt(_) => { - state.write_u8(13u8); - } - BinOp::Le(_) => { - state.write_u8(14u8); - } - BinOp::Ne(_) => { - state.write_u8(15u8); - } - BinOp::Ge(_) => { - state.write_u8(16u8); - } - BinOp::Gt(_) => { - state.write_u8(17u8); - } - BinOp::AddAssign(_) => { - state.write_u8(18u8); - } - BinOp::SubAssign(_) => { - state.write_u8(19u8); - } - BinOp::MulAssign(_) => { - state.write_u8(20u8); - } - BinOp::DivAssign(_) => { - state.write_u8(21u8); - } - BinOp::RemAssign(_) => { - state.write_u8(22u8); - } - BinOp::BitXorAssign(_) => { - state.write_u8(23u8); - } - BinOp::BitAndAssign(_) => { - state.write_u8(24u8); - } - BinOp::BitOrAssign(_) => { - state.write_u8(25u8); - } - BinOp::ShlAssign(_) => { - state.write_u8(26u8); - } - BinOp::ShrAssign(_) => { - state.write_u8(27u8); - } - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for Block { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.stmts.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for BoundLifetimes { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.lifetimes.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ConstParam { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.ident.hash(state); - self.ty.hash(state); - self.eq_token.hash(state); - self.default.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for Constraint { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.ident.hash(state); - self.generics.hash(state); - self.bounds.hash(state); - } -} -#[cfg(feature = "derive")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for Data { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - match self { - Data::Struct(v0) => { - state.write_u8(0u8); - v0.hash(state); - } - Data::Enum(v0) => { - state.write_u8(1u8); - v0.hash(state); - } - Data::Union(v0) => { - state.write_u8(2u8); - v0.hash(state); - } - } - } -} -#[cfg(feature = "derive")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for DataEnum { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.variants.hash(state); - } -} -#[cfg(feature = "derive")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for DataStruct { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.fields.hash(state); - self.semi_token.hash(state); - } -} -#[cfg(feature = "derive")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for DataUnion { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.fields.hash(state); - } -} -#[cfg(feature = "derive")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for DeriveInput { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.vis.hash(state); - self.ident.hash(state); - self.generics.hash(state); - self.data.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for Expr { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - match self { - #[cfg(feature = "full")] - Expr::Array(v0) => { - state.write_u8(0u8); - v0.hash(state); - } - #[cfg(feature = "full")] - Expr::Assign(v0) => { - state.write_u8(1u8); - v0.hash(state); - } - #[cfg(feature = "full")] - Expr::Async(v0) => { - state.write_u8(2u8); - v0.hash(state); - } - #[cfg(feature = "full")] - Expr::Await(v0) => { - state.write_u8(3u8); - v0.hash(state); - } - Expr::Binary(v0) => { - state.write_u8(4u8); - v0.hash(state); - } - #[cfg(feature = "full")] - Expr::Block(v0) => { - state.write_u8(5u8); - v0.hash(state); - } - #[cfg(feature = "full")] - Expr::Break(v0) => { - state.write_u8(6u8); - v0.hash(state); - } - Expr::Call(v0) => { - state.write_u8(7u8); - v0.hash(state); - } - Expr::Cast(v0) => { - state.write_u8(8u8); - v0.hash(state); - } - #[cfg(feature = "full")] - Expr::Closure(v0) => { - state.write_u8(9u8); - v0.hash(state); - } - #[cfg(feature = "full")] - Expr::Const(v0) => { - state.write_u8(10u8); - v0.hash(state); - } - #[cfg(feature = "full")] - Expr::Continue(v0) => { - state.write_u8(11u8); - v0.hash(state); - } - Expr::Field(v0) => { - state.write_u8(12u8); - v0.hash(state); - } - #[cfg(feature = "full")] - Expr::ForLoop(v0) => { - state.write_u8(13u8); - v0.hash(state); - } - Expr::Group(v0) => { - state.write_u8(14u8); - v0.hash(state); - } - #[cfg(feature = "full")] - Expr::If(v0) => { - state.write_u8(15u8); - v0.hash(state); - } - Expr::Index(v0) => { - state.write_u8(16u8); - v0.hash(state); - } - #[cfg(feature = "full")] - Expr::Infer(v0) => { - state.write_u8(17u8); - v0.hash(state); - } - #[cfg(feature = "full")] - Expr::Let(v0) => { - state.write_u8(18u8); - v0.hash(state); - } - Expr::Lit(v0) => { - state.write_u8(19u8); - v0.hash(state); - } - #[cfg(feature = "full")] - Expr::Loop(v0) => { - state.write_u8(20u8); - v0.hash(state); - } - Expr::Macro(v0) => { - state.write_u8(21u8); - v0.hash(state); - } - #[cfg(feature = "full")] - Expr::Match(v0) => { - state.write_u8(22u8); - v0.hash(state); - } - Expr::MethodCall(v0) => { - state.write_u8(23u8); - v0.hash(state); - } - Expr::Paren(v0) => { - state.write_u8(24u8); - v0.hash(state); - } - Expr::Path(v0) => { - state.write_u8(25u8); - v0.hash(state); - } - #[cfg(feature = "full")] - Expr::Range(v0) => { - state.write_u8(26u8); - v0.hash(state); - } - Expr::Reference(v0) => { - state.write_u8(27u8); - v0.hash(state); - } - #[cfg(feature = "full")] - Expr::Repeat(v0) => { - state.write_u8(28u8); - v0.hash(state); - } - #[cfg(feature = "full")] - Expr::Return(v0) => { - state.write_u8(29u8); - v0.hash(state); - } - Expr::Struct(v0) => { - state.write_u8(30u8); - v0.hash(state); - } - #[cfg(feature = "full")] - Expr::Try(v0) => { - state.write_u8(31u8); - v0.hash(state); - } - #[cfg(feature = "full")] - Expr::TryBlock(v0) => { - state.write_u8(32u8); - v0.hash(state); - } - #[cfg(feature = "full")] - Expr::Tuple(v0) => { - state.write_u8(33u8); - v0.hash(state); - } - Expr::Unary(v0) => { - state.write_u8(34u8); - v0.hash(state); - } - #[cfg(feature = "full")] - Expr::Unsafe(v0) => { - state.write_u8(35u8); - v0.hash(state); - } - Expr::Verbatim(v0) => { - state.write_u8(36u8); - TokenStreamHelper(v0).hash(state); - } - #[cfg(feature = "full")] - Expr::While(v0) => { - state.write_u8(37u8); - v0.hash(state); - } - #[cfg(feature = "full")] - Expr::Yield(v0) => { - state.write_u8(38u8); - v0.hash(state); - } - #[cfg(not(feature = "full"))] - _ => unreachable!(), - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ExprArray { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.elems.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ExprAssign { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.left.hash(state); - self.right.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ExprAsync { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.capture.hash(state); - self.block.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ExprAwait { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.base.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ExprBinary { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.left.hash(state); - self.op.hash(state); - self.right.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ExprBlock { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.label.hash(state); - self.block.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ExprBreak { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.label.hash(state); - self.expr.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ExprCall { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.func.hash(state); - self.args.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ExprCast { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.expr.hash(state); - self.ty.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ExprClosure { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.lifetimes.hash(state); - self.constness.hash(state); - self.movability.hash(state); - self.asyncness.hash(state); - self.capture.hash(state); - self.inputs.hash(state); - self.output.hash(state); - self.body.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ExprConst { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.block.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ExprContinue { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.label.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ExprField { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.base.hash(state); - self.member.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ExprForLoop { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.label.hash(state); - self.pat.hash(state); - self.expr.hash(state); - self.body.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ExprGroup { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.expr.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ExprIf { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.cond.hash(state); - self.then_branch.hash(state); - self.else_branch.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ExprIndex { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.expr.hash(state); - self.index.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ExprInfer { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ExprLet { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.pat.hash(state); - self.expr.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ExprLit { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.lit.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ExprLoop { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.label.hash(state); - self.body.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ExprMacro { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.mac.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ExprMatch { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.expr.hash(state); - self.arms.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ExprMethodCall { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.receiver.hash(state); - self.method.hash(state); - self.turbofish.hash(state); - self.args.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ExprParen { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.expr.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ExprPath { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.qself.hash(state); - self.path.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ExprRange { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.start.hash(state); - self.limits.hash(state); - self.end.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ExprReference { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.mutability.hash(state); - self.expr.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ExprRepeat { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.expr.hash(state); - self.len.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ExprReturn { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.expr.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ExprStruct { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.qself.hash(state); - self.path.hash(state); - self.fields.hash(state); - self.dot2_token.hash(state); - self.rest.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ExprTry { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.expr.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ExprTryBlock { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.block.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ExprTuple { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.elems.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ExprUnary { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.op.hash(state); - self.expr.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ExprUnsafe { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.block.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ExprWhile { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.label.hash(state); - self.cond.hash(state); - self.body.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ExprYield { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.expr.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for Field { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.vis.hash(state); - self.mutability.hash(state); - self.ident.hash(state); - self.colon_token.hash(state); - self.ty.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for FieldMutability { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - match self { - FieldMutability::None => { - state.write_u8(0u8); - } - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for FieldPat { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.member.hash(state); - self.colon_token.hash(state); - self.pat.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for FieldValue { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.member.hash(state); - self.colon_token.hash(state); - self.expr.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for Fields { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - match self { - Fields::Named(v0) => { - state.write_u8(0u8); - v0.hash(state); - } - Fields::Unnamed(v0) => { - state.write_u8(1u8); - v0.hash(state); - } - Fields::Unit => { - state.write_u8(2u8); - } - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for FieldsNamed { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.named.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for FieldsUnnamed { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.unnamed.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for File { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.shebang.hash(state); - self.attrs.hash(state); - self.items.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for FnArg { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - match self { - FnArg::Receiver(v0) => { - state.write_u8(0u8); - v0.hash(state); - } - FnArg::Typed(v0) => { - state.write_u8(1u8); - v0.hash(state); - } - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ForeignItem { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - match self { - ForeignItem::Fn(v0) => { - state.write_u8(0u8); - v0.hash(state); - } - ForeignItem::Static(v0) => { - state.write_u8(1u8); - v0.hash(state); - } - ForeignItem::Type(v0) => { - state.write_u8(2u8); - v0.hash(state); - } - ForeignItem::Macro(v0) => { - state.write_u8(3u8); - v0.hash(state); - } - ForeignItem::Verbatim(v0) => { - state.write_u8(4u8); - TokenStreamHelper(v0).hash(state); - } - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ForeignItemFn { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.vis.hash(state); - self.sig.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ForeignItemMacro { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.mac.hash(state); - self.semi_token.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ForeignItemStatic { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.vis.hash(state); - self.mutability.hash(state); - self.ident.hash(state); - self.ty.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ForeignItemType { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.vis.hash(state); - self.ident.hash(state); - self.generics.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for GenericArgument { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - match self { - GenericArgument::Lifetime(v0) => { - state.write_u8(0u8); - v0.hash(state); - } - GenericArgument::Type(v0) => { - state.write_u8(1u8); - v0.hash(state); - } - GenericArgument::Const(v0) => { - state.write_u8(2u8); - v0.hash(state); - } - GenericArgument::AssocType(v0) => { - state.write_u8(3u8); - v0.hash(state); - } - GenericArgument::AssocConst(v0) => { - state.write_u8(4u8); - v0.hash(state); - } - GenericArgument::Constraint(v0) => { - state.write_u8(5u8); - v0.hash(state); - } - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for GenericParam { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - match self { - GenericParam::Lifetime(v0) => { - state.write_u8(0u8); - v0.hash(state); - } - GenericParam::Type(v0) => { - state.write_u8(1u8); - v0.hash(state); - } - GenericParam::Const(v0) => { - state.write_u8(2u8); - v0.hash(state); - } - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for Generics { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.lt_token.hash(state); - self.params.hash(state); - self.gt_token.hash(state); - self.where_clause.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ImplItem { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - match self { - ImplItem::Const(v0) => { - state.write_u8(0u8); - v0.hash(state); - } - ImplItem::Fn(v0) => { - state.write_u8(1u8); - v0.hash(state); - } - ImplItem::Type(v0) => { - state.write_u8(2u8); - v0.hash(state); - } - ImplItem::Macro(v0) => { - state.write_u8(3u8); - v0.hash(state); - } - ImplItem::Verbatim(v0) => { - state.write_u8(4u8); - TokenStreamHelper(v0).hash(state); - } - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ImplItemConst { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.vis.hash(state); - self.defaultness.hash(state); - self.ident.hash(state); - self.generics.hash(state); - self.ty.hash(state); - self.expr.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ImplItemFn { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.vis.hash(state); - self.defaultness.hash(state); - self.sig.hash(state); - self.block.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ImplItemMacro { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.mac.hash(state); - self.semi_token.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ImplItemType { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.vis.hash(state); - self.defaultness.hash(state); - self.ident.hash(state); - self.generics.hash(state); - self.ty.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ImplRestriction { - fn hash(&self, _state: &mut H) - where - H: Hasher, - { - match *self {} - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for Item { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - match self { - Item::Const(v0) => { - state.write_u8(0u8); - v0.hash(state); - } - Item::Enum(v0) => { - state.write_u8(1u8); - v0.hash(state); - } - Item::ExternCrate(v0) => { - state.write_u8(2u8); - v0.hash(state); - } - Item::Fn(v0) => { - state.write_u8(3u8); - v0.hash(state); - } - Item::ForeignMod(v0) => { - state.write_u8(4u8); - v0.hash(state); - } - Item::Impl(v0) => { - state.write_u8(5u8); - v0.hash(state); - } - Item::Macro(v0) => { - state.write_u8(6u8); - v0.hash(state); - } - Item::Mod(v0) => { - state.write_u8(7u8); - v0.hash(state); - } - Item::Static(v0) => { - state.write_u8(8u8); - v0.hash(state); - } - Item::Struct(v0) => { - state.write_u8(9u8); - v0.hash(state); - } - Item::Trait(v0) => { - state.write_u8(10u8); - v0.hash(state); - } - Item::TraitAlias(v0) => { - state.write_u8(11u8); - v0.hash(state); - } - Item::Type(v0) => { - state.write_u8(12u8); - v0.hash(state); - } - Item::Union(v0) => { - state.write_u8(13u8); - v0.hash(state); - } - Item::Use(v0) => { - state.write_u8(14u8); - v0.hash(state); - } - Item::Verbatim(v0) => { - state.write_u8(15u8); - TokenStreamHelper(v0).hash(state); - } - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ItemConst { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.vis.hash(state); - self.ident.hash(state); - self.generics.hash(state); - self.ty.hash(state); - self.expr.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ItemEnum { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.vis.hash(state); - self.ident.hash(state); - self.generics.hash(state); - self.variants.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ItemExternCrate { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.vis.hash(state); - self.ident.hash(state); - self.rename.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ItemFn { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.vis.hash(state); - self.sig.hash(state); - self.block.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ItemForeignMod { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.unsafety.hash(state); - self.abi.hash(state); - self.items.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ItemImpl { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.defaultness.hash(state); - self.unsafety.hash(state); - self.generics.hash(state); - self.trait_.hash(state); - self.self_ty.hash(state); - self.items.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ItemMacro { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.ident.hash(state); - self.mac.hash(state); - self.semi_token.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ItemMod { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.vis.hash(state); - self.unsafety.hash(state); - self.ident.hash(state); - self.content.hash(state); - self.semi.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ItemStatic { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.vis.hash(state); - self.mutability.hash(state); - self.ident.hash(state); - self.ty.hash(state); - self.expr.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ItemStruct { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.vis.hash(state); - self.ident.hash(state); - self.generics.hash(state); - self.fields.hash(state); - self.semi_token.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ItemTrait { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.vis.hash(state); - self.unsafety.hash(state); - self.auto_token.hash(state); - self.restriction.hash(state); - self.ident.hash(state); - self.generics.hash(state); - self.colon_token.hash(state); - self.supertraits.hash(state); - self.items.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ItemTraitAlias { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.vis.hash(state); - self.ident.hash(state); - self.generics.hash(state); - self.bounds.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ItemType { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.vis.hash(state); - self.ident.hash(state); - self.generics.hash(state); - self.ty.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ItemUnion { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.vis.hash(state); - self.ident.hash(state); - self.generics.hash(state); - self.fields.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ItemUse { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.vis.hash(state); - self.leading_colon.hash(state); - self.tree.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for Label { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.name.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for LifetimeParam { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.lifetime.hash(state); - self.colon_token.hash(state); - self.bounds.hash(state); - } -} -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for Lit { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - match self { - Lit::Str(v0) => { - state.write_u8(0u8); - v0.hash(state); - } - Lit::ByteStr(v0) => { - state.write_u8(1u8); - v0.hash(state); - } - Lit::Byte(v0) => { - state.write_u8(2u8); - v0.hash(state); - } - Lit::Char(v0) => { - state.write_u8(3u8); - v0.hash(state); - } - Lit::Int(v0) => { - state.write_u8(4u8); - v0.hash(state); - } - Lit::Float(v0) => { - state.write_u8(5u8); - v0.hash(state); - } - Lit::Bool(v0) => { - state.write_u8(6u8); - v0.hash(state); - } - Lit::Verbatim(v0) => { - state.write_u8(7u8); - v0.to_string().hash(state); - } - } - } -} -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for LitBool { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.value.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for Local { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.pat.hash(state); - self.init.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for LocalInit { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.expr.hash(state); - self.diverge.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for Macro { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.path.hash(state); - self.delimiter.hash(state); - TokenStreamHelper(&self.tokens).hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for MacroDelimiter { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - match self { - MacroDelimiter::Paren(_) => { - state.write_u8(0u8); - } - MacroDelimiter::Brace(_) => { - state.write_u8(1u8); - } - MacroDelimiter::Bracket(_) => { - state.write_u8(2u8); - } - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for Meta { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - match self { - Meta::Path(v0) => { - state.write_u8(0u8); - v0.hash(state); - } - Meta::List(v0) => { - state.write_u8(1u8); - v0.hash(state); - } - Meta::NameValue(v0) => { - state.write_u8(2u8); - v0.hash(state); - } - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for MetaList { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.path.hash(state); - self.delimiter.hash(state); - TokenStreamHelper(&self.tokens).hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for MetaNameValue { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.path.hash(state); - self.value.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ParenthesizedGenericArguments { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.inputs.hash(state); - self.output.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for Pat { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - match self { - Pat::Const(v0) => { - state.write_u8(0u8); - v0.hash(state); - } - Pat::Ident(v0) => { - state.write_u8(1u8); - v0.hash(state); - } - Pat::Lit(v0) => { - state.write_u8(2u8); - v0.hash(state); - } - Pat::Macro(v0) => { - state.write_u8(3u8); - v0.hash(state); - } - Pat::Or(v0) => { - state.write_u8(4u8); - v0.hash(state); - } - Pat::Paren(v0) => { - state.write_u8(5u8); - v0.hash(state); - } - Pat::Path(v0) => { - state.write_u8(6u8); - v0.hash(state); - } - Pat::Range(v0) => { - state.write_u8(7u8); - v0.hash(state); - } - Pat::Reference(v0) => { - state.write_u8(8u8); - v0.hash(state); - } - Pat::Rest(v0) => { - state.write_u8(9u8); - v0.hash(state); - } - Pat::Slice(v0) => { - state.write_u8(10u8); - v0.hash(state); - } - Pat::Struct(v0) => { - state.write_u8(11u8); - v0.hash(state); - } - Pat::Tuple(v0) => { - state.write_u8(12u8); - v0.hash(state); - } - Pat::TupleStruct(v0) => { - state.write_u8(13u8); - v0.hash(state); - } - Pat::Type(v0) => { - state.write_u8(14u8); - v0.hash(state); - } - Pat::Verbatim(v0) => { - state.write_u8(15u8); - TokenStreamHelper(v0).hash(state); - } - Pat::Wild(v0) => { - state.write_u8(16u8); - v0.hash(state); - } - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for PatIdent { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.by_ref.hash(state); - self.mutability.hash(state); - self.ident.hash(state); - self.subpat.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for PatOr { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.leading_vert.hash(state); - self.cases.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for PatParen { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.pat.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for PatReference { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.mutability.hash(state); - self.pat.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for PatRest { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for PatSlice { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.elems.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for PatStruct { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.qself.hash(state); - self.path.hash(state); - self.fields.hash(state); - self.rest.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for PatTuple { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.elems.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for PatTupleStruct { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.qself.hash(state); - self.path.hash(state); - self.elems.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for PatType { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.pat.hash(state); - self.ty.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for PatWild { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for Path { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.leading_colon.hash(state); - self.segments.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for PathArguments { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - match self { - PathArguments::None => { - state.write_u8(0u8); - } - PathArguments::AngleBracketed(v0) => { - state.write_u8(1u8); - v0.hash(state); - } - PathArguments::Parenthesized(v0) => { - state.write_u8(2u8); - v0.hash(state); - } - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for PathSegment { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.ident.hash(state); - self.arguments.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for PredicateLifetime { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.lifetime.hash(state); - self.bounds.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for PredicateType { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.lifetimes.hash(state); - self.bounded_ty.hash(state); - self.bounds.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for QSelf { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.ty.hash(state); - self.position.hash(state); - self.as_token.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for RangeLimits { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - match self { - RangeLimits::HalfOpen(_) => { - state.write_u8(0u8); - } - RangeLimits::Closed(_) => { - state.write_u8(1u8); - } - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for Receiver { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.reference.hash(state); - self.mutability.hash(state); - self.colon_token.hash(state); - self.ty.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for ReturnType { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - match self { - ReturnType::Default => { - state.write_u8(0u8); - } - ReturnType::Type(_, v1) => { - state.write_u8(1u8); - v1.hash(state); - } - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for Signature { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.constness.hash(state); - self.asyncness.hash(state); - self.unsafety.hash(state); - self.abi.hash(state); - self.ident.hash(state); - self.generics.hash(state); - self.inputs.hash(state); - self.variadic.hash(state); - self.output.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for StaticMutability { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - match self { - StaticMutability::Mut(_) => { - state.write_u8(0u8); - } - StaticMutability::None => { - state.write_u8(1u8); - } - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for Stmt { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - match self { - Stmt::Local(v0) => { - state.write_u8(0u8); - v0.hash(state); - } - Stmt::Item(v0) => { - state.write_u8(1u8); - v0.hash(state); - } - Stmt::Expr(v0, v1) => { - state.write_u8(2u8); - v0.hash(state); - v1.hash(state); - } - Stmt::Macro(v0) => { - state.write_u8(3u8); - v0.hash(state); - } - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for StmtMacro { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.mac.hash(state); - self.semi_token.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for TraitBound { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.paren_token.hash(state); - self.modifier.hash(state); - self.lifetimes.hash(state); - self.path.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for TraitBoundModifier { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - match self { - TraitBoundModifier::None => { - state.write_u8(0u8); - } - TraitBoundModifier::Maybe(_) => { - state.write_u8(1u8); - } - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for TraitItem { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - match self { - TraitItem::Const(v0) => { - state.write_u8(0u8); - v0.hash(state); - } - TraitItem::Fn(v0) => { - state.write_u8(1u8); - v0.hash(state); - } - TraitItem::Type(v0) => { - state.write_u8(2u8); - v0.hash(state); - } - TraitItem::Macro(v0) => { - state.write_u8(3u8); - v0.hash(state); - } - TraitItem::Verbatim(v0) => { - state.write_u8(4u8); - TokenStreamHelper(v0).hash(state); - } - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for TraitItemConst { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.ident.hash(state); - self.generics.hash(state); - self.ty.hash(state); - self.default.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for TraitItemFn { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.sig.hash(state); - self.default.hash(state); - self.semi_token.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for TraitItemMacro { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.mac.hash(state); - self.semi_token.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for TraitItemType { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.ident.hash(state); - self.generics.hash(state); - self.colon_token.hash(state); - self.bounds.hash(state); - self.default.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for Type { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - match self { - Type::Array(v0) => { - state.write_u8(0u8); - v0.hash(state); - } - Type::BareFn(v0) => { - state.write_u8(1u8); - v0.hash(state); - } - Type::Group(v0) => { - state.write_u8(2u8); - v0.hash(state); - } - Type::ImplTrait(v0) => { - state.write_u8(3u8); - v0.hash(state); - } - Type::Infer(v0) => { - state.write_u8(4u8); - v0.hash(state); - } - Type::Macro(v0) => { - state.write_u8(5u8); - v0.hash(state); - } - Type::Never(v0) => { - state.write_u8(6u8); - v0.hash(state); - } - Type::Paren(v0) => { - state.write_u8(7u8); - v0.hash(state); - } - Type::Path(v0) => { - state.write_u8(8u8); - v0.hash(state); - } - Type::Ptr(v0) => { - state.write_u8(9u8); - v0.hash(state); - } - Type::Reference(v0) => { - state.write_u8(10u8); - v0.hash(state); - } - Type::Slice(v0) => { - state.write_u8(11u8); - v0.hash(state); - } - Type::TraitObject(v0) => { - state.write_u8(12u8); - v0.hash(state); - } - Type::Tuple(v0) => { - state.write_u8(13u8); - v0.hash(state); - } - Type::Verbatim(v0) => { - state.write_u8(14u8); - TokenStreamHelper(v0).hash(state); - } - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for TypeArray { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.elem.hash(state); - self.len.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for TypeBareFn { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.lifetimes.hash(state); - self.unsafety.hash(state); - self.abi.hash(state); - self.inputs.hash(state); - self.variadic.hash(state); - self.output.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for TypeGroup { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.elem.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for TypeImplTrait { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.bounds.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for TypeInfer { - fn hash(&self, _state: &mut H) - where - H: Hasher, - {} -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for TypeMacro { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.mac.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for TypeNever { - fn hash(&self, _state: &mut H) - where - H: Hasher, - {} -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for TypeParam { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.ident.hash(state); - self.colon_token.hash(state); - self.bounds.hash(state); - self.eq_token.hash(state); - self.default.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for TypeParamBound { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - match self { - TypeParamBound::Trait(v0) => { - state.write_u8(0u8); - v0.hash(state); - } - TypeParamBound::Lifetime(v0) => { - state.write_u8(1u8); - v0.hash(state); - } - TypeParamBound::Verbatim(v0) => { - state.write_u8(2u8); - TokenStreamHelper(v0).hash(state); - } - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for TypeParen { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.elem.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for TypePath { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.qself.hash(state); - self.path.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for TypePtr { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.const_token.hash(state); - self.mutability.hash(state); - self.elem.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for TypeReference { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.lifetime.hash(state); - self.mutability.hash(state); - self.elem.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for TypeSlice { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.elem.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for TypeTraitObject { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.dyn_token.hash(state); - self.bounds.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for TypeTuple { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.elems.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for UnOp { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - match self { - UnOp::Deref(_) => { - state.write_u8(0u8); - } - UnOp::Not(_) => { - state.write_u8(1u8); - } - UnOp::Neg(_) => { - state.write_u8(2u8); - } - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for UseGlob { - fn hash(&self, _state: &mut H) - where - H: Hasher, - {} -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for UseGroup { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.items.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for UseName { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.ident.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for UsePath { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.ident.hash(state); - self.tree.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for UseRename { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.ident.hash(state); - self.rename.hash(state); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for UseTree { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - match self { - UseTree::Path(v0) => { - state.write_u8(0u8); - v0.hash(state); - } - UseTree::Name(v0) => { - state.write_u8(1u8); - v0.hash(state); - } - UseTree::Rename(v0) => { - state.write_u8(2u8); - v0.hash(state); - } - UseTree::Glob(v0) => { - state.write_u8(3u8); - v0.hash(state); - } - UseTree::Group(v0) => { - state.write_u8(4u8); - v0.hash(state); - } - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for Variadic { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.pat.hash(state); - self.comma.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for Variant { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.attrs.hash(state); - self.ident.hash(state); - self.fields.hash(state); - self.discriminant.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for VisRestricted { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.in_token.hash(state); - self.path.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for Visibility { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - match self { - Visibility::Public(_) => { - state.write_u8(0u8); - } - Visibility::Restricted(v0) => { - state.write_u8(1u8); - v0.hash(state); - } - Visibility::Inherited => { - state.write_u8(2u8); - } - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for WhereClause { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - self.predicates.hash(state); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))] -impl Hash for WherePredicate { - fn hash(&self, state: &mut H) - where - H: Hasher, - { - match self { - WherePredicate::Lifetime(v0) => { - state.write_u8(0u8); - v0.hash(state); - } - WherePredicate::Type(v0) => { - state.write_u8(1u8); - v0.hash(state); - } - } - } -} diff --git a/vendor/syn/src/gen/visit.rs b/vendor/syn/src/gen/visit.rs deleted file mode 100644 index 572e0ad..0000000 --- a/vendor/syn/src/gen/visit.rs +++ /dev/null @@ -1,3844 +0,0 @@ -// This file is @generated by syn-internal-codegen. -// It is not intended for manual editing. - -#![allow(unused_variables)] -#![allow(clippy::needless_pass_by_ref_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!() - }; -} -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 -pub trait Visit<'ast> { - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_abi(&mut self, i: &'ast Abi) { - visit_abi(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_arm(&mut self, i: &'ast Arm) { - visit_arm(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_assoc_const(&mut self, i: &'ast AssocConst) { - visit_assoc_const(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_assoc_type(&mut self, i: &'ast AssocType) { - visit_assoc_type(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_attribute(&mut self, i: &'ast Attribute) { - visit_attribute(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_bare_variadic(&mut self, i: &'ast BareVariadic) { - visit_bare_variadic(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_bin_op(&mut self, i: &'ast BinOp) { - visit_bin_op(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_block(&mut self, i: &'ast Block) { - visit_block(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_constraint(&mut self, i: &'ast Constraint) { - visit_constraint(self, i); - } - #[cfg(feature = "derive")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "derive")))] - fn visit_data(&mut self, i: &'ast Data) { - visit_data(self, i); - } - #[cfg(feature = "derive")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "derive")))] - fn visit_data_enum(&mut self, i: &'ast DataEnum) { - visit_data_enum(self, i); - } - #[cfg(feature = "derive")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "derive")))] - fn visit_data_struct(&mut self, i: &'ast DataStruct) { - visit_data_struct(self, i); - } - #[cfg(feature = "derive")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "derive")))] - fn visit_data_union(&mut self, i: &'ast DataUnion) { - visit_data_union(self, i); - } - #[cfg(feature = "derive")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "derive")))] - fn visit_derive_input(&mut self, i: &'ast DeriveInput) { - visit_derive_input(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_expr(&mut self, i: &'ast Expr) { - visit_expr(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_array(&mut self, i: &'ast ExprArray) { - visit_expr_array(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_assign(&mut self, i: &'ast ExprAssign) { - visit_expr_assign(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_async(&mut self, i: &'ast ExprAsync) { - visit_expr_async(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_await(&mut self, i: &'ast ExprAwait) { - visit_expr_await(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_expr_binary(&mut self, i: &'ast ExprBinary) { - visit_expr_binary(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_block(&mut self, i: &'ast ExprBlock) { - visit_expr_block(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_break(&mut self, i: &'ast ExprBreak) { - visit_expr_break(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_expr_cast(&mut self, i: &'ast ExprCast) { - visit_expr_cast(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_closure(&mut self, i: &'ast ExprClosure) { - visit_expr_closure(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_const(&mut self, i: &'ast ExprConst) { - visit_expr_const(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_continue(&mut self, i: &'ast ExprContinue) { - visit_expr_continue(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_expr_field(&mut self, i: &'ast ExprField) { - visit_expr_field(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_for_loop(&mut self, i: &'ast ExprForLoop) { - visit_expr_for_loop(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_expr_group(&mut self, i: &'ast ExprGroup) { - visit_expr_group(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_if(&mut self, i: &'ast ExprIf) { - visit_expr_if(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_expr_index(&mut self, i: &'ast ExprIndex) { - visit_expr_index(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_infer(&mut self, i: &'ast ExprInfer) { - visit_expr_infer(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_let(&mut self, i: &'ast ExprLet) { - visit_expr_let(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_expr_lit(&mut self, i: &'ast ExprLit) { - visit_expr_lit(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_loop(&mut self, i: &'ast ExprLoop) { - visit_expr_loop(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_expr_macro(&mut self, i: &'ast ExprMacro) { - visit_expr_macro(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_match(&mut self, i: &'ast ExprMatch) { - visit_expr_match(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_expr_method_call(&mut self, i: &'ast ExprMethodCall) { - visit_expr_method_call(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_expr_path(&mut self, i: &'ast ExprPath) { - visit_expr_path(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_range(&mut self, i: &'ast ExprRange) { - visit_expr_range(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_expr_reference(&mut self, i: &'ast ExprReference) { - visit_expr_reference(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_repeat(&mut self, i: &'ast ExprRepeat) { - visit_expr_repeat(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_return(&mut self, i: &'ast ExprReturn) { - visit_expr_return(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_expr_struct(&mut self, i: &'ast ExprStruct) { - visit_expr_struct(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_try(&mut self, i: &'ast ExprTry) { - visit_expr_try(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_try_block(&mut self, i: &'ast ExprTryBlock) { - visit_expr_try_block(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_tuple(&mut self, i: &'ast ExprTuple) { - visit_expr_tuple(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_expr_unary(&mut self, i: &'ast ExprUnary) { - visit_expr_unary(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_unsafe(&mut self, i: &'ast ExprUnsafe) { - visit_expr_unsafe(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_while(&mut self, i: &'ast ExprWhile) { - visit_expr_while(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_yield(&mut self, i: &'ast ExprYield) { - visit_expr_yield(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_field(&mut self, i: &'ast Field) { - visit_field(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_field_mutability(&mut self, i: &'ast FieldMutability) { - visit_field_mutability(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_field_pat(&mut self, i: &'ast FieldPat) { - visit_field_pat(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_field_value(&mut self, i: &'ast FieldValue) { - visit_field_value(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_fields(&mut self, i: &'ast Fields) { - visit_fields(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_fields_unnamed(&mut self, i: &'ast FieldsUnnamed) { - visit_fields_unnamed(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_file(&mut self, i: &'ast File) { - visit_file(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_fn_arg(&mut self, i: &'ast FnArg) { - visit_fn_arg(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_foreign_item(&mut self, i: &'ast ForeignItem) { - visit_foreign_item(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_foreign_item_fn(&mut self, i: &'ast ForeignItemFn) { - visit_foreign_item_fn(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_foreign_item_macro(&mut self, i: &'ast ForeignItemMacro) { - visit_foreign_item_macro(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_foreign_item_static(&mut self, i: &'ast ForeignItemStatic) { - visit_foreign_item_static(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_generic_argument(&mut self, i: &'ast GenericArgument) { - visit_generic_argument(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_impl_item(&mut self, i: &'ast ImplItem) { - visit_impl_item(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_impl_item_const(&mut self, i: &'ast ImplItemConst) { - visit_impl_item_const(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_impl_item_fn(&mut self, i: &'ast ImplItemFn) { - visit_impl_item_fn(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_impl_item_macro(&mut self, i: &'ast ImplItemMacro) { - visit_impl_item_macro(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_impl_item_type(&mut self, i: &'ast ImplItemType) { - visit_impl_item_type(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_impl_restriction(&mut self, i: &'ast ImplRestriction) { - visit_impl_restriction(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_index(&mut self, i: &'ast Index) { - visit_index(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_item(&mut self, i: &'ast Item) { - visit_item(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_item_const(&mut self, i: &'ast ItemConst) { - visit_item_const(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_item_enum(&mut self, i: &'ast ItemEnum) { - visit_item_enum(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_item_extern_crate(&mut self, i: &'ast ItemExternCrate) { - visit_item_extern_crate(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_item_fn(&mut self, i: &'ast ItemFn) { - visit_item_fn(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_item_foreign_mod(&mut self, i: &'ast ItemForeignMod) { - visit_item_foreign_mod(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_item_impl(&mut self, i: &'ast ItemImpl) { - visit_item_impl(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_item_macro(&mut self, i: &'ast ItemMacro) { - visit_item_macro(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_item_mod(&mut self, i: &'ast ItemMod) { - visit_item_mod(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_item_static(&mut self, i: &'ast ItemStatic) { - visit_item_static(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_item_struct(&mut self, i: &'ast ItemStruct) { - visit_item_struct(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_item_trait(&mut self, i: &'ast ItemTrait) { - visit_item_trait(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_item_trait_alias(&mut self, i: &'ast ItemTraitAlias) { - visit_item_trait_alias(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_item_type(&mut self, i: &'ast ItemType) { - visit_item_type(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_item_union(&mut self, i: &'ast ItemUnion) { - visit_item_union(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_item_use(&mut self, i: &'ast ItemUse) { - visit_item_use(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_lifetime_param(&mut self, i: &'ast LifetimeParam) { - visit_lifetime_param(self, i); - } - fn visit_lit(&mut self, i: &'ast Lit) { - visit_lit(self, i); - } - fn visit_lit_bool(&mut self, i: &'ast LitBool) { - visit_lit_bool(self, i); - } - fn visit_lit_byte(&mut self, i: &'ast LitByte) { - visit_lit_byte(self, i); - } - fn visit_lit_byte_str(&mut self, i: &'ast LitByteStr) { - visit_lit_byte_str(self, i); - } - fn visit_lit_char(&mut self, i: &'ast LitChar) { - visit_lit_char(self, i); - } - fn visit_lit_float(&mut self, i: &'ast LitFloat) { - visit_lit_float(self, i); - } - fn visit_lit_int(&mut self, i: &'ast LitInt) { - visit_lit_int(self, i); - } - fn visit_lit_str(&mut self, i: &'ast LitStr) { - visit_lit_str(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_local(&mut self, i: &'ast Local) { - visit_local(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_local_init(&mut self, i: &'ast LocalInit) { - visit_local_init(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_macro(&mut self, i: &'ast Macro) { - visit_macro(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_member(&mut self, i: &'ast Member) { - visit_member(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_meta(&mut self, i: &'ast Meta) { - visit_meta(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_meta_name_value(&mut self, i: &'ast MetaNameValue) { - visit_meta_name_value(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_pat(&mut self, i: &'ast Pat) { - visit_pat(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_pat_ident(&mut self, i: &'ast PatIdent) { - visit_pat_ident(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_pat_or(&mut self, i: &'ast PatOr) { - visit_pat_or(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_pat_paren(&mut self, i: &'ast PatParen) { - visit_pat_paren(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_pat_reference(&mut self, i: &'ast PatReference) { - visit_pat_reference(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_pat_rest(&mut self, i: &'ast PatRest) { - visit_pat_rest(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_pat_slice(&mut self, i: &'ast PatSlice) { - visit_pat_slice(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_pat_struct(&mut self, i: &'ast PatStruct) { - visit_pat_struct(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_pat_tuple(&mut self, i: &'ast PatTuple) { - visit_pat_tuple(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_pat_tuple_struct(&mut self, i: &'ast PatTupleStruct) { - visit_pat_tuple_struct(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_pat_type(&mut self, i: &'ast PatType) { - visit_pat_type(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_pat_wild(&mut self, i: &'ast PatWild) { - visit_pat_wild(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_path(&mut self, i: &'ast Path) { - visit_path(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_qself(&mut self, i: &'ast QSelf) { - visit_qself(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_range_limits(&mut self, i: &'ast RangeLimits) { - visit_range_limits(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_receiver(&mut self, i: &'ast Receiver) { - visit_receiver(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_return_type(&mut self, i: &'ast ReturnType) { - visit_return_type(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(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")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_static_mutability(&mut self, i: &'ast StaticMutability) { - visit_static_mutability(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_stmt(&mut self, i: &'ast Stmt) { - visit_stmt(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_stmt_macro(&mut self, i: &'ast StmtMacro) { - visit_stmt_macro(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_trait_item(&mut self, i: &'ast TraitItem) { - visit_trait_item(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_trait_item_const(&mut self, i: &'ast TraitItemConst) { - visit_trait_item_const(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_trait_item_fn(&mut self, i: &'ast TraitItemFn) { - visit_trait_item_fn(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_trait_item_macro(&mut self, i: &'ast TraitItemMacro) { - visit_trait_item_macro(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_type(&mut self, i: &'ast Type) { - visit_type(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_un_op(&mut self, i: &'ast UnOp) { - visit_un_op(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_use_glob(&mut self, i: &'ast UseGlob) { - visit_use_glob(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_use_group(&mut self, i: &'ast UseGroup) { - visit_use_group(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_use_name(&mut self, i: &'ast UseName) { - visit_use_name(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_use_path(&mut self, i: &'ast UsePath) { - visit_use_path(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_use_rename(&mut self, i: &'ast UseRename) { - visit_use_rename(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_use_tree(&mut self, i: &'ast UseTree) { - visit_use_tree(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_variadic(&mut self, i: &'ast Variadic) { - visit_variadic(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_variant(&mut self, i: &'ast Variant) { - visit_variant(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_visibility(&mut self, i: &'ast Visibility) { - visit_visibility(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_abi<'ast, V>(v: &mut V, node: &'ast Abi) -where - V: Visit<'ast> + ?Sized, -{ - skip!(node.extern_token); - if let Some(it) = &node.name { - v.visit_lit_str(it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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, -{ - skip!(node.colon2_token); - skip!(node.lt_token); - for el in Punctuated::pairs(&node.args) { - let it = el.value(); - v.visit_generic_argument(it); - } - skip!(node.gt_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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 { - skip!((it).0); - v.visit_expr(&*(it).1); - } - skip!(node.fat_arrow_token); - v.visit_expr(&*node.body); - skip!(node.comma); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_assoc_const<'ast, V>(v: &mut V, node: &'ast AssocConst) -where - V: Visit<'ast> + ?Sized, -{ - v.visit_ident(&node.ident); - if let Some(it) = &node.generics { - v.visit_angle_bracketed_generic_arguments(it); - } - skip!(node.eq_token); - v.visit_expr(&node.value); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_assoc_type<'ast, V>(v: &mut V, node: &'ast AssocType) -where - V: Visit<'ast> + ?Sized, -{ - v.visit_ident(&node.ident); - if let Some(it) = &node.generics { - v.visit_angle_bracketed_generic_arguments(it); - } - skip!(node.eq_token); - v.visit_type(&node.ty); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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) => { - skip!(_binding_0); - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_attribute<'ast, V>(v: &mut V, node: &'ast Attribute) -where - V: Visit<'ast> + ?Sized, -{ - skip!(node.pound_token); - v.visit_attr_style(&node.style); - skip!(node.bracket_token); - v.visit_meta(&node.meta); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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); - skip!((it).1); - } - v.visit_type(&node.ty); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_bare_variadic<'ast, V>(v: &mut V, node: &'ast BareVariadic) -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); - skip!((it).1); - } - skip!(node.dots); - skip!(node.comma); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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) => { - skip!(_binding_0); - } - BinOp::Sub(_binding_0) => { - skip!(_binding_0); - } - BinOp::Mul(_binding_0) => { - skip!(_binding_0); - } - BinOp::Div(_binding_0) => { - skip!(_binding_0); - } - BinOp::Rem(_binding_0) => { - skip!(_binding_0); - } - BinOp::And(_binding_0) => { - skip!(_binding_0); - } - BinOp::Or(_binding_0) => { - skip!(_binding_0); - } - BinOp::BitXor(_binding_0) => { - skip!(_binding_0); - } - BinOp::BitAnd(_binding_0) => { - skip!(_binding_0); - } - BinOp::BitOr(_binding_0) => { - skip!(_binding_0); - } - BinOp::Shl(_binding_0) => { - skip!(_binding_0); - } - BinOp::Shr(_binding_0) => { - skip!(_binding_0); - } - BinOp::Eq(_binding_0) => { - skip!(_binding_0); - } - BinOp::Lt(_binding_0) => { - skip!(_binding_0); - } - BinOp::Le(_binding_0) => { - skip!(_binding_0); - } - BinOp::Ne(_binding_0) => { - skip!(_binding_0); - } - BinOp::Ge(_binding_0) => { - skip!(_binding_0); - } - BinOp::Gt(_binding_0) => { - skip!(_binding_0); - } - BinOp::AddAssign(_binding_0) => { - skip!(_binding_0); - } - BinOp::SubAssign(_binding_0) => { - skip!(_binding_0); - } - BinOp::MulAssign(_binding_0) => { - skip!(_binding_0); - } - BinOp::DivAssign(_binding_0) => { - skip!(_binding_0); - } - BinOp::RemAssign(_binding_0) => { - skip!(_binding_0); - } - BinOp::BitXorAssign(_binding_0) => { - skip!(_binding_0); - } - BinOp::BitAndAssign(_binding_0) => { - skip!(_binding_0); - } - BinOp::BitOrAssign(_binding_0) => { - skip!(_binding_0); - } - BinOp::ShlAssign(_binding_0) => { - skip!(_binding_0); - } - BinOp::ShrAssign(_binding_0) => { - skip!(_binding_0); - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_block<'ast, V>(v: &mut V, node: &'ast Block) -where - V: Visit<'ast> + ?Sized, -{ - skip!(node.brace_token); - for it in &node.stmts { - v.visit_stmt(it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_bound_lifetimes<'ast, V>(v: &mut V, node: &'ast BoundLifetimes) -where - V: Visit<'ast> + ?Sized, -{ - skip!(node.for_token); - skip!(node.lt_token); - for el in Punctuated::pairs(&node.lifetimes) { - let it = el.value(); - v.visit_generic_param(it); - } - skip!(node.gt_token); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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); - } - skip!(node.const_token); - v.visit_ident(&node.ident); - skip!(node.colon_token); - v.visit_type(&node.ty); - skip!(node.eq_token); - if let Some(it) = &node.default { - v.visit_expr(it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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); - if let Some(it) = &node.generics { - v.visit_angle_bracketed_generic_arguments(it); - } - skip!(node.colon_token); - for el in Punctuated::pairs(&node.bounds) { - let it = el.value(); - v.visit_type_param_bound(it); - } -} -#[cfg(feature = "derive")] -#[cfg_attr(doc_cfg, doc(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")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "derive")))] -pub fn visit_data_enum<'ast, V>(v: &mut V, node: &'ast DataEnum) -where - V: Visit<'ast> + ?Sized, -{ - skip!(node.enum_token); - skip!(node.brace_token); - for el in Punctuated::pairs(&node.variants) { - let it = el.value(); - v.visit_variant(it); - } -} -#[cfg(feature = "derive")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "derive")))] -pub fn visit_data_struct<'ast, V>(v: &mut V, node: &'ast DataStruct) -where - V: Visit<'ast> + ?Sized, -{ - skip!(node.struct_token); - v.visit_fields(&node.fields); - skip!(node.semi_token); -} -#[cfg(feature = "derive")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "derive")))] -pub fn visit_data_union<'ast, V>(v: &mut V, node: &'ast DataUnion) -where - V: Visit<'ast> + ?Sized, -{ - skip!(node.union_token); - v.visit_fields_named(&node.fields); -} -#[cfg(feature = "derive")] -#[cfg_attr(doc_cfg, doc(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"))] -#[cfg_attr(doc_cfg, doc(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::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::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::Const(_binding_0) => { - full!(v.visit_expr_const(_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) => { - 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::Infer(_binding_0) => { - full!(v.visit_expr_infer(_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) => { - v.visit_expr_macro(_binding_0); - } - Expr::Match(_binding_0) => { - full!(v.visit_expr_match(_binding_0)); - } - Expr::MethodCall(_binding_0) => { - 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) => { - 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) => { - 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::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)); - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - } - skip!(node.bracket_token); - for el in Punctuated::pairs(&node.elems) { - let it = el.value(); - v.visit_expr(it); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - skip!(node.eq_token); - v.visit_expr(&*node.right); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - } - skip!(node.async_token); - skip!(node.capture); - v.visit_block(&node.block); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - skip!(node.dot_token); - skip!(node.await_token); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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")] -#[cfg_attr(doc_cfg, doc(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")] -#[cfg_attr(doc_cfg, doc(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); - } - skip!(node.break_token); - 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"))] -#[cfg_attr(doc_cfg, doc(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); - skip!(node.paren_token); - for el in Punctuated::pairs(&node.args) { - let it = el.value(); - v.visit_expr(it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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); - skip!(node.as_token); - v.visit_type(&*node.ty); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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.lifetimes { - v.visit_bound_lifetimes(it); - } - skip!(node.constness); - skip!(node.movability); - skip!(node.asyncness); - skip!(node.capture); - skip!(node.or1_token); - for el in Punctuated::pairs(&node.inputs) { - let it = el.value(); - v.visit_pat(it); - } - skip!(node.or2_token); - v.visit_return_type(&node.output); - v.visit_expr(&*node.body); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_expr_const<'ast, V>(v: &mut V, node: &'ast ExprConst) -where - V: Visit<'ast> + ?Sized, -{ - for it in &node.attrs { - v.visit_attribute(it); - } - skip!(node.const_token); - v.visit_block(&node.block); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - } - skip!(node.continue_token); - if let Some(it) = &node.label { - v.visit_lifetime(it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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); - skip!(node.dot_token); - v.visit_member(&node.member); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - } - skip!(node.for_token); - v.visit_pat(&*node.pat); - skip!(node.in_token); - v.visit_expr(&*node.expr); - v.visit_block(&node.body); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", 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); - } - skip!(node.group_token); - v.visit_expr(&*node.expr); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - } - skip!(node.if_token); - v.visit_expr(&*node.cond); - v.visit_block(&node.then_branch); - if let Some(it) = &node.else_branch { - skip!((it).0); - v.visit_expr(&*(it).1); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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); - skip!(node.bracket_token); - v.visit_expr(&*node.index); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_expr_infer<'ast, V>(v: &mut V, node: &'ast ExprInfer) -where - V: Visit<'ast> + ?Sized, -{ - for it in &node.attrs { - v.visit_attribute(it); - } - skip!(node.underscore_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - } - skip!(node.let_token); - v.visit_pat(&*node.pat); - skip!(node.eq_token); - v.visit_expr(&*node.expr); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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")] -#[cfg_attr(doc_cfg, doc(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); - } - skip!(node.loop_token); - v.visit_block(&node.body); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", 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")] -#[cfg_attr(doc_cfg, doc(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); - } - skip!(node.match_token); - v.visit_expr(&*node.expr); - skip!(node.brace_token); - for it in &node.arms { - v.visit_arm(it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", 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); - skip!(node.dot_token); - v.visit_ident(&node.method); - if let Some(it) = &node.turbofish { - v.visit_angle_bracketed_generic_arguments(it); - } - skip!(node.paren_token); - for el in Punctuated::pairs(&node.args) { - let it = el.value(); - v.visit_expr(it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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); - } - skip!(node.paren_token); - v.visit_expr(&*node.expr); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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")] -#[cfg_attr(doc_cfg, doc(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.start { - v.visit_expr(&**it); - } - v.visit_range_limits(&node.limits); - if let Some(it) = &node.end { - v.visit_expr(&**it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", 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); - } - skip!(node.and_token); - skip!(node.mutability); - v.visit_expr(&*node.expr); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - } - skip!(node.bracket_token); - v.visit_expr(&*node.expr); - skip!(node.semi_token); - v.visit_expr(&*node.len); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - } - skip!(node.return_token); - if let Some(it) = &node.expr { - v.visit_expr(&**it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", 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); - } - if let Some(it) = &node.qself { - v.visit_qself(it); - } - v.visit_path(&node.path); - skip!(node.brace_token); - for el in Punctuated::pairs(&node.fields) { - let it = el.value(); - v.visit_field_value(it); - } - skip!(node.dot2_token); - if let Some(it) = &node.rest { - v.visit_expr(&**it); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - skip!(node.question_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - } - skip!(node.try_token); - v.visit_block(&node.block); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - } - skip!(node.paren_token); - for el in Punctuated::pairs(&node.elems) { - let it = el.value(); - v.visit_expr(it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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")] -#[cfg_attr(doc_cfg, doc(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); - } - skip!(node.unsafe_token); - v.visit_block(&node.block); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - } - skip!(node.while_token); - v.visit_expr(&*node.cond); - v.visit_block(&node.body); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - } - skip!(node.yield_token); - if let Some(it) = &node.expr { - v.visit_expr(&**it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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); - v.visit_field_mutability(&node.mutability); - if let Some(it) = &node.ident { - v.visit_ident(it); - } - skip!(node.colon_token); - v.visit_type(&node.ty); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_field_mutability<'ast, V>(v: &mut V, node: &'ast FieldMutability) -where - V: Visit<'ast> + ?Sized, -{ - match node { - FieldMutability::None => {} - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - skip!(node.colon_token); - v.visit_pat(&*node.pat); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", 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); - skip!(node.colon_token); - v.visit_expr(&node.expr); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_fields_named<'ast, V>(v: &mut V, node: &'ast FieldsNamed) -where - V: Visit<'ast> + ?Sized, -{ - skip!(node.brace_token); - for el in Punctuated::pairs(&node.named) { - let it = el.value(); - v.visit_field(it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_fields_unnamed<'ast, V>(v: &mut V, node: &'ast FieldsUnnamed) -where - V: Visit<'ast> + ?Sized, -{ - skip!(node.paren_token); - for el in Punctuated::pairs(&node.unnamed) { - let it = el.value(); - v.visit_field(it); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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")] -#[cfg_attr(doc_cfg, doc(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")] -#[cfg_attr(doc_cfg, doc(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); - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - skip!(node.semi_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - skip!(node.semi_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - skip!(node.static_token); - v.visit_static_mutability(&node.mutability); - v.visit_ident(&node.ident); - skip!(node.colon_token); - v.visit_type(&*node.ty); - skip!(node.semi_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - skip!(node.type_token); - v.visit_ident(&node.ident); - v.visit_generics(&node.generics); - skip!(node.semi_token); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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::Const(_binding_0) => { - v.visit_expr(_binding_0); - } - GenericArgument::AssocType(_binding_0) => { - v.visit_assoc_type(_binding_0); - } - GenericArgument::AssocConst(_binding_0) => { - v.visit_assoc_const(_binding_0); - } - GenericArgument::Constraint(_binding_0) => { - v.visit_constraint(_binding_0); - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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::Lifetime(_binding_0) => { - v.visit_lifetime_param(_binding_0); - } - GenericParam::Type(_binding_0) => { - v.visit_type_param(_binding_0); - } - GenericParam::Const(_binding_0) => { - v.visit_const_param(_binding_0); - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_generics<'ast, V>(v: &mut V, node: &'ast Generics) -where - V: Visit<'ast> + ?Sized, -{ - skip!(node.lt_token); - for el in Punctuated::pairs(&node.params) { - let it = el.value(); - v.visit_generic_param(it); - } - skip!(node.gt_token); - 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")] -#[cfg_attr(doc_cfg, doc(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::Fn(_binding_0) => { - v.visit_impl_item_fn(_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); - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - skip!(node.defaultness); - skip!(node.const_token); - v.visit_ident(&node.ident); - v.visit_generics(&node.generics); - skip!(node.colon_token); - v.visit_type(&node.ty); - skip!(node.eq_token); - v.visit_expr(&node.expr); - skip!(node.semi_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_impl_item_fn<'ast, V>(v: &mut V, node: &'ast ImplItemFn) -where - V: Visit<'ast> + ?Sized, -{ - for it in &node.attrs { - v.visit_attribute(it); - } - v.visit_visibility(&node.vis); - skip!(node.defaultness); - v.visit_signature(&node.sig); - v.visit_block(&node.block); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - skip!(node.semi_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - skip!(node.defaultness); - skip!(node.type_token); - v.visit_ident(&node.ident); - v.visit_generics(&node.generics); - skip!(node.eq_token); - v.visit_type(&node.ty); - skip!(node.semi_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_impl_restriction<'ast, V>(v: &mut V, node: &'ast ImplRestriction) -where - V: Visit<'ast> + ?Sized, -{ - match *node {} -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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")] -#[cfg_attr(doc_cfg, doc(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::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); - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - skip!(node.const_token); - v.visit_ident(&node.ident); - v.visit_generics(&node.generics); - skip!(node.colon_token); - v.visit_type(&*node.ty); - skip!(node.eq_token); - v.visit_expr(&*node.expr); - skip!(node.semi_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - skip!(node.enum_token); - v.visit_ident(&node.ident); - v.visit_generics(&node.generics); - skip!(node.brace_token); - for el in Punctuated::pairs(&node.variants) { - let it = el.value(); - v.visit_variant(it); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - skip!(node.extern_token); - skip!(node.crate_token); - v.visit_ident(&node.ident); - if let Some(it) = &node.rename { - skip!((it).0); - v.visit_ident(&(it).1); - } - skip!(node.semi_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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")] -#[cfg_attr(doc_cfg, doc(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); - } - skip!(node.unsafety); - v.visit_abi(&node.abi); - skip!(node.brace_token); - for it in &node.items { - v.visit_foreign_item(it); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - } - skip!(node.defaultness); - skip!(node.unsafety); - skip!(node.impl_token); - v.visit_generics(&node.generics); - if let Some(it) = &node.trait_ { - skip!((it).0); - v.visit_path(&(it).1); - skip!((it).2); - } - v.visit_type(&*node.self_ty); - skip!(node.brace_token); - for it in &node.items { - v.visit_impl_item(it); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - skip!(node.semi_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - skip!(node.unsafety); - skip!(node.mod_token); - v.visit_ident(&node.ident); - if let Some(it) = &node.content { - skip!((it).0); - for it in &(it).1 { - v.visit_item(it); - } - } - skip!(node.semi); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - skip!(node.static_token); - v.visit_static_mutability(&node.mutability); - v.visit_ident(&node.ident); - skip!(node.colon_token); - v.visit_type(&*node.ty); - skip!(node.eq_token); - v.visit_expr(&*node.expr); - skip!(node.semi_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - skip!(node.struct_token); - v.visit_ident(&node.ident); - v.visit_generics(&node.generics); - v.visit_fields(&node.fields); - skip!(node.semi_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - skip!(node.unsafety); - skip!(node.auto_token); - if let Some(it) = &node.restriction { - v.visit_impl_restriction(it); - } - skip!(node.trait_token); - v.visit_ident(&node.ident); - v.visit_generics(&node.generics); - skip!(node.colon_token); - for el in Punctuated::pairs(&node.supertraits) { - let it = el.value(); - v.visit_type_param_bound(it); - } - skip!(node.brace_token); - for it in &node.items { - v.visit_trait_item(it); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - skip!(node.trait_token); - v.visit_ident(&node.ident); - v.visit_generics(&node.generics); - skip!(node.eq_token); - for el in Punctuated::pairs(&node.bounds) { - let it = el.value(); - v.visit_type_param_bound(it); - } - skip!(node.semi_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - skip!(node.type_token); - v.visit_ident(&node.ident); - v.visit_generics(&node.generics); - skip!(node.eq_token); - v.visit_type(&*node.ty); - skip!(node.semi_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - skip!(node.union_token); - v.visit_ident(&node.ident); - v.visit_generics(&node.generics); - v.visit_fields_named(&node.fields); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - skip!(node.use_token); - skip!(node.leading_colon); - v.visit_use_tree(&node.tree); - skip!(node.semi_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - skip!(node.colon_token); -} -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"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_lifetime_param<'ast, V>(v: &mut V, node: &'ast LifetimeParam) -where - V: Visit<'ast> + ?Sized, -{ - for it in &node.attrs { - v.visit_attribute(it); - } - v.visit_lifetime(&node.lifetime); - skip!(node.colon_token); - for el in Punctuated::pairs(&node.bounds) { - let it = el.value(); - v.visit_lifetime(it); - } -} -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); - } - } -} -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); -} -pub fn visit_lit_byte<'ast, V>(v: &mut V, node: &'ast LitByte) -where - V: Visit<'ast> + ?Sized, -{} -pub fn visit_lit_byte_str<'ast, V>(v: &mut V, node: &'ast LitByteStr) -where - V: Visit<'ast> + ?Sized, -{} -pub fn visit_lit_char<'ast, V>(v: &mut V, node: &'ast LitChar) -where - V: Visit<'ast> + ?Sized, -{} -pub fn visit_lit_float<'ast, V>(v: &mut V, node: &'ast LitFloat) -where - V: Visit<'ast> + ?Sized, -{} -pub fn visit_lit_int<'ast, V>(v: &mut V, node: &'ast LitInt) -where - V: Visit<'ast> + ?Sized, -{} -pub fn visit_lit_str<'ast, V>(v: &mut V, node: &'ast LitStr) -where - V: Visit<'ast> + ?Sized, -{} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - } - skip!(node.let_token); - v.visit_pat(&node.pat); - if let Some(it) = &node.init { - v.visit_local_init(it); - } - skip!(node.semi_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_local_init<'ast, V>(v: &mut V, node: &'ast LocalInit) -where - V: Visit<'ast> + ?Sized, -{ - skip!(node.eq_token); - v.visit_expr(&*node.expr); - if let Some(it) = &node.diverge { - skip!((it).0); - v.visit_expr(&*(it).1); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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); - skip!(node.bang_token); - v.visit_macro_delimiter(&node.delimiter); - skip!(node.tokens); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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) => { - skip!(_binding_0); - } - MacroDelimiter::Brace(_binding_0) => { - skip!(_binding_0); - } - MacroDelimiter::Bracket(_binding_0) => { - skip!(_binding_0); - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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"))] -#[cfg_attr(doc_cfg, doc(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"))] -#[cfg_attr(doc_cfg, doc(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); - v.visit_macro_delimiter(&node.delimiter); - skip!(node.tokens); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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); - skip!(node.eq_token); - v.visit_expr(&node.value); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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, -{ - skip!(node.paren_token); - for el in Punctuated::pairs(&node.inputs) { - let it = el.value(); - v.visit_type(it); - } - v.visit_return_type(&node.output); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_pat<'ast, V>(v: &mut V, node: &'ast Pat) -where - V: Visit<'ast> + ?Sized, -{ - match node { - Pat::Const(_binding_0) => { - v.visit_expr_const(_binding_0); - } - Pat::Ident(_binding_0) => { - v.visit_pat_ident(_binding_0); - } - Pat::Lit(_binding_0) => { - v.visit_expr_lit(_binding_0); - } - Pat::Macro(_binding_0) => { - v.visit_expr_macro(_binding_0); - } - Pat::Or(_binding_0) => { - v.visit_pat_or(_binding_0); - } - Pat::Paren(_binding_0) => { - v.visit_pat_paren(_binding_0); - } - Pat::Path(_binding_0) => { - v.visit_expr_path(_binding_0); - } - Pat::Range(_binding_0) => { - v.visit_expr_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); - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - } - skip!(node.by_ref); - skip!(node.mutability); - v.visit_ident(&node.ident); - if let Some(it) = &node.subpat { - skip!((it).0); - v.visit_pat(&*(it).1); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - } - skip!(node.leading_vert); - for el in Punctuated::pairs(&node.cases) { - let it = el.value(); - v.visit_pat(it); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_pat_paren<'ast, V>(v: &mut V, node: &'ast PatParen) -where - V: Visit<'ast> + ?Sized, -{ - for it in &node.attrs { - v.visit_attribute(it); - } - skip!(node.paren_token); - v.visit_pat(&*node.pat); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - } - skip!(node.and_token); - skip!(node.mutability); - v.visit_pat(&*node.pat); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - } - skip!(node.dot2_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - } - skip!(node.bracket_token); - for el in Punctuated::pairs(&node.elems) { - let it = el.value(); - v.visit_pat(it); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - } - if let Some(it) = &node.qself { - v.visit_qself(it); - } - v.visit_path(&node.path); - skip!(node.brace_token); - for el in Punctuated::pairs(&node.fields) { - let it = el.value(); - v.visit_field_pat(it); - } - if let Some(it) = &node.rest { - v.visit_pat_rest(it); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - } - skip!(node.paren_token); - for el in Punctuated::pairs(&node.elems) { - let it = el.value(); - v.visit_pat(it); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - } - if let Some(it) = &node.qself { - v.visit_qself(it); - } - v.visit_path(&node.path); - skip!(node.paren_token); - for el in Punctuated::pairs(&node.elems) { - let it = el.value(); - v.visit_pat(it); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - skip!(node.colon_token); - v.visit_type(&*node.ty); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - } - skip!(node.underscore_token); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_path<'ast, V>(v: &mut V, node: &'ast Path) -where - V: Visit<'ast> + ?Sized, -{ - skip!(node.leading_colon); - for el in Punctuated::pairs(&node.segments) { - let it = el.value(); - v.visit_path_segment(it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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"))] -#[cfg_attr(doc_cfg, doc(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"))] -#[cfg_attr(doc_cfg, doc(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); - skip!(node.colon_token); - for el in Punctuated::pairs(&node.bounds) { - let it = el.value(); - v.visit_lifetime(it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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); - skip!(node.colon_token); - for el in Punctuated::pairs(&node.bounds) { - let it = el.value(); - v.visit_type_param_bound(it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_qself<'ast, V>(v: &mut V, node: &'ast QSelf) -where - V: Visit<'ast> + ?Sized, -{ - skip!(node.lt_token); - v.visit_type(&*node.ty); - skip!(node.position); - skip!(node.as_token); - skip!(node.gt_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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) => { - skip!(_binding_0); - } - RangeLimits::Closed(_binding_0) => { - skip!(_binding_0); - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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 { - skip!((it).0); - if let Some(it) = &(it).1 { - v.visit_lifetime(it); - } - } - skip!(node.mutability); - skip!(node.self_token); - skip!(node.colon_token); - v.visit_type(&*node.ty); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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) => { - skip!(_binding_0); - v.visit_type(&**_binding_1); - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_signature<'ast, V>(v: &mut V, node: &'ast Signature) -where - V: Visit<'ast> + ?Sized, -{ - skip!(node.constness); - skip!(node.asyncness); - skip!(node.unsafety); - if let Some(it) = &node.abi { - v.visit_abi(it); - } - skip!(node.fn_token); - v.visit_ident(&node.ident); - v.visit_generics(&node.generics); - skip!(node.paren_token); - for el in Punctuated::pairs(&node.inputs) { - let it = el.value(); - v.visit_fn_arg(it); - } - 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")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_static_mutability<'ast, V>(v: &mut V, node: &'ast StaticMutability) -where - V: Visit<'ast> + ?Sized, -{ - match node { - StaticMutability::Mut(_binding_0) => { - skip!(_binding_0); - } - StaticMutability::None => {} - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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, _binding_1) => { - v.visit_expr(_binding_0); - skip!(_binding_1); - } - Stmt::Macro(_binding_0) => { - v.visit_stmt_macro(_binding_0); - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_stmt_macro<'ast, V>(v: &mut V, node: &'ast StmtMacro) -where - V: Visit<'ast> + ?Sized, -{ - for it in &node.attrs { - v.visit_attribute(it); - } - v.visit_macro(&node.mac); - skip!(node.semi_token); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_trait_bound<'ast, V>(v: &mut V, node: &'ast TraitBound) -where - V: Visit<'ast> + ?Sized, -{ - skip!(node.paren_token); - 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"))] -#[cfg_attr(doc_cfg, doc(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) => { - skip!(_binding_0); - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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::Fn(_binding_0) => { - v.visit_trait_item_fn(_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); - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - } - skip!(node.const_token); - v.visit_ident(&node.ident); - v.visit_generics(&node.generics); - skip!(node.colon_token); - v.visit_type(&node.ty); - if let Some(it) = &node.default { - skip!((it).0); - v.visit_expr(&(it).1); - } - skip!(node.semi_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_trait_item_fn<'ast, V>(v: &mut V, node: &'ast TraitItemFn) -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); - } - skip!(node.semi_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - skip!(node.semi_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - } - skip!(node.type_token); - v.visit_ident(&node.ident); - v.visit_generics(&node.generics); - skip!(node.colon_token); - for el in Punctuated::pairs(&node.bounds) { - let it = el.value(); - v.visit_type_param_bound(it); - } - if let Some(it) = &node.default { - skip!((it).0); - v.visit_type(&(it).1); - } - skip!(node.semi_token); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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); - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_type_array<'ast, V>(v: &mut V, node: &'ast TypeArray) -where - V: Visit<'ast> + ?Sized, -{ - skip!(node.bracket_token); - v.visit_type(&*node.elem); - skip!(node.semi_token); - v.visit_expr(&node.len); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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); - } - skip!(node.unsafety); - if let Some(it) = &node.abi { - v.visit_abi(it); - } - skip!(node.fn_token); - skip!(node.paren_token); - for el in Punctuated::pairs(&node.inputs) { - let it = el.value(); - v.visit_bare_fn_arg(it); - } - if let Some(it) = &node.variadic { - v.visit_bare_variadic(it); - } - v.visit_return_type(&node.output); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_type_group<'ast, V>(v: &mut V, node: &'ast TypeGroup) -where - V: Visit<'ast> + ?Sized, -{ - skip!(node.group_token); - v.visit_type(&*node.elem); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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, -{ - skip!(node.impl_token); - for el in Punctuated::pairs(&node.bounds) { - let it = el.value(); - v.visit_type_param_bound(it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_type_infer<'ast, V>(v: &mut V, node: &'ast TypeInfer) -where - V: Visit<'ast> + ?Sized, -{ - skip!(node.underscore_token); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_type_never<'ast, V>(v: &mut V, node: &'ast TypeNever) -where - V: Visit<'ast> + ?Sized, -{ - skip!(node.bang_token); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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); - skip!(node.colon_token); - for el in Punctuated::pairs(&node.bounds) { - let it = el.value(); - v.visit_type_param_bound(it); - } - skip!(node.eq_token); - if let Some(it) = &node.default { - v.visit_type(it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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); - } - TypeParamBound::Verbatim(_binding_0) => { - skip!(_binding_0); - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_type_paren<'ast, V>(v: &mut V, node: &'ast TypeParen) -where - V: Visit<'ast> + ?Sized, -{ - skip!(node.paren_token); - v.visit_type(&*node.elem); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_type_ptr<'ast, V>(v: &mut V, node: &'ast TypePtr) -where - V: Visit<'ast> + ?Sized, -{ - skip!(node.star_token); - skip!(node.const_token); - skip!(node.mutability); - v.visit_type(&*node.elem); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_type_reference<'ast, V>(v: &mut V, node: &'ast TypeReference) -where - V: Visit<'ast> + ?Sized, -{ - skip!(node.and_token); - if let Some(it) = &node.lifetime { - v.visit_lifetime(it); - } - skip!(node.mutability); - v.visit_type(&*node.elem); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_type_slice<'ast, V>(v: &mut V, node: &'ast TypeSlice) -where - V: Visit<'ast> + ?Sized, -{ - skip!(node.bracket_token); - v.visit_type(&*node.elem); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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, -{ - skip!(node.dyn_token); - for el in Punctuated::pairs(&node.bounds) { - let it = el.value(); - v.visit_type_param_bound(it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_type_tuple<'ast, V>(v: &mut V, node: &'ast TypeTuple) -where - V: Visit<'ast> + ?Sized, -{ - skip!(node.paren_token); - for el in Punctuated::pairs(&node.elems) { - let it = el.value(); - v.visit_type(it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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) => { - skip!(_binding_0); - } - UnOp::Not(_binding_0) => { - skip!(_binding_0); - } - UnOp::Neg(_binding_0) => { - skip!(_binding_0); - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_use_glob<'ast, V>(v: &mut V, node: &'ast UseGlob) -where - V: Visit<'ast> + ?Sized, -{ - skip!(node.star_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_use_group<'ast, V>(v: &mut V, node: &'ast UseGroup) -where - V: Visit<'ast> + ?Sized, -{ - skip!(node.brace_token); - for el in Punctuated::pairs(&node.items) { - let it = el.value(); - v.visit_use_tree(it); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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")] -#[cfg_attr(doc_cfg, doc(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); - skip!(node.colon2_token); - v.visit_use_tree(&*node.tree); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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); - skip!(node.as_token); - v.visit_ident(&node.rename); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(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(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(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); - } - if let Some(it) = &node.pat { - v.visit_pat(&*(it).0); - skip!((it).1); - } - skip!(node.dots); - skip!(node.comma); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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 { - skip!((it).0); - v.visit_expr(&(it).1); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_vis_restricted<'ast, V>(v: &mut V, node: &'ast VisRestricted) -where - V: Visit<'ast> + ?Sized, -{ - skip!(node.pub_token); - skip!(node.paren_token); - skip!(node.in_token); - v.visit_path(&*node.path); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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) => { - skip!(_binding_0); - } - Visibility::Restricted(_binding_0) => { - v.visit_vis_restricted(_binding_0); - } - Visibility::Inherited => {} - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_where_clause<'ast, V>(v: &mut V, node: &'ast WhereClause) -where - V: Visit<'ast> + ?Sized, -{ - skip!(node.where_token); - for el in Punctuated::pairs(&node.predicates) { - let it = el.value(); - v.visit_where_predicate(it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(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::Lifetime(_binding_0) => { - v.visit_predicate_lifetime(_binding_0); - } - WherePredicate::Type(_binding_0) => { - v.visit_predicate_type(_binding_0); - } - } -} diff --git a/vendor/syn/src/gen/visit_mut.rs b/vendor/syn/src/gen/visit_mut.rs deleted file mode 100644 index 3e81aae..0000000 --- a/vendor/syn/src/gen/visit_mut.rs +++ /dev/null @@ -1,3847 +0,0 @@ -// This file is @generated by syn-internal-codegen. -// It is not intended for manual editing. - -#![allow(unused_variables)] -#![allow(clippy::needless_pass_by_ref_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!() - }; -} -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 -pub trait VisitMut { - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_arm_mut(&mut self, i: &mut Arm) { - visit_arm_mut(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_assoc_const_mut(&mut self, i: &mut AssocConst) { - visit_assoc_const_mut(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_assoc_type_mut(&mut self, i: &mut AssocType) { - visit_assoc_type_mut(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_bare_variadic_mut(&mut self, i: &mut BareVariadic) { - visit_bare_variadic_mut(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_bin_op_mut(&mut self, i: &mut BinOp) { - visit_bin_op_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_block_mut(&mut self, i: &mut Block) { - visit_block_mut(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_constraint_mut(&mut self, i: &mut Constraint) { - visit_constraint_mut(self, i); - } - #[cfg(feature = "derive")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "derive")))] - fn visit_data_mut(&mut self, i: &mut Data) { - visit_data_mut(self, i); - } - #[cfg(feature = "derive")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "derive")))] - fn visit_data_enum_mut(&mut self, i: &mut DataEnum) { - visit_data_enum_mut(self, i); - } - #[cfg(feature = "derive")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "derive")))] - fn visit_data_struct_mut(&mut self, i: &mut DataStruct) { - visit_data_struct_mut(self, i); - } - #[cfg(feature = "derive")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "derive")))] - fn visit_data_union_mut(&mut self, i: &mut DataUnion) { - visit_data_union_mut(self, i); - } - #[cfg(feature = "derive")] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_expr_mut(&mut self, i: &mut Expr) { - visit_expr_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_array_mut(&mut self, i: &mut ExprArray) { - visit_expr_array_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_assign_mut(&mut self, i: &mut ExprAssign) { - visit_expr_assign_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_async_mut(&mut self, i: &mut ExprAsync) { - visit_expr_async_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_block_mut(&mut self, i: &mut ExprBlock) { - visit_expr_block_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_closure_mut(&mut self, i: &mut ExprClosure) { - visit_expr_closure_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_const_mut(&mut self, i: &mut ExprConst) { - visit_expr_const_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_for_loop_mut(&mut self, i: &mut ExprForLoop) { - visit_expr_for_loop_mut(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_expr_group_mut(&mut self, i: &mut ExprGroup) { - visit_expr_group_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_infer_mut(&mut self, i: &mut ExprInfer) { - visit_expr_infer_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_loop_mut(&mut self, i: &mut ExprLoop) { - visit_expr_loop_mut(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_expr_macro_mut(&mut self, i: &mut ExprMacro) { - visit_expr_macro_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_match_mut(&mut self, i: &mut ExprMatch) { - visit_expr_match_mut(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", 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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_range_mut(&mut self, i: &mut ExprRange) { - visit_expr_range_mut(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_expr_reference_mut(&mut self, i: &mut ExprReference) { - visit_expr_reference_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_repeat_mut(&mut self, i: &mut ExprRepeat) { - visit_expr_repeat_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_return_mut(&mut self, i: &mut ExprReturn) { - visit_expr_return_mut(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_expr_struct_mut(&mut self, i: &mut ExprStruct) { - visit_expr_struct_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_try_mut(&mut self, i: &mut ExprTry) { - visit_expr_try_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_try_block_mut(&mut self, i: &mut ExprTryBlock) { - visit_expr_try_block_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_tuple_mut(&mut self, i: &mut ExprTuple) { - visit_expr_tuple_mut(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_unsafe_mut(&mut self, i: &mut ExprUnsafe) { - visit_expr_unsafe_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_expr_while_mut(&mut self, i: &mut ExprWhile) { - visit_expr_while_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_field_mut(&mut self, i: &mut Field) { - visit_field_mut(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_field_mutability_mut(&mut self, i: &mut FieldMutability) { - visit_field_mutability_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_field_pat_mut(&mut self, i: &mut FieldPat) { - visit_field_pat_mut(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_field_value_mut(&mut self, i: &mut FieldValue) { - visit_field_value_mut(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_file_mut(&mut self, i: &mut File) { - visit_file_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_fn_arg_mut(&mut self, i: &mut FnArg) { - visit_fn_arg_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_foreign_item_mut(&mut self, i: &mut ForeignItem) { - visit_foreign_item_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_foreign_item_fn_mut(&mut self, i: &mut ForeignItemFn) { - visit_foreign_item_fn_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_foreign_item_macro_mut(&mut self, i: &mut ForeignItemMacro) { - visit_foreign_item_macro_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_foreign_item_static_mut(&mut self, i: &mut ForeignItemStatic) { - visit_foreign_item_static_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_generic_argument_mut(&mut self, i: &mut GenericArgument) { - visit_generic_argument_mut(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_impl_item_mut(&mut self, i: &mut ImplItem) { - visit_impl_item_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_impl_item_const_mut(&mut self, i: &mut ImplItemConst) { - visit_impl_item_const_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_impl_item_fn_mut(&mut self, i: &mut ImplItemFn) { - visit_impl_item_fn_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_impl_item_macro_mut(&mut self, i: &mut ImplItemMacro) { - visit_impl_item_macro_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_impl_item_type_mut(&mut self, i: &mut ImplItemType) { - visit_impl_item_type_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_impl_restriction_mut(&mut self, i: &mut ImplRestriction) { - visit_impl_restriction_mut(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_index_mut(&mut self, i: &mut Index) { - visit_index_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_item_mut(&mut self, i: &mut Item) { - visit_item_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_item_const_mut(&mut self, i: &mut ItemConst) { - visit_item_const_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_item_enum_mut(&mut self, i: &mut ItemEnum) { - visit_item_enum_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_item_extern_crate_mut(&mut self, i: &mut ItemExternCrate) { - visit_item_extern_crate_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_item_fn_mut(&mut self, i: &mut ItemFn) { - visit_item_fn_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_item_foreign_mod_mut(&mut self, i: &mut ItemForeignMod) { - visit_item_foreign_mod_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_item_impl_mut(&mut self, i: &mut ItemImpl) { - visit_item_impl_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_item_macro_mut(&mut self, i: &mut ItemMacro) { - visit_item_macro_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_item_mod_mut(&mut self, i: &mut ItemMod) { - visit_item_mod_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_item_static_mut(&mut self, i: &mut ItemStatic) { - visit_item_static_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_item_struct_mut(&mut self, i: &mut ItemStruct) { - visit_item_struct_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_item_trait_mut(&mut self, i: &mut ItemTrait) { - visit_item_trait_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_item_trait_alias_mut(&mut self, i: &mut ItemTraitAlias) { - visit_item_trait_alias_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_item_type_mut(&mut self, i: &mut ItemType) { - visit_item_type_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_item_union_mut(&mut self, i: &mut ItemUnion) { - visit_item_union_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_item_use_mut(&mut self, i: &mut ItemUse) { - visit_item_use_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_lifetime_param_mut(&mut self, i: &mut LifetimeParam) { - visit_lifetime_param_mut(self, i); - } - fn visit_lit_mut(&mut self, i: &mut Lit) { - visit_lit_mut(self, i); - } - fn visit_lit_bool_mut(&mut self, i: &mut LitBool) { - visit_lit_bool_mut(self, i); - } - fn visit_lit_byte_mut(&mut self, i: &mut LitByte) { - visit_lit_byte_mut(self, i); - } - fn visit_lit_byte_str_mut(&mut self, i: &mut LitByteStr) { - visit_lit_byte_str_mut(self, i); - } - fn visit_lit_char_mut(&mut self, i: &mut LitChar) { - visit_lit_char_mut(self, i); - } - fn visit_lit_float_mut(&mut self, i: &mut LitFloat) { - visit_lit_float_mut(self, i); - } - fn visit_lit_int_mut(&mut self, i: &mut LitInt) { - visit_lit_int_mut(self, i); - } - fn visit_lit_str_mut(&mut self, i: &mut LitStr) { - visit_lit_str_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_local_mut(&mut self, i: &mut Local) { - visit_local_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_local_init_mut(&mut self, i: &mut LocalInit) { - visit_local_init_mut(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_pat_mut(&mut self, i: &mut Pat) { - visit_pat_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_pat_ident_mut(&mut self, i: &mut PatIdent) { - visit_pat_ident_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_pat_or_mut(&mut self, i: &mut PatOr) { - visit_pat_or_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_pat_paren_mut(&mut self, i: &mut PatParen) { - visit_pat_paren_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_pat_reference_mut(&mut self, i: &mut PatReference) { - visit_pat_reference_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_pat_rest_mut(&mut self, i: &mut PatRest) { - visit_pat_rest_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_pat_slice_mut(&mut self, i: &mut PatSlice) { - visit_pat_slice_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_pat_struct_mut(&mut self, i: &mut PatStruct) { - visit_pat_struct_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_pat_tuple_mut(&mut self, i: &mut PatTuple) { - visit_pat_tuple_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_pat_tuple_struct_mut(&mut self, i: &mut PatTupleStruct) { - visit_pat_tuple_struct_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_pat_type_mut(&mut self, i: &mut PatType) { - visit_pat_type_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] - fn visit_qself_mut(&mut self, i: &mut QSelf) { - visit_qself_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_range_limits_mut(&mut self, i: &mut RangeLimits) { - visit_range_limits_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_receiver_mut(&mut self, i: &mut Receiver) { - visit_receiver_mut(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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")] - #[cfg_attr(doc_cfg, doc(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")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_static_mutability_mut(&mut self, i: &mut StaticMutability) { - visit_static_mutability_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_stmt_mut(&mut self, i: &mut Stmt) { - visit_stmt_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_stmt_macro_mut(&mut self, i: &mut StmtMacro) { - visit_stmt_macro_mut(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_trait_item_mut(&mut self, i: &mut TraitItem) { - visit_trait_item_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_trait_item_const_mut(&mut self, i: &mut TraitItemConst) { - visit_trait_item_const_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_trait_item_fn_mut(&mut self, i: &mut TraitItemFn) { - visit_trait_item_fn_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_trait_item_macro_mut(&mut self, i: &mut TraitItemMacro) { - visit_trait_item_macro_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_use_glob_mut(&mut self, i: &mut UseGlob) { - visit_use_glob_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_use_group_mut(&mut self, i: &mut UseGroup) { - visit_use_group_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_use_name_mut(&mut self, i: &mut UseName) { - visit_use_name_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_use_path_mut(&mut self, i: &mut UsePath) { - visit_use_path_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_use_rename_mut(&mut self, i: &mut UseRename) { - visit_use_rename_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_use_tree_mut(&mut self, i: &mut UseTree) { - visit_use_tree_mut(self, i); - } - #[cfg(feature = "full")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] - fn visit_variadic_mut(&mut self, i: &mut Variadic) { - visit_variadic_mut(self, i); - } - #[cfg(any(feature = "derive", feature = "full"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] - #[cfg_attr(doc_cfg, doc(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"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_abi_mut(v: &mut V, node: &mut Abi) -where - V: VisitMut + ?Sized, -{ - skip!(node.extern_token); - if let Some(it) = &mut node.name { - v.visit_lit_str_mut(it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_angle_bracketed_generic_arguments_mut( - v: &mut V, - node: &mut AngleBracketedGenericArguments, -) -where - V: VisitMut + ?Sized, -{ - skip!(node.colon2_token); - skip!(node.lt_token); - for mut el in Punctuated::pairs_mut(&mut node.args) { - let it = el.value_mut(); - v.visit_generic_argument_mut(it); - } - skip!(node.gt_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_arm_mut(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 { - skip!((it).0); - v.visit_expr_mut(&mut *(it).1); - } - skip!(node.fat_arrow_token); - v.visit_expr_mut(&mut *node.body); - skip!(node.comma); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_assoc_const_mut(v: &mut V, node: &mut AssocConst) -where - V: VisitMut + ?Sized, -{ - v.visit_ident_mut(&mut node.ident); - if let Some(it) = &mut node.generics { - v.visit_angle_bracketed_generic_arguments_mut(it); - } - skip!(node.eq_token); - v.visit_expr_mut(&mut node.value); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_assoc_type_mut(v: &mut V, node: &mut AssocType) -where - V: VisitMut + ?Sized, -{ - v.visit_ident_mut(&mut node.ident); - if let Some(it) = &mut node.generics { - v.visit_angle_bracketed_generic_arguments_mut(it); - } - skip!(node.eq_token); - v.visit_type_mut(&mut node.ty); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_attr_style_mut(v: &mut V, node: &mut AttrStyle) -where - V: VisitMut + ?Sized, -{ - match node { - AttrStyle::Outer => {} - AttrStyle::Inner(_binding_0) => { - skip!(_binding_0); - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_attribute_mut(v: &mut V, node: &mut Attribute) -where - V: VisitMut + ?Sized, -{ - skip!(node.pound_token); - v.visit_attr_style_mut(&mut node.style); - skip!(node.bracket_token); - v.visit_meta_mut(&mut node.meta); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_bare_fn_arg_mut(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); - skip!((it).1); - } - v.visit_type_mut(&mut node.ty); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_bare_variadic_mut(v: &mut V, node: &mut BareVariadic) -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); - skip!((it).1); - } - skip!(node.dots); - skip!(node.comma); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_bin_op_mut(v: &mut V, node: &mut BinOp) -where - V: VisitMut + ?Sized, -{ - match node { - BinOp::Add(_binding_0) => { - skip!(_binding_0); - } - BinOp::Sub(_binding_0) => { - skip!(_binding_0); - } - BinOp::Mul(_binding_0) => { - skip!(_binding_0); - } - BinOp::Div(_binding_0) => { - skip!(_binding_0); - } - BinOp::Rem(_binding_0) => { - skip!(_binding_0); - } - BinOp::And(_binding_0) => { - skip!(_binding_0); - } - BinOp::Or(_binding_0) => { - skip!(_binding_0); - } - BinOp::BitXor(_binding_0) => { - skip!(_binding_0); - } - BinOp::BitAnd(_binding_0) => { - skip!(_binding_0); - } - BinOp::BitOr(_binding_0) => { - skip!(_binding_0); - } - BinOp::Shl(_binding_0) => { - skip!(_binding_0); - } - BinOp::Shr(_binding_0) => { - skip!(_binding_0); - } - BinOp::Eq(_binding_0) => { - skip!(_binding_0); - } - BinOp::Lt(_binding_0) => { - skip!(_binding_0); - } - BinOp::Le(_binding_0) => { - skip!(_binding_0); - } - BinOp::Ne(_binding_0) => { - skip!(_binding_0); - } - BinOp::Ge(_binding_0) => { - skip!(_binding_0); - } - BinOp::Gt(_binding_0) => { - skip!(_binding_0); - } - BinOp::AddAssign(_binding_0) => { - skip!(_binding_0); - } - BinOp::SubAssign(_binding_0) => { - skip!(_binding_0); - } - BinOp::MulAssign(_binding_0) => { - skip!(_binding_0); - } - BinOp::DivAssign(_binding_0) => { - skip!(_binding_0); - } - BinOp::RemAssign(_binding_0) => { - skip!(_binding_0); - } - BinOp::BitXorAssign(_binding_0) => { - skip!(_binding_0); - } - BinOp::BitAndAssign(_binding_0) => { - skip!(_binding_0); - } - BinOp::BitOrAssign(_binding_0) => { - skip!(_binding_0); - } - BinOp::ShlAssign(_binding_0) => { - skip!(_binding_0); - } - BinOp::ShrAssign(_binding_0) => { - skip!(_binding_0); - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_block_mut(v: &mut V, node: &mut Block) -where - V: VisitMut + ?Sized, -{ - skip!(node.brace_token); - for it in &mut node.stmts { - v.visit_stmt_mut(it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_bound_lifetimes_mut(v: &mut V, node: &mut BoundLifetimes) -where - V: VisitMut + ?Sized, -{ - skip!(node.for_token); - skip!(node.lt_token); - for mut el in Punctuated::pairs_mut(&mut node.lifetimes) { - let it = el.value_mut(); - v.visit_generic_param_mut(it); - } - skip!(node.gt_token); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_const_param_mut(v: &mut V, node: &mut ConstParam) -where - V: VisitMut + ?Sized, -{ - for it in &mut node.attrs { - v.visit_attribute_mut(it); - } - skip!(node.const_token); - v.visit_ident_mut(&mut node.ident); - skip!(node.colon_token); - v.visit_type_mut(&mut node.ty); - skip!(node.eq_token); - if let Some(it) = &mut node.default { - v.visit_expr_mut(it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_constraint_mut(v: &mut V, node: &mut Constraint) -where - V: VisitMut + ?Sized, -{ - v.visit_ident_mut(&mut node.ident); - if let Some(it) = &mut node.generics { - v.visit_angle_bracketed_generic_arguments_mut(it); - } - skip!(node.colon_token); - for mut el in Punctuated::pairs_mut(&mut node.bounds) { - let it = el.value_mut(); - v.visit_type_param_bound_mut(it); - } -} -#[cfg(feature = "derive")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "derive")))] -pub fn visit_data_mut(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")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "derive")))] -pub fn visit_data_enum_mut(v: &mut V, node: &mut DataEnum) -where - V: VisitMut + ?Sized, -{ - skip!(node.enum_token); - skip!(node.brace_token); - for mut el in Punctuated::pairs_mut(&mut node.variants) { - let it = el.value_mut(); - v.visit_variant_mut(it); - } -} -#[cfg(feature = "derive")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "derive")))] -pub fn visit_data_struct_mut(v: &mut V, node: &mut DataStruct) -where - V: VisitMut + ?Sized, -{ - skip!(node.struct_token); - v.visit_fields_mut(&mut node.fields); - skip!(node.semi_token); -} -#[cfg(feature = "derive")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "derive")))] -pub fn visit_data_union_mut(v: &mut V, node: &mut DataUnion) -where - V: VisitMut + ?Sized, -{ - skip!(node.union_token); - v.visit_fields_named_mut(&mut node.fields); -} -#[cfg(feature = "derive")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "derive")))] -pub fn visit_derive_input_mut(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"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_expr_mut(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::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::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::Const(_binding_0) => { - full!(v.visit_expr_const_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) => { - 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::Infer(_binding_0) => { - full!(v.visit_expr_infer_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) => { - v.visit_expr_macro_mut(_binding_0); - } - Expr::Match(_binding_0) => { - full!(v.visit_expr_match_mut(_binding_0)); - } - Expr::MethodCall(_binding_0) => { - 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) => { - 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) => { - 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::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)); - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_expr_array_mut(v: &mut V, node: &mut ExprArray) -where - V: VisitMut + ?Sized, -{ - for it in &mut node.attrs { - v.visit_attribute_mut(it); - } - skip!(node.bracket_token); - for mut el in Punctuated::pairs_mut(&mut node.elems) { - let it = el.value_mut(); - v.visit_expr_mut(it); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_expr_assign_mut(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); - skip!(node.eq_token); - v.visit_expr_mut(&mut *node.right); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_expr_async_mut(v: &mut V, node: &mut ExprAsync) -where - V: VisitMut + ?Sized, -{ - for it in &mut node.attrs { - v.visit_attribute_mut(it); - } - skip!(node.async_token); - skip!(node.capture); - v.visit_block_mut(&mut node.block); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_expr_await_mut(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); - skip!(node.dot_token); - skip!(node.await_token); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_expr_binary_mut(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")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_expr_block_mut(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")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_expr_break_mut(v: &mut V, node: &mut ExprBreak) -where - V: VisitMut + ?Sized, -{ - for it in &mut node.attrs { - v.visit_attribute_mut(it); - } - skip!(node.break_token); - 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"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_expr_call_mut(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); - skip!(node.paren_token); - for mut el in Punctuated::pairs_mut(&mut node.args) { - let it = el.value_mut(); - v.visit_expr_mut(it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_expr_cast_mut(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); - skip!(node.as_token); - v.visit_type_mut(&mut *node.ty); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_expr_closure_mut(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.lifetimes { - v.visit_bound_lifetimes_mut(it); - } - skip!(node.constness); - skip!(node.movability); - skip!(node.asyncness); - skip!(node.capture); - skip!(node.or1_token); - for mut el in Punctuated::pairs_mut(&mut node.inputs) { - let it = el.value_mut(); - v.visit_pat_mut(it); - } - skip!(node.or2_token); - v.visit_return_type_mut(&mut node.output); - v.visit_expr_mut(&mut *node.body); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_expr_const_mut(v: &mut V, node: &mut ExprConst) -where - V: VisitMut + ?Sized, -{ - for it in &mut node.attrs { - v.visit_attribute_mut(it); - } - skip!(node.const_token); - v.visit_block_mut(&mut node.block); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_expr_continue_mut(v: &mut V, node: &mut ExprContinue) -where - V: VisitMut + ?Sized, -{ - for it in &mut node.attrs { - v.visit_attribute_mut(it); - } - skip!(node.continue_token); - if let Some(it) = &mut node.label { - v.visit_lifetime_mut(it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_expr_field_mut(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); - skip!(node.dot_token); - v.visit_member_mut(&mut node.member); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_expr_for_loop_mut(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); - } - skip!(node.for_token); - v.visit_pat_mut(&mut *node.pat); - skip!(node.in_token); - v.visit_expr_mut(&mut *node.expr); - v.visit_block_mut(&mut node.body); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_expr_group_mut(v: &mut V, node: &mut ExprGroup) -where - V: VisitMut + ?Sized, -{ - for it in &mut node.attrs { - v.visit_attribute_mut(it); - } - skip!(node.group_token); - v.visit_expr_mut(&mut *node.expr); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_expr_if_mut(v: &mut V, node: &mut ExprIf) -where - V: VisitMut + ?Sized, -{ - for it in &mut node.attrs { - v.visit_attribute_mut(it); - } - skip!(node.if_token); - v.visit_expr_mut(&mut *node.cond); - v.visit_block_mut(&mut node.then_branch); - if let Some(it) = &mut node.else_branch { - skip!((it).0); - v.visit_expr_mut(&mut *(it).1); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_expr_index_mut(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); - skip!(node.bracket_token); - v.visit_expr_mut(&mut *node.index); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_expr_infer_mut(v: &mut V, node: &mut ExprInfer) -where - V: VisitMut + ?Sized, -{ - for it in &mut node.attrs { - v.visit_attribute_mut(it); - } - skip!(node.underscore_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_expr_let_mut(v: &mut V, node: &mut ExprLet) -where - V: VisitMut + ?Sized, -{ - for it in &mut node.attrs { - v.visit_attribute_mut(it); - } - skip!(node.let_token); - v.visit_pat_mut(&mut *node.pat); - skip!(node.eq_token); - v.visit_expr_mut(&mut *node.expr); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_expr_lit_mut(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")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_expr_loop_mut(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); - } - skip!(node.loop_token); - v.visit_block_mut(&mut node.body); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_expr_macro_mut(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")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_expr_match_mut(v: &mut V, node: &mut ExprMatch) -where - V: VisitMut + ?Sized, -{ - for it in &mut node.attrs { - v.visit_attribute_mut(it); - } - skip!(node.match_token); - v.visit_expr_mut(&mut *node.expr); - skip!(node.brace_token); - for it in &mut node.arms { - v.visit_arm_mut(it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_expr_method_call_mut(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); - skip!(node.dot_token); - v.visit_ident_mut(&mut node.method); - if let Some(it) = &mut node.turbofish { - v.visit_angle_bracketed_generic_arguments_mut(it); - } - skip!(node.paren_token); - for mut el in Punctuated::pairs_mut(&mut node.args) { - let it = el.value_mut(); - v.visit_expr_mut(it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_expr_paren_mut(v: &mut V, node: &mut ExprParen) -where - V: VisitMut + ?Sized, -{ - for it in &mut node.attrs { - v.visit_attribute_mut(it); - } - skip!(node.paren_token); - v.visit_expr_mut(&mut *node.expr); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_expr_path_mut(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")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_expr_range_mut(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.start { - v.visit_expr_mut(&mut **it); - } - v.visit_range_limits_mut(&mut node.limits); - if let Some(it) = &mut node.end { - v.visit_expr_mut(&mut **it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_expr_reference_mut(v: &mut V, node: &mut ExprReference) -where - V: VisitMut + ?Sized, -{ - for it in &mut node.attrs { - v.visit_attribute_mut(it); - } - skip!(node.and_token); - skip!(node.mutability); - v.visit_expr_mut(&mut *node.expr); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_expr_repeat_mut(v: &mut V, node: &mut ExprRepeat) -where - V: VisitMut + ?Sized, -{ - for it in &mut node.attrs { - v.visit_attribute_mut(it); - } - skip!(node.bracket_token); - v.visit_expr_mut(&mut *node.expr); - skip!(node.semi_token); - v.visit_expr_mut(&mut *node.len); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_expr_return_mut(v: &mut V, node: &mut ExprReturn) -where - V: VisitMut + ?Sized, -{ - for it in &mut node.attrs { - v.visit_attribute_mut(it); - } - skip!(node.return_token); - if let Some(it) = &mut node.expr { - v.visit_expr_mut(&mut **it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_expr_struct_mut(v: &mut V, node: &mut ExprStruct) -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); - skip!(node.brace_token); - for mut el in Punctuated::pairs_mut(&mut node.fields) { - let it = el.value_mut(); - v.visit_field_value_mut(it); - } - skip!(node.dot2_token); - if let Some(it) = &mut node.rest { - v.visit_expr_mut(&mut **it); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_expr_try_mut(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); - skip!(node.question_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_expr_try_block_mut(v: &mut V, node: &mut ExprTryBlock) -where - V: VisitMut + ?Sized, -{ - for it in &mut node.attrs { - v.visit_attribute_mut(it); - } - skip!(node.try_token); - v.visit_block_mut(&mut node.block); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_expr_tuple_mut(v: &mut V, node: &mut ExprTuple) -where - V: VisitMut + ?Sized, -{ - for it in &mut node.attrs { - v.visit_attribute_mut(it); - } - skip!(node.paren_token); - for mut el in Punctuated::pairs_mut(&mut node.elems) { - let it = el.value_mut(); - v.visit_expr_mut(it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_expr_unary_mut(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")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_expr_unsafe_mut(v: &mut V, node: &mut ExprUnsafe) -where - V: VisitMut + ?Sized, -{ - for it in &mut node.attrs { - v.visit_attribute_mut(it); - } - skip!(node.unsafe_token); - v.visit_block_mut(&mut node.block); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_expr_while_mut(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); - } - skip!(node.while_token); - v.visit_expr_mut(&mut *node.cond); - v.visit_block_mut(&mut node.body); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_expr_yield_mut(v: &mut V, node: &mut ExprYield) -where - V: VisitMut + ?Sized, -{ - for it in &mut node.attrs { - v.visit_attribute_mut(it); - } - skip!(node.yield_token); - if let Some(it) = &mut node.expr { - v.visit_expr_mut(&mut **it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_field_mut(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); - v.visit_field_mutability_mut(&mut node.mutability); - if let Some(it) = &mut node.ident { - v.visit_ident_mut(it); - } - skip!(node.colon_token); - v.visit_type_mut(&mut node.ty); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_field_mutability_mut(v: &mut V, node: &mut FieldMutability) -where - V: VisitMut + ?Sized, -{ - match node { - FieldMutability::None => {} - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_field_pat_mut(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); - skip!(node.colon_token); - v.visit_pat_mut(&mut *node.pat); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_field_value_mut(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); - skip!(node.colon_token); - v.visit_expr_mut(&mut node.expr); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_fields_mut(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"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_fields_named_mut(v: &mut V, node: &mut FieldsNamed) -where - V: VisitMut + ?Sized, -{ - skip!(node.brace_token); - for mut el in Punctuated::pairs_mut(&mut node.named) { - let it = el.value_mut(); - v.visit_field_mut(it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_fields_unnamed_mut(v: &mut V, node: &mut FieldsUnnamed) -where - V: VisitMut + ?Sized, -{ - skip!(node.paren_token); - for mut el in Punctuated::pairs_mut(&mut node.unnamed) { - let it = el.value_mut(); - v.visit_field_mut(it); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_file_mut(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")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_fn_arg_mut(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")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_foreign_item_mut(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); - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_foreign_item_fn_mut(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); - skip!(node.semi_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_foreign_item_macro_mut(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); - skip!(node.semi_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_foreign_item_static_mut(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); - skip!(node.static_token); - v.visit_static_mutability_mut(&mut node.mutability); - v.visit_ident_mut(&mut node.ident); - skip!(node.colon_token); - v.visit_type_mut(&mut *node.ty); - skip!(node.semi_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_foreign_item_type_mut(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); - skip!(node.type_token); - v.visit_ident_mut(&mut node.ident); - v.visit_generics_mut(&mut node.generics); - skip!(node.semi_token); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_generic_argument_mut(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::Const(_binding_0) => { - v.visit_expr_mut(_binding_0); - } - GenericArgument::AssocType(_binding_0) => { - v.visit_assoc_type_mut(_binding_0); - } - GenericArgument::AssocConst(_binding_0) => { - v.visit_assoc_const_mut(_binding_0); - } - GenericArgument::Constraint(_binding_0) => { - v.visit_constraint_mut(_binding_0); - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_generic_param_mut(v: &mut V, node: &mut GenericParam) -where - V: VisitMut + ?Sized, -{ - match node { - GenericParam::Lifetime(_binding_0) => { - v.visit_lifetime_param_mut(_binding_0); - } - GenericParam::Type(_binding_0) => { - v.visit_type_param_mut(_binding_0); - } - GenericParam::Const(_binding_0) => { - v.visit_const_param_mut(_binding_0); - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_generics_mut(v: &mut V, node: &mut Generics) -where - V: VisitMut + ?Sized, -{ - skip!(node.lt_token); - for mut el in Punctuated::pairs_mut(&mut node.params) { - let it = el.value_mut(); - v.visit_generic_param_mut(it); - } - skip!(node.gt_token); - if let Some(it) = &mut node.where_clause { - v.visit_where_clause_mut(it); - } -} -pub fn visit_ident_mut(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")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_impl_item_mut(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::Fn(_binding_0) => { - v.visit_impl_item_fn_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); - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_impl_item_const_mut(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); - skip!(node.defaultness); - skip!(node.const_token); - v.visit_ident_mut(&mut node.ident); - v.visit_generics_mut(&mut node.generics); - skip!(node.colon_token); - v.visit_type_mut(&mut node.ty); - skip!(node.eq_token); - v.visit_expr_mut(&mut node.expr); - skip!(node.semi_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_impl_item_fn_mut(v: &mut V, node: &mut ImplItemFn) -where - V: VisitMut + ?Sized, -{ - for it in &mut node.attrs { - v.visit_attribute_mut(it); - } - v.visit_visibility_mut(&mut node.vis); - skip!(node.defaultness); - v.visit_signature_mut(&mut node.sig); - v.visit_block_mut(&mut node.block); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_impl_item_macro_mut(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); - skip!(node.semi_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_impl_item_type_mut(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); - skip!(node.defaultness); - skip!(node.type_token); - v.visit_ident_mut(&mut node.ident); - v.visit_generics_mut(&mut node.generics); - skip!(node.eq_token); - v.visit_type_mut(&mut node.ty); - skip!(node.semi_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_impl_restriction_mut(v: &mut V, node: &mut ImplRestriction) -where - V: VisitMut + ?Sized, -{ - match *node {} -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_index_mut(v: &mut V, node: &mut Index) -where - V: VisitMut + ?Sized, -{ - skip!(node.index); - v.visit_span_mut(&mut node.span); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_item_mut(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::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); - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_item_const_mut(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); - skip!(node.const_token); - v.visit_ident_mut(&mut node.ident); - v.visit_generics_mut(&mut node.generics); - skip!(node.colon_token); - v.visit_type_mut(&mut *node.ty); - skip!(node.eq_token); - v.visit_expr_mut(&mut *node.expr); - skip!(node.semi_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_item_enum_mut(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); - skip!(node.enum_token); - v.visit_ident_mut(&mut node.ident); - v.visit_generics_mut(&mut node.generics); - skip!(node.brace_token); - for mut el in Punctuated::pairs_mut(&mut node.variants) { - let it = el.value_mut(); - v.visit_variant_mut(it); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_item_extern_crate_mut(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); - skip!(node.extern_token); - skip!(node.crate_token); - v.visit_ident_mut(&mut node.ident); - if let Some(it) = &mut node.rename { - skip!((it).0); - v.visit_ident_mut(&mut (it).1); - } - skip!(node.semi_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_item_fn_mut(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")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_item_foreign_mod_mut(v: &mut V, node: &mut ItemForeignMod) -where - V: VisitMut + ?Sized, -{ - for it in &mut node.attrs { - v.visit_attribute_mut(it); - } - skip!(node.unsafety); - v.visit_abi_mut(&mut node.abi); - skip!(node.brace_token); - for it in &mut node.items { - v.visit_foreign_item_mut(it); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_item_impl_mut(v: &mut V, node: &mut ItemImpl) -where - V: VisitMut + ?Sized, -{ - for it in &mut node.attrs { - v.visit_attribute_mut(it); - } - skip!(node.defaultness); - skip!(node.unsafety); - skip!(node.impl_token); - v.visit_generics_mut(&mut node.generics); - if let Some(it) = &mut node.trait_ { - skip!((it).0); - v.visit_path_mut(&mut (it).1); - skip!((it).2); - } - v.visit_type_mut(&mut *node.self_ty); - skip!(node.brace_token); - for it in &mut node.items { - v.visit_impl_item_mut(it); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_item_macro_mut(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); - skip!(node.semi_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_item_mod_mut(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); - skip!(node.unsafety); - skip!(node.mod_token); - v.visit_ident_mut(&mut node.ident); - if let Some(it) = &mut node.content { - skip!((it).0); - for it in &mut (it).1 { - v.visit_item_mut(it); - } - } - skip!(node.semi); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_item_static_mut(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); - skip!(node.static_token); - v.visit_static_mutability_mut(&mut node.mutability); - v.visit_ident_mut(&mut node.ident); - skip!(node.colon_token); - v.visit_type_mut(&mut *node.ty); - skip!(node.eq_token); - v.visit_expr_mut(&mut *node.expr); - skip!(node.semi_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_item_struct_mut(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); - skip!(node.struct_token); - v.visit_ident_mut(&mut node.ident); - v.visit_generics_mut(&mut node.generics); - v.visit_fields_mut(&mut node.fields); - skip!(node.semi_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_item_trait_mut(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); - skip!(node.unsafety); - skip!(node.auto_token); - if let Some(it) = &mut node.restriction { - v.visit_impl_restriction_mut(it); - } - skip!(node.trait_token); - v.visit_ident_mut(&mut node.ident); - v.visit_generics_mut(&mut node.generics); - skip!(node.colon_token); - for mut el in Punctuated::pairs_mut(&mut node.supertraits) { - let it = el.value_mut(); - v.visit_type_param_bound_mut(it); - } - skip!(node.brace_token); - for it in &mut node.items { - v.visit_trait_item_mut(it); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_item_trait_alias_mut(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); - skip!(node.trait_token); - v.visit_ident_mut(&mut node.ident); - v.visit_generics_mut(&mut node.generics); - skip!(node.eq_token); - for mut el in Punctuated::pairs_mut(&mut node.bounds) { - let it = el.value_mut(); - v.visit_type_param_bound_mut(it); - } - skip!(node.semi_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_item_type_mut(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); - skip!(node.type_token); - v.visit_ident_mut(&mut node.ident); - v.visit_generics_mut(&mut node.generics); - skip!(node.eq_token); - v.visit_type_mut(&mut *node.ty); - skip!(node.semi_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_item_union_mut(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); - skip!(node.union_token); - 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")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_item_use_mut(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); - skip!(node.use_token); - skip!(node.leading_colon); - v.visit_use_tree_mut(&mut node.tree); - skip!(node.semi_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_label_mut(v: &mut V, node: &mut Label) -where - V: VisitMut + ?Sized, -{ - v.visit_lifetime_mut(&mut node.name); - skip!(node.colon_token); -} -pub fn visit_lifetime_mut(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"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_lifetime_param_mut(v: &mut V, node: &mut LifetimeParam) -where - V: VisitMut + ?Sized, -{ - for it in &mut node.attrs { - v.visit_attribute_mut(it); - } - v.visit_lifetime_mut(&mut node.lifetime); - skip!(node.colon_token); - for mut el in Punctuated::pairs_mut(&mut node.bounds) { - let it = el.value_mut(); - v.visit_lifetime_mut(it); - } -} -pub fn visit_lit_mut(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); - } - } -} -pub fn visit_lit_bool_mut(v: &mut V, node: &mut LitBool) -where - V: VisitMut + ?Sized, -{ - skip!(node.value); - v.visit_span_mut(&mut node.span); -} -pub fn visit_lit_byte_mut(v: &mut V, node: &mut LitByte) -where - V: VisitMut + ?Sized, -{} -pub fn visit_lit_byte_str_mut(v: &mut V, node: &mut LitByteStr) -where - V: VisitMut + ?Sized, -{} -pub fn visit_lit_char_mut(v: &mut V, node: &mut LitChar) -where - V: VisitMut + ?Sized, -{} -pub fn visit_lit_float_mut(v: &mut V, node: &mut LitFloat) -where - V: VisitMut + ?Sized, -{} -pub fn visit_lit_int_mut(v: &mut V, node: &mut LitInt) -where - V: VisitMut + ?Sized, -{} -pub fn visit_lit_str_mut(v: &mut V, node: &mut LitStr) -where - V: VisitMut + ?Sized, -{} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_local_mut(v: &mut V, node: &mut Local) -where - V: VisitMut + ?Sized, -{ - for it in &mut node.attrs { - v.visit_attribute_mut(it); - } - skip!(node.let_token); - v.visit_pat_mut(&mut node.pat); - if let Some(it) = &mut node.init { - v.visit_local_init_mut(it); - } - skip!(node.semi_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_local_init_mut(v: &mut V, node: &mut LocalInit) -where - V: VisitMut + ?Sized, -{ - skip!(node.eq_token); - v.visit_expr_mut(&mut *node.expr); - if let Some(it) = &mut node.diverge { - skip!((it).0); - v.visit_expr_mut(&mut *(it).1); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_macro_mut(v: &mut V, node: &mut Macro) -where - V: VisitMut + ?Sized, -{ - v.visit_path_mut(&mut node.path); - skip!(node.bang_token); - v.visit_macro_delimiter_mut(&mut node.delimiter); - skip!(node.tokens); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_macro_delimiter_mut(v: &mut V, node: &mut MacroDelimiter) -where - V: VisitMut + ?Sized, -{ - match node { - MacroDelimiter::Paren(_binding_0) => { - skip!(_binding_0); - } - MacroDelimiter::Brace(_binding_0) => { - skip!(_binding_0); - } - MacroDelimiter::Bracket(_binding_0) => { - skip!(_binding_0); - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_member_mut(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"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_meta_mut(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"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_meta_list_mut(v: &mut V, node: &mut MetaList) -where - V: VisitMut + ?Sized, -{ - v.visit_path_mut(&mut node.path); - v.visit_macro_delimiter_mut(&mut node.delimiter); - skip!(node.tokens); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_meta_name_value_mut(v: &mut V, node: &mut MetaNameValue) -where - V: VisitMut + ?Sized, -{ - v.visit_path_mut(&mut node.path); - skip!(node.eq_token); - v.visit_expr_mut(&mut node.value); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_parenthesized_generic_arguments_mut( - v: &mut V, - node: &mut ParenthesizedGenericArguments, -) -where - V: VisitMut + ?Sized, -{ - skip!(node.paren_token); - for mut el in Punctuated::pairs_mut(&mut node.inputs) { - let it = el.value_mut(); - v.visit_type_mut(it); - } - v.visit_return_type_mut(&mut node.output); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_pat_mut(v: &mut V, node: &mut Pat) -where - V: VisitMut + ?Sized, -{ - match node { - Pat::Const(_binding_0) => { - v.visit_expr_const_mut(_binding_0); - } - Pat::Ident(_binding_0) => { - v.visit_pat_ident_mut(_binding_0); - } - Pat::Lit(_binding_0) => { - v.visit_expr_lit_mut(_binding_0); - } - Pat::Macro(_binding_0) => { - v.visit_expr_macro_mut(_binding_0); - } - Pat::Or(_binding_0) => { - v.visit_pat_or_mut(_binding_0); - } - Pat::Paren(_binding_0) => { - v.visit_pat_paren_mut(_binding_0); - } - Pat::Path(_binding_0) => { - v.visit_expr_path_mut(_binding_0); - } - Pat::Range(_binding_0) => { - v.visit_expr_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); - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_pat_ident_mut(v: &mut V, node: &mut PatIdent) -where - V: VisitMut + ?Sized, -{ - for it in &mut node.attrs { - v.visit_attribute_mut(it); - } - skip!(node.by_ref); - skip!(node.mutability); - v.visit_ident_mut(&mut node.ident); - if let Some(it) = &mut node.subpat { - skip!((it).0); - v.visit_pat_mut(&mut *(it).1); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_pat_or_mut(v: &mut V, node: &mut PatOr) -where - V: VisitMut + ?Sized, -{ - for it in &mut node.attrs { - v.visit_attribute_mut(it); - } - skip!(node.leading_vert); - for mut el in Punctuated::pairs_mut(&mut node.cases) { - let it = el.value_mut(); - v.visit_pat_mut(it); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_pat_paren_mut(v: &mut V, node: &mut PatParen) -where - V: VisitMut + ?Sized, -{ - for it in &mut node.attrs { - v.visit_attribute_mut(it); - } - skip!(node.paren_token); - v.visit_pat_mut(&mut *node.pat); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_pat_reference_mut(v: &mut V, node: &mut PatReference) -where - V: VisitMut + ?Sized, -{ - for it in &mut node.attrs { - v.visit_attribute_mut(it); - } - skip!(node.and_token); - skip!(node.mutability); - v.visit_pat_mut(&mut *node.pat); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_pat_rest_mut(v: &mut V, node: &mut PatRest) -where - V: VisitMut + ?Sized, -{ - for it in &mut node.attrs { - v.visit_attribute_mut(it); - } - skip!(node.dot2_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_pat_slice_mut(v: &mut V, node: &mut PatSlice) -where - V: VisitMut + ?Sized, -{ - for it in &mut node.attrs { - v.visit_attribute_mut(it); - } - skip!(node.bracket_token); - for mut el in Punctuated::pairs_mut(&mut node.elems) { - let it = el.value_mut(); - v.visit_pat_mut(it); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_pat_struct_mut(v: &mut V, node: &mut PatStruct) -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); - skip!(node.brace_token); - for mut el in Punctuated::pairs_mut(&mut node.fields) { - let it = el.value_mut(); - v.visit_field_pat_mut(it); - } - if let Some(it) = &mut node.rest { - v.visit_pat_rest_mut(it); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_pat_tuple_mut(v: &mut V, node: &mut PatTuple) -where - V: VisitMut + ?Sized, -{ - for it in &mut node.attrs { - v.visit_attribute_mut(it); - } - skip!(node.paren_token); - for mut el in Punctuated::pairs_mut(&mut node.elems) { - let it = el.value_mut(); - v.visit_pat_mut(it); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_pat_tuple_struct_mut(v: &mut V, node: &mut PatTupleStruct) -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); - skip!(node.paren_token); - for mut el in Punctuated::pairs_mut(&mut node.elems) { - let it = el.value_mut(); - v.visit_pat_mut(it); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_pat_type_mut(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); - skip!(node.colon_token); - v.visit_type_mut(&mut *node.ty); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_pat_wild_mut(v: &mut V, node: &mut PatWild) -where - V: VisitMut + ?Sized, -{ - for it in &mut node.attrs { - v.visit_attribute_mut(it); - } - skip!(node.underscore_token); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_path_mut(v: &mut V, node: &mut Path) -where - V: VisitMut + ?Sized, -{ - skip!(node.leading_colon); - for mut el in Punctuated::pairs_mut(&mut node.segments) { - let it = el.value_mut(); - v.visit_path_segment_mut(it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_path_arguments_mut(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"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_path_segment_mut(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"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_predicate_lifetime_mut(v: &mut V, node: &mut PredicateLifetime) -where - V: VisitMut + ?Sized, -{ - v.visit_lifetime_mut(&mut node.lifetime); - skip!(node.colon_token); - for mut el in Punctuated::pairs_mut(&mut node.bounds) { - let it = el.value_mut(); - v.visit_lifetime_mut(it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_predicate_type_mut(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); - skip!(node.colon_token); - for mut el in Punctuated::pairs_mut(&mut node.bounds) { - let it = el.value_mut(); - v.visit_type_param_bound_mut(it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_qself_mut(v: &mut V, node: &mut QSelf) -where - V: VisitMut + ?Sized, -{ - skip!(node.lt_token); - v.visit_type_mut(&mut *node.ty); - skip!(node.position); - skip!(node.as_token); - skip!(node.gt_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_range_limits_mut(v: &mut V, node: &mut RangeLimits) -where - V: VisitMut + ?Sized, -{ - match node { - RangeLimits::HalfOpen(_binding_0) => { - skip!(_binding_0); - } - RangeLimits::Closed(_binding_0) => { - skip!(_binding_0); - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_receiver_mut(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 { - skip!((it).0); - if let Some(it) = &mut (it).1 { - v.visit_lifetime_mut(it); - } - } - skip!(node.mutability); - skip!(node.self_token); - skip!(node.colon_token); - v.visit_type_mut(&mut *node.ty); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_return_type_mut(v: &mut V, node: &mut ReturnType) -where - V: VisitMut + ?Sized, -{ - match node { - ReturnType::Default => {} - ReturnType::Type(_binding_0, _binding_1) => { - skip!(_binding_0); - v.visit_type_mut(&mut **_binding_1); - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_signature_mut(v: &mut V, node: &mut Signature) -where - V: VisitMut + ?Sized, -{ - skip!(node.constness); - skip!(node.asyncness); - skip!(node.unsafety); - if let Some(it) = &mut node.abi { - v.visit_abi_mut(it); - } - skip!(node.fn_token); - v.visit_ident_mut(&mut node.ident); - v.visit_generics_mut(&mut node.generics); - skip!(node.paren_token); - for mut el in Punctuated::pairs_mut(&mut node.inputs) { - let it = el.value_mut(); - v.visit_fn_arg_mut(it); - } - 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: &mut V, node: &mut Span) -where - V: VisitMut + ?Sized, -{} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_static_mutability_mut(v: &mut V, node: &mut StaticMutability) -where - V: VisitMut + ?Sized, -{ - match node { - StaticMutability::Mut(_binding_0) => { - skip!(_binding_0); - } - StaticMutability::None => {} - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_stmt_mut(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, _binding_1) => { - v.visit_expr_mut(_binding_0); - skip!(_binding_1); - } - Stmt::Macro(_binding_0) => { - v.visit_stmt_macro_mut(_binding_0); - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_stmt_macro_mut(v: &mut V, node: &mut StmtMacro) -where - V: VisitMut + ?Sized, -{ - for it in &mut node.attrs { - v.visit_attribute_mut(it); - } - v.visit_macro_mut(&mut node.mac); - skip!(node.semi_token); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_trait_bound_mut(v: &mut V, node: &mut TraitBound) -where - V: VisitMut + ?Sized, -{ - skip!(node.paren_token); - 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"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_trait_bound_modifier_mut(v: &mut V, node: &mut TraitBoundModifier) -where - V: VisitMut + ?Sized, -{ - match node { - TraitBoundModifier::None => {} - TraitBoundModifier::Maybe(_binding_0) => { - skip!(_binding_0); - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_trait_item_mut(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::Fn(_binding_0) => { - v.visit_trait_item_fn_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); - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_trait_item_const_mut(v: &mut V, node: &mut TraitItemConst) -where - V: VisitMut + ?Sized, -{ - for it in &mut node.attrs { - v.visit_attribute_mut(it); - } - skip!(node.const_token); - v.visit_ident_mut(&mut node.ident); - v.visit_generics_mut(&mut node.generics); - skip!(node.colon_token); - v.visit_type_mut(&mut node.ty); - if let Some(it) = &mut node.default { - skip!((it).0); - v.visit_expr_mut(&mut (it).1); - } - skip!(node.semi_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_trait_item_fn_mut(v: &mut V, node: &mut TraitItemFn) -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); - } - skip!(node.semi_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_trait_item_macro_mut(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); - skip!(node.semi_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_trait_item_type_mut(v: &mut V, node: &mut TraitItemType) -where - V: VisitMut + ?Sized, -{ - for it in &mut node.attrs { - v.visit_attribute_mut(it); - } - skip!(node.type_token); - v.visit_ident_mut(&mut node.ident); - v.visit_generics_mut(&mut node.generics); - skip!(node.colon_token); - for mut el in Punctuated::pairs_mut(&mut node.bounds) { - let it = el.value_mut(); - v.visit_type_param_bound_mut(it); - } - if let Some(it) = &mut node.default { - skip!((it).0); - v.visit_type_mut(&mut (it).1); - } - skip!(node.semi_token); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_type_mut(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); - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_type_array_mut(v: &mut V, node: &mut TypeArray) -where - V: VisitMut + ?Sized, -{ - skip!(node.bracket_token); - v.visit_type_mut(&mut *node.elem); - skip!(node.semi_token); - v.visit_expr_mut(&mut node.len); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_type_bare_fn_mut(v: &mut V, node: &mut TypeBareFn) -where - V: VisitMut + ?Sized, -{ - if let Some(it) = &mut node.lifetimes { - v.visit_bound_lifetimes_mut(it); - } - skip!(node.unsafety); - if let Some(it) = &mut node.abi { - v.visit_abi_mut(it); - } - skip!(node.fn_token); - skip!(node.paren_token); - for mut el in Punctuated::pairs_mut(&mut node.inputs) { - let it = el.value_mut(); - v.visit_bare_fn_arg_mut(it); - } - if let Some(it) = &mut node.variadic { - v.visit_bare_variadic_mut(it); - } - v.visit_return_type_mut(&mut node.output); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_type_group_mut(v: &mut V, node: &mut TypeGroup) -where - V: VisitMut + ?Sized, -{ - skip!(node.group_token); - v.visit_type_mut(&mut *node.elem); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_type_impl_trait_mut(v: &mut V, node: &mut TypeImplTrait) -where - V: VisitMut + ?Sized, -{ - skip!(node.impl_token); - for mut el in Punctuated::pairs_mut(&mut node.bounds) { - let it = el.value_mut(); - v.visit_type_param_bound_mut(it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_type_infer_mut(v: &mut V, node: &mut TypeInfer) -where - V: VisitMut + ?Sized, -{ - skip!(node.underscore_token); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_type_macro_mut(v: &mut V, node: &mut TypeMacro) -where - V: VisitMut + ?Sized, -{ - v.visit_macro_mut(&mut node.mac); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_type_never_mut(v: &mut V, node: &mut TypeNever) -where - V: VisitMut + ?Sized, -{ - skip!(node.bang_token); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_type_param_mut(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); - skip!(node.colon_token); - for mut el in Punctuated::pairs_mut(&mut node.bounds) { - let it = el.value_mut(); - v.visit_type_param_bound_mut(it); - } - skip!(node.eq_token); - if let Some(it) = &mut node.default { - v.visit_type_mut(it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_type_param_bound_mut(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); - } - TypeParamBound::Verbatim(_binding_0) => { - skip!(_binding_0); - } - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_type_paren_mut(v: &mut V, node: &mut TypeParen) -where - V: VisitMut + ?Sized, -{ - skip!(node.paren_token); - v.visit_type_mut(&mut *node.elem); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_type_path_mut(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"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_type_ptr_mut(v: &mut V, node: &mut TypePtr) -where - V: VisitMut + ?Sized, -{ - skip!(node.star_token); - skip!(node.const_token); - skip!(node.mutability); - v.visit_type_mut(&mut *node.elem); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_type_reference_mut(v: &mut V, node: &mut TypeReference) -where - V: VisitMut + ?Sized, -{ - skip!(node.and_token); - if let Some(it) = &mut node.lifetime { - v.visit_lifetime_mut(it); - } - skip!(node.mutability); - v.visit_type_mut(&mut *node.elem); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_type_slice_mut(v: &mut V, node: &mut TypeSlice) -where - V: VisitMut + ?Sized, -{ - skip!(node.bracket_token); - v.visit_type_mut(&mut *node.elem); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_type_trait_object_mut(v: &mut V, node: &mut TypeTraitObject) -where - V: VisitMut + ?Sized, -{ - skip!(node.dyn_token); - for mut el in Punctuated::pairs_mut(&mut node.bounds) { - let it = el.value_mut(); - v.visit_type_param_bound_mut(it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_type_tuple_mut(v: &mut V, node: &mut TypeTuple) -where - V: VisitMut + ?Sized, -{ - skip!(node.paren_token); - for mut el in Punctuated::pairs_mut(&mut node.elems) { - let it = el.value_mut(); - v.visit_type_mut(it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_un_op_mut(v: &mut V, node: &mut UnOp) -where - V: VisitMut + ?Sized, -{ - match node { - UnOp::Deref(_binding_0) => { - skip!(_binding_0); - } - UnOp::Not(_binding_0) => { - skip!(_binding_0); - } - UnOp::Neg(_binding_0) => { - skip!(_binding_0); - } - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_use_glob_mut(v: &mut V, node: &mut UseGlob) -where - V: VisitMut + ?Sized, -{ - skip!(node.star_token); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_use_group_mut(v: &mut V, node: &mut UseGroup) -where - V: VisitMut + ?Sized, -{ - skip!(node.brace_token); - for mut el in Punctuated::pairs_mut(&mut node.items) { - let it = el.value_mut(); - v.visit_use_tree_mut(it); - } -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_use_name_mut(v: &mut V, node: &mut UseName) -where - V: VisitMut + ?Sized, -{ - v.visit_ident_mut(&mut node.ident); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_use_path_mut(v: &mut V, node: &mut UsePath) -where - V: VisitMut + ?Sized, -{ - v.visit_ident_mut(&mut node.ident); - skip!(node.colon2_token); - v.visit_use_tree_mut(&mut *node.tree); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_use_rename_mut(v: &mut V, node: &mut UseRename) -where - V: VisitMut + ?Sized, -{ - v.visit_ident_mut(&mut node.ident); - skip!(node.as_token); - v.visit_ident_mut(&mut node.rename); -} -#[cfg(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_use_tree_mut(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(feature = "full")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] -pub fn visit_variadic_mut(v: &mut V, node: &mut Variadic) -where - V: VisitMut + ?Sized, -{ - for it in &mut node.attrs { - v.visit_attribute_mut(it); - } - if let Some(it) = &mut node.pat { - v.visit_pat_mut(&mut *(it).0); - skip!((it).1); - } - skip!(node.dots); - skip!(node.comma); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_variant_mut(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 { - skip!((it).0); - v.visit_expr_mut(&mut (it).1); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_vis_restricted_mut(v: &mut V, node: &mut VisRestricted) -where - V: VisitMut + ?Sized, -{ - skip!(node.pub_token); - skip!(node.paren_token); - skip!(node.in_token); - v.visit_path_mut(&mut *node.path); -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_visibility_mut(v: &mut V, node: &mut Visibility) -where - V: VisitMut + ?Sized, -{ - match node { - Visibility::Public(_binding_0) => { - skip!(_binding_0); - } - Visibility::Restricted(_binding_0) => { - v.visit_vis_restricted_mut(_binding_0); - } - Visibility::Inherited => {} - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_where_clause_mut(v: &mut V, node: &mut WhereClause) -where - V: VisitMut + ?Sized, -{ - skip!(node.where_token); - for mut el in Punctuated::pairs_mut(&mut node.predicates) { - let it = el.value_mut(); - v.visit_where_predicate_mut(it); - } -} -#[cfg(any(feature = "derive", feature = "full"))] -#[cfg_attr(doc_cfg, doc(cfg(any(feature = "derive", feature = "full"))))] -pub fn visit_where_predicate_mut(v: &mut V, node: &mut WherePredicate) -where - V: VisitMut + ?Sized, -{ - match node { - WherePredicate::Lifetime(_binding_0) => { - v.visit_predicate_lifetime_mut(_binding_0); - } - WherePredicate::Type(_binding_0) => { - v.visit_predicate_type_mut(_binding_0); - } - } -} -- cgit v1.2.3