summaryrefslogtreecommitdiffstats
path: root/third_party/rust/syn/src/gen
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /third_party/rust/syn/src/gen
parentInitial commit. (diff)
downloadfirefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz
firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/rust/syn/src/gen')
-rw-r--r--third_party/rust/syn/src/gen/clone.rs2241
-rw-r--r--third_party/rust/syn/src/gen/debug.rs3042
-rw-r--r--third_party/rust/syn/src/gen/eq.rs2195
-rw-r--r--third_party/rust/syn/src/gen/fold.rs3341
-rw-r--r--third_party/rust/syn/src/gen/hash.rs2869
-rw-r--r--third_party/rust/syn/src/gen/visit.rs3786
-rw-r--r--third_party/rust/syn/src/gen/visit_mut.rs3786
7 files changed, 21260 insertions, 0 deletions
diff --git a/third_party/rust/syn/src/gen/clone.rs b/third_party/rust/syn/src/gen/clone.rs
new file mode 100644
index 0000000000..a413e3ec70
--- /dev/null
+++ b/third_party/rust/syn/src/gen/clone.rs
@@ -0,0 +1,2241 @@
+// 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 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(),
+ path: self.path.clone(),
+ tokens: self.tokens.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 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(any(feature = "derive", feature = "full"))]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
+impl Clone for Binding {
+ fn clone(&self) -> Self {
+ Binding {
+ ident: self.ident.clone(),
+ eq_token: self.eq_token.clone(),
+ ty: self.ty.clone(),
+ }
+ }
+}
+#[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(),
+ 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::AssignOp(v0) => Expr::AssignOp(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::Box(v0) => Expr::Box(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::Continue(v0) => Expr::Continue(v0.clone()),
+ Expr::Field(v0) => Expr::Field(v0.clone()),
+ #[cfg(feature = "full")]
+ Expr::ForLoop(v0) => Expr::ForLoop(v0.clone()),
+ #[cfg(feature = "full")]
+ 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::Let(v0) => Expr::Let(v0.clone()),
+ Expr::Lit(v0) => Expr::Lit(v0.clone()),
+ #[cfg(feature = "full")]
+ Expr::Loop(v0) => Expr::Loop(v0.clone()),
+ #[cfg(feature = "full")]
+ Expr::Macro(v0) => Expr::Macro(v0.clone()),
+ #[cfg(feature = "full")]
+ Expr::Match(v0) => Expr::Match(v0.clone()),
+ #[cfg(feature = "full")]
+ 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()),
+ #[cfg(feature = "full")]
+ 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()),
+ #[cfg(feature = "full")]
+ 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()),
+ #[cfg(feature = "full")]
+ Expr::Type(v0) => Expr::Type(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(any(syn_no_non_exhaustive, 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 ExprAssignOp {
+ fn clone(&self) -> Self {
+ ExprAssignOp {
+ 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 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 ExprBox {
+ fn clone(&self) -> Self {
+ ExprBox {
+ attrs: self.attrs.clone(),
+ box_token: self.box_token.clone(),
+ expr: self.expr.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(),
+ 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 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(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 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(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(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(),
+ from: self.from.clone(),
+ limits: self.limits.clone(),
+ to: self.to.clone(),
+ }
+ }
+}
+#[cfg(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(),
+ raw: self.raw.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(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
+impl Clone for ExprStruct {
+ fn clone(&self) -> Self {
+ ExprStruct {
+ attrs: self.attrs.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(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
+impl Clone for ExprType {
+ fn clone(&self) -> Self {
+ ExprType {
+ attrs: self.attrs.clone(),
+ expr: self.expr.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 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(),
+ ident: self.ident.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 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(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(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+ }
+}
+#[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(),
+ 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::Binding(v0) => GenericArgument::Binding(v0.clone()),
+ GenericArgument::Constraint(v0) => GenericArgument::Constraint(v0.clone()),
+ }
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
+impl Clone for GenericMethodArgument {
+ fn clone(&self) -> Self {
+ match self {
+ GenericMethodArgument::Type(v0) => GenericMethodArgument::Type(v0.clone()),
+ GenericMethodArgument::Const(v0) => GenericMethodArgument::Const(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::Type(v0) => GenericParam::Type(v0.clone()),
+ GenericParam::Lifetime(v0) => GenericParam::Lifetime(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::Method(v0) => ImplItem::Method(v0.clone()),
+ ImplItem::Type(v0) => ImplItem::Type(v0.clone()),
+ ImplItem::Macro(v0) => ImplItem::Macro(v0.clone()),
+ ImplItem::Verbatim(v0) => ImplItem::Verbatim(v0.clone()),
+ #[cfg(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+ }
+}
+#[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(),
+ 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 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 ImplItemMethod {
+ fn clone(&self) -> Self {
+ ImplItemMethod {
+ 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 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(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::Macro2(v0) => Item::Macro2(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(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+ }
+}
+#[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(),
+ 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(),
+ 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 ItemMacro2 {
+ fn clone(&self) -> Self {
+ ItemMacro2 {
+ attrs: self.attrs.clone(),
+ vis: self.vis.clone(),
+ macro_token: self.macro_token.clone(),
+ ident: self.ident.clone(),
+ rules: self.rules.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(),
+ 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(),
+ 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 LifetimeDef {
+ fn clone(&self) -> Self {
+ LifetimeDef {
+ 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(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(),
+ paren_token: self.paren_token.clone(),
+ nested: self.nested.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(),
+ lit: self.lit.clone(),
+ }
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
+impl Clone for MethodTurbofish {
+ fn clone(&self) -> Self {
+ MethodTurbofish {
+ colon2_token: self.colon2_token.clone(),
+ lt_token: self.lt_token.clone(),
+ args: self.args.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 NestedMeta {
+ fn clone(&self) -> Self {
+ match self {
+ NestedMeta::Meta(v0) => NestedMeta::Meta(v0.clone()),
+ NestedMeta::Lit(v0) => NestedMeta::Lit(v0.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::Box(v0) => Pat::Box(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::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(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
+impl Clone for PatBox {
+ fn clone(&self) -> Self {
+ PatBox {
+ attrs: self.attrs.clone(),
+ box_token: self.box_token.clone(),
+ pat: self.pat.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 PatLit {
+ fn clone(&self) -> Self {
+ PatLit {
+ attrs: self.attrs.clone(),
+ expr: self.expr.clone(),
+ }
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
+impl Clone for PatMacro {
+ fn clone(&self) -> Self {
+ PatMacro {
+ attrs: self.attrs.clone(),
+ mac: self.mac.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 PatPath {
+ fn clone(&self) -> Self {
+ PatPath {
+ 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 PatRange {
+ fn clone(&self) -> Self {
+ PatRange {
+ attrs: self.attrs.clone(),
+ lo: self.lo.clone(),
+ limits: self.limits.clone(),
+ hi: self.hi.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(),
+ path: self.path.clone(),
+ brace_token: self.brace_token.clone(),
+ fields: self.fields.clone(),
+ dot2_token: self.dot2_token.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(),
+ path: self.path.clone(),
+ pat: self.pat.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 PredicateEq {
+ fn clone(&self) -> Self {
+ PredicateEq {
+ lhs_ty: self.lhs_ty.clone(),
+ eq_token: self.eq_token.clone(),
+ rhs_ty: self.rhs_ty.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(),
+ }
+ }
+}
+#[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 Stmt {
+ fn clone(&self) -> Self {
+ match self {
+ Stmt::Local(v0) => Stmt::Local(v0.clone()),
+ Stmt::Item(v0) => Stmt::Item(v0.clone()),
+ Stmt::Expr(v0) => Stmt::Expr(v0.clone()),
+ Stmt::Semi(v0, v1) => Stmt::Semi(v0.clone(), v1.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::Method(v0) => TraitItem::Method(v0.clone()),
+ TraitItem::Type(v0) => TraitItem::Type(v0.clone()),
+ TraitItem::Macro(v0) => TraitItem::Macro(v0.clone()),
+ TraitItem::Verbatim(v0) => TraitItem::Verbatim(v0.clone()),
+ #[cfg(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+ }
+}
+#[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(),
+ 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 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 TraitItemMethod {
+ fn clone(&self) -> Self {
+ TraitItemMethod {
+ 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 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(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+ }
+}
+#[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()),
+ }
+ }
+}
+#[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(any(feature = "derive", feature = "full"))]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
+impl Clone for Variadic {
+ fn clone(&self) -> Self {
+ Variadic {
+ attrs: self.attrs.clone(),
+ dots: self.dots.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 VisCrate {
+ fn clone(&self) -> Self {
+ VisCrate {
+ crate_token: self.crate_token.clone(),
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
+impl Clone for VisPublic {
+ fn clone(&self) -> Self {
+ VisPublic {
+ pub_token: self.pub_token.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::Crate(v0) => Visibility::Crate(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::Type(v0) => WherePredicate::Type(v0.clone()),
+ WherePredicate::Lifetime(v0) => WherePredicate::Lifetime(v0.clone()),
+ WherePredicate::Eq(v0) => WherePredicate::Eq(v0.clone()),
+ }
+ }
+}
diff --git a/third_party/rust/syn/src/gen/debug.rs b/third_party/rust/syn/src/gen/debug.rs
new file mode 100644
index 0000000000..a1f0afa790
--- /dev/null
+++ b/third_party/rust/syn/src/gen/debug.rs
@@ -0,0 +1,3042 @@
+// 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 {
+ let mut formatter = formatter.debug_struct("AngleBracketedGenericArguments");
+ 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()
+ }
+}
+#[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 AttrStyle {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ 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("path", &self.path);
+ 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 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 BinOp {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ 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::AddEq(v0) => {
+ let mut formatter = formatter.debug_tuple("AddEq");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ BinOp::SubEq(v0) => {
+ let mut formatter = formatter.debug_tuple("SubEq");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ BinOp::MulEq(v0) => {
+ let mut formatter = formatter.debug_tuple("MulEq");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ BinOp::DivEq(v0) => {
+ let mut formatter = formatter.debug_tuple("DivEq");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ BinOp::RemEq(v0) => {
+ let mut formatter = formatter.debug_tuple("RemEq");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ BinOp::BitXorEq(v0) => {
+ let mut formatter = formatter.debug_tuple("BitXorEq");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ BinOp::BitAndEq(v0) => {
+ let mut formatter = formatter.debug_tuple("BitAndEq");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ BinOp::BitOrEq(v0) => {
+ let mut formatter = formatter.debug_tuple("BitOrEq");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ BinOp::ShlEq(v0) => {
+ let mut formatter = formatter.debug_tuple("ShlEq");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ BinOp::ShrEq(v0) => {
+ let mut formatter = formatter.debug_tuple("ShrEq");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Debug for Binding {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ let mut formatter = formatter.debug_struct("Binding");
+ formatter.field("ident", &self.ident);
+ formatter.field("eq_token", &self.eq_token);
+ formatter.field("ty", &self.ty);
+ 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("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 {
+ match self {
+ Data::Struct(v0) => {
+ let mut formatter = formatter.debug_tuple("Struct");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Data::Enum(v0) => {
+ let mut formatter = formatter.debug_tuple("Enum");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Data::Union(v0) => {
+ let mut formatter = formatter.debug_tuple("Union");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ }
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("DataEnum");
+ formatter.field("enum_token", &self.enum_token);
+ formatter.field("brace_token", &self.brace_token);
+ formatter.field("variants", &self.variants);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("DataStruct");
+ formatter.field("struct_token", &self.struct_token);
+ formatter.field("fields", &self.fields);
+ formatter.field("semi_token", &self.semi_token);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("DataUnion");
+ formatter.field("union_token", &self.union_token);
+ formatter.field("fields", &self.fields);
+ formatter.finish()
+ }
+}
+#[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 {
+ match self {
+ #[cfg(feature = "full")]
+ Expr::Array(v0) => {
+ let mut formatter = formatter.debug_tuple("Array");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ #[cfg(feature = "full")]
+ Expr::Assign(v0) => {
+ let mut formatter = formatter.debug_tuple("Assign");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ #[cfg(feature = "full")]
+ Expr::AssignOp(v0) => {
+ let mut formatter = formatter.debug_tuple("AssignOp");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ #[cfg(feature = "full")]
+ Expr::Async(v0) => {
+ let mut formatter = formatter.debug_tuple("Async");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ #[cfg(feature = "full")]
+ Expr::Await(v0) => {
+ let mut formatter = formatter.debug_tuple("Await");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Expr::Binary(v0) => {
+ let mut formatter = formatter.debug_tuple("Binary");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ #[cfg(feature = "full")]
+ Expr::Block(v0) => {
+ let mut formatter = formatter.debug_tuple("Block");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ #[cfg(feature = "full")]
+ Expr::Box(v0) => {
+ let mut formatter = formatter.debug_tuple("Box");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ #[cfg(feature = "full")]
+ Expr::Break(v0) => {
+ let mut formatter = formatter.debug_tuple("Break");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Expr::Call(v0) => {
+ let mut formatter = formatter.debug_tuple("Call");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Expr::Cast(v0) => {
+ let mut formatter = formatter.debug_tuple("Cast");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ #[cfg(feature = "full")]
+ Expr::Closure(v0) => {
+ let mut formatter = formatter.debug_tuple("Closure");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ #[cfg(feature = "full")]
+ Expr::Continue(v0) => {
+ let mut formatter = formatter.debug_tuple("Continue");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Expr::Field(v0) => {
+ let mut formatter = formatter.debug_tuple("Field");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ #[cfg(feature = "full")]
+ Expr::ForLoop(v0) => {
+ let mut formatter = formatter.debug_tuple("ForLoop");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ #[cfg(feature = "full")]
+ Expr::Group(v0) => {
+ let mut formatter = formatter.debug_tuple("Group");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ #[cfg(feature = "full")]
+ Expr::If(v0) => {
+ let mut formatter = formatter.debug_tuple("If");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Expr::Index(v0) => {
+ let mut formatter = formatter.debug_tuple("Index");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ #[cfg(feature = "full")]
+ Expr::Let(v0) => {
+ let mut formatter = formatter.debug_tuple("Let");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Expr::Lit(v0) => {
+ let mut formatter = formatter.debug_tuple("Lit");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ #[cfg(feature = "full")]
+ Expr::Loop(v0) => {
+ let mut formatter = formatter.debug_tuple("Loop");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ #[cfg(feature = "full")]
+ Expr::Macro(v0) => {
+ let mut formatter = formatter.debug_tuple("Macro");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ #[cfg(feature = "full")]
+ Expr::Match(v0) => {
+ let mut formatter = formatter.debug_tuple("Match");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ #[cfg(feature = "full")]
+ Expr::MethodCall(v0) => {
+ let mut formatter = formatter.debug_tuple("MethodCall");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Expr::Paren(v0) => {
+ let mut formatter = formatter.debug_tuple("Paren");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Expr::Path(v0) => {
+ let mut formatter = formatter.debug_tuple("Path");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ #[cfg(feature = "full")]
+ Expr::Range(v0) => {
+ let mut formatter = formatter.debug_tuple("Range");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ #[cfg(feature = "full")]
+ Expr::Reference(v0) => {
+ let mut formatter = formatter.debug_tuple("Reference");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ #[cfg(feature = "full")]
+ Expr::Repeat(v0) => {
+ let mut formatter = formatter.debug_tuple("Repeat");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ #[cfg(feature = "full")]
+ Expr::Return(v0) => {
+ let mut formatter = formatter.debug_tuple("Return");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ #[cfg(feature = "full")]
+ Expr::Struct(v0) => {
+ let mut formatter = formatter.debug_tuple("Struct");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ #[cfg(feature = "full")]
+ Expr::Try(v0) => {
+ let mut formatter = formatter.debug_tuple("Try");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ #[cfg(feature = "full")]
+ Expr::TryBlock(v0) => {
+ let mut formatter = formatter.debug_tuple("TryBlock");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ #[cfg(feature = "full")]
+ Expr::Tuple(v0) => {
+ let mut formatter = formatter.debug_tuple("Tuple");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ #[cfg(feature = "full")]
+ Expr::Type(v0) => {
+ let mut formatter = formatter.debug_tuple("Type");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Expr::Unary(v0) => {
+ let mut formatter = formatter.debug_tuple("Unary");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ #[cfg(feature = "full")]
+ Expr::Unsafe(v0) => {
+ let mut formatter = formatter.debug_tuple("Unsafe");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Expr::Verbatim(v0) => {
+ let mut formatter = formatter.debug_tuple("Verbatim");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ #[cfg(feature = "full")]
+ Expr::While(v0) => {
+ let mut formatter = formatter.debug_tuple("While");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ #[cfg(feature = "full")]
+ Expr::Yield(v0) => {
+ let mut formatter = formatter.debug_tuple("Yield");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ #[cfg(any(syn_no_non_exhaustive, 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 {
+ let mut formatter = formatter.debug_struct("ExprArray");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("bracket_token", &self.bracket_token);
+ formatter.field("elems", &self.elems);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ExprAssign");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("left", &self.left);
+ formatter.field("eq_token", &self.eq_token);
+ formatter.field("right", &self.right);
+ formatter.finish()
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Debug for ExprAssignOp {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ let mut formatter = formatter.debug_struct("ExprAssignOp");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("left", &self.left);
+ formatter.field("op", &self.op);
+ formatter.field("right", &self.right);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ExprAsync");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("async_token", &self.async_token);
+ formatter.field("capture", &self.capture);
+ formatter.field("block", &self.block);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ExprAwait");
+ 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()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ExprBinary");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("left", &self.left);
+ formatter.field("op", &self.op);
+ formatter.field("right", &self.right);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ExprBlock");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("label", &self.label);
+ formatter.field("block", &self.block);
+ formatter.finish()
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Debug for ExprBox {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ let mut formatter = formatter.debug_struct("ExprBox");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("box_token", &self.box_token);
+ formatter.field("expr", &self.expr);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ExprBreak");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("break_token", &self.break_token);
+ formatter.field("label", &self.label);
+ 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 ExprCall {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ let mut formatter = formatter.debug_struct("ExprCall");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("func", &self.func);
+ formatter.field("paren_token", &self.paren_token);
+ formatter.field("args", &self.args);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ExprCast");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("expr", &self.expr);
+ formatter.field("as_token", &self.as_token);
+ formatter.field("ty", &self.ty);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ExprClosure");
+ formatter.field("attrs", &self.attrs);
+ 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()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ExprContinue");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("continue_token", &self.continue_token);
+ formatter.field("label", &self.label);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ExprField");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("base", &self.base);
+ formatter.field("dot_token", &self.dot_token);
+ formatter.field("member", &self.member);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ExprForLoop");
+ 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()
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Debug for ExprGroup {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ let mut formatter = formatter.debug_struct("ExprGroup");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("group_token", &self.group_token);
+ formatter.field("expr", &self.expr);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ExprIf");
+ 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()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ExprIndex");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("expr", &self.expr);
+ formatter.field("bracket_token", &self.bracket_token);
+ formatter.field("index", &self.index);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ExprLet");
+ 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()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ExprLit");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("lit", &self.lit);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ExprLoop");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("label", &self.label);
+ formatter.field("loop_token", &self.loop_token);
+ formatter.field("body", &self.body);
+ formatter.finish()
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Debug for ExprMacro {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ let mut formatter = formatter.debug_struct("ExprMacro");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("mac", &self.mac);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ExprMatch");
+ 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()
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Debug for ExprMethodCall {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ let mut formatter = formatter.debug_struct("ExprMethodCall");
+ 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()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ExprParen");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("paren_token", &self.paren_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 ExprPath {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ let mut formatter = formatter.debug_struct("ExprPath");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("qself", &self.qself);
+ formatter.field("path", &self.path);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ExprRange");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("from", &self.from);
+ formatter.field("limits", &self.limits);
+ formatter.field("to", &self.to);
+ formatter.finish()
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Debug for ExprReference {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ let mut formatter = formatter.debug_struct("ExprReference");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("and_token", &self.and_token);
+ formatter.field("raw", &self.raw);
+ formatter.field("mutability", &self.mutability);
+ formatter.field("expr", &self.expr);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ExprRepeat");
+ 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()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ExprReturn");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("return_token", &self.return_token);
+ formatter.field("expr", &self.expr);
+ formatter.finish()
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Debug for ExprStruct {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ let mut formatter = formatter.debug_struct("ExprStruct");
+ formatter.field("attrs", &self.attrs);
+ 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()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ExprTry");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("expr", &self.expr);
+ formatter.field("question_token", &self.question_token);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ExprTryBlock");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("try_token", &self.try_token);
+ formatter.field("block", &self.block);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ExprTuple");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("paren_token", &self.paren_token);
+ formatter.field("elems", &self.elems);
+ formatter.finish()
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Debug for ExprType {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ let mut formatter = formatter.debug_struct("ExprType");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("expr", &self.expr);
+ 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 ExprUnary {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ let mut formatter = formatter.debug_struct("ExprUnary");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("op", &self.op);
+ formatter.field("expr", &self.expr);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ExprUnsafe");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("unsafe_token", &self.unsafe_token);
+ formatter.field("block", &self.block);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ExprWhile");
+ 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()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ExprYield");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("yield_token", &self.yield_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 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("ident", &self.ident);
+ formatter.field("colon_token", &self.colon_token);
+ formatter.field("ty", &self.ty);
+ formatter.finish()
+ }
+}
+#[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(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 {
+ match self {
+ Fields::Named(v0) => {
+ let mut formatter = formatter.debug_tuple("Named");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Fields::Unnamed(v0) => {
+ let mut formatter = formatter.debug_tuple("Unnamed");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ 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 {
+ let mut formatter = formatter.debug_struct("FieldsNamed");
+ formatter.field("brace_token", &self.brace_token);
+ formatter.field("named", &self.named);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("FieldsUnnamed");
+ formatter.field("paren_token", &self.paren_token);
+ formatter.field("unnamed", &self.unnamed);
+ formatter.finish()
+ }
+}
+#[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 {
+ 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 {
+ match self {
+ ForeignItem::Fn(v0) => {
+ let mut formatter = formatter.debug_tuple("Fn");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ ForeignItem::Static(v0) => {
+ let mut formatter = formatter.debug_tuple("Static");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ ForeignItem::Type(v0) => {
+ let mut formatter = formatter.debug_tuple("Type");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ ForeignItem::Macro(v0) => {
+ let mut formatter = formatter.debug_tuple("Macro");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ ForeignItem::Verbatim(v0) => {
+ let mut formatter = formatter.debug_tuple("Verbatim");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ #[cfg(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ForeignItemFn");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("vis", &self.vis);
+ formatter.field("sig", &self.sig);
+ formatter.field("semi_token", &self.semi_token);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ForeignItemMacro");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("mac", &self.mac);
+ formatter.field("semi_token", &self.semi_token);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ForeignItemStatic");
+ 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()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ForeignItemType");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("vis", &self.vis);
+ formatter.field("type_token", &self.type_token);
+ formatter.field("ident", &self.ident);
+ formatter.field("semi_token", &self.semi_token);
+ formatter.finish()
+ }
+}
+#[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 {
+ 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::Binding(v0) => {
+ let mut formatter = formatter.debug_tuple("Binding");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ GenericArgument::Constraint(v0) => {
+ let mut formatter = formatter.debug_tuple("Constraint");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ }
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Debug for GenericMethodArgument {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ match self {
+ GenericMethodArgument::Type(v0) => {
+ let mut formatter = formatter.debug_tuple("Type");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ GenericMethodArgument::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 GenericParam {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ match self {
+ GenericParam::Type(v0) => {
+ let mut formatter = formatter.debug_tuple("Type");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ GenericParam::Lifetime(v0) => {
+ let mut formatter = formatter.debug_tuple("Lifetime");
+ 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 {
+ match self {
+ ImplItem::Const(v0) => {
+ let mut formatter = formatter.debug_tuple("Const");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ ImplItem::Method(v0) => {
+ let mut formatter = formatter.debug_tuple("Method");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ ImplItem::Type(v0) => {
+ let mut formatter = formatter.debug_tuple("Type");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ ImplItem::Macro(v0) => {
+ let mut formatter = formatter.debug_tuple("Macro");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ ImplItem::Verbatim(v0) => {
+ let mut formatter = formatter.debug_tuple("Verbatim");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ #[cfg(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ImplItemConst");
+ 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("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()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ImplItemMacro");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("mac", &self.mac);
+ formatter.field("semi_token", &self.semi_token);
+ formatter.finish()
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Debug for ImplItemMethod {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ let mut formatter = formatter.debug_struct("ImplItemMethod");
+ 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()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ImplItemType");
+ 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()
+ }
+}
+#[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 {
+ match self {
+ Item::Const(v0) => {
+ let mut formatter = formatter.debug_tuple("Const");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Item::Enum(v0) => {
+ let mut formatter = formatter.debug_tuple("Enum");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Item::ExternCrate(v0) => {
+ let mut formatter = formatter.debug_tuple("ExternCrate");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Item::Fn(v0) => {
+ let mut formatter = formatter.debug_tuple("Fn");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Item::ForeignMod(v0) => {
+ let mut formatter = formatter.debug_tuple("ForeignMod");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Item::Impl(v0) => {
+ let mut formatter = formatter.debug_tuple("Impl");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Item::Macro(v0) => {
+ let mut formatter = formatter.debug_tuple("Macro");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Item::Macro2(v0) => {
+ let mut formatter = formatter.debug_tuple("Macro2");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Item::Mod(v0) => {
+ let mut formatter = formatter.debug_tuple("Mod");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Item::Static(v0) => {
+ let mut formatter = formatter.debug_tuple("Static");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Item::Struct(v0) => {
+ let mut formatter = formatter.debug_tuple("Struct");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Item::Trait(v0) => {
+ let mut formatter = formatter.debug_tuple("Trait");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Item::TraitAlias(v0) => {
+ let mut formatter = formatter.debug_tuple("TraitAlias");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Item::Type(v0) => {
+ let mut formatter = formatter.debug_tuple("Type");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Item::Union(v0) => {
+ let mut formatter = formatter.debug_tuple("Union");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Item::Use(v0) => {
+ let mut formatter = formatter.debug_tuple("Use");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Item::Verbatim(v0) => {
+ let mut formatter = formatter.debug_tuple("Verbatim");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ #[cfg(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ItemConst");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("vis", &self.vis);
+ 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("expr", &self.expr);
+ formatter.field("semi_token", &self.semi_token);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ItemEnum");
+ 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()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ItemExternCrate");
+ 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()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ItemFn");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("vis", &self.vis);
+ formatter.field("sig", &self.sig);
+ formatter.field("block", &self.block);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ItemForeignMod");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("abi", &self.abi);
+ 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 ItemImpl {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ let mut formatter = formatter.debug_struct("ItemImpl");
+ 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()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ItemMacro");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("ident", &self.ident);
+ formatter.field("mac", &self.mac);
+ formatter.field("semi_token", &self.semi_token);
+ formatter.finish()
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Debug for ItemMacro2 {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ let mut formatter = formatter.debug_struct("ItemMacro2");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("vis", &self.vis);
+ formatter.field("macro_token", &self.macro_token);
+ formatter.field("ident", &self.ident);
+ formatter.field("rules", &self.rules);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ItemMod");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("vis", &self.vis);
+ formatter.field("mod_token", &self.mod_token);
+ formatter.field("ident", &self.ident);
+ formatter.field("content", &self.content);
+ formatter.field("semi", &self.semi);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ItemStatic");
+ 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()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ItemStruct");
+ 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()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ItemTrait");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("vis", &self.vis);
+ formatter.field("unsafety", &self.unsafety);
+ formatter.field("auto_token", &self.auto_token);
+ 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()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ItemTraitAlias");
+ 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()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ItemType");
+ 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()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ItemUnion");
+ 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()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ItemUse");
+ 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()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("Lifetime");
+ formatter.field("apostrophe", &self.apostrophe);
+ formatter.field("ident", &self.ident);
+ formatter.finish()
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Debug for LifetimeDef {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ let mut formatter = formatter.debug_struct("LifetimeDef");
+ 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 {
+ match self {
+ Lit::Str(v0) => {
+ let mut formatter = formatter.debug_tuple("Str");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Lit::ByteStr(v0) => {
+ let mut formatter = formatter.debug_tuple("ByteStr");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Lit::Byte(v0) => {
+ let mut formatter = formatter.debug_tuple("Byte");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Lit::Char(v0) => {
+ let mut formatter = formatter.debug_tuple("Char");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Lit::Int(v0) => {
+ let mut formatter = formatter.debug_tuple("Int");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Lit::Float(v0) => {
+ let mut formatter = formatter.debug_tuple("Float");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Lit::Bool(v0) => {
+ let mut formatter = formatter.debug_tuple("Bool");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ 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 {
+ let mut formatter = formatter.debug_struct("Local");
+ 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()
+ }
+}
+#[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 {
+ 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 {
+ 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 {
+ match self {
+ Meta::Path(v0) => {
+ let mut formatter = formatter.debug_tuple("Path");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Meta::List(v0) => {
+ let mut formatter = formatter.debug_tuple("List");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Meta::NameValue(v0) => {
+ let mut formatter = formatter.debug_tuple("NameValue");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ }
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("MetaList");
+ formatter.field("path", &self.path);
+ formatter.field("paren_token", &self.paren_token);
+ formatter.field("nested", &self.nested);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("MetaNameValue");
+ formatter.field("path", &self.path);
+ formatter.field("eq_token", &self.eq_token);
+ formatter.field("lit", &self.lit);
+ formatter.finish()
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Debug for MethodTurbofish {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ let mut formatter = formatter.debug_struct("MethodTurbofish");
+ 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()
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Debug for NestedMeta {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ match self {
+ NestedMeta::Meta(v0) => {
+ let mut formatter = formatter.debug_tuple("Meta");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ NestedMeta::Lit(v0) => {
+ let mut formatter = formatter.debug_tuple("Lit");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ }
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("ParenthesizedGenericArguments");
+ formatter.field("paren_token", &self.paren_token);
+ formatter.field("inputs", &self.inputs);
+ formatter.field("output", &self.output);
+ formatter.finish()
+ }
+}
+#[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 {
+ match self {
+ Pat::Box(v0) => {
+ let mut formatter = formatter.debug_tuple("Box");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Pat::Ident(v0) => {
+ let mut formatter = formatter.debug_tuple("Ident");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Pat::Lit(v0) => {
+ let mut formatter = formatter.debug_tuple("Lit");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Pat::Macro(v0) => {
+ let mut formatter = formatter.debug_tuple("Macro");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Pat::Or(v0) => {
+ let mut formatter = formatter.debug_tuple("Or");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Pat::Path(v0) => {
+ let mut formatter = formatter.debug_tuple("Path");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Pat::Range(v0) => {
+ let mut formatter = formatter.debug_tuple("Range");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Pat::Reference(v0) => {
+ let mut formatter = formatter.debug_tuple("Reference");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Pat::Rest(v0) => {
+ let mut formatter = formatter.debug_tuple("Rest");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Pat::Slice(v0) => {
+ let mut formatter = formatter.debug_tuple("Slice");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Pat::Struct(v0) => {
+ let mut formatter = formatter.debug_tuple("Struct");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Pat::Tuple(v0) => {
+ let mut formatter = formatter.debug_tuple("Tuple");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Pat::TupleStruct(v0) => {
+ let mut formatter = formatter.debug_tuple("TupleStruct");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Pat::Type(v0) => {
+ let mut formatter = formatter.debug_tuple("Type");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Pat::Verbatim(v0) => {
+ let mut formatter = formatter.debug_tuple("Verbatim");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Pat::Wild(v0) => {
+ let mut formatter = formatter.debug_tuple("Wild");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ #[cfg(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Debug for PatBox {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ let mut formatter = formatter.debug_struct("PatBox");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("box_token", &self.box_token);
+ formatter.field("pat", &self.pat);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("PatIdent");
+ 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()
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Debug for PatLit {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ let mut formatter = formatter.debug_struct("PatLit");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("expr", &self.expr);
+ formatter.finish()
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Debug for PatMacro {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ let mut formatter = formatter.debug_struct("PatMacro");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("mac", &self.mac);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("PatOr");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("leading_vert", &self.leading_vert);
+ formatter.field("cases", &self.cases);
+ formatter.finish()
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Debug for PatPath {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ let mut formatter = formatter.debug_struct("PatPath");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("qself", &self.qself);
+ formatter.field("path", &self.path);
+ formatter.finish()
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Debug for PatRange {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ let mut formatter = formatter.debug_struct("PatRange");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("lo", &self.lo);
+ formatter.field("limits", &self.limits);
+ formatter.field("hi", &self.hi);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("PatReference");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("and_token", &self.and_token);
+ formatter.field("mutability", &self.mutability);
+ formatter.field("pat", &self.pat);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("PatRest");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("dot2_token", &self.dot2_token);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("PatSlice");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("bracket_token", &self.bracket_token);
+ formatter.field("elems", &self.elems);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("PatStruct");
+ formatter.field("attrs", &self.attrs);
+ 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.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("PatTuple");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("paren_token", &self.paren_token);
+ formatter.field("elems", &self.elems);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("PatTupleStruct");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("path", &self.path);
+ formatter.field("pat", &self.pat);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("PatType");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("pat", &self.pat);
+ formatter.field("colon_token", &self.colon_token);
+ formatter.field("ty", &self.ty);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("PatWild");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("underscore_token", &self.underscore_token);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("Path");
+ formatter.field("leading_colon", &self.leading_colon);
+ formatter.field("segments", &self.segments);
+ formatter.finish()
+ }
+}
+#[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 {
+ match self {
+ PathArguments::None => formatter.write_str("None"),
+ PathArguments::AngleBracketed(v0) => {
+ let mut formatter = formatter.debug_tuple("AngleBracketed");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ PathArguments::Parenthesized(v0) => {
+ let mut formatter = formatter.debug_tuple("Parenthesized");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ }
+ }
+}
+#[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 PredicateEq {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ let mut formatter = formatter.debug_struct("PredicateEq");
+ formatter.field("lhs_ty", &self.lhs_ty);
+ formatter.field("eq_token", &self.eq_token);
+ formatter.field("rhs_ty", &self.rhs_ty);
+ 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 {
+ 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.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 {
+ 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 Stmt {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ match self {
+ Stmt::Local(v0) => {
+ let mut formatter = formatter.debug_tuple("Local");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Stmt::Item(v0) => {
+ let mut formatter = formatter.debug_tuple("Item");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Stmt::Expr(v0) => {
+ let mut formatter = formatter.debug_tuple("Expr");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Stmt::Semi(v0, v1) => {
+ let mut formatter = formatter.debug_tuple("Semi");
+ formatter.field(v0);
+ formatter.field(v1);
+ formatter.finish()
+ }
+ }
+ }
+}
+#[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 {
+ 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 {
+ match self {
+ TraitItem::Const(v0) => {
+ let mut formatter = formatter.debug_tuple("Const");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ TraitItem::Method(v0) => {
+ let mut formatter = formatter.debug_tuple("Method");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ TraitItem::Type(v0) => {
+ let mut formatter = formatter.debug_tuple("Type");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ TraitItem::Macro(v0) => {
+ let mut formatter = formatter.debug_tuple("Macro");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ TraitItem::Verbatim(v0) => {
+ let mut formatter = formatter.debug_tuple("Verbatim");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ #[cfg(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("TraitItemConst");
+ 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("default", &self.default);
+ formatter.field("semi_token", &self.semi_token);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("TraitItemMacro");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("mac", &self.mac);
+ formatter.field("semi_token", &self.semi_token);
+ formatter.finish()
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Debug for TraitItemMethod {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ let mut formatter = formatter.debug_struct("TraitItemMethod");
+ formatter.field("attrs", &self.attrs);
+ formatter.field("sig", &self.sig);
+ formatter.field("default", &self.default);
+ formatter.field("semi_token", &self.semi_token);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("TraitItemType");
+ 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()
+ }
+}
+#[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 {
+ match self {
+ Type::Array(v0) => {
+ let mut formatter = formatter.debug_tuple("Array");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Type::BareFn(v0) => {
+ let mut formatter = formatter.debug_tuple("BareFn");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Type::Group(v0) => {
+ let mut formatter = formatter.debug_tuple("Group");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Type::ImplTrait(v0) => {
+ let mut formatter = formatter.debug_tuple("ImplTrait");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Type::Infer(v0) => {
+ let mut formatter = formatter.debug_tuple("Infer");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Type::Macro(v0) => {
+ let mut formatter = formatter.debug_tuple("Macro");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Type::Never(v0) => {
+ let mut formatter = formatter.debug_tuple("Never");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Type::Paren(v0) => {
+ let mut formatter = formatter.debug_tuple("Paren");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Type::Path(v0) => {
+ let mut formatter = formatter.debug_tuple("Path");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Type::Ptr(v0) => {
+ let mut formatter = formatter.debug_tuple("Ptr");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Type::Reference(v0) => {
+ let mut formatter = formatter.debug_tuple("Reference");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Type::Slice(v0) => {
+ let mut formatter = formatter.debug_tuple("Slice");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Type::TraitObject(v0) => {
+ let mut formatter = formatter.debug_tuple("TraitObject");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Type::Tuple(v0) => {
+ let mut formatter = formatter.debug_tuple("Tuple");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Type::Verbatim(v0) => {
+ let mut formatter = formatter.debug_tuple("Verbatim");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ #[cfg(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("TypeArray");
+ 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()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("TypeBareFn");
+ 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()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("TypeGroup");
+ formatter.field("group_token", &self.group_token);
+ formatter.field("elem", &self.elem);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("TypeImplTrait");
+ formatter.field("impl_token", &self.impl_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 TypeInfer {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ let mut formatter = formatter.debug_struct("TypeInfer");
+ formatter.field("underscore_token", &self.underscore_token);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("TypeMacro");
+ formatter.field("mac", &self.mac);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("TypeNever");
+ formatter.field("bang_token", &self.bang_token);
+ formatter.finish()
+ }
+}
+#[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 {
+ match self {
+ TypeParamBound::Trait(v0) => {
+ let mut formatter = formatter.debug_tuple("Trait");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ TypeParamBound::Lifetime(v0) => {
+ let mut formatter = formatter.debug_tuple("Lifetime");
+ 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 {
+ let mut formatter = formatter.debug_struct("TypeParen");
+ formatter.field("paren_token", &self.paren_token);
+ formatter.field("elem", &self.elem);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("TypePath");
+ formatter.field("qself", &self.qself);
+ 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 TypePtr {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ let mut formatter = formatter.debug_struct("TypePtr");
+ 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()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("TypeReference");
+ formatter.field("and_token", &self.and_token);
+ formatter.field("lifetime", &self.lifetime);
+ formatter.field("mutability", &self.mutability);
+ formatter.field("elem", &self.elem);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("TypeSlice");
+ formatter.field("bracket_token", &self.bracket_token);
+ formatter.field("elem", &self.elem);
+ formatter.finish()
+ }
+}
+#[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 {
+ let mut formatter = formatter.debug_struct("TypeTraitObject");
+ formatter.field("dyn_token", &self.dyn_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 TypeTuple {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ let mut formatter = formatter.debug_struct("TypeTuple");
+ formatter.field("paren_token", &self.paren_token);
+ formatter.field("elems", &self.elems);
+ formatter.finish()
+ }
+}
+#[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 {
+ 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 {
+ 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(any(feature = "derive", 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("dots", &self.dots);
+ 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 VisCrate {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ let mut formatter = formatter.debug_struct("VisCrate");
+ formatter.field("crate_token", &self.crate_token);
+ formatter.finish()
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Debug for VisPublic {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ let mut formatter = formatter.debug_struct("VisPublic");
+ formatter.field("pub_token", &self.pub_token);
+ 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 {
+ let mut formatter = formatter.debug_struct("VisRestricted");
+ 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()
+ }
+}
+#[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 {
+ match self {
+ Visibility::Public(v0) => {
+ let mut formatter = formatter.debug_tuple("Public");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Visibility::Crate(v0) => {
+ let mut formatter = formatter.debug_tuple("Crate");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ Visibility::Restricted(v0) => {
+ let mut formatter = formatter.debug_tuple("Restricted");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ 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 {
+ match self {
+ WherePredicate::Type(v0) => {
+ let mut formatter = formatter.debug_tuple("Type");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ WherePredicate::Lifetime(v0) => {
+ let mut formatter = formatter.debug_tuple("Lifetime");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ WherePredicate::Eq(v0) => {
+ let mut formatter = formatter.debug_tuple("Eq");
+ formatter.field(v0);
+ formatter.finish()
+ }
+ }
+ }
+}
diff --git a/third_party/rust/syn/src/gen/eq.rs b/third_party/rust/syn/src/gen/eq.rs
new file mode 100644
index 0000000000..20acb809d8
--- /dev/null
+++ b/third_party/rust/syn/src/gen/eq.rs
@@ -0,0 +1,2195 @@
+// 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 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.path == other.path
+ && TokenStreamHelper(&self.tokens) == TokenStreamHelper(&other.tokens)
+ }
+}
+#[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 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::AddEq(_), BinOp::AddEq(_)) => true,
+ (BinOp::SubEq(_), BinOp::SubEq(_)) => true,
+ (BinOp::MulEq(_), BinOp::MulEq(_)) => true,
+ (BinOp::DivEq(_), BinOp::DivEq(_)) => true,
+ (BinOp::RemEq(_), BinOp::RemEq(_)) => true,
+ (BinOp::BitXorEq(_), BinOp::BitXorEq(_)) => true,
+ (BinOp::BitAndEq(_), BinOp::BitAndEq(_)) => true,
+ (BinOp::BitOrEq(_), BinOp::BitOrEq(_)) => true,
+ (BinOp::ShlEq(_), BinOp::ShlEq(_)) => true,
+ (BinOp::ShrEq(_), BinOp::ShrEq(_)) => true,
+ _ => false,
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Eq for Binding {}
+#[cfg(any(feature = "derive", feature = "full"))]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl PartialEq for Binding {
+ fn eq(&self, other: &Self) -> bool {
+ self.ident == other.ident && self.ty == other.ty
+ }
+}
+#[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.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::AssignOp(self0), Expr::AssignOp(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::Box(self0), Expr::Box(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::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,
+ #[cfg(feature = "full")]
+ (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::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,
+ #[cfg(feature = "full")]
+ (Expr::Macro(self0), Expr::Macro(other0)) => self0 == other0,
+ #[cfg(feature = "full")]
+ (Expr::Match(self0), Expr::Match(other0)) => self0 == other0,
+ #[cfg(feature = "full")]
+ (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,
+ #[cfg(feature = "full")]
+ (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,
+ #[cfg(feature = "full")]
+ (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,
+ #[cfg(feature = "full")]
+ (Expr::Type(self0), Expr::Type(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 ExprAssignOp {}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl PartialEq for ExprAssignOp {
+ 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 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 ExprBox {}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl PartialEq for ExprBox {
+ 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 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.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 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(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Eq for ExprGroup {}
+#[cfg(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 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(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Eq for ExprMacro {}
+#[cfg(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(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Eq for ExprMethodCall {}
+#[cfg(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.from == other.from
+ && self.limits == other.limits && self.to == other.to
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Eq for ExprReference {}
+#[cfg(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(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Eq for ExprStruct {}
+#[cfg(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.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(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Eq for ExprType {}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl PartialEq for ExprType {
+ fn eq(&self, other: &Self) -> bool {
+ self.attrs == other.attrs && self.expr == other.expr && self.ty == other.ty
+ }
+}
+#[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.ident == other.ident
+ && self.colon_token == other.colon_token && self.ty == other.ty
+ }
+}
+#[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(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Eq for FieldValue {}
+#[cfg(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
+ }
+}
+#[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::Binding(self0), GenericArgument::Binding(other0)) => {
+ self0 == other0
+ }
+ (GenericArgument::Constraint(self0), GenericArgument::Constraint(other0)) => {
+ self0 == other0
+ }
+ _ => false,
+ }
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Eq for GenericMethodArgument {}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl PartialEq for GenericMethodArgument {
+ fn eq(&self, other: &Self) -> bool {
+ match (self, other) {
+ (GenericMethodArgument::Type(self0), GenericMethodArgument::Type(other0)) => {
+ self0 == other0
+ }
+ (
+ GenericMethodArgument::Const(self0),
+ GenericMethodArgument::Const(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::Type(self0), GenericParam::Type(other0)) => self0 == other0,
+ (GenericParam::Lifetime(self0), GenericParam::Lifetime(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::Method(self0), ImplItem::Method(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.ty == other.ty && self.expr == other.expr
+ }
+}
+#[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 ImplItemMethod {}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl PartialEq for ImplItemMethod {
+ 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 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 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::Macro2(self0), Item::Macro2(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.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.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 ItemMacro2 {}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl PartialEq for ItemMacro2 {
+ fn eq(&self, other: &Self) -> bool {
+ self.attrs == other.attrs && self.vis == other.vis && self.ident == other.ident
+ && TokenStreamHelper(&self.rules) == TokenStreamHelper(&other.rules)
+ }
+}
+#[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.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.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 LifetimeDef {}
+#[cfg(any(feature = "derive", feature = "full"))]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl PartialEq for LifetimeDef {
+ 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(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.nested == other.nested
+ }
+}
+#[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.lit == other.lit
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Eq for MethodTurbofish {}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl PartialEq for MethodTurbofish {
+ fn eq(&self, other: &Self) -> bool {
+ self.args == other.args
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Eq for NestedMeta {}
+#[cfg(any(feature = "derive", feature = "full"))]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl PartialEq for NestedMeta {
+ fn eq(&self, other: &Self) -> bool {
+ match (self, other) {
+ (NestedMeta::Meta(self0), NestedMeta::Meta(other0)) => self0 == other0,
+ (NestedMeta::Lit(self0), NestedMeta::Lit(other0)) => self0 == other0,
+ _ => false,
+ }
+ }
+}
+#[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::Box(self0), Pat::Box(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::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 PatBox {}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl PartialEq for PatBox {
+ 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 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 PatLit {}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl PartialEq for PatLit {
+ 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 PatMacro {}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl PartialEq for PatMacro {
+ 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 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 PatPath {}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl PartialEq for PatPath {
+ 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 PatRange {}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl PartialEq for PatRange {
+ fn eq(&self, other: &Self) -> bool {
+ self.attrs == other.attrs && self.lo == other.lo && self.limits == other.limits
+ && self.hi == other.hi
+ }
+}
+#[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.path == other.path
+ && self.fields == other.fields && self.dot2_token == other.dot2_token
+ }
+}
+#[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.path == other.path && self.pat == other.pat
+ }
+}
+#[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 PredicateEq {}
+#[cfg(any(feature = "derive", feature = "full"))]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl PartialEq for PredicateEq {
+ fn eq(&self, other: &Self) -> bool {
+ self.lhs_ty == other.lhs_ty && self.rhs_ty == other.rhs_ty
+ }
+}
+#[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
+ }
+}
+#[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 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), Stmt::Expr(other0)) => self0 == other0,
+ (Stmt::Semi(self0, _), Stmt::Semi(other0, _)) => self0 == other0,
+ _ => false,
+ }
+ }
+}
+#[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::Method(self0), TraitItem::Method(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.ty == other.ty
+ && self.default == other.default
+ }
+}
+#[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 TraitItemMethod {}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl PartialEq for TraitItemMethod {
+ 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 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
+ }
+ _ => 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(any(feature = "derive", feature = "full"))]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Eq for Variadic {}
+#[cfg(any(feature = "derive", 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
+ }
+}
+#[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 VisCrate {}
+#[cfg(any(feature = "derive", feature = "full"))]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl PartialEq for VisCrate {
+ 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 VisPublic {}
+#[cfg(any(feature = "derive", feature = "full"))]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl PartialEq for VisPublic {
+ 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 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(self0), Visibility::Public(other0)) => self0 == other0,
+ (Visibility::Crate(self0), Visibility::Crate(other0)) => self0 == other0,
+ (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::Type(self0), WherePredicate::Type(other0)) => {
+ self0 == other0
+ }
+ (WherePredicate::Lifetime(self0), WherePredicate::Lifetime(other0)) => {
+ self0 == other0
+ }
+ (WherePredicate::Eq(self0), WherePredicate::Eq(other0)) => self0 == other0,
+ _ => false,
+ }
+ }
+}
diff --git a/third_party/rust/syn/src/gen/fold.rs b/third_party/rust/syn/src/gen/fold.rs
new file mode 100644
index 0000000000..98bb5794aa
--- /dev/null
+++ b/third_party/rust/syn/src/gen/fold.rs
@@ -0,0 +1,3341 @@
+// 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)]
+#[cfg(any(feature = "full", feature = "derive"))]
+use crate::gen::helper::fold::*;
+#[cfg(any(feature = "full", feature = "derive"))]
+use crate::token::{Brace, Bracket, Group, Paren};
+use crate::*;
+use proc_macro2::Span;
+#[cfg(feature = "full")]
+macro_rules! full {
+ ($e:expr) => {
+ $e
+ };
+}
+#[cfg(all(feature = "derive", not(feature = "full")))]
+macro_rules! full {
+ ($e:expr) => {
+ unreachable!()
+ };
+}
+/// Syntax tree traversal to transform the nodes of an owned syntax tree.
+///
+/// See the [module documentation] for details.
+///
+/// [module documentation]: self
+///
+/// *This trait is available only if Syn is built with the `"fold"` feature.*
+pub trait Fold {
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_abi(&mut self, i: Abi) -> Abi {
+ fold_abi(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_angle_bracketed_generic_arguments(
+ &mut self,
+ i: AngleBracketedGenericArguments,
+ ) -> AngleBracketedGenericArguments {
+ fold_angle_bracketed_generic_arguments(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_arm(&mut self, i: Arm) -> Arm {
+ fold_arm(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_attr_style(&mut self, i: AttrStyle) -> AttrStyle {
+ fold_attr_style(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_attribute(&mut self, i: Attribute) -> Attribute {
+ fold_attribute(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_bare_fn_arg(&mut self, i: BareFnArg) -> BareFnArg {
+ fold_bare_fn_arg(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_bin_op(&mut self, i: BinOp) -> BinOp {
+ fold_bin_op(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_binding(&mut self, i: Binding) -> Binding {
+ fold_binding(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_block(&mut self, i: Block) -> Block {
+ fold_block(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_bound_lifetimes(&mut self, i: BoundLifetimes) -> BoundLifetimes {
+ fold_bound_lifetimes(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_const_param(&mut self, i: ConstParam) -> ConstParam {
+ fold_const_param(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_constraint(&mut self, i: Constraint) -> Constraint {
+ fold_constraint(self, i)
+ }
+ #[cfg(feature = "derive")]
+ fn fold_data(&mut self, i: Data) -> Data {
+ fold_data(self, i)
+ }
+ #[cfg(feature = "derive")]
+ fn fold_data_enum(&mut self, i: DataEnum) -> DataEnum {
+ fold_data_enum(self, i)
+ }
+ #[cfg(feature = "derive")]
+ fn fold_data_struct(&mut self, i: DataStruct) -> DataStruct {
+ fold_data_struct(self, i)
+ }
+ #[cfg(feature = "derive")]
+ fn fold_data_union(&mut self, i: DataUnion) -> DataUnion {
+ fold_data_union(self, i)
+ }
+ #[cfg(feature = "derive")]
+ fn fold_derive_input(&mut self, i: DeriveInput) -> DeriveInput {
+ fold_derive_input(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_expr(&mut self, i: Expr) -> Expr {
+ fold_expr(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_array(&mut self, i: ExprArray) -> ExprArray {
+ fold_expr_array(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_assign(&mut self, i: ExprAssign) -> ExprAssign {
+ fold_expr_assign(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_assign_op(&mut self, i: ExprAssignOp) -> ExprAssignOp {
+ fold_expr_assign_op(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_async(&mut self, i: ExprAsync) -> ExprAsync {
+ fold_expr_async(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_await(&mut self, i: ExprAwait) -> ExprAwait {
+ fold_expr_await(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_expr_binary(&mut self, i: ExprBinary) -> ExprBinary {
+ fold_expr_binary(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_block(&mut self, i: ExprBlock) -> ExprBlock {
+ fold_expr_block(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_box(&mut self, i: ExprBox) -> ExprBox {
+ fold_expr_box(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_break(&mut self, i: ExprBreak) -> ExprBreak {
+ fold_expr_break(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_expr_call(&mut self, i: ExprCall) -> ExprCall {
+ fold_expr_call(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_expr_cast(&mut self, i: ExprCast) -> ExprCast {
+ fold_expr_cast(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_closure(&mut self, i: ExprClosure) -> ExprClosure {
+ fold_expr_closure(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_continue(&mut self, i: ExprContinue) -> ExprContinue {
+ fold_expr_continue(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_expr_field(&mut self, i: ExprField) -> ExprField {
+ fold_expr_field(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_for_loop(&mut self, i: ExprForLoop) -> ExprForLoop {
+ fold_expr_for_loop(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_group(&mut self, i: ExprGroup) -> ExprGroup {
+ fold_expr_group(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_if(&mut self, i: ExprIf) -> ExprIf {
+ fold_expr_if(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_expr_index(&mut self, i: ExprIndex) -> ExprIndex {
+ fold_expr_index(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_let(&mut self, i: ExprLet) -> ExprLet {
+ fold_expr_let(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_expr_lit(&mut self, i: ExprLit) -> ExprLit {
+ fold_expr_lit(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_loop(&mut self, i: ExprLoop) -> ExprLoop {
+ fold_expr_loop(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_macro(&mut self, i: ExprMacro) -> ExprMacro {
+ fold_expr_macro(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_match(&mut self, i: ExprMatch) -> ExprMatch {
+ fold_expr_match(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_method_call(&mut self, i: ExprMethodCall) -> ExprMethodCall {
+ fold_expr_method_call(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_expr_paren(&mut self, i: ExprParen) -> ExprParen {
+ fold_expr_paren(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_expr_path(&mut self, i: ExprPath) -> ExprPath {
+ fold_expr_path(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_range(&mut self, i: ExprRange) -> ExprRange {
+ fold_expr_range(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_reference(&mut self, i: ExprReference) -> ExprReference {
+ fold_expr_reference(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_repeat(&mut self, i: ExprRepeat) -> ExprRepeat {
+ fold_expr_repeat(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_return(&mut self, i: ExprReturn) -> ExprReturn {
+ fold_expr_return(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_struct(&mut self, i: ExprStruct) -> ExprStruct {
+ fold_expr_struct(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_try(&mut self, i: ExprTry) -> ExprTry {
+ fold_expr_try(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_try_block(&mut self, i: ExprTryBlock) -> ExprTryBlock {
+ fold_expr_try_block(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_tuple(&mut self, i: ExprTuple) -> ExprTuple {
+ fold_expr_tuple(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_type(&mut self, i: ExprType) -> ExprType {
+ fold_expr_type(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_expr_unary(&mut self, i: ExprUnary) -> ExprUnary {
+ fold_expr_unary(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_unsafe(&mut self, i: ExprUnsafe) -> ExprUnsafe {
+ fold_expr_unsafe(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_while(&mut self, i: ExprWhile) -> ExprWhile {
+ fold_expr_while(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_expr_yield(&mut self, i: ExprYield) -> ExprYield {
+ fold_expr_yield(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_field(&mut self, i: Field) -> Field {
+ fold_field(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_field_pat(&mut self, i: FieldPat) -> FieldPat {
+ fold_field_pat(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_field_value(&mut self, i: FieldValue) -> FieldValue {
+ fold_field_value(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_fields(&mut self, i: Fields) -> Fields {
+ fold_fields(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_fields_named(&mut self, i: FieldsNamed) -> FieldsNamed {
+ fold_fields_named(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_fields_unnamed(&mut self, i: FieldsUnnamed) -> FieldsUnnamed {
+ fold_fields_unnamed(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_file(&mut self, i: File) -> File {
+ fold_file(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_fn_arg(&mut self, i: FnArg) -> FnArg {
+ fold_fn_arg(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_foreign_item(&mut self, i: ForeignItem) -> ForeignItem {
+ fold_foreign_item(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_foreign_item_fn(&mut self, i: ForeignItemFn) -> ForeignItemFn {
+ fold_foreign_item_fn(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_foreign_item_macro(&mut self, i: ForeignItemMacro) -> ForeignItemMacro {
+ fold_foreign_item_macro(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_foreign_item_static(&mut self, i: ForeignItemStatic) -> ForeignItemStatic {
+ fold_foreign_item_static(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_foreign_item_type(&mut self, i: ForeignItemType) -> ForeignItemType {
+ fold_foreign_item_type(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_generic_argument(&mut self, i: GenericArgument) -> GenericArgument {
+ fold_generic_argument(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_generic_method_argument(
+ &mut self,
+ i: GenericMethodArgument,
+ ) -> GenericMethodArgument {
+ fold_generic_method_argument(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_generic_param(&mut self, i: GenericParam) -> GenericParam {
+ fold_generic_param(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_generics(&mut self, i: Generics) -> Generics {
+ fold_generics(self, i)
+ }
+ fn fold_ident(&mut self, i: Ident) -> Ident {
+ fold_ident(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_impl_item(&mut self, i: ImplItem) -> ImplItem {
+ fold_impl_item(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_impl_item_const(&mut self, i: ImplItemConst) -> ImplItemConst {
+ fold_impl_item_const(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_impl_item_macro(&mut self, i: ImplItemMacro) -> ImplItemMacro {
+ fold_impl_item_macro(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_impl_item_method(&mut self, i: ImplItemMethod) -> ImplItemMethod {
+ fold_impl_item_method(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_impl_item_type(&mut self, i: ImplItemType) -> ImplItemType {
+ fold_impl_item_type(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_index(&mut self, i: Index) -> Index {
+ fold_index(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_item(&mut self, i: Item) -> Item {
+ fold_item(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_item_const(&mut self, i: ItemConst) -> ItemConst {
+ fold_item_const(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_item_enum(&mut self, i: ItemEnum) -> ItemEnum {
+ fold_item_enum(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_item_extern_crate(&mut self, i: ItemExternCrate) -> ItemExternCrate {
+ fold_item_extern_crate(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_item_fn(&mut self, i: ItemFn) -> ItemFn {
+ fold_item_fn(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_item_foreign_mod(&mut self, i: ItemForeignMod) -> ItemForeignMod {
+ fold_item_foreign_mod(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_item_impl(&mut self, i: ItemImpl) -> ItemImpl {
+ fold_item_impl(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_item_macro(&mut self, i: ItemMacro) -> ItemMacro {
+ fold_item_macro(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_item_macro2(&mut self, i: ItemMacro2) -> ItemMacro2 {
+ fold_item_macro2(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_item_mod(&mut self, i: ItemMod) -> ItemMod {
+ fold_item_mod(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_item_static(&mut self, i: ItemStatic) -> ItemStatic {
+ fold_item_static(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_item_struct(&mut self, i: ItemStruct) -> ItemStruct {
+ fold_item_struct(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_item_trait(&mut self, i: ItemTrait) -> ItemTrait {
+ fold_item_trait(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_item_trait_alias(&mut self, i: ItemTraitAlias) -> ItemTraitAlias {
+ fold_item_trait_alias(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_item_type(&mut self, i: ItemType) -> ItemType {
+ fold_item_type(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_item_union(&mut self, i: ItemUnion) -> ItemUnion {
+ fold_item_union(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_item_use(&mut self, i: ItemUse) -> ItemUse {
+ fold_item_use(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_label(&mut self, i: Label) -> Label {
+ fold_label(self, i)
+ }
+ fn fold_lifetime(&mut self, i: Lifetime) -> Lifetime {
+ fold_lifetime(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_lifetime_def(&mut self, i: LifetimeDef) -> LifetimeDef {
+ fold_lifetime_def(self, i)
+ }
+ 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")]
+ fn fold_local(&mut self, i: Local) -> Local {
+ fold_local(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_macro(&mut self, i: Macro) -> Macro {
+ fold_macro(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_macro_delimiter(&mut self, i: MacroDelimiter) -> MacroDelimiter {
+ fold_macro_delimiter(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_member(&mut self, i: Member) -> Member {
+ fold_member(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_meta(&mut self, i: Meta) -> Meta {
+ fold_meta(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_meta_list(&mut self, i: MetaList) -> MetaList {
+ fold_meta_list(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_meta_name_value(&mut self, i: MetaNameValue) -> MetaNameValue {
+ fold_meta_name_value(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_method_turbofish(&mut self, i: MethodTurbofish) -> MethodTurbofish {
+ fold_method_turbofish(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_nested_meta(&mut self, i: NestedMeta) -> NestedMeta {
+ fold_nested_meta(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_parenthesized_generic_arguments(
+ &mut self,
+ i: ParenthesizedGenericArguments,
+ ) -> ParenthesizedGenericArguments {
+ fold_parenthesized_generic_arguments(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_pat(&mut self, i: Pat) -> Pat {
+ fold_pat(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_pat_box(&mut self, i: PatBox) -> PatBox {
+ fold_pat_box(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_pat_ident(&mut self, i: PatIdent) -> PatIdent {
+ fold_pat_ident(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_pat_lit(&mut self, i: PatLit) -> PatLit {
+ fold_pat_lit(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_pat_macro(&mut self, i: PatMacro) -> PatMacro {
+ fold_pat_macro(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_pat_or(&mut self, i: PatOr) -> PatOr {
+ fold_pat_or(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_pat_path(&mut self, i: PatPath) -> PatPath {
+ fold_pat_path(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_pat_range(&mut self, i: PatRange) -> PatRange {
+ fold_pat_range(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_pat_reference(&mut self, i: PatReference) -> PatReference {
+ fold_pat_reference(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_pat_rest(&mut self, i: PatRest) -> PatRest {
+ fold_pat_rest(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_pat_slice(&mut self, i: PatSlice) -> PatSlice {
+ fold_pat_slice(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_pat_struct(&mut self, i: PatStruct) -> PatStruct {
+ fold_pat_struct(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_pat_tuple(&mut self, i: PatTuple) -> PatTuple {
+ fold_pat_tuple(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_pat_tuple_struct(&mut self, i: PatTupleStruct) -> PatTupleStruct {
+ fold_pat_tuple_struct(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_pat_type(&mut self, i: PatType) -> PatType {
+ fold_pat_type(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_pat_wild(&mut self, i: PatWild) -> PatWild {
+ fold_pat_wild(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_path(&mut self, i: Path) -> Path {
+ fold_path(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_path_arguments(&mut self, i: PathArguments) -> PathArguments {
+ fold_path_arguments(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_path_segment(&mut self, i: PathSegment) -> PathSegment {
+ fold_path_segment(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_predicate_eq(&mut self, i: PredicateEq) -> PredicateEq {
+ fold_predicate_eq(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_predicate_lifetime(&mut self, i: PredicateLifetime) -> PredicateLifetime {
+ fold_predicate_lifetime(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_predicate_type(&mut self, i: PredicateType) -> PredicateType {
+ fold_predicate_type(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_qself(&mut self, i: QSelf) -> QSelf {
+ fold_qself(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_range_limits(&mut self, i: RangeLimits) -> RangeLimits {
+ fold_range_limits(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_receiver(&mut self, i: Receiver) -> Receiver {
+ fold_receiver(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_return_type(&mut self, i: ReturnType) -> ReturnType {
+ fold_return_type(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_signature(&mut self, i: Signature) -> Signature {
+ fold_signature(self, i)
+ }
+ fn fold_span(&mut self, i: Span) -> Span {
+ fold_span(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_stmt(&mut self, i: Stmt) -> Stmt {
+ fold_stmt(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_trait_bound(&mut self, i: TraitBound) -> TraitBound {
+ fold_trait_bound(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_trait_bound_modifier(
+ &mut self,
+ i: TraitBoundModifier,
+ ) -> TraitBoundModifier {
+ fold_trait_bound_modifier(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_trait_item(&mut self, i: TraitItem) -> TraitItem {
+ fold_trait_item(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_trait_item_const(&mut self, i: TraitItemConst) -> TraitItemConst {
+ fold_trait_item_const(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_trait_item_macro(&mut self, i: TraitItemMacro) -> TraitItemMacro {
+ fold_trait_item_macro(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_trait_item_method(&mut self, i: TraitItemMethod) -> TraitItemMethod {
+ fold_trait_item_method(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_trait_item_type(&mut self, i: TraitItemType) -> TraitItemType {
+ fold_trait_item_type(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_type(&mut self, i: Type) -> Type {
+ fold_type(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_type_array(&mut self, i: TypeArray) -> TypeArray {
+ fold_type_array(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_type_bare_fn(&mut self, i: TypeBareFn) -> TypeBareFn {
+ fold_type_bare_fn(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_type_group(&mut self, i: TypeGroup) -> TypeGroup {
+ fold_type_group(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_type_impl_trait(&mut self, i: TypeImplTrait) -> TypeImplTrait {
+ fold_type_impl_trait(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_type_infer(&mut self, i: TypeInfer) -> TypeInfer {
+ fold_type_infer(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_type_macro(&mut self, i: TypeMacro) -> TypeMacro {
+ fold_type_macro(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_type_never(&mut self, i: TypeNever) -> TypeNever {
+ fold_type_never(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_type_param(&mut self, i: TypeParam) -> TypeParam {
+ fold_type_param(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_type_param_bound(&mut self, i: TypeParamBound) -> TypeParamBound {
+ fold_type_param_bound(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_type_paren(&mut self, i: TypeParen) -> TypeParen {
+ fold_type_paren(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_type_path(&mut self, i: TypePath) -> TypePath {
+ fold_type_path(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_type_ptr(&mut self, i: TypePtr) -> TypePtr {
+ fold_type_ptr(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_type_reference(&mut self, i: TypeReference) -> TypeReference {
+ fold_type_reference(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_type_slice(&mut self, i: TypeSlice) -> TypeSlice {
+ fold_type_slice(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_type_trait_object(&mut self, i: TypeTraitObject) -> TypeTraitObject {
+ fold_type_trait_object(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_type_tuple(&mut self, i: TypeTuple) -> TypeTuple {
+ fold_type_tuple(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_un_op(&mut self, i: UnOp) -> UnOp {
+ fold_un_op(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_use_glob(&mut self, i: UseGlob) -> UseGlob {
+ fold_use_glob(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_use_group(&mut self, i: UseGroup) -> UseGroup {
+ fold_use_group(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_use_name(&mut self, i: UseName) -> UseName {
+ fold_use_name(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_use_path(&mut self, i: UsePath) -> UsePath {
+ fold_use_path(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_use_rename(&mut self, i: UseRename) -> UseRename {
+ fold_use_rename(self, i)
+ }
+ #[cfg(feature = "full")]
+ fn fold_use_tree(&mut self, i: UseTree) -> UseTree {
+ fold_use_tree(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_variadic(&mut self, i: Variadic) -> Variadic {
+ fold_variadic(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_variant(&mut self, i: Variant) -> Variant {
+ fold_variant(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_vis_crate(&mut self, i: VisCrate) -> VisCrate {
+ fold_vis_crate(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_vis_public(&mut self, i: VisPublic) -> VisPublic {
+ fold_vis_public(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_vis_restricted(&mut self, i: VisRestricted) -> VisRestricted {
+ fold_vis_restricted(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_visibility(&mut self, i: Visibility) -> Visibility {
+ fold_visibility(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_where_clause(&mut self, i: WhereClause) -> WhereClause {
+ fold_where_clause(self, i)
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn fold_where_predicate(&mut self, i: WherePredicate) -> WherePredicate {
+ fold_where_predicate(self, i)
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_abi<F>(f: &mut F, node: Abi) -> Abi
+where
+ F: Fold + ?Sized,
+{
+ Abi {
+ extern_token: Token![extern](tokens_helper(f, &node.extern_token.span)),
+ name: (node.name).map(|it| f.fold_lit_str(it)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_angle_bracketed_generic_arguments<F>(
+ f: &mut F,
+ node: AngleBracketedGenericArguments,
+) -> AngleBracketedGenericArguments
+where
+ F: Fold + ?Sized,
+{
+ AngleBracketedGenericArguments {
+ colon2_token: (node.colon2_token)
+ .map(|it| Token![::](tokens_helper(f, &it.spans))),
+ lt_token: Token![<](tokens_helper(f, &node.lt_token.spans)),
+ args: FoldHelper::lift(node.args, |it| f.fold_generic_argument(it)),
+ gt_token: Token![>](tokens_helper(f, &node.gt_token.spans)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_arm<F>(f: &mut F, node: Arm) -> Arm
+where
+ F: Fold + ?Sized,
+{
+ Arm {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ pat: f.fold_pat(node.pat),
+ guard: (node.guard)
+ .map(|it| (
+ Token![if](tokens_helper(f, &(it).0.span)),
+ Box::new(f.fold_expr(*(it).1)),
+ )),
+ fat_arrow_token: Token![=>](tokens_helper(f, &node.fat_arrow_token.spans)),
+ body: Box::new(f.fold_expr(*node.body)),
+ comma: (node.comma).map(|it| Token![,](tokens_helper(f, &it.spans))),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_attr_style<F>(f: &mut F, node: AttrStyle) -> AttrStyle
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ AttrStyle::Outer => AttrStyle::Outer,
+ AttrStyle::Inner(_binding_0) => {
+ AttrStyle::Inner(Token![!](tokens_helper(f, &_binding_0.spans)))
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_attribute<F>(f: &mut F, node: Attribute) -> Attribute
+where
+ F: Fold + ?Sized,
+{
+ Attribute {
+ pound_token: Token![#](tokens_helper(f, &node.pound_token.spans)),
+ style: f.fold_attr_style(node.style),
+ bracket_token: Bracket(tokens_helper(f, &node.bracket_token.span)),
+ path: f.fold_path(node.path),
+ tokens: node.tokens,
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_bare_fn_arg<F>(f: &mut F, node: BareFnArg) -> BareFnArg
+where
+ F: Fold + ?Sized,
+{
+ BareFnArg {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ name: (node.name)
+ .map(|it| (
+ f.fold_ident((it).0),
+ Token![:](tokens_helper(f, &(it).1.spans)),
+ )),
+ ty: f.fold_type(node.ty),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_bin_op<F>(f: &mut F, node: BinOp) -> BinOp
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ BinOp::Add(_binding_0) => {
+ BinOp::Add(Token![+](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::Sub(_binding_0) => {
+ BinOp::Sub(Token![-](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::Mul(_binding_0) => {
+ BinOp::Mul(Token![*](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::Div(_binding_0) => {
+ BinOp::Div(Token![/](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::Rem(_binding_0) => {
+ BinOp::Rem(Token![%](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::And(_binding_0) => {
+ BinOp::And(Token![&&](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::Or(_binding_0) => {
+ BinOp::Or(Token![||](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::BitXor(_binding_0) => {
+ BinOp::BitXor(Token![^](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::BitAnd(_binding_0) => {
+ BinOp::BitAnd(Token![&](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::BitOr(_binding_0) => {
+ BinOp::BitOr(Token![|](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::Shl(_binding_0) => {
+ BinOp::Shl(Token![<<](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::Shr(_binding_0) => {
+ BinOp::Shr(Token![>>](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::Eq(_binding_0) => {
+ BinOp::Eq(Token![==](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::Lt(_binding_0) => {
+ BinOp::Lt(Token![<](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::Le(_binding_0) => {
+ BinOp::Le(Token![<=](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::Ne(_binding_0) => {
+ BinOp::Ne(Token![!=](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::Ge(_binding_0) => {
+ BinOp::Ge(Token![>=](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::Gt(_binding_0) => {
+ BinOp::Gt(Token![>](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::AddEq(_binding_0) => {
+ BinOp::AddEq(Token![+=](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::SubEq(_binding_0) => {
+ BinOp::SubEq(Token![-=](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::MulEq(_binding_0) => {
+ BinOp::MulEq(Token![*=](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::DivEq(_binding_0) => {
+ BinOp::DivEq(Token![/=](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::RemEq(_binding_0) => {
+ BinOp::RemEq(Token![%=](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::BitXorEq(_binding_0) => {
+ BinOp::BitXorEq(Token![^=](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::BitAndEq(_binding_0) => {
+ BinOp::BitAndEq(Token![&=](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::BitOrEq(_binding_0) => {
+ BinOp::BitOrEq(Token![|=](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::ShlEq(_binding_0) => {
+ BinOp::ShlEq(Token![<<=](tokens_helper(f, &_binding_0.spans)))
+ }
+ BinOp::ShrEq(_binding_0) => {
+ BinOp::ShrEq(Token![>>=](tokens_helper(f, &_binding_0.spans)))
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_binding<F>(f: &mut F, node: Binding) -> Binding
+where
+ F: Fold + ?Sized,
+{
+ Binding {
+ ident: f.fold_ident(node.ident),
+ eq_token: Token![=](tokens_helper(f, &node.eq_token.spans)),
+ ty: f.fold_type(node.ty),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_block<F>(f: &mut F, node: Block) -> Block
+where
+ F: Fold + ?Sized,
+{
+ Block {
+ brace_token: Brace(tokens_helper(f, &node.brace_token.span)),
+ stmts: FoldHelper::lift(node.stmts, |it| f.fold_stmt(it)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_bound_lifetimes<F>(f: &mut F, node: BoundLifetimes) -> BoundLifetimes
+where
+ F: Fold + ?Sized,
+{
+ BoundLifetimes {
+ for_token: Token![for](tokens_helper(f, &node.for_token.span)),
+ lt_token: Token![<](tokens_helper(f, &node.lt_token.spans)),
+ lifetimes: FoldHelper::lift(node.lifetimes, |it| f.fold_lifetime_def(it)),
+ gt_token: Token![>](tokens_helper(f, &node.gt_token.spans)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_const_param<F>(f: &mut F, node: ConstParam) -> ConstParam
+where
+ F: Fold + ?Sized,
+{
+ ConstParam {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ const_token: Token![const](tokens_helper(f, &node.const_token.span)),
+ ident: f.fold_ident(node.ident),
+ colon_token: Token![:](tokens_helper(f, &node.colon_token.spans)),
+ ty: f.fold_type(node.ty),
+ eq_token: (node.eq_token).map(|it| Token![=](tokens_helper(f, &it.spans))),
+ default: (node.default).map(|it| f.fold_expr(it)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_constraint<F>(f: &mut F, node: Constraint) -> Constraint
+where
+ F: Fold + ?Sized,
+{
+ Constraint {
+ ident: f.fold_ident(node.ident),
+ colon_token: Token![:](tokens_helper(f, &node.colon_token.spans)),
+ bounds: FoldHelper::lift(node.bounds, |it| f.fold_type_param_bound(it)),
+ }
+}
+#[cfg(feature = "derive")]
+pub fn fold_data<F>(f: &mut F, node: Data) -> Data
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ Data::Struct(_binding_0) => Data::Struct(f.fold_data_struct(_binding_0)),
+ Data::Enum(_binding_0) => Data::Enum(f.fold_data_enum(_binding_0)),
+ Data::Union(_binding_0) => Data::Union(f.fold_data_union(_binding_0)),
+ }
+}
+#[cfg(feature = "derive")]
+pub fn fold_data_enum<F>(f: &mut F, node: DataEnum) -> DataEnum
+where
+ F: Fold + ?Sized,
+{
+ DataEnum {
+ enum_token: Token![enum](tokens_helper(f, &node.enum_token.span)),
+ brace_token: Brace(tokens_helper(f, &node.brace_token.span)),
+ variants: FoldHelper::lift(node.variants, |it| f.fold_variant(it)),
+ }
+}
+#[cfg(feature = "derive")]
+pub fn fold_data_struct<F>(f: &mut F, node: DataStruct) -> DataStruct
+where
+ F: Fold + ?Sized,
+{
+ DataStruct {
+ struct_token: Token![struct](tokens_helper(f, &node.struct_token.span)),
+ fields: f.fold_fields(node.fields),
+ semi_token: (node.semi_token).map(|it| Token![;](tokens_helper(f, &it.spans))),
+ }
+}
+#[cfg(feature = "derive")]
+pub fn fold_data_union<F>(f: &mut F, node: DataUnion) -> DataUnion
+where
+ F: Fold + ?Sized,
+{
+ DataUnion {
+ union_token: Token![union](tokens_helper(f, &node.union_token.span)),
+ fields: f.fold_fields_named(node.fields),
+ }
+}
+#[cfg(feature = "derive")]
+pub fn fold_derive_input<F>(f: &mut F, node: DeriveInput) -> DeriveInput
+where
+ F: Fold + ?Sized,
+{
+ DeriveInput {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ ident: f.fold_ident(node.ident),
+ generics: f.fold_generics(node.generics),
+ data: f.fold_data(node.data),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_expr<F>(f: &mut F, node: Expr) -> Expr
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ Expr::Array(_binding_0) => Expr::Array(full!(f.fold_expr_array(_binding_0))),
+ Expr::Assign(_binding_0) => Expr::Assign(full!(f.fold_expr_assign(_binding_0))),
+ Expr::AssignOp(_binding_0) => {
+ Expr::AssignOp(full!(f.fold_expr_assign_op(_binding_0)))
+ }
+ Expr::Async(_binding_0) => Expr::Async(full!(f.fold_expr_async(_binding_0))),
+ Expr::Await(_binding_0) => Expr::Await(full!(f.fold_expr_await(_binding_0))),
+ Expr::Binary(_binding_0) => Expr::Binary(f.fold_expr_binary(_binding_0)),
+ Expr::Block(_binding_0) => Expr::Block(full!(f.fold_expr_block(_binding_0))),
+ Expr::Box(_binding_0) => Expr::Box(full!(f.fold_expr_box(_binding_0))),
+ Expr::Break(_binding_0) => Expr::Break(full!(f.fold_expr_break(_binding_0))),
+ Expr::Call(_binding_0) => Expr::Call(f.fold_expr_call(_binding_0)),
+ Expr::Cast(_binding_0) => Expr::Cast(f.fold_expr_cast(_binding_0)),
+ Expr::Closure(_binding_0) => {
+ Expr::Closure(full!(f.fold_expr_closure(_binding_0)))
+ }
+ Expr::Continue(_binding_0) => {
+ Expr::Continue(full!(f.fold_expr_continue(_binding_0)))
+ }
+ Expr::Field(_binding_0) => Expr::Field(f.fold_expr_field(_binding_0)),
+ Expr::ForLoop(_binding_0) => {
+ Expr::ForLoop(full!(f.fold_expr_for_loop(_binding_0)))
+ }
+ Expr::Group(_binding_0) => Expr::Group(full!(f.fold_expr_group(_binding_0))),
+ Expr::If(_binding_0) => Expr::If(full!(f.fold_expr_if(_binding_0))),
+ Expr::Index(_binding_0) => Expr::Index(f.fold_expr_index(_binding_0)),
+ Expr::Let(_binding_0) => Expr::Let(full!(f.fold_expr_let(_binding_0))),
+ Expr::Lit(_binding_0) => Expr::Lit(f.fold_expr_lit(_binding_0)),
+ Expr::Loop(_binding_0) => Expr::Loop(full!(f.fold_expr_loop(_binding_0))),
+ Expr::Macro(_binding_0) => Expr::Macro(full!(f.fold_expr_macro(_binding_0))),
+ Expr::Match(_binding_0) => Expr::Match(full!(f.fold_expr_match(_binding_0))),
+ Expr::MethodCall(_binding_0) => {
+ Expr::MethodCall(full!(f.fold_expr_method_call(_binding_0)))
+ }
+ Expr::Paren(_binding_0) => Expr::Paren(f.fold_expr_paren(_binding_0)),
+ Expr::Path(_binding_0) => Expr::Path(f.fold_expr_path(_binding_0)),
+ Expr::Range(_binding_0) => Expr::Range(full!(f.fold_expr_range(_binding_0))),
+ Expr::Reference(_binding_0) => {
+ Expr::Reference(full!(f.fold_expr_reference(_binding_0)))
+ }
+ Expr::Repeat(_binding_0) => Expr::Repeat(full!(f.fold_expr_repeat(_binding_0))),
+ Expr::Return(_binding_0) => Expr::Return(full!(f.fold_expr_return(_binding_0))),
+ Expr::Struct(_binding_0) => Expr::Struct(full!(f.fold_expr_struct(_binding_0))),
+ Expr::Try(_binding_0) => Expr::Try(full!(f.fold_expr_try(_binding_0))),
+ Expr::TryBlock(_binding_0) => {
+ Expr::TryBlock(full!(f.fold_expr_try_block(_binding_0)))
+ }
+ Expr::Tuple(_binding_0) => Expr::Tuple(full!(f.fold_expr_tuple(_binding_0))),
+ Expr::Type(_binding_0) => Expr::Type(full!(f.fold_expr_type(_binding_0))),
+ Expr::Unary(_binding_0) => Expr::Unary(f.fold_expr_unary(_binding_0)),
+ Expr::Unsafe(_binding_0) => Expr::Unsafe(full!(f.fold_expr_unsafe(_binding_0))),
+ Expr::Verbatim(_binding_0) => Expr::Verbatim(_binding_0),
+ Expr::While(_binding_0) => Expr::While(full!(f.fold_expr_while(_binding_0))),
+ Expr::Yield(_binding_0) => Expr::Yield(full!(f.fold_expr_yield(_binding_0))),
+ #[cfg(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_array<F>(f: &mut F, node: ExprArray) -> ExprArray
+where
+ F: Fold + ?Sized,
+{
+ ExprArray {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ bracket_token: Bracket(tokens_helper(f, &node.bracket_token.span)),
+ elems: FoldHelper::lift(node.elems, |it| f.fold_expr(it)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_assign<F>(f: &mut F, node: ExprAssign) -> ExprAssign
+where
+ F: Fold + ?Sized,
+{
+ ExprAssign {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ left: Box::new(f.fold_expr(*node.left)),
+ eq_token: Token![=](tokens_helper(f, &node.eq_token.spans)),
+ right: Box::new(f.fold_expr(*node.right)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_assign_op<F>(f: &mut F, node: ExprAssignOp) -> ExprAssignOp
+where
+ F: Fold + ?Sized,
+{
+ ExprAssignOp {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ left: Box::new(f.fold_expr(*node.left)),
+ op: f.fold_bin_op(node.op),
+ right: Box::new(f.fold_expr(*node.right)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_async<F>(f: &mut F, node: ExprAsync) -> ExprAsync
+where
+ F: Fold + ?Sized,
+{
+ ExprAsync {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ async_token: Token![async](tokens_helper(f, &node.async_token.span)),
+ capture: (node.capture).map(|it| Token![move](tokens_helper(f, &it.span))),
+ block: f.fold_block(node.block),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_await<F>(f: &mut F, node: ExprAwait) -> ExprAwait
+where
+ F: Fold + ?Sized,
+{
+ ExprAwait {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ base: Box::new(f.fold_expr(*node.base)),
+ dot_token: Token![.](tokens_helper(f, &node.dot_token.spans)),
+ await_token: crate::token::Await(tokens_helper(f, &node.await_token.span)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_expr_binary<F>(f: &mut F, node: ExprBinary) -> ExprBinary
+where
+ F: Fold + ?Sized,
+{
+ ExprBinary {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ left: Box::new(f.fold_expr(*node.left)),
+ op: f.fold_bin_op(node.op),
+ right: Box::new(f.fold_expr(*node.right)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_block<F>(f: &mut F, node: ExprBlock) -> ExprBlock
+where
+ F: Fold + ?Sized,
+{
+ ExprBlock {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ label: (node.label).map(|it| f.fold_label(it)),
+ block: f.fold_block(node.block),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_box<F>(f: &mut F, node: ExprBox) -> ExprBox
+where
+ F: Fold + ?Sized,
+{
+ ExprBox {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ box_token: Token![box](tokens_helper(f, &node.box_token.span)),
+ expr: Box::new(f.fold_expr(*node.expr)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_break<F>(f: &mut F, node: ExprBreak) -> ExprBreak
+where
+ F: Fold + ?Sized,
+{
+ ExprBreak {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ break_token: Token![break](tokens_helper(f, &node.break_token.span)),
+ label: (node.label).map(|it| f.fold_lifetime(it)),
+ expr: (node.expr).map(|it| Box::new(f.fold_expr(*it))),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_expr_call<F>(f: &mut F, node: ExprCall) -> ExprCall
+where
+ F: Fold + ?Sized,
+{
+ ExprCall {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ func: Box::new(f.fold_expr(*node.func)),
+ paren_token: Paren(tokens_helper(f, &node.paren_token.span)),
+ args: FoldHelper::lift(node.args, |it| f.fold_expr(it)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_expr_cast<F>(f: &mut F, node: ExprCast) -> ExprCast
+where
+ F: Fold + ?Sized,
+{
+ ExprCast {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ expr: Box::new(f.fold_expr(*node.expr)),
+ as_token: Token![as](tokens_helper(f, &node.as_token.span)),
+ ty: Box::new(f.fold_type(*node.ty)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_closure<F>(f: &mut F, node: ExprClosure) -> ExprClosure
+where
+ F: Fold + ?Sized,
+{
+ ExprClosure {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ movability: (node.movability)
+ .map(|it| Token![static](tokens_helper(f, &it.span))),
+ asyncness: (node.asyncness).map(|it| Token![async](tokens_helper(f, &it.span))),
+ capture: (node.capture).map(|it| Token![move](tokens_helper(f, &it.span))),
+ or1_token: Token![|](tokens_helper(f, &node.or1_token.spans)),
+ inputs: FoldHelper::lift(node.inputs, |it| f.fold_pat(it)),
+ or2_token: Token![|](tokens_helper(f, &node.or2_token.spans)),
+ output: f.fold_return_type(node.output),
+ body: Box::new(f.fold_expr(*node.body)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_continue<F>(f: &mut F, node: ExprContinue) -> ExprContinue
+where
+ F: Fold + ?Sized,
+{
+ ExprContinue {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ continue_token: Token![continue](tokens_helper(f, &node.continue_token.span)),
+ label: (node.label).map(|it| f.fold_lifetime(it)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_expr_field<F>(f: &mut F, node: ExprField) -> ExprField
+where
+ F: Fold + ?Sized,
+{
+ ExprField {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ base: Box::new(f.fold_expr(*node.base)),
+ dot_token: Token![.](tokens_helper(f, &node.dot_token.spans)),
+ member: f.fold_member(node.member),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_for_loop<F>(f: &mut F, node: ExprForLoop) -> ExprForLoop
+where
+ F: Fold + ?Sized,
+{
+ ExprForLoop {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ label: (node.label).map(|it| f.fold_label(it)),
+ for_token: Token![for](tokens_helper(f, &node.for_token.span)),
+ pat: f.fold_pat(node.pat),
+ in_token: Token![in](tokens_helper(f, &node.in_token.span)),
+ expr: Box::new(f.fold_expr(*node.expr)),
+ body: f.fold_block(node.body),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_group<F>(f: &mut F, node: ExprGroup) -> ExprGroup
+where
+ F: Fold + ?Sized,
+{
+ ExprGroup {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ group_token: Group(tokens_helper(f, &node.group_token.span)),
+ expr: Box::new(f.fold_expr(*node.expr)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_if<F>(f: &mut F, node: ExprIf) -> ExprIf
+where
+ F: Fold + ?Sized,
+{
+ ExprIf {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ if_token: Token![if](tokens_helper(f, &node.if_token.span)),
+ cond: Box::new(f.fold_expr(*node.cond)),
+ then_branch: f.fold_block(node.then_branch),
+ else_branch: (node.else_branch)
+ .map(|it| (
+ Token![else](tokens_helper(f, &(it).0.span)),
+ Box::new(f.fold_expr(*(it).1)),
+ )),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_expr_index<F>(f: &mut F, node: ExprIndex) -> ExprIndex
+where
+ F: Fold + ?Sized,
+{
+ ExprIndex {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ expr: Box::new(f.fold_expr(*node.expr)),
+ bracket_token: Bracket(tokens_helper(f, &node.bracket_token.span)),
+ index: Box::new(f.fold_expr(*node.index)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_let<F>(f: &mut F, node: ExprLet) -> ExprLet
+where
+ F: Fold + ?Sized,
+{
+ ExprLet {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ let_token: Token![let](tokens_helper(f, &node.let_token.span)),
+ pat: f.fold_pat(node.pat),
+ eq_token: Token![=](tokens_helper(f, &node.eq_token.spans)),
+ expr: Box::new(f.fold_expr(*node.expr)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_expr_lit<F>(f: &mut F, node: ExprLit) -> ExprLit
+where
+ F: Fold + ?Sized,
+{
+ ExprLit {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ lit: f.fold_lit(node.lit),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_loop<F>(f: &mut F, node: ExprLoop) -> ExprLoop
+where
+ F: Fold + ?Sized,
+{
+ ExprLoop {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ label: (node.label).map(|it| f.fold_label(it)),
+ loop_token: Token![loop](tokens_helper(f, &node.loop_token.span)),
+ body: f.fold_block(node.body),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_macro<F>(f: &mut F, node: ExprMacro) -> ExprMacro
+where
+ F: Fold + ?Sized,
+{
+ ExprMacro {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ mac: f.fold_macro(node.mac),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_match<F>(f: &mut F, node: ExprMatch) -> ExprMatch
+where
+ F: Fold + ?Sized,
+{
+ ExprMatch {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ match_token: Token![match](tokens_helper(f, &node.match_token.span)),
+ expr: Box::new(f.fold_expr(*node.expr)),
+ brace_token: Brace(tokens_helper(f, &node.brace_token.span)),
+ arms: FoldHelper::lift(node.arms, |it| f.fold_arm(it)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_method_call<F>(f: &mut F, node: ExprMethodCall) -> ExprMethodCall
+where
+ F: Fold + ?Sized,
+{
+ ExprMethodCall {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ receiver: Box::new(f.fold_expr(*node.receiver)),
+ dot_token: Token![.](tokens_helper(f, &node.dot_token.spans)),
+ method: f.fold_ident(node.method),
+ turbofish: (node.turbofish).map(|it| f.fold_method_turbofish(it)),
+ paren_token: Paren(tokens_helper(f, &node.paren_token.span)),
+ args: FoldHelper::lift(node.args, |it| f.fold_expr(it)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_expr_paren<F>(f: &mut F, node: ExprParen) -> ExprParen
+where
+ F: Fold + ?Sized,
+{
+ ExprParen {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ paren_token: Paren(tokens_helper(f, &node.paren_token.span)),
+ expr: Box::new(f.fold_expr(*node.expr)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_expr_path<F>(f: &mut F, node: ExprPath) -> ExprPath
+where
+ F: Fold + ?Sized,
+{
+ ExprPath {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ qself: (node.qself).map(|it| f.fold_qself(it)),
+ path: f.fold_path(node.path),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_range<F>(f: &mut F, node: ExprRange) -> ExprRange
+where
+ F: Fold + ?Sized,
+{
+ ExprRange {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ from: (node.from).map(|it| Box::new(f.fold_expr(*it))),
+ limits: f.fold_range_limits(node.limits),
+ to: (node.to).map(|it| Box::new(f.fold_expr(*it))),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_reference<F>(f: &mut F, node: ExprReference) -> ExprReference
+where
+ F: Fold + ?Sized,
+{
+ ExprReference {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ and_token: Token![&](tokens_helper(f, &node.and_token.spans)),
+ raw: node.raw,
+ mutability: (node.mutability).map(|it| Token![mut](tokens_helper(f, &it.span))),
+ expr: Box::new(f.fold_expr(*node.expr)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_repeat<F>(f: &mut F, node: ExprRepeat) -> ExprRepeat
+where
+ F: Fold + ?Sized,
+{
+ ExprRepeat {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ bracket_token: Bracket(tokens_helper(f, &node.bracket_token.span)),
+ expr: Box::new(f.fold_expr(*node.expr)),
+ semi_token: Token![;](tokens_helper(f, &node.semi_token.spans)),
+ len: Box::new(f.fold_expr(*node.len)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_return<F>(f: &mut F, node: ExprReturn) -> ExprReturn
+where
+ F: Fold + ?Sized,
+{
+ ExprReturn {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ return_token: Token![return](tokens_helper(f, &node.return_token.span)),
+ expr: (node.expr).map(|it| Box::new(f.fold_expr(*it))),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_struct<F>(f: &mut F, node: ExprStruct) -> ExprStruct
+where
+ F: Fold + ?Sized,
+{
+ ExprStruct {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ path: f.fold_path(node.path),
+ brace_token: Brace(tokens_helper(f, &node.brace_token.span)),
+ fields: FoldHelper::lift(node.fields, |it| f.fold_field_value(it)),
+ dot2_token: (node.dot2_token).map(|it| Token![..](tokens_helper(f, &it.spans))),
+ rest: (node.rest).map(|it| Box::new(f.fold_expr(*it))),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_try<F>(f: &mut F, node: ExprTry) -> ExprTry
+where
+ F: Fold + ?Sized,
+{
+ ExprTry {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ expr: Box::new(f.fold_expr(*node.expr)),
+ question_token: Token![?](tokens_helper(f, &node.question_token.spans)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_try_block<F>(f: &mut F, node: ExprTryBlock) -> ExprTryBlock
+where
+ F: Fold + ?Sized,
+{
+ ExprTryBlock {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ try_token: Token![try](tokens_helper(f, &node.try_token.span)),
+ block: f.fold_block(node.block),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_tuple<F>(f: &mut F, node: ExprTuple) -> ExprTuple
+where
+ F: Fold + ?Sized,
+{
+ ExprTuple {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ paren_token: Paren(tokens_helper(f, &node.paren_token.span)),
+ elems: FoldHelper::lift(node.elems, |it| f.fold_expr(it)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_type<F>(f: &mut F, node: ExprType) -> ExprType
+where
+ F: Fold + ?Sized,
+{
+ ExprType {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ expr: Box::new(f.fold_expr(*node.expr)),
+ colon_token: Token![:](tokens_helper(f, &node.colon_token.spans)),
+ ty: Box::new(f.fold_type(*node.ty)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_expr_unary<F>(f: &mut F, node: ExprUnary) -> ExprUnary
+where
+ F: Fold + ?Sized,
+{
+ ExprUnary {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ op: f.fold_un_op(node.op),
+ expr: Box::new(f.fold_expr(*node.expr)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_unsafe<F>(f: &mut F, node: ExprUnsafe) -> ExprUnsafe
+where
+ F: Fold + ?Sized,
+{
+ ExprUnsafe {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ unsafe_token: Token![unsafe](tokens_helper(f, &node.unsafe_token.span)),
+ block: f.fold_block(node.block),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_while<F>(f: &mut F, node: ExprWhile) -> ExprWhile
+where
+ F: Fold + ?Sized,
+{
+ ExprWhile {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ label: (node.label).map(|it| f.fold_label(it)),
+ while_token: Token![while](tokens_helper(f, &node.while_token.span)),
+ cond: Box::new(f.fold_expr(*node.cond)),
+ body: f.fold_block(node.body),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_expr_yield<F>(f: &mut F, node: ExprYield) -> ExprYield
+where
+ F: Fold + ?Sized,
+{
+ ExprYield {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ yield_token: Token![yield](tokens_helper(f, &node.yield_token.span)),
+ expr: (node.expr).map(|it| Box::new(f.fold_expr(*it))),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_field<F>(f: &mut F, node: Field) -> Field
+where
+ F: Fold + ?Sized,
+{
+ Field {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ ident: (node.ident).map(|it| f.fold_ident(it)),
+ colon_token: (node.colon_token).map(|it| Token![:](tokens_helper(f, &it.spans))),
+ ty: f.fold_type(node.ty),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_field_pat<F>(f: &mut F, node: FieldPat) -> FieldPat
+where
+ F: Fold + ?Sized,
+{
+ FieldPat {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ member: f.fold_member(node.member),
+ colon_token: (node.colon_token).map(|it| Token![:](tokens_helper(f, &it.spans))),
+ pat: Box::new(f.fold_pat(*node.pat)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_field_value<F>(f: &mut F, node: FieldValue) -> FieldValue
+where
+ F: Fold + ?Sized,
+{
+ FieldValue {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ member: f.fold_member(node.member),
+ colon_token: (node.colon_token).map(|it| Token![:](tokens_helper(f, &it.spans))),
+ expr: f.fold_expr(node.expr),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_fields<F>(f: &mut F, node: Fields) -> Fields
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ Fields::Named(_binding_0) => Fields::Named(f.fold_fields_named(_binding_0)),
+ Fields::Unnamed(_binding_0) => Fields::Unnamed(f.fold_fields_unnamed(_binding_0)),
+ Fields::Unit => Fields::Unit,
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_fields_named<F>(f: &mut F, node: FieldsNamed) -> FieldsNamed
+where
+ F: Fold + ?Sized,
+{
+ FieldsNamed {
+ brace_token: Brace(tokens_helper(f, &node.brace_token.span)),
+ named: FoldHelper::lift(node.named, |it| f.fold_field(it)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_fields_unnamed<F>(f: &mut F, node: FieldsUnnamed) -> FieldsUnnamed
+where
+ F: Fold + ?Sized,
+{
+ FieldsUnnamed {
+ paren_token: Paren(tokens_helper(f, &node.paren_token.span)),
+ unnamed: FoldHelper::lift(node.unnamed, |it| f.fold_field(it)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_file<F>(f: &mut F, node: File) -> File
+where
+ F: Fold + ?Sized,
+{
+ File {
+ shebang: node.shebang,
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ items: FoldHelper::lift(node.items, |it| f.fold_item(it)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_fn_arg<F>(f: &mut F, node: FnArg) -> FnArg
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ FnArg::Receiver(_binding_0) => FnArg::Receiver(f.fold_receiver(_binding_0)),
+ FnArg::Typed(_binding_0) => FnArg::Typed(f.fold_pat_type(_binding_0)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_foreign_item<F>(f: &mut F, node: ForeignItem) -> ForeignItem
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ ForeignItem::Fn(_binding_0) => {
+ ForeignItem::Fn(f.fold_foreign_item_fn(_binding_0))
+ }
+ ForeignItem::Static(_binding_0) => {
+ ForeignItem::Static(f.fold_foreign_item_static(_binding_0))
+ }
+ ForeignItem::Type(_binding_0) => {
+ ForeignItem::Type(f.fold_foreign_item_type(_binding_0))
+ }
+ ForeignItem::Macro(_binding_0) => {
+ ForeignItem::Macro(f.fold_foreign_item_macro(_binding_0))
+ }
+ ForeignItem::Verbatim(_binding_0) => ForeignItem::Verbatim(_binding_0),
+ #[cfg(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_foreign_item_fn<F>(f: &mut F, node: ForeignItemFn) -> ForeignItemFn
+where
+ F: Fold + ?Sized,
+{
+ ForeignItemFn {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ sig: f.fold_signature(node.sig),
+ semi_token: Token![;](tokens_helper(f, &node.semi_token.spans)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_foreign_item_macro<F>(f: &mut F, node: ForeignItemMacro) -> ForeignItemMacro
+where
+ F: Fold + ?Sized,
+{
+ ForeignItemMacro {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ mac: f.fold_macro(node.mac),
+ semi_token: (node.semi_token).map(|it| Token![;](tokens_helper(f, &it.spans))),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_foreign_item_static<F>(
+ f: &mut F,
+ node: ForeignItemStatic,
+) -> ForeignItemStatic
+where
+ F: Fold + ?Sized,
+{
+ ForeignItemStatic {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ static_token: Token![static](tokens_helper(f, &node.static_token.span)),
+ mutability: (node.mutability).map(|it| Token![mut](tokens_helper(f, &it.span))),
+ ident: f.fold_ident(node.ident),
+ colon_token: Token![:](tokens_helper(f, &node.colon_token.spans)),
+ ty: Box::new(f.fold_type(*node.ty)),
+ semi_token: Token![;](tokens_helper(f, &node.semi_token.spans)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_foreign_item_type<F>(f: &mut F, node: ForeignItemType) -> ForeignItemType
+where
+ F: Fold + ?Sized,
+{
+ ForeignItemType {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ type_token: Token![type](tokens_helper(f, &node.type_token.span)),
+ ident: f.fold_ident(node.ident),
+ semi_token: Token![;](tokens_helper(f, &node.semi_token.spans)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_generic_argument<F>(f: &mut F, node: GenericArgument) -> GenericArgument
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ GenericArgument::Lifetime(_binding_0) => {
+ GenericArgument::Lifetime(f.fold_lifetime(_binding_0))
+ }
+ GenericArgument::Type(_binding_0) => {
+ GenericArgument::Type(f.fold_type(_binding_0))
+ }
+ GenericArgument::Const(_binding_0) => {
+ GenericArgument::Const(f.fold_expr(_binding_0))
+ }
+ GenericArgument::Binding(_binding_0) => {
+ GenericArgument::Binding(f.fold_binding(_binding_0))
+ }
+ GenericArgument::Constraint(_binding_0) => {
+ GenericArgument::Constraint(f.fold_constraint(_binding_0))
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_generic_method_argument<F>(
+ f: &mut F,
+ node: GenericMethodArgument,
+) -> GenericMethodArgument
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ GenericMethodArgument::Type(_binding_0) => {
+ GenericMethodArgument::Type(f.fold_type(_binding_0))
+ }
+ GenericMethodArgument::Const(_binding_0) => {
+ GenericMethodArgument::Const(f.fold_expr(_binding_0))
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_generic_param<F>(f: &mut F, node: GenericParam) -> GenericParam
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ GenericParam::Type(_binding_0) => {
+ GenericParam::Type(f.fold_type_param(_binding_0))
+ }
+ GenericParam::Lifetime(_binding_0) => {
+ GenericParam::Lifetime(f.fold_lifetime_def(_binding_0))
+ }
+ GenericParam::Const(_binding_0) => {
+ GenericParam::Const(f.fold_const_param(_binding_0))
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_generics<F>(f: &mut F, node: Generics) -> Generics
+where
+ F: Fold + ?Sized,
+{
+ Generics {
+ lt_token: (node.lt_token).map(|it| Token![<](tokens_helper(f, &it.spans))),
+ params: FoldHelper::lift(node.params, |it| f.fold_generic_param(it)),
+ gt_token: (node.gt_token).map(|it| Token![>](tokens_helper(f, &it.spans))),
+ where_clause: (node.where_clause).map(|it| f.fold_where_clause(it)),
+ }
+}
+pub fn fold_ident<F>(f: &mut F, node: Ident) -> Ident
+where
+ F: Fold + ?Sized,
+{
+ let mut node = node;
+ let span = f.fold_span(node.span());
+ node.set_span(span);
+ node
+}
+#[cfg(feature = "full")]
+pub fn fold_impl_item<F>(f: &mut F, node: ImplItem) -> ImplItem
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ ImplItem::Const(_binding_0) => {
+ ImplItem::Const(f.fold_impl_item_const(_binding_0))
+ }
+ ImplItem::Method(_binding_0) => {
+ ImplItem::Method(f.fold_impl_item_method(_binding_0))
+ }
+ ImplItem::Type(_binding_0) => ImplItem::Type(f.fold_impl_item_type(_binding_0)),
+ ImplItem::Macro(_binding_0) => {
+ ImplItem::Macro(f.fold_impl_item_macro(_binding_0))
+ }
+ ImplItem::Verbatim(_binding_0) => ImplItem::Verbatim(_binding_0),
+ #[cfg(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_impl_item_const<F>(f: &mut F, node: ImplItemConst) -> ImplItemConst
+where
+ F: Fold + ?Sized,
+{
+ ImplItemConst {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ defaultness: (node.defaultness)
+ .map(|it| Token![default](tokens_helper(f, &it.span))),
+ const_token: Token![const](tokens_helper(f, &node.const_token.span)),
+ ident: f.fold_ident(node.ident),
+ colon_token: Token![:](tokens_helper(f, &node.colon_token.spans)),
+ ty: f.fold_type(node.ty),
+ eq_token: Token![=](tokens_helper(f, &node.eq_token.spans)),
+ expr: f.fold_expr(node.expr),
+ semi_token: Token![;](tokens_helper(f, &node.semi_token.spans)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_impl_item_macro<F>(f: &mut F, node: ImplItemMacro) -> ImplItemMacro
+where
+ F: Fold + ?Sized,
+{
+ ImplItemMacro {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ mac: f.fold_macro(node.mac),
+ semi_token: (node.semi_token).map(|it| Token![;](tokens_helper(f, &it.spans))),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_impl_item_method<F>(f: &mut F, node: ImplItemMethod) -> ImplItemMethod
+where
+ F: Fold + ?Sized,
+{
+ ImplItemMethod {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ defaultness: (node.defaultness)
+ .map(|it| Token![default](tokens_helper(f, &it.span))),
+ sig: f.fold_signature(node.sig),
+ block: f.fold_block(node.block),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_impl_item_type<F>(f: &mut F, node: ImplItemType) -> ImplItemType
+where
+ F: Fold + ?Sized,
+{
+ ImplItemType {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ defaultness: (node.defaultness)
+ .map(|it| Token![default](tokens_helper(f, &it.span))),
+ type_token: Token![type](tokens_helper(f, &node.type_token.span)),
+ ident: f.fold_ident(node.ident),
+ generics: f.fold_generics(node.generics),
+ eq_token: Token![=](tokens_helper(f, &node.eq_token.spans)),
+ ty: f.fold_type(node.ty),
+ semi_token: Token![;](tokens_helper(f, &node.semi_token.spans)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_index<F>(f: &mut F, node: Index) -> Index
+where
+ F: Fold + ?Sized,
+{
+ Index {
+ index: node.index,
+ span: f.fold_span(node.span),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_item<F>(f: &mut F, node: Item) -> Item
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ Item::Const(_binding_0) => Item::Const(f.fold_item_const(_binding_0)),
+ Item::Enum(_binding_0) => Item::Enum(f.fold_item_enum(_binding_0)),
+ Item::ExternCrate(_binding_0) => {
+ Item::ExternCrate(f.fold_item_extern_crate(_binding_0))
+ }
+ Item::Fn(_binding_0) => Item::Fn(f.fold_item_fn(_binding_0)),
+ Item::ForeignMod(_binding_0) => {
+ Item::ForeignMod(f.fold_item_foreign_mod(_binding_0))
+ }
+ Item::Impl(_binding_0) => Item::Impl(f.fold_item_impl(_binding_0)),
+ Item::Macro(_binding_0) => Item::Macro(f.fold_item_macro(_binding_0)),
+ Item::Macro2(_binding_0) => Item::Macro2(f.fold_item_macro2(_binding_0)),
+ Item::Mod(_binding_0) => Item::Mod(f.fold_item_mod(_binding_0)),
+ Item::Static(_binding_0) => Item::Static(f.fold_item_static(_binding_0)),
+ Item::Struct(_binding_0) => Item::Struct(f.fold_item_struct(_binding_0)),
+ Item::Trait(_binding_0) => Item::Trait(f.fold_item_trait(_binding_0)),
+ Item::TraitAlias(_binding_0) => {
+ Item::TraitAlias(f.fold_item_trait_alias(_binding_0))
+ }
+ Item::Type(_binding_0) => Item::Type(f.fold_item_type(_binding_0)),
+ Item::Union(_binding_0) => Item::Union(f.fold_item_union(_binding_0)),
+ Item::Use(_binding_0) => Item::Use(f.fold_item_use(_binding_0)),
+ Item::Verbatim(_binding_0) => Item::Verbatim(_binding_0),
+ #[cfg(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_item_const<F>(f: &mut F, node: ItemConst) -> ItemConst
+where
+ F: Fold + ?Sized,
+{
+ ItemConst {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ const_token: Token![const](tokens_helper(f, &node.const_token.span)),
+ ident: f.fold_ident(node.ident),
+ colon_token: Token![:](tokens_helper(f, &node.colon_token.spans)),
+ ty: Box::new(f.fold_type(*node.ty)),
+ eq_token: Token![=](tokens_helper(f, &node.eq_token.spans)),
+ expr: Box::new(f.fold_expr(*node.expr)),
+ semi_token: Token![;](tokens_helper(f, &node.semi_token.spans)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_item_enum<F>(f: &mut F, node: ItemEnum) -> ItemEnum
+where
+ F: Fold + ?Sized,
+{
+ ItemEnum {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ enum_token: Token![enum](tokens_helper(f, &node.enum_token.span)),
+ ident: f.fold_ident(node.ident),
+ generics: f.fold_generics(node.generics),
+ brace_token: Brace(tokens_helper(f, &node.brace_token.span)),
+ variants: FoldHelper::lift(node.variants, |it| f.fold_variant(it)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_item_extern_crate<F>(f: &mut F, node: ItemExternCrate) -> ItemExternCrate
+where
+ F: Fold + ?Sized,
+{
+ ItemExternCrate {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ extern_token: Token![extern](tokens_helper(f, &node.extern_token.span)),
+ crate_token: Token![crate](tokens_helper(f, &node.crate_token.span)),
+ ident: f.fold_ident(node.ident),
+ rename: (node.rename)
+ .map(|it| (
+ Token![as](tokens_helper(f, &(it).0.span)),
+ f.fold_ident((it).1),
+ )),
+ semi_token: Token![;](tokens_helper(f, &node.semi_token.spans)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_item_fn<F>(f: &mut F, node: ItemFn) -> ItemFn
+where
+ F: Fold + ?Sized,
+{
+ ItemFn {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ sig: f.fold_signature(node.sig),
+ block: Box::new(f.fold_block(*node.block)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_item_foreign_mod<F>(f: &mut F, node: ItemForeignMod) -> ItemForeignMod
+where
+ F: Fold + ?Sized,
+{
+ ItemForeignMod {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ abi: f.fold_abi(node.abi),
+ brace_token: Brace(tokens_helper(f, &node.brace_token.span)),
+ items: FoldHelper::lift(node.items, |it| f.fold_foreign_item(it)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_item_impl<F>(f: &mut F, node: ItemImpl) -> ItemImpl
+where
+ F: Fold + ?Sized,
+{
+ ItemImpl {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ defaultness: (node.defaultness)
+ .map(|it| Token![default](tokens_helper(f, &it.span))),
+ unsafety: (node.unsafety).map(|it| Token![unsafe](tokens_helper(f, &it.span))),
+ impl_token: Token![impl](tokens_helper(f, &node.impl_token.span)),
+ generics: f.fold_generics(node.generics),
+ trait_: (node.trait_)
+ .map(|it| (
+ ((it).0).map(|it| Token![!](tokens_helper(f, &it.spans))),
+ f.fold_path((it).1),
+ Token![for](tokens_helper(f, &(it).2.span)),
+ )),
+ self_ty: Box::new(f.fold_type(*node.self_ty)),
+ brace_token: Brace(tokens_helper(f, &node.brace_token.span)),
+ items: FoldHelper::lift(node.items, |it| f.fold_impl_item(it)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_item_macro<F>(f: &mut F, node: ItemMacro) -> ItemMacro
+where
+ F: Fold + ?Sized,
+{
+ ItemMacro {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ ident: (node.ident).map(|it| f.fold_ident(it)),
+ mac: f.fold_macro(node.mac),
+ semi_token: (node.semi_token).map(|it| Token![;](tokens_helper(f, &it.spans))),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_item_macro2<F>(f: &mut F, node: ItemMacro2) -> ItemMacro2
+where
+ F: Fold + ?Sized,
+{
+ ItemMacro2 {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ macro_token: Token![macro](tokens_helper(f, &node.macro_token.span)),
+ ident: f.fold_ident(node.ident),
+ rules: node.rules,
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_item_mod<F>(f: &mut F, node: ItemMod) -> ItemMod
+where
+ F: Fold + ?Sized,
+{
+ ItemMod {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ mod_token: Token![mod](tokens_helper(f, &node.mod_token.span)),
+ ident: f.fold_ident(node.ident),
+ content: (node.content)
+ .map(|it| (
+ Brace(tokens_helper(f, &(it).0.span)),
+ FoldHelper::lift((it).1, |it| f.fold_item(it)),
+ )),
+ semi: (node.semi).map(|it| Token![;](tokens_helper(f, &it.spans))),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_item_static<F>(f: &mut F, node: ItemStatic) -> ItemStatic
+where
+ F: Fold + ?Sized,
+{
+ ItemStatic {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ static_token: Token![static](tokens_helper(f, &node.static_token.span)),
+ mutability: (node.mutability).map(|it| Token![mut](tokens_helper(f, &it.span))),
+ ident: f.fold_ident(node.ident),
+ colon_token: Token![:](tokens_helper(f, &node.colon_token.spans)),
+ ty: Box::new(f.fold_type(*node.ty)),
+ eq_token: Token![=](tokens_helper(f, &node.eq_token.spans)),
+ expr: Box::new(f.fold_expr(*node.expr)),
+ semi_token: Token![;](tokens_helper(f, &node.semi_token.spans)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_item_struct<F>(f: &mut F, node: ItemStruct) -> ItemStruct
+where
+ F: Fold + ?Sized,
+{
+ ItemStruct {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ struct_token: Token![struct](tokens_helper(f, &node.struct_token.span)),
+ ident: f.fold_ident(node.ident),
+ generics: f.fold_generics(node.generics),
+ fields: f.fold_fields(node.fields),
+ semi_token: (node.semi_token).map(|it| Token![;](tokens_helper(f, &it.spans))),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_item_trait<F>(f: &mut F, node: ItemTrait) -> ItemTrait
+where
+ F: Fold + ?Sized,
+{
+ ItemTrait {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ unsafety: (node.unsafety).map(|it| Token![unsafe](tokens_helper(f, &it.span))),
+ auto_token: (node.auto_token).map(|it| Token![auto](tokens_helper(f, &it.span))),
+ trait_token: Token![trait](tokens_helper(f, &node.trait_token.span)),
+ ident: f.fold_ident(node.ident),
+ generics: f.fold_generics(node.generics),
+ colon_token: (node.colon_token).map(|it| Token![:](tokens_helper(f, &it.spans))),
+ supertraits: FoldHelper::lift(
+ node.supertraits,
+ |it| f.fold_type_param_bound(it),
+ ),
+ brace_token: Brace(tokens_helper(f, &node.brace_token.span)),
+ items: FoldHelper::lift(node.items, |it| f.fold_trait_item(it)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_item_trait_alias<F>(f: &mut F, node: ItemTraitAlias) -> ItemTraitAlias
+where
+ F: Fold + ?Sized,
+{
+ ItemTraitAlias {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ trait_token: Token![trait](tokens_helper(f, &node.trait_token.span)),
+ ident: f.fold_ident(node.ident),
+ generics: f.fold_generics(node.generics),
+ eq_token: Token![=](tokens_helper(f, &node.eq_token.spans)),
+ bounds: FoldHelper::lift(node.bounds, |it| f.fold_type_param_bound(it)),
+ semi_token: Token![;](tokens_helper(f, &node.semi_token.spans)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_item_type<F>(f: &mut F, node: ItemType) -> ItemType
+where
+ F: Fold + ?Sized,
+{
+ ItemType {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ type_token: Token![type](tokens_helper(f, &node.type_token.span)),
+ ident: f.fold_ident(node.ident),
+ generics: f.fold_generics(node.generics),
+ eq_token: Token![=](tokens_helper(f, &node.eq_token.spans)),
+ ty: Box::new(f.fold_type(*node.ty)),
+ semi_token: Token![;](tokens_helper(f, &node.semi_token.spans)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_item_union<F>(f: &mut F, node: ItemUnion) -> ItemUnion
+where
+ F: Fold + ?Sized,
+{
+ ItemUnion {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ union_token: Token![union](tokens_helper(f, &node.union_token.span)),
+ ident: f.fold_ident(node.ident),
+ generics: f.fold_generics(node.generics),
+ fields: f.fold_fields_named(node.fields),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_item_use<F>(f: &mut F, node: ItemUse) -> ItemUse
+where
+ F: Fold + ?Sized,
+{
+ ItemUse {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ vis: f.fold_visibility(node.vis),
+ use_token: Token![use](tokens_helper(f, &node.use_token.span)),
+ leading_colon: (node.leading_colon)
+ .map(|it| Token![::](tokens_helper(f, &it.spans))),
+ tree: f.fold_use_tree(node.tree),
+ semi_token: Token![;](tokens_helper(f, &node.semi_token.spans)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_label<F>(f: &mut F, node: Label) -> Label
+where
+ F: Fold + ?Sized,
+{
+ Label {
+ name: f.fold_lifetime(node.name),
+ colon_token: Token![:](tokens_helper(f, &node.colon_token.spans)),
+ }
+}
+pub fn fold_lifetime<F>(f: &mut F, node: Lifetime) -> Lifetime
+where
+ F: Fold + ?Sized,
+{
+ Lifetime {
+ apostrophe: f.fold_span(node.apostrophe),
+ ident: f.fold_ident(node.ident),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_lifetime_def<F>(f: &mut F, node: LifetimeDef) -> LifetimeDef
+where
+ F: Fold + ?Sized,
+{
+ LifetimeDef {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ lifetime: f.fold_lifetime(node.lifetime),
+ colon_token: (node.colon_token).map(|it| Token![:](tokens_helper(f, &it.spans))),
+ bounds: FoldHelper::lift(node.bounds, |it| f.fold_lifetime(it)),
+ }
+}
+pub fn fold_lit<F>(f: &mut F, node: Lit) -> Lit
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ Lit::Str(_binding_0) => Lit::Str(f.fold_lit_str(_binding_0)),
+ Lit::ByteStr(_binding_0) => Lit::ByteStr(f.fold_lit_byte_str(_binding_0)),
+ Lit::Byte(_binding_0) => Lit::Byte(f.fold_lit_byte(_binding_0)),
+ Lit::Char(_binding_0) => Lit::Char(f.fold_lit_char(_binding_0)),
+ Lit::Int(_binding_0) => Lit::Int(f.fold_lit_int(_binding_0)),
+ Lit::Float(_binding_0) => Lit::Float(f.fold_lit_float(_binding_0)),
+ Lit::Bool(_binding_0) => Lit::Bool(f.fold_lit_bool(_binding_0)),
+ Lit::Verbatim(_binding_0) => Lit::Verbatim(_binding_0),
+ }
+}
+pub fn fold_lit_bool<F>(f: &mut F, node: LitBool) -> LitBool
+where
+ F: Fold + ?Sized,
+{
+ LitBool {
+ value: node.value,
+ span: f.fold_span(node.span),
+ }
+}
+pub fn fold_lit_byte<F>(f: &mut F, node: LitByte) -> LitByte
+where
+ F: Fold + ?Sized,
+{
+ let span = f.fold_span(node.span());
+ let mut node = node;
+ node.set_span(span);
+ node
+}
+pub fn fold_lit_byte_str<F>(f: &mut F, node: LitByteStr) -> LitByteStr
+where
+ F: Fold + ?Sized,
+{
+ let span = f.fold_span(node.span());
+ let mut node = node;
+ node.set_span(span);
+ node
+}
+pub fn fold_lit_char<F>(f: &mut F, node: LitChar) -> LitChar
+where
+ F: Fold + ?Sized,
+{
+ let span = f.fold_span(node.span());
+ let mut node = node;
+ node.set_span(span);
+ node
+}
+pub fn fold_lit_float<F>(f: &mut F, node: LitFloat) -> LitFloat
+where
+ F: Fold + ?Sized,
+{
+ let span = f.fold_span(node.span());
+ let mut node = node;
+ node.set_span(span);
+ node
+}
+pub fn fold_lit_int<F>(f: &mut F, node: LitInt) -> LitInt
+where
+ F: Fold + ?Sized,
+{
+ let span = f.fold_span(node.span());
+ let mut node = node;
+ node.set_span(span);
+ node
+}
+pub fn fold_lit_str<F>(f: &mut F, node: LitStr) -> LitStr
+where
+ F: Fold + ?Sized,
+{
+ let span = f.fold_span(node.span());
+ let mut node = node;
+ node.set_span(span);
+ node
+}
+#[cfg(feature = "full")]
+pub fn fold_local<F>(f: &mut F, node: Local) -> Local
+where
+ F: Fold + ?Sized,
+{
+ Local {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ let_token: Token![let](tokens_helper(f, &node.let_token.span)),
+ pat: f.fold_pat(node.pat),
+ init: (node.init)
+ .map(|it| (
+ Token![=](tokens_helper(f, &(it).0.spans)),
+ Box::new(f.fold_expr(*(it).1)),
+ )),
+ semi_token: Token![;](tokens_helper(f, &node.semi_token.spans)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_macro<F>(f: &mut F, node: Macro) -> Macro
+where
+ F: Fold + ?Sized,
+{
+ Macro {
+ path: f.fold_path(node.path),
+ bang_token: Token![!](tokens_helper(f, &node.bang_token.spans)),
+ delimiter: f.fold_macro_delimiter(node.delimiter),
+ tokens: node.tokens,
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_macro_delimiter<F>(f: &mut F, node: MacroDelimiter) -> MacroDelimiter
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ MacroDelimiter::Paren(_binding_0) => {
+ MacroDelimiter::Paren(Paren(tokens_helper(f, &_binding_0.span)))
+ }
+ MacroDelimiter::Brace(_binding_0) => {
+ MacroDelimiter::Brace(Brace(tokens_helper(f, &_binding_0.span)))
+ }
+ MacroDelimiter::Bracket(_binding_0) => {
+ MacroDelimiter::Bracket(Bracket(tokens_helper(f, &_binding_0.span)))
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_member<F>(f: &mut F, node: Member) -> Member
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ Member::Named(_binding_0) => Member::Named(f.fold_ident(_binding_0)),
+ Member::Unnamed(_binding_0) => Member::Unnamed(f.fold_index(_binding_0)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_meta<F>(f: &mut F, node: Meta) -> Meta
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ Meta::Path(_binding_0) => Meta::Path(f.fold_path(_binding_0)),
+ Meta::List(_binding_0) => Meta::List(f.fold_meta_list(_binding_0)),
+ Meta::NameValue(_binding_0) => {
+ Meta::NameValue(f.fold_meta_name_value(_binding_0))
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_meta_list<F>(f: &mut F, node: MetaList) -> MetaList
+where
+ F: Fold + ?Sized,
+{
+ MetaList {
+ path: f.fold_path(node.path),
+ paren_token: Paren(tokens_helper(f, &node.paren_token.span)),
+ nested: FoldHelper::lift(node.nested, |it| f.fold_nested_meta(it)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_meta_name_value<F>(f: &mut F, node: MetaNameValue) -> MetaNameValue
+where
+ F: Fold + ?Sized,
+{
+ MetaNameValue {
+ path: f.fold_path(node.path),
+ eq_token: Token![=](tokens_helper(f, &node.eq_token.spans)),
+ lit: f.fold_lit(node.lit),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_method_turbofish<F>(f: &mut F, node: MethodTurbofish) -> MethodTurbofish
+where
+ F: Fold + ?Sized,
+{
+ MethodTurbofish {
+ colon2_token: Token![::](tokens_helper(f, &node.colon2_token.spans)),
+ lt_token: Token![<](tokens_helper(f, &node.lt_token.spans)),
+ args: FoldHelper::lift(node.args, |it| f.fold_generic_method_argument(it)),
+ gt_token: Token![>](tokens_helper(f, &node.gt_token.spans)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_nested_meta<F>(f: &mut F, node: NestedMeta) -> NestedMeta
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ NestedMeta::Meta(_binding_0) => NestedMeta::Meta(f.fold_meta(_binding_0)),
+ NestedMeta::Lit(_binding_0) => NestedMeta::Lit(f.fold_lit(_binding_0)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_parenthesized_generic_arguments<F>(
+ f: &mut F,
+ node: ParenthesizedGenericArguments,
+) -> ParenthesizedGenericArguments
+where
+ F: Fold + ?Sized,
+{
+ ParenthesizedGenericArguments {
+ paren_token: Paren(tokens_helper(f, &node.paren_token.span)),
+ inputs: FoldHelper::lift(node.inputs, |it| f.fold_type(it)),
+ output: f.fold_return_type(node.output),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_pat<F>(f: &mut F, node: Pat) -> Pat
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ Pat::Box(_binding_0) => Pat::Box(f.fold_pat_box(_binding_0)),
+ Pat::Ident(_binding_0) => Pat::Ident(f.fold_pat_ident(_binding_0)),
+ Pat::Lit(_binding_0) => Pat::Lit(f.fold_pat_lit(_binding_0)),
+ Pat::Macro(_binding_0) => Pat::Macro(f.fold_pat_macro(_binding_0)),
+ Pat::Or(_binding_0) => Pat::Or(f.fold_pat_or(_binding_0)),
+ Pat::Path(_binding_0) => Pat::Path(f.fold_pat_path(_binding_0)),
+ Pat::Range(_binding_0) => Pat::Range(f.fold_pat_range(_binding_0)),
+ Pat::Reference(_binding_0) => Pat::Reference(f.fold_pat_reference(_binding_0)),
+ Pat::Rest(_binding_0) => Pat::Rest(f.fold_pat_rest(_binding_0)),
+ Pat::Slice(_binding_0) => Pat::Slice(f.fold_pat_slice(_binding_0)),
+ Pat::Struct(_binding_0) => Pat::Struct(f.fold_pat_struct(_binding_0)),
+ Pat::Tuple(_binding_0) => Pat::Tuple(f.fold_pat_tuple(_binding_0)),
+ Pat::TupleStruct(_binding_0) => {
+ Pat::TupleStruct(f.fold_pat_tuple_struct(_binding_0))
+ }
+ Pat::Type(_binding_0) => Pat::Type(f.fold_pat_type(_binding_0)),
+ Pat::Verbatim(_binding_0) => Pat::Verbatim(_binding_0),
+ Pat::Wild(_binding_0) => Pat::Wild(f.fold_pat_wild(_binding_0)),
+ #[cfg(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_pat_box<F>(f: &mut F, node: PatBox) -> PatBox
+where
+ F: Fold + ?Sized,
+{
+ PatBox {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ box_token: Token![box](tokens_helper(f, &node.box_token.span)),
+ pat: Box::new(f.fold_pat(*node.pat)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_pat_ident<F>(f: &mut F, node: PatIdent) -> PatIdent
+where
+ F: Fold + ?Sized,
+{
+ PatIdent {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ by_ref: (node.by_ref).map(|it| Token![ref](tokens_helper(f, &it.span))),
+ mutability: (node.mutability).map(|it| Token![mut](tokens_helper(f, &it.span))),
+ ident: f.fold_ident(node.ident),
+ subpat: (node.subpat)
+ .map(|it| (
+ Token![@](tokens_helper(f, &(it).0.spans)),
+ Box::new(f.fold_pat(*(it).1)),
+ )),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_pat_lit<F>(f: &mut F, node: PatLit) -> PatLit
+where
+ F: Fold + ?Sized,
+{
+ PatLit {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ expr: Box::new(f.fold_expr(*node.expr)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_pat_macro<F>(f: &mut F, node: PatMacro) -> PatMacro
+where
+ F: Fold + ?Sized,
+{
+ PatMacro {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ mac: f.fold_macro(node.mac),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_pat_or<F>(f: &mut F, node: PatOr) -> PatOr
+where
+ F: Fold + ?Sized,
+{
+ PatOr {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ leading_vert: (node.leading_vert)
+ .map(|it| Token![|](tokens_helper(f, &it.spans))),
+ cases: FoldHelper::lift(node.cases, |it| f.fold_pat(it)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_pat_path<F>(f: &mut F, node: PatPath) -> PatPath
+where
+ F: Fold + ?Sized,
+{
+ PatPath {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ qself: (node.qself).map(|it| f.fold_qself(it)),
+ path: f.fold_path(node.path),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_pat_range<F>(f: &mut F, node: PatRange) -> PatRange
+where
+ F: Fold + ?Sized,
+{
+ PatRange {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ lo: Box::new(f.fold_expr(*node.lo)),
+ limits: f.fold_range_limits(node.limits),
+ hi: Box::new(f.fold_expr(*node.hi)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_pat_reference<F>(f: &mut F, node: PatReference) -> PatReference
+where
+ F: Fold + ?Sized,
+{
+ PatReference {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ and_token: Token![&](tokens_helper(f, &node.and_token.spans)),
+ mutability: (node.mutability).map(|it| Token![mut](tokens_helper(f, &it.span))),
+ pat: Box::new(f.fold_pat(*node.pat)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_pat_rest<F>(f: &mut F, node: PatRest) -> PatRest
+where
+ F: Fold + ?Sized,
+{
+ PatRest {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ dot2_token: Token![..](tokens_helper(f, &node.dot2_token.spans)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_pat_slice<F>(f: &mut F, node: PatSlice) -> PatSlice
+where
+ F: Fold + ?Sized,
+{
+ PatSlice {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ bracket_token: Bracket(tokens_helper(f, &node.bracket_token.span)),
+ elems: FoldHelper::lift(node.elems, |it| f.fold_pat(it)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_pat_struct<F>(f: &mut F, node: PatStruct) -> PatStruct
+where
+ F: Fold + ?Sized,
+{
+ PatStruct {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ path: f.fold_path(node.path),
+ brace_token: Brace(tokens_helper(f, &node.brace_token.span)),
+ fields: FoldHelper::lift(node.fields, |it| f.fold_field_pat(it)),
+ dot2_token: (node.dot2_token).map(|it| Token![..](tokens_helper(f, &it.spans))),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_pat_tuple<F>(f: &mut F, node: PatTuple) -> PatTuple
+where
+ F: Fold + ?Sized,
+{
+ PatTuple {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ paren_token: Paren(tokens_helper(f, &node.paren_token.span)),
+ elems: FoldHelper::lift(node.elems, |it| f.fold_pat(it)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_pat_tuple_struct<F>(f: &mut F, node: PatTupleStruct) -> PatTupleStruct
+where
+ F: Fold + ?Sized,
+{
+ PatTupleStruct {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ path: f.fold_path(node.path),
+ pat: f.fold_pat_tuple(node.pat),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_pat_type<F>(f: &mut F, node: PatType) -> PatType
+where
+ F: Fold + ?Sized,
+{
+ PatType {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ pat: Box::new(f.fold_pat(*node.pat)),
+ colon_token: Token![:](tokens_helper(f, &node.colon_token.spans)),
+ ty: Box::new(f.fold_type(*node.ty)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_pat_wild<F>(f: &mut F, node: PatWild) -> PatWild
+where
+ F: Fold + ?Sized,
+{
+ PatWild {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ underscore_token: Token![_](tokens_helper(f, &node.underscore_token.spans)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_path<F>(f: &mut F, node: Path) -> Path
+where
+ F: Fold + ?Sized,
+{
+ Path {
+ leading_colon: (node.leading_colon)
+ .map(|it| Token![::](tokens_helper(f, &it.spans))),
+ segments: FoldHelper::lift(node.segments, |it| f.fold_path_segment(it)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_path_arguments<F>(f: &mut F, node: PathArguments) -> PathArguments
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ PathArguments::None => PathArguments::None,
+ PathArguments::AngleBracketed(_binding_0) => {
+ PathArguments::AngleBracketed(
+ f.fold_angle_bracketed_generic_arguments(_binding_0),
+ )
+ }
+ PathArguments::Parenthesized(_binding_0) => {
+ PathArguments::Parenthesized(
+ f.fold_parenthesized_generic_arguments(_binding_0),
+ )
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_path_segment<F>(f: &mut F, node: PathSegment) -> PathSegment
+where
+ F: Fold + ?Sized,
+{
+ PathSegment {
+ ident: f.fold_ident(node.ident),
+ arguments: f.fold_path_arguments(node.arguments),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_predicate_eq<F>(f: &mut F, node: PredicateEq) -> PredicateEq
+where
+ F: Fold + ?Sized,
+{
+ PredicateEq {
+ lhs_ty: f.fold_type(node.lhs_ty),
+ eq_token: Token![=](tokens_helper(f, &node.eq_token.spans)),
+ rhs_ty: f.fold_type(node.rhs_ty),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_predicate_lifetime<F>(
+ f: &mut F,
+ node: PredicateLifetime,
+) -> PredicateLifetime
+where
+ F: Fold + ?Sized,
+{
+ PredicateLifetime {
+ lifetime: f.fold_lifetime(node.lifetime),
+ colon_token: Token![:](tokens_helper(f, &node.colon_token.spans)),
+ bounds: FoldHelper::lift(node.bounds, |it| f.fold_lifetime(it)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_predicate_type<F>(f: &mut F, node: PredicateType) -> PredicateType
+where
+ F: Fold + ?Sized,
+{
+ PredicateType {
+ lifetimes: (node.lifetimes).map(|it| f.fold_bound_lifetimes(it)),
+ bounded_ty: f.fold_type(node.bounded_ty),
+ colon_token: Token![:](tokens_helper(f, &node.colon_token.spans)),
+ bounds: FoldHelper::lift(node.bounds, |it| f.fold_type_param_bound(it)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_qself<F>(f: &mut F, node: QSelf) -> QSelf
+where
+ F: Fold + ?Sized,
+{
+ QSelf {
+ lt_token: Token![<](tokens_helper(f, &node.lt_token.spans)),
+ ty: Box::new(f.fold_type(*node.ty)),
+ position: node.position,
+ as_token: (node.as_token).map(|it| Token![as](tokens_helper(f, &it.span))),
+ gt_token: Token![>](tokens_helper(f, &node.gt_token.spans)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_range_limits<F>(f: &mut F, node: RangeLimits) -> RangeLimits
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ RangeLimits::HalfOpen(_binding_0) => {
+ RangeLimits::HalfOpen(Token![..](tokens_helper(f, &_binding_0.spans)))
+ }
+ RangeLimits::Closed(_binding_0) => {
+ RangeLimits::Closed(Token![..=](tokens_helper(f, &_binding_0.spans)))
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_receiver<F>(f: &mut F, node: Receiver) -> Receiver
+where
+ F: Fold + ?Sized,
+{
+ Receiver {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ reference: (node.reference)
+ .map(|it| (
+ Token![&](tokens_helper(f, &(it).0.spans)),
+ ((it).1).map(|it| f.fold_lifetime(it)),
+ )),
+ mutability: (node.mutability).map(|it| Token![mut](tokens_helper(f, &it.span))),
+ self_token: Token![self](tokens_helper(f, &node.self_token.span)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_return_type<F>(f: &mut F, node: ReturnType) -> ReturnType
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ ReturnType::Default => ReturnType::Default,
+ ReturnType::Type(_binding_0, _binding_1) => {
+ ReturnType::Type(
+ Token![->](tokens_helper(f, &_binding_0.spans)),
+ Box::new(f.fold_type(*_binding_1)),
+ )
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_signature<F>(f: &mut F, node: Signature) -> Signature
+where
+ F: Fold + ?Sized,
+{
+ Signature {
+ constness: (node.constness).map(|it| Token![const](tokens_helper(f, &it.span))),
+ asyncness: (node.asyncness).map(|it| Token![async](tokens_helper(f, &it.span))),
+ unsafety: (node.unsafety).map(|it| Token![unsafe](tokens_helper(f, &it.span))),
+ abi: (node.abi).map(|it| f.fold_abi(it)),
+ fn_token: Token![fn](tokens_helper(f, &node.fn_token.span)),
+ ident: f.fold_ident(node.ident),
+ generics: f.fold_generics(node.generics),
+ paren_token: Paren(tokens_helper(f, &node.paren_token.span)),
+ inputs: FoldHelper::lift(node.inputs, |it| f.fold_fn_arg(it)),
+ variadic: (node.variadic).map(|it| f.fold_variadic(it)),
+ output: f.fold_return_type(node.output),
+ }
+}
+pub fn fold_span<F>(f: &mut F, node: Span) -> Span
+where
+ F: Fold + ?Sized,
+{
+ node
+}
+#[cfg(feature = "full")]
+pub fn fold_stmt<F>(f: &mut F, node: Stmt) -> Stmt
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ Stmt::Local(_binding_0) => Stmt::Local(f.fold_local(_binding_0)),
+ Stmt::Item(_binding_0) => Stmt::Item(f.fold_item(_binding_0)),
+ Stmt::Expr(_binding_0) => Stmt::Expr(f.fold_expr(_binding_0)),
+ Stmt::Semi(_binding_0, _binding_1) => {
+ Stmt::Semi(
+ f.fold_expr(_binding_0),
+ Token![;](tokens_helper(f, &_binding_1.spans)),
+ )
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_trait_bound<F>(f: &mut F, node: TraitBound) -> TraitBound
+where
+ F: Fold + ?Sized,
+{
+ TraitBound {
+ paren_token: (node.paren_token).map(|it| Paren(tokens_helper(f, &it.span))),
+ modifier: f.fold_trait_bound_modifier(node.modifier),
+ lifetimes: (node.lifetimes).map(|it| f.fold_bound_lifetimes(it)),
+ path: f.fold_path(node.path),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_trait_bound_modifier<F>(
+ f: &mut F,
+ node: TraitBoundModifier,
+) -> TraitBoundModifier
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ TraitBoundModifier::None => TraitBoundModifier::None,
+ TraitBoundModifier::Maybe(_binding_0) => {
+ TraitBoundModifier::Maybe(Token![?](tokens_helper(f, &_binding_0.spans)))
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_trait_item<F>(f: &mut F, node: TraitItem) -> TraitItem
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ TraitItem::Const(_binding_0) => {
+ TraitItem::Const(f.fold_trait_item_const(_binding_0))
+ }
+ TraitItem::Method(_binding_0) => {
+ TraitItem::Method(f.fold_trait_item_method(_binding_0))
+ }
+ TraitItem::Type(_binding_0) => {
+ TraitItem::Type(f.fold_trait_item_type(_binding_0))
+ }
+ TraitItem::Macro(_binding_0) => {
+ TraitItem::Macro(f.fold_trait_item_macro(_binding_0))
+ }
+ TraitItem::Verbatim(_binding_0) => TraitItem::Verbatim(_binding_0),
+ #[cfg(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_trait_item_const<F>(f: &mut F, node: TraitItemConst) -> TraitItemConst
+where
+ F: Fold + ?Sized,
+{
+ TraitItemConst {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ const_token: Token![const](tokens_helper(f, &node.const_token.span)),
+ ident: f.fold_ident(node.ident),
+ colon_token: Token![:](tokens_helper(f, &node.colon_token.spans)),
+ ty: f.fold_type(node.ty),
+ default: (node.default)
+ .map(|it| (Token![=](tokens_helper(f, &(it).0.spans)), f.fold_expr((it).1))),
+ semi_token: Token![;](tokens_helper(f, &node.semi_token.spans)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_trait_item_macro<F>(f: &mut F, node: TraitItemMacro) -> TraitItemMacro
+where
+ F: Fold + ?Sized,
+{
+ TraitItemMacro {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ mac: f.fold_macro(node.mac),
+ semi_token: (node.semi_token).map(|it| Token![;](tokens_helper(f, &it.spans))),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_trait_item_method<F>(f: &mut F, node: TraitItemMethod) -> TraitItemMethod
+where
+ F: Fold + ?Sized,
+{
+ TraitItemMethod {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ sig: f.fold_signature(node.sig),
+ default: (node.default).map(|it| f.fold_block(it)),
+ semi_token: (node.semi_token).map(|it| Token![;](tokens_helper(f, &it.spans))),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_trait_item_type<F>(f: &mut F, node: TraitItemType) -> TraitItemType
+where
+ F: Fold + ?Sized,
+{
+ TraitItemType {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ type_token: Token![type](tokens_helper(f, &node.type_token.span)),
+ ident: f.fold_ident(node.ident),
+ generics: f.fold_generics(node.generics),
+ colon_token: (node.colon_token).map(|it| Token![:](tokens_helper(f, &it.spans))),
+ bounds: FoldHelper::lift(node.bounds, |it| f.fold_type_param_bound(it)),
+ default: (node.default)
+ .map(|it| (Token![=](tokens_helper(f, &(it).0.spans)), f.fold_type((it).1))),
+ semi_token: Token![;](tokens_helper(f, &node.semi_token.spans)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_type<F>(f: &mut F, node: Type) -> Type
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ Type::Array(_binding_0) => Type::Array(f.fold_type_array(_binding_0)),
+ Type::BareFn(_binding_0) => Type::BareFn(f.fold_type_bare_fn(_binding_0)),
+ Type::Group(_binding_0) => Type::Group(f.fold_type_group(_binding_0)),
+ Type::ImplTrait(_binding_0) => {
+ Type::ImplTrait(f.fold_type_impl_trait(_binding_0))
+ }
+ Type::Infer(_binding_0) => Type::Infer(f.fold_type_infer(_binding_0)),
+ Type::Macro(_binding_0) => Type::Macro(f.fold_type_macro(_binding_0)),
+ Type::Never(_binding_0) => Type::Never(f.fold_type_never(_binding_0)),
+ Type::Paren(_binding_0) => Type::Paren(f.fold_type_paren(_binding_0)),
+ Type::Path(_binding_0) => Type::Path(f.fold_type_path(_binding_0)),
+ Type::Ptr(_binding_0) => Type::Ptr(f.fold_type_ptr(_binding_0)),
+ Type::Reference(_binding_0) => Type::Reference(f.fold_type_reference(_binding_0)),
+ Type::Slice(_binding_0) => Type::Slice(f.fold_type_slice(_binding_0)),
+ Type::TraitObject(_binding_0) => {
+ Type::TraitObject(f.fold_type_trait_object(_binding_0))
+ }
+ Type::Tuple(_binding_0) => Type::Tuple(f.fold_type_tuple(_binding_0)),
+ Type::Verbatim(_binding_0) => Type::Verbatim(_binding_0),
+ #[cfg(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_type_array<F>(f: &mut F, node: TypeArray) -> TypeArray
+where
+ F: Fold + ?Sized,
+{
+ TypeArray {
+ bracket_token: Bracket(tokens_helper(f, &node.bracket_token.span)),
+ elem: Box::new(f.fold_type(*node.elem)),
+ semi_token: Token![;](tokens_helper(f, &node.semi_token.spans)),
+ len: f.fold_expr(node.len),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_type_bare_fn<F>(f: &mut F, node: TypeBareFn) -> TypeBareFn
+where
+ F: Fold + ?Sized,
+{
+ TypeBareFn {
+ lifetimes: (node.lifetimes).map(|it| f.fold_bound_lifetimes(it)),
+ unsafety: (node.unsafety).map(|it| Token![unsafe](tokens_helper(f, &it.span))),
+ abi: (node.abi).map(|it| f.fold_abi(it)),
+ fn_token: Token![fn](tokens_helper(f, &node.fn_token.span)),
+ paren_token: Paren(tokens_helper(f, &node.paren_token.span)),
+ inputs: FoldHelper::lift(node.inputs, |it| f.fold_bare_fn_arg(it)),
+ variadic: (node.variadic).map(|it| f.fold_variadic(it)),
+ output: f.fold_return_type(node.output),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_type_group<F>(f: &mut F, node: TypeGroup) -> TypeGroup
+where
+ F: Fold + ?Sized,
+{
+ TypeGroup {
+ group_token: Group(tokens_helper(f, &node.group_token.span)),
+ elem: Box::new(f.fold_type(*node.elem)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_type_impl_trait<F>(f: &mut F, node: TypeImplTrait) -> TypeImplTrait
+where
+ F: Fold + ?Sized,
+{
+ TypeImplTrait {
+ impl_token: Token![impl](tokens_helper(f, &node.impl_token.span)),
+ bounds: FoldHelper::lift(node.bounds, |it| f.fold_type_param_bound(it)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_type_infer<F>(f: &mut F, node: TypeInfer) -> TypeInfer
+where
+ F: Fold + ?Sized,
+{
+ TypeInfer {
+ underscore_token: Token![_](tokens_helper(f, &node.underscore_token.spans)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_type_macro<F>(f: &mut F, node: TypeMacro) -> TypeMacro
+where
+ F: Fold + ?Sized,
+{
+ TypeMacro {
+ mac: f.fold_macro(node.mac),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_type_never<F>(f: &mut F, node: TypeNever) -> TypeNever
+where
+ F: Fold + ?Sized,
+{
+ TypeNever {
+ bang_token: Token![!](tokens_helper(f, &node.bang_token.spans)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_type_param<F>(f: &mut F, node: TypeParam) -> TypeParam
+where
+ F: Fold + ?Sized,
+{
+ TypeParam {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ ident: f.fold_ident(node.ident),
+ colon_token: (node.colon_token).map(|it| Token![:](tokens_helper(f, &it.spans))),
+ bounds: FoldHelper::lift(node.bounds, |it| f.fold_type_param_bound(it)),
+ eq_token: (node.eq_token).map(|it| Token![=](tokens_helper(f, &it.spans))),
+ default: (node.default).map(|it| f.fold_type(it)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_type_param_bound<F>(f: &mut F, node: TypeParamBound) -> TypeParamBound
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ TypeParamBound::Trait(_binding_0) => {
+ TypeParamBound::Trait(f.fold_trait_bound(_binding_0))
+ }
+ TypeParamBound::Lifetime(_binding_0) => {
+ TypeParamBound::Lifetime(f.fold_lifetime(_binding_0))
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_type_paren<F>(f: &mut F, node: TypeParen) -> TypeParen
+where
+ F: Fold + ?Sized,
+{
+ TypeParen {
+ paren_token: Paren(tokens_helper(f, &node.paren_token.span)),
+ elem: Box::new(f.fold_type(*node.elem)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_type_path<F>(f: &mut F, node: TypePath) -> TypePath
+where
+ F: Fold + ?Sized,
+{
+ TypePath {
+ qself: (node.qself).map(|it| f.fold_qself(it)),
+ path: f.fold_path(node.path),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_type_ptr<F>(f: &mut F, node: TypePtr) -> TypePtr
+where
+ F: Fold + ?Sized,
+{
+ TypePtr {
+ star_token: Token![*](tokens_helper(f, &node.star_token.spans)),
+ const_token: (node.const_token)
+ .map(|it| Token![const](tokens_helper(f, &it.span))),
+ mutability: (node.mutability).map(|it| Token![mut](tokens_helper(f, &it.span))),
+ elem: Box::new(f.fold_type(*node.elem)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_type_reference<F>(f: &mut F, node: TypeReference) -> TypeReference
+where
+ F: Fold + ?Sized,
+{
+ TypeReference {
+ and_token: Token![&](tokens_helper(f, &node.and_token.spans)),
+ lifetime: (node.lifetime).map(|it| f.fold_lifetime(it)),
+ mutability: (node.mutability).map(|it| Token![mut](tokens_helper(f, &it.span))),
+ elem: Box::new(f.fold_type(*node.elem)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_type_slice<F>(f: &mut F, node: TypeSlice) -> TypeSlice
+where
+ F: Fold + ?Sized,
+{
+ TypeSlice {
+ bracket_token: Bracket(tokens_helper(f, &node.bracket_token.span)),
+ elem: Box::new(f.fold_type(*node.elem)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_type_trait_object<F>(f: &mut F, node: TypeTraitObject) -> TypeTraitObject
+where
+ F: Fold + ?Sized,
+{
+ TypeTraitObject {
+ dyn_token: (node.dyn_token).map(|it| Token![dyn](tokens_helper(f, &it.span))),
+ bounds: FoldHelper::lift(node.bounds, |it| f.fold_type_param_bound(it)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_type_tuple<F>(f: &mut F, node: TypeTuple) -> TypeTuple
+where
+ F: Fold + ?Sized,
+{
+ TypeTuple {
+ paren_token: Paren(tokens_helper(f, &node.paren_token.span)),
+ elems: FoldHelper::lift(node.elems, |it| f.fold_type(it)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_un_op<F>(f: &mut F, node: UnOp) -> UnOp
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ UnOp::Deref(_binding_0) => {
+ UnOp::Deref(Token![*](tokens_helper(f, &_binding_0.spans)))
+ }
+ UnOp::Not(_binding_0) => {
+ UnOp::Not(Token![!](tokens_helper(f, &_binding_0.spans)))
+ }
+ UnOp::Neg(_binding_0) => {
+ UnOp::Neg(Token![-](tokens_helper(f, &_binding_0.spans)))
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_use_glob<F>(f: &mut F, node: UseGlob) -> UseGlob
+where
+ F: Fold + ?Sized,
+{
+ UseGlob {
+ star_token: Token![*](tokens_helper(f, &node.star_token.spans)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_use_group<F>(f: &mut F, node: UseGroup) -> UseGroup
+where
+ F: Fold + ?Sized,
+{
+ UseGroup {
+ brace_token: Brace(tokens_helper(f, &node.brace_token.span)),
+ items: FoldHelper::lift(node.items, |it| f.fold_use_tree(it)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_use_name<F>(f: &mut F, node: UseName) -> UseName
+where
+ F: Fold + ?Sized,
+{
+ UseName {
+ ident: f.fold_ident(node.ident),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_use_path<F>(f: &mut F, node: UsePath) -> UsePath
+where
+ F: Fold + ?Sized,
+{
+ UsePath {
+ ident: f.fold_ident(node.ident),
+ colon2_token: Token![::](tokens_helper(f, &node.colon2_token.spans)),
+ tree: Box::new(f.fold_use_tree(*node.tree)),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_use_rename<F>(f: &mut F, node: UseRename) -> UseRename
+where
+ F: Fold + ?Sized,
+{
+ UseRename {
+ ident: f.fold_ident(node.ident),
+ as_token: Token![as](tokens_helper(f, &node.as_token.span)),
+ rename: f.fold_ident(node.rename),
+ }
+}
+#[cfg(feature = "full")]
+pub fn fold_use_tree<F>(f: &mut F, node: UseTree) -> UseTree
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ UseTree::Path(_binding_0) => UseTree::Path(f.fold_use_path(_binding_0)),
+ UseTree::Name(_binding_0) => UseTree::Name(f.fold_use_name(_binding_0)),
+ UseTree::Rename(_binding_0) => UseTree::Rename(f.fold_use_rename(_binding_0)),
+ UseTree::Glob(_binding_0) => UseTree::Glob(f.fold_use_glob(_binding_0)),
+ UseTree::Group(_binding_0) => UseTree::Group(f.fold_use_group(_binding_0)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_variadic<F>(f: &mut F, node: Variadic) -> Variadic
+where
+ F: Fold + ?Sized,
+{
+ Variadic {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ dots: Token![...](tokens_helper(f, &node.dots.spans)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_variant<F>(f: &mut F, node: Variant) -> Variant
+where
+ F: Fold + ?Sized,
+{
+ Variant {
+ attrs: FoldHelper::lift(node.attrs, |it| f.fold_attribute(it)),
+ ident: f.fold_ident(node.ident),
+ fields: f.fold_fields(node.fields),
+ discriminant: (node.discriminant)
+ .map(|it| (Token![=](tokens_helper(f, &(it).0.spans)), f.fold_expr((it).1))),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_vis_crate<F>(f: &mut F, node: VisCrate) -> VisCrate
+where
+ F: Fold + ?Sized,
+{
+ VisCrate {
+ crate_token: Token![crate](tokens_helper(f, &node.crate_token.span)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_vis_public<F>(f: &mut F, node: VisPublic) -> VisPublic
+where
+ F: Fold + ?Sized,
+{
+ VisPublic {
+ pub_token: Token![pub](tokens_helper(f, &node.pub_token.span)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_vis_restricted<F>(f: &mut F, node: VisRestricted) -> VisRestricted
+where
+ F: Fold + ?Sized,
+{
+ VisRestricted {
+ pub_token: Token![pub](tokens_helper(f, &node.pub_token.span)),
+ paren_token: Paren(tokens_helper(f, &node.paren_token.span)),
+ in_token: (node.in_token).map(|it| Token![in](tokens_helper(f, &it.span))),
+ path: Box::new(f.fold_path(*node.path)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_visibility<F>(f: &mut F, node: Visibility) -> Visibility
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ Visibility::Public(_binding_0) => {
+ Visibility::Public(f.fold_vis_public(_binding_0))
+ }
+ Visibility::Crate(_binding_0) => Visibility::Crate(f.fold_vis_crate(_binding_0)),
+ Visibility::Restricted(_binding_0) => {
+ Visibility::Restricted(f.fold_vis_restricted(_binding_0))
+ }
+ Visibility::Inherited => Visibility::Inherited,
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_where_clause<F>(f: &mut F, node: WhereClause) -> WhereClause
+where
+ F: Fold + ?Sized,
+{
+ WhereClause {
+ where_token: Token![where](tokens_helper(f, &node.where_token.span)),
+ predicates: FoldHelper::lift(node.predicates, |it| f.fold_where_predicate(it)),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn fold_where_predicate<F>(f: &mut F, node: WherePredicate) -> WherePredicate
+where
+ F: Fold + ?Sized,
+{
+ match node {
+ WherePredicate::Type(_binding_0) => {
+ WherePredicate::Type(f.fold_predicate_type(_binding_0))
+ }
+ WherePredicate::Lifetime(_binding_0) => {
+ WherePredicate::Lifetime(f.fold_predicate_lifetime(_binding_0))
+ }
+ WherePredicate::Eq(_binding_0) => {
+ WherePredicate::Eq(f.fold_predicate_eq(_binding_0))
+ }
+ }
+}
diff --git a/third_party/rust/syn/src/gen/hash.rs b/third_party/rust/syn/src/gen/hash.rs
new file mode 100644
index 0000000000..d0400e19d6
--- /dev/null
+++ b/third_party/rust/syn/src/gen/hash.rs
@@ -0,0 +1,2869 @@
+// 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<H>(&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<H>(&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<H>(&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 AttrStyle {
+ fn hash<H>(&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<H>(&self, state: &mut H)
+ where
+ H: Hasher,
+ {
+ self.style.hash(state);
+ self.path.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 BareFnArg {
+ fn hash<H>(&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 BinOp {
+ fn hash<H>(&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::AddEq(_) => {
+ state.write_u8(18u8);
+ }
+ BinOp::SubEq(_) => {
+ state.write_u8(19u8);
+ }
+ BinOp::MulEq(_) => {
+ state.write_u8(20u8);
+ }
+ BinOp::DivEq(_) => {
+ state.write_u8(21u8);
+ }
+ BinOp::RemEq(_) => {
+ state.write_u8(22u8);
+ }
+ BinOp::BitXorEq(_) => {
+ state.write_u8(23u8);
+ }
+ BinOp::BitAndEq(_) => {
+ state.write_u8(24u8);
+ }
+ BinOp::BitOrEq(_) => {
+ state.write_u8(25u8);
+ }
+ BinOp::ShlEq(_) => {
+ state.write_u8(26u8);
+ }
+ BinOp::ShrEq(_) => {
+ state.write_u8(27u8);
+ }
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Hash for Binding {
+ fn hash<H>(&self, state: &mut H)
+ where
+ H: Hasher,
+ {
+ self.ident.hash(state);
+ self.ty.hash(state);
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Hash for Block {
+ fn hash<H>(&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<H>(&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<H>(&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<H>(&self, state: &mut H)
+ where
+ H: Hasher,
+ {
+ self.ident.hash(state);
+ self.bounds.hash(state);
+ }
+}
+#[cfg(feature = "derive")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Hash for Data {
+ fn hash<H>(&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<H>(&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<H>(&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<H>(&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<H>(&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<H>(&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::AssignOp(v0) => {
+ state.write_u8(2u8);
+ v0.hash(state);
+ }
+ #[cfg(feature = "full")]
+ Expr::Async(v0) => {
+ state.write_u8(3u8);
+ v0.hash(state);
+ }
+ #[cfg(feature = "full")]
+ Expr::Await(v0) => {
+ state.write_u8(4u8);
+ v0.hash(state);
+ }
+ Expr::Binary(v0) => {
+ state.write_u8(5u8);
+ v0.hash(state);
+ }
+ #[cfg(feature = "full")]
+ Expr::Block(v0) => {
+ state.write_u8(6u8);
+ v0.hash(state);
+ }
+ #[cfg(feature = "full")]
+ Expr::Box(v0) => {
+ state.write_u8(7u8);
+ v0.hash(state);
+ }
+ #[cfg(feature = "full")]
+ Expr::Break(v0) => {
+ state.write_u8(8u8);
+ v0.hash(state);
+ }
+ Expr::Call(v0) => {
+ state.write_u8(9u8);
+ v0.hash(state);
+ }
+ Expr::Cast(v0) => {
+ state.write_u8(10u8);
+ v0.hash(state);
+ }
+ #[cfg(feature = "full")]
+ Expr::Closure(v0) => {
+ state.write_u8(11u8);
+ v0.hash(state);
+ }
+ #[cfg(feature = "full")]
+ Expr::Continue(v0) => {
+ state.write_u8(12u8);
+ v0.hash(state);
+ }
+ Expr::Field(v0) => {
+ state.write_u8(13u8);
+ v0.hash(state);
+ }
+ #[cfg(feature = "full")]
+ Expr::ForLoop(v0) => {
+ state.write_u8(14u8);
+ v0.hash(state);
+ }
+ #[cfg(feature = "full")]
+ Expr::Group(v0) => {
+ state.write_u8(15u8);
+ v0.hash(state);
+ }
+ #[cfg(feature = "full")]
+ Expr::If(v0) => {
+ state.write_u8(16u8);
+ v0.hash(state);
+ }
+ Expr::Index(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);
+ }
+ #[cfg(feature = "full")]
+ Expr::Macro(v0) => {
+ state.write_u8(21u8);
+ v0.hash(state);
+ }
+ #[cfg(feature = "full")]
+ Expr::Match(v0) => {
+ state.write_u8(22u8);
+ v0.hash(state);
+ }
+ #[cfg(feature = "full")]
+ 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);
+ }
+ #[cfg(feature = "full")]
+ 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);
+ }
+ #[cfg(feature = "full")]
+ 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);
+ }
+ #[cfg(feature = "full")]
+ Expr::Type(v0) => {
+ state.write_u8(34u8);
+ v0.hash(state);
+ }
+ Expr::Unary(v0) => {
+ state.write_u8(35u8);
+ v0.hash(state);
+ }
+ #[cfg(feature = "full")]
+ Expr::Unsafe(v0) => {
+ state.write_u8(36u8);
+ v0.hash(state);
+ }
+ Expr::Verbatim(v0) => {
+ state.write_u8(37u8);
+ TokenStreamHelper(v0).hash(state);
+ }
+ #[cfg(feature = "full")]
+ Expr::While(v0) => {
+ state.write_u8(38u8);
+ v0.hash(state);
+ }
+ #[cfg(feature = "full")]
+ Expr::Yield(v0) => {
+ state.write_u8(39u8);
+ v0.hash(state);
+ }
+ #[cfg(any(syn_no_non_exhaustive, not(feature = "full")))]
+ _ => unreachable!(),
+ }
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Hash for ExprArray {
+ fn hash<H>(&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<H>(&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 ExprAssignOp {
+ fn hash<H>(&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 ExprAsync {
+ fn hash<H>(&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<H>(&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<H>(&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<H>(&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 ExprBox {
+ fn hash<H>(&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 ExprBreak {
+ fn hash<H>(&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<H>(&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<H>(&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<H>(&self, state: &mut H)
+ where
+ H: Hasher,
+ {
+ self.attrs.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 ExprContinue {
+ fn hash<H>(&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<H>(&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<H>(&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(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Hash for ExprGroup {
+ fn hash<H>(&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<H>(&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<H>(&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 ExprLet {
+ fn hash<H>(&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<H>(&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<H>(&self, state: &mut H)
+ where
+ H: Hasher,
+ {
+ self.attrs.hash(state);
+ self.label.hash(state);
+ self.body.hash(state);
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Hash for ExprMacro {
+ fn hash<H>(&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<H>(&self, state: &mut H)
+ where
+ H: Hasher,
+ {
+ self.attrs.hash(state);
+ self.expr.hash(state);
+ self.arms.hash(state);
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Hash for ExprMethodCall {
+ fn hash<H>(&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<H>(&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<H>(&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<H>(&self, state: &mut H)
+ where
+ H: Hasher,
+ {
+ self.attrs.hash(state);
+ self.from.hash(state);
+ self.limits.hash(state);
+ self.to.hash(state);
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Hash for ExprReference {
+ fn hash<H>(&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<H>(&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<H>(&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 ExprStruct {
+ fn hash<H>(&self, state: &mut H)
+ where
+ H: Hasher,
+ {
+ self.attrs.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<H>(&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<H>(&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<H>(&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 ExprType {
+ fn hash<H>(&self, state: &mut H)
+ where
+ H: Hasher,
+ {
+ self.attrs.hash(state);
+ self.expr.hash(state);
+ self.ty.hash(state);
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Hash for ExprUnary {
+ fn hash<H>(&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<H>(&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<H>(&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<H>(&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<H>(&self, state: &mut H)
+ where
+ H: Hasher,
+ {
+ self.attrs.hash(state);
+ self.vis.hash(state);
+ self.ident.hash(state);
+ self.colon_token.hash(state);
+ self.ty.hash(state);
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Hash for FieldPat {
+ fn hash<H>(&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(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Hash for FieldValue {
+ fn hash<H>(&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<H>(&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<H>(&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<H>(&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<H>(&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<H>(&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<H>(&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(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Hash for ForeignItemFn {
+ fn hash<H>(&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<H>(&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<H>(&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<H>(&self, state: &mut H)
+ where
+ H: Hasher,
+ {
+ self.attrs.hash(state);
+ self.vis.hash(state);
+ self.ident.hash(state);
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Hash for GenericArgument {
+ fn hash<H>(&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::Binding(v0) => {
+ state.write_u8(3u8);
+ v0.hash(state);
+ }
+ GenericArgument::Constraint(v0) => {
+ state.write_u8(4u8);
+ v0.hash(state);
+ }
+ }
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Hash for GenericMethodArgument {
+ fn hash<H>(&self, state: &mut H)
+ where
+ H: Hasher,
+ {
+ match self {
+ GenericMethodArgument::Type(v0) => {
+ state.write_u8(0u8);
+ v0.hash(state);
+ }
+ GenericMethodArgument::Const(v0) => {
+ state.write_u8(1u8);
+ v0.hash(state);
+ }
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Hash for GenericParam {
+ fn hash<H>(&self, state: &mut H)
+ where
+ H: Hasher,
+ {
+ match self {
+ GenericParam::Type(v0) => {
+ state.write_u8(0u8);
+ v0.hash(state);
+ }
+ GenericParam::Lifetime(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<H>(&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<H>(&self, state: &mut H)
+ where
+ H: Hasher,
+ {
+ match self {
+ ImplItem::Const(v0) => {
+ state.write_u8(0u8);
+ v0.hash(state);
+ }
+ ImplItem::Method(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(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Hash for ImplItemConst {
+ fn hash<H>(&self, state: &mut H)
+ where
+ H: Hasher,
+ {
+ self.attrs.hash(state);
+ self.vis.hash(state);
+ self.defaultness.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 ImplItemMacro {
+ fn hash<H>(&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 ImplItemMethod {
+ fn hash<H>(&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 ImplItemType {
+ fn hash<H>(&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 Item {
+ fn hash<H>(&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::Macro2(v0) => {
+ state.write_u8(7u8);
+ v0.hash(state);
+ }
+ Item::Mod(v0) => {
+ state.write_u8(8u8);
+ v0.hash(state);
+ }
+ Item::Static(v0) => {
+ state.write_u8(9u8);
+ v0.hash(state);
+ }
+ Item::Struct(v0) => {
+ state.write_u8(10u8);
+ v0.hash(state);
+ }
+ Item::Trait(v0) => {
+ state.write_u8(11u8);
+ v0.hash(state);
+ }
+ Item::TraitAlias(v0) => {
+ state.write_u8(12u8);
+ v0.hash(state);
+ }
+ Item::Type(v0) => {
+ state.write_u8(13u8);
+ v0.hash(state);
+ }
+ Item::Union(v0) => {
+ state.write_u8(14u8);
+ v0.hash(state);
+ }
+ Item::Use(v0) => {
+ state.write_u8(15u8);
+ v0.hash(state);
+ }
+ Item::Verbatim(v0) => {
+ state.write_u8(16u8);
+ TokenStreamHelper(v0).hash(state);
+ }
+ #[cfg(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Hash for ItemConst {
+ fn hash<H>(&self, state: &mut H)
+ where
+ H: Hasher,
+ {
+ self.attrs.hash(state);
+ self.vis.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 ItemEnum {
+ fn hash<H>(&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<H>(&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<H>(&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<H>(&self, state: &mut H)
+ where
+ H: Hasher,
+ {
+ self.attrs.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<H>(&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<H>(&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 ItemMacro2 {
+ fn hash<H>(&self, state: &mut H)
+ where
+ H: Hasher,
+ {
+ self.attrs.hash(state);
+ self.vis.hash(state);
+ self.ident.hash(state);
+ TokenStreamHelper(&self.rules).hash(state);
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Hash for ItemMod {
+ fn hash<H>(&self, state: &mut H)
+ where
+ H: Hasher,
+ {
+ self.attrs.hash(state);
+ self.vis.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<H>(&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<H>(&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<H>(&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.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<H>(&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<H>(&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<H>(&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<H>(&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<H>(&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 LifetimeDef {
+ fn hash<H>(&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<H>(&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<H>(&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<H>(&self, state: &mut H)
+ where
+ H: Hasher,
+ {
+ self.attrs.hash(state);
+ self.pat.hash(state);
+ self.init.hash(state);
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Hash for Macro {
+ fn hash<H>(&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<H>(&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<H>(&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<H>(&self, state: &mut H)
+ where
+ H: Hasher,
+ {
+ self.path.hash(state);
+ self.nested.hash(state);
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Hash for MetaNameValue {
+ fn hash<H>(&self, state: &mut H)
+ where
+ H: Hasher,
+ {
+ self.path.hash(state);
+ self.lit.hash(state);
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Hash for MethodTurbofish {
+ fn hash<H>(&self, state: &mut H)
+ where
+ H: Hasher,
+ {
+ self.args.hash(state);
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Hash for NestedMeta {
+ fn hash<H>(&self, state: &mut H)
+ where
+ H: Hasher,
+ {
+ match self {
+ NestedMeta::Meta(v0) => {
+ state.write_u8(0u8);
+ v0.hash(state);
+ }
+ NestedMeta::Lit(v0) => {
+ state.write_u8(1u8);
+ v0.hash(state);
+ }
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Hash for ParenthesizedGenericArguments {
+ fn hash<H>(&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<H>(&self, state: &mut H)
+ where
+ H: Hasher,
+ {
+ match self {
+ Pat::Box(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::Path(v0) => {
+ state.write_u8(5u8);
+ v0.hash(state);
+ }
+ Pat::Range(v0) => {
+ state.write_u8(6u8);
+ v0.hash(state);
+ }
+ Pat::Reference(v0) => {
+ state.write_u8(7u8);
+ v0.hash(state);
+ }
+ Pat::Rest(v0) => {
+ state.write_u8(8u8);
+ v0.hash(state);
+ }
+ Pat::Slice(v0) => {
+ state.write_u8(9u8);
+ v0.hash(state);
+ }
+ Pat::Struct(v0) => {
+ state.write_u8(10u8);
+ v0.hash(state);
+ }
+ Pat::Tuple(v0) => {
+ state.write_u8(11u8);
+ v0.hash(state);
+ }
+ Pat::TupleStruct(v0) => {
+ state.write_u8(12u8);
+ v0.hash(state);
+ }
+ Pat::Type(v0) => {
+ state.write_u8(13u8);
+ v0.hash(state);
+ }
+ Pat::Verbatim(v0) => {
+ state.write_u8(14u8);
+ TokenStreamHelper(v0).hash(state);
+ }
+ Pat::Wild(v0) => {
+ state.write_u8(15u8);
+ v0.hash(state);
+ }
+ #[cfg(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Hash for PatBox {
+ fn hash<H>(&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 PatIdent {
+ fn hash<H>(&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 PatLit {
+ fn hash<H>(&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 PatMacro {
+ fn hash<H>(&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 PatOr {
+ fn hash<H>(&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 PatPath {
+ fn hash<H>(&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 PatRange {
+ fn hash<H>(&self, state: &mut H)
+ where
+ H: Hasher,
+ {
+ self.attrs.hash(state);
+ self.lo.hash(state);
+ self.limits.hash(state);
+ self.hi.hash(state);
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Hash for PatReference {
+ fn hash<H>(&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<H>(&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<H>(&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<H>(&self, state: &mut H)
+ where
+ H: Hasher,
+ {
+ self.attrs.hash(state);
+ self.path.hash(state);
+ self.fields.hash(state);
+ self.dot2_token.hash(state);
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Hash for PatTuple {
+ fn hash<H>(&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<H>(&self, state: &mut H)
+ where
+ H: Hasher,
+ {
+ self.attrs.hash(state);
+ self.path.hash(state);
+ self.pat.hash(state);
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Hash for PatType {
+ fn hash<H>(&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<H>(&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<H>(&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<H>(&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<H>(&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 PredicateEq {
+ fn hash<H>(&self, state: &mut H)
+ where
+ H: Hasher,
+ {
+ self.lhs_ty.hash(state);
+ self.rhs_ty.hash(state);
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Hash for PredicateLifetime {
+ fn hash<H>(&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<H>(&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<H>(&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<H>(&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<H>(&self, state: &mut H)
+ where
+ H: Hasher,
+ {
+ self.attrs.hash(state);
+ self.reference.hash(state);
+ self.mutability.hash(state);
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Hash for ReturnType {
+ fn hash<H>(&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<H>(&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 Stmt {
+ fn hash<H>(&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) => {
+ state.write_u8(2u8);
+ v0.hash(state);
+ }
+ Stmt::Semi(v0, _) => {
+ state.write_u8(3u8);
+ v0.hash(state);
+ }
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Hash for TraitBound {
+ fn hash<H>(&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<H>(&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<H>(&self, state: &mut H)
+ where
+ H: Hasher,
+ {
+ match self {
+ TraitItem::Const(v0) => {
+ state.write_u8(0u8);
+ v0.hash(state);
+ }
+ TraitItem::Method(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(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+ }
+}
+#[cfg(feature = "full")]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Hash for TraitItemConst {
+ fn hash<H>(&self, state: &mut H)
+ where
+ H: Hasher,
+ {
+ self.attrs.hash(state);
+ self.ident.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 TraitItemMacro {
+ fn hash<H>(&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 TraitItemMethod {
+ fn hash<H>(&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 TraitItemType {
+ fn hash<H>(&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<H>(&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(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Hash for TypeArray {
+ fn hash<H>(&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<H>(&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<H>(&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<H>(&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<H>(&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<H>(&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<H>(&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<H>(&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<H>(&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);
+ }
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Hash for TypeParen {
+ fn hash<H>(&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<H>(&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<H>(&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<H>(&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<H>(&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<H>(&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<H>(&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<H>(&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<H>(&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<H>(&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<H>(&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<H>(&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<H>(&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<H>(&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(any(feature = "derive", feature = "full"))]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Hash for Variadic {
+ fn hash<H>(&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 Variant {
+ fn hash<H>(&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 VisCrate {
+ fn hash<H>(&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 VisPublic {
+ fn hash<H>(&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 VisRestricted {
+ fn hash<H>(&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<H>(&self, state: &mut H)
+ where
+ H: Hasher,
+ {
+ match self {
+ Visibility::Public(v0) => {
+ state.write_u8(0u8);
+ v0.hash(state);
+ }
+ Visibility::Crate(v0) => {
+ state.write_u8(1u8);
+ v0.hash(state);
+ }
+ Visibility::Restricted(v0) => {
+ state.write_u8(2u8);
+ v0.hash(state);
+ }
+ Visibility::Inherited => {
+ state.write_u8(3u8);
+ }
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+#[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
+impl Hash for WhereClause {
+ fn hash<H>(&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<H>(&self, state: &mut H)
+ where
+ H: Hasher,
+ {
+ match self {
+ WherePredicate::Type(v0) => {
+ state.write_u8(0u8);
+ v0.hash(state);
+ }
+ WherePredicate::Lifetime(v0) => {
+ state.write_u8(1u8);
+ v0.hash(state);
+ }
+ WherePredicate::Eq(v0) => {
+ state.write_u8(2u8);
+ v0.hash(state);
+ }
+ }
+ }
+}
diff --git a/third_party/rust/syn/src/gen/visit.rs b/third_party/rust/syn/src/gen/visit.rs
new file mode 100644
index 0000000000..19ddd2e726
--- /dev/null
+++ b/third_party/rust/syn/src/gen/visit.rs
@@ -0,0 +1,3786 @@
+// This file is @generated by syn-internal-codegen.
+// It is not intended for manual editing.
+
+#![allow(unused_variables)]
+#[cfg(any(feature = "full", feature = "derive"))]
+use crate::gen::helper::visit::*;
+#[cfg(any(feature = "full", feature = "derive"))]
+use crate::punctuated::Punctuated;
+use crate::*;
+use proc_macro2::Span;
+#[cfg(feature = "full")]
+macro_rules! full {
+ ($e:expr) => {
+ $e
+ };
+}
+#[cfg(all(feature = "derive", not(feature = "full")))]
+macro_rules! full {
+ ($e:expr) => {
+ unreachable!()
+ };
+}
+macro_rules! skip {
+ ($($tt:tt)*) => {};
+}
+/// Syntax tree traversal to walk a shared borrow of a syntax tree.
+///
+/// See the [module documentation] for details.
+///
+/// [module documentation]: self
+///
+/// *This trait is available only if Syn is built with the `"visit"` feature.*
+pub trait Visit<'ast> {
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_abi(&mut self, i: &'ast Abi) {
+ visit_abi(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_angle_bracketed_generic_arguments(
+ &mut self,
+ i: &'ast AngleBracketedGenericArguments,
+ ) {
+ visit_angle_bracketed_generic_arguments(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_arm(&mut self, i: &'ast Arm) {
+ visit_arm(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_attr_style(&mut self, i: &'ast AttrStyle) {
+ visit_attr_style(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_attribute(&mut self, i: &'ast Attribute) {
+ visit_attribute(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_bare_fn_arg(&mut self, i: &'ast BareFnArg) {
+ visit_bare_fn_arg(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_bin_op(&mut self, i: &'ast BinOp) {
+ visit_bin_op(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_binding(&mut self, i: &'ast Binding) {
+ visit_binding(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_block(&mut self, i: &'ast Block) {
+ visit_block(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_bound_lifetimes(&mut self, i: &'ast BoundLifetimes) {
+ visit_bound_lifetimes(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_const_param(&mut self, i: &'ast ConstParam) {
+ visit_const_param(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_constraint(&mut self, i: &'ast Constraint) {
+ visit_constraint(self, i);
+ }
+ #[cfg(feature = "derive")]
+ fn visit_data(&mut self, i: &'ast Data) {
+ visit_data(self, i);
+ }
+ #[cfg(feature = "derive")]
+ fn visit_data_enum(&mut self, i: &'ast DataEnum) {
+ visit_data_enum(self, i);
+ }
+ #[cfg(feature = "derive")]
+ fn visit_data_struct(&mut self, i: &'ast DataStruct) {
+ visit_data_struct(self, i);
+ }
+ #[cfg(feature = "derive")]
+ fn visit_data_union(&mut self, i: &'ast DataUnion) {
+ visit_data_union(self, i);
+ }
+ #[cfg(feature = "derive")]
+ fn visit_derive_input(&mut self, i: &'ast DeriveInput) {
+ visit_derive_input(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr(&mut self, i: &'ast Expr) {
+ visit_expr(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_array(&mut self, i: &'ast ExprArray) {
+ visit_expr_array(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_assign(&mut self, i: &'ast ExprAssign) {
+ visit_expr_assign(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_assign_op(&mut self, i: &'ast ExprAssignOp) {
+ visit_expr_assign_op(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_async(&mut self, i: &'ast ExprAsync) {
+ visit_expr_async(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_await(&mut self, i: &'ast ExprAwait) {
+ visit_expr_await(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr_binary(&mut self, i: &'ast ExprBinary) {
+ visit_expr_binary(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_block(&mut self, i: &'ast ExprBlock) {
+ visit_expr_block(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_box(&mut self, i: &'ast ExprBox) {
+ visit_expr_box(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_break(&mut self, i: &'ast ExprBreak) {
+ visit_expr_break(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr_call(&mut self, i: &'ast ExprCall) {
+ visit_expr_call(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr_cast(&mut self, i: &'ast ExprCast) {
+ visit_expr_cast(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_closure(&mut self, i: &'ast ExprClosure) {
+ visit_expr_closure(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_continue(&mut self, i: &'ast ExprContinue) {
+ visit_expr_continue(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr_field(&mut self, i: &'ast ExprField) {
+ visit_expr_field(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_for_loop(&mut self, i: &'ast ExprForLoop) {
+ visit_expr_for_loop(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_group(&mut self, i: &'ast ExprGroup) {
+ visit_expr_group(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_if(&mut self, i: &'ast ExprIf) {
+ visit_expr_if(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr_index(&mut self, i: &'ast ExprIndex) {
+ visit_expr_index(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_let(&mut self, i: &'ast ExprLet) {
+ visit_expr_let(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr_lit(&mut self, i: &'ast ExprLit) {
+ visit_expr_lit(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_loop(&mut self, i: &'ast ExprLoop) {
+ visit_expr_loop(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_macro(&mut self, i: &'ast ExprMacro) {
+ visit_expr_macro(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_match(&mut self, i: &'ast ExprMatch) {
+ visit_expr_match(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_method_call(&mut self, i: &'ast ExprMethodCall) {
+ visit_expr_method_call(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr_paren(&mut self, i: &'ast ExprParen) {
+ visit_expr_paren(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr_path(&mut self, i: &'ast ExprPath) {
+ visit_expr_path(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_range(&mut self, i: &'ast ExprRange) {
+ visit_expr_range(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_reference(&mut self, i: &'ast ExprReference) {
+ visit_expr_reference(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_repeat(&mut self, i: &'ast ExprRepeat) {
+ visit_expr_repeat(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_return(&mut self, i: &'ast ExprReturn) {
+ visit_expr_return(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_struct(&mut self, i: &'ast ExprStruct) {
+ visit_expr_struct(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_try(&mut self, i: &'ast ExprTry) {
+ visit_expr_try(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_try_block(&mut self, i: &'ast ExprTryBlock) {
+ visit_expr_try_block(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_tuple(&mut self, i: &'ast ExprTuple) {
+ visit_expr_tuple(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_type(&mut self, i: &'ast ExprType) {
+ visit_expr_type(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr_unary(&mut self, i: &'ast ExprUnary) {
+ visit_expr_unary(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_unsafe(&mut self, i: &'ast ExprUnsafe) {
+ visit_expr_unsafe(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_while(&mut self, i: &'ast ExprWhile) {
+ visit_expr_while(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_yield(&mut self, i: &'ast ExprYield) {
+ visit_expr_yield(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_field(&mut self, i: &'ast Field) {
+ visit_field(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_field_pat(&mut self, i: &'ast FieldPat) {
+ visit_field_pat(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_field_value(&mut self, i: &'ast FieldValue) {
+ visit_field_value(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_fields(&mut self, i: &'ast Fields) {
+ visit_fields(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_fields_named(&mut self, i: &'ast FieldsNamed) {
+ visit_fields_named(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_fields_unnamed(&mut self, i: &'ast FieldsUnnamed) {
+ visit_fields_unnamed(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_file(&mut self, i: &'ast File) {
+ visit_file(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_fn_arg(&mut self, i: &'ast FnArg) {
+ visit_fn_arg(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_foreign_item(&mut self, i: &'ast ForeignItem) {
+ visit_foreign_item(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_foreign_item_fn(&mut self, i: &'ast ForeignItemFn) {
+ visit_foreign_item_fn(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_foreign_item_macro(&mut self, i: &'ast ForeignItemMacro) {
+ visit_foreign_item_macro(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_foreign_item_static(&mut self, i: &'ast ForeignItemStatic) {
+ visit_foreign_item_static(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_foreign_item_type(&mut self, i: &'ast ForeignItemType) {
+ visit_foreign_item_type(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_generic_argument(&mut self, i: &'ast GenericArgument) {
+ visit_generic_argument(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_generic_method_argument(&mut self, i: &'ast GenericMethodArgument) {
+ visit_generic_method_argument(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_generic_param(&mut self, i: &'ast GenericParam) {
+ visit_generic_param(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_generics(&mut self, i: &'ast Generics) {
+ visit_generics(self, i);
+ }
+ fn visit_ident(&mut self, i: &'ast Ident) {
+ visit_ident(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_impl_item(&mut self, i: &'ast ImplItem) {
+ visit_impl_item(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_impl_item_const(&mut self, i: &'ast ImplItemConst) {
+ visit_impl_item_const(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_impl_item_macro(&mut self, i: &'ast ImplItemMacro) {
+ visit_impl_item_macro(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_impl_item_method(&mut self, i: &'ast ImplItemMethod) {
+ visit_impl_item_method(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_impl_item_type(&mut self, i: &'ast ImplItemType) {
+ visit_impl_item_type(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_index(&mut self, i: &'ast Index) {
+ visit_index(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_item(&mut self, i: &'ast Item) {
+ visit_item(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_const(&mut self, i: &'ast ItemConst) {
+ visit_item_const(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_enum(&mut self, i: &'ast ItemEnum) {
+ visit_item_enum(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_extern_crate(&mut self, i: &'ast ItemExternCrate) {
+ visit_item_extern_crate(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_fn(&mut self, i: &'ast ItemFn) {
+ visit_item_fn(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_foreign_mod(&mut self, i: &'ast ItemForeignMod) {
+ visit_item_foreign_mod(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_impl(&mut self, i: &'ast ItemImpl) {
+ visit_item_impl(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_macro(&mut self, i: &'ast ItemMacro) {
+ visit_item_macro(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_macro2(&mut self, i: &'ast ItemMacro2) {
+ visit_item_macro2(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_mod(&mut self, i: &'ast ItemMod) {
+ visit_item_mod(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_static(&mut self, i: &'ast ItemStatic) {
+ visit_item_static(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_struct(&mut self, i: &'ast ItemStruct) {
+ visit_item_struct(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_trait(&mut self, i: &'ast ItemTrait) {
+ visit_item_trait(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_trait_alias(&mut self, i: &'ast ItemTraitAlias) {
+ visit_item_trait_alias(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_type(&mut self, i: &'ast ItemType) {
+ visit_item_type(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_union(&mut self, i: &'ast ItemUnion) {
+ visit_item_union(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_use(&mut self, i: &'ast ItemUse) {
+ visit_item_use(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_label(&mut self, i: &'ast Label) {
+ visit_label(self, i);
+ }
+ fn visit_lifetime(&mut self, i: &'ast Lifetime) {
+ visit_lifetime(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_lifetime_def(&mut self, i: &'ast LifetimeDef) {
+ visit_lifetime_def(self, i);
+ }
+ 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")]
+ fn visit_local(&mut self, i: &'ast Local) {
+ visit_local(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_macro(&mut self, i: &'ast Macro) {
+ visit_macro(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_macro_delimiter(&mut self, i: &'ast MacroDelimiter) {
+ visit_macro_delimiter(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_member(&mut self, i: &'ast Member) {
+ visit_member(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_meta(&mut self, i: &'ast Meta) {
+ visit_meta(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_meta_list(&mut self, i: &'ast MetaList) {
+ visit_meta_list(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_meta_name_value(&mut self, i: &'ast MetaNameValue) {
+ visit_meta_name_value(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_method_turbofish(&mut self, i: &'ast MethodTurbofish) {
+ visit_method_turbofish(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_nested_meta(&mut self, i: &'ast NestedMeta) {
+ visit_nested_meta(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_parenthesized_generic_arguments(
+ &mut self,
+ i: &'ast ParenthesizedGenericArguments,
+ ) {
+ visit_parenthesized_generic_arguments(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat(&mut self, i: &'ast Pat) {
+ visit_pat(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_box(&mut self, i: &'ast PatBox) {
+ visit_pat_box(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_ident(&mut self, i: &'ast PatIdent) {
+ visit_pat_ident(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_lit(&mut self, i: &'ast PatLit) {
+ visit_pat_lit(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_macro(&mut self, i: &'ast PatMacro) {
+ visit_pat_macro(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_or(&mut self, i: &'ast PatOr) {
+ visit_pat_or(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_path(&mut self, i: &'ast PatPath) {
+ visit_pat_path(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_range(&mut self, i: &'ast PatRange) {
+ visit_pat_range(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_reference(&mut self, i: &'ast PatReference) {
+ visit_pat_reference(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_rest(&mut self, i: &'ast PatRest) {
+ visit_pat_rest(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_slice(&mut self, i: &'ast PatSlice) {
+ visit_pat_slice(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_struct(&mut self, i: &'ast PatStruct) {
+ visit_pat_struct(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_tuple(&mut self, i: &'ast PatTuple) {
+ visit_pat_tuple(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_tuple_struct(&mut self, i: &'ast PatTupleStruct) {
+ visit_pat_tuple_struct(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_type(&mut self, i: &'ast PatType) {
+ visit_pat_type(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_wild(&mut self, i: &'ast PatWild) {
+ visit_pat_wild(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_path(&mut self, i: &'ast Path) {
+ visit_path(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_path_arguments(&mut self, i: &'ast PathArguments) {
+ visit_path_arguments(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_path_segment(&mut self, i: &'ast PathSegment) {
+ visit_path_segment(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_predicate_eq(&mut self, i: &'ast PredicateEq) {
+ visit_predicate_eq(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_predicate_lifetime(&mut self, i: &'ast PredicateLifetime) {
+ visit_predicate_lifetime(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_predicate_type(&mut self, i: &'ast PredicateType) {
+ visit_predicate_type(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_qself(&mut self, i: &'ast QSelf) {
+ visit_qself(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_range_limits(&mut self, i: &'ast RangeLimits) {
+ visit_range_limits(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_receiver(&mut self, i: &'ast Receiver) {
+ visit_receiver(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_return_type(&mut self, i: &'ast ReturnType) {
+ visit_return_type(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_signature(&mut self, i: &'ast Signature) {
+ visit_signature(self, i);
+ }
+ fn visit_span(&mut self, i: &Span) {
+ visit_span(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_stmt(&mut self, i: &'ast Stmt) {
+ visit_stmt(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_trait_bound(&mut self, i: &'ast TraitBound) {
+ visit_trait_bound(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_trait_bound_modifier(&mut self, i: &'ast TraitBoundModifier) {
+ visit_trait_bound_modifier(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_trait_item(&mut self, i: &'ast TraitItem) {
+ visit_trait_item(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_trait_item_const(&mut self, i: &'ast TraitItemConst) {
+ visit_trait_item_const(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_trait_item_macro(&mut self, i: &'ast TraitItemMacro) {
+ visit_trait_item_macro(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_trait_item_method(&mut self, i: &'ast TraitItemMethod) {
+ visit_trait_item_method(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_trait_item_type(&mut self, i: &'ast TraitItemType) {
+ visit_trait_item_type(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type(&mut self, i: &'ast Type) {
+ visit_type(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_array(&mut self, i: &'ast TypeArray) {
+ visit_type_array(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_bare_fn(&mut self, i: &'ast TypeBareFn) {
+ visit_type_bare_fn(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_group(&mut self, i: &'ast TypeGroup) {
+ visit_type_group(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_impl_trait(&mut self, i: &'ast TypeImplTrait) {
+ visit_type_impl_trait(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_infer(&mut self, i: &'ast TypeInfer) {
+ visit_type_infer(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_macro(&mut self, i: &'ast TypeMacro) {
+ visit_type_macro(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_never(&mut self, i: &'ast TypeNever) {
+ visit_type_never(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_param(&mut self, i: &'ast TypeParam) {
+ visit_type_param(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_param_bound(&mut self, i: &'ast TypeParamBound) {
+ visit_type_param_bound(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_paren(&mut self, i: &'ast TypeParen) {
+ visit_type_paren(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_path(&mut self, i: &'ast TypePath) {
+ visit_type_path(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_ptr(&mut self, i: &'ast TypePtr) {
+ visit_type_ptr(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_reference(&mut self, i: &'ast TypeReference) {
+ visit_type_reference(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_slice(&mut self, i: &'ast TypeSlice) {
+ visit_type_slice(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_trait_object(&mut self, i: &'ast TypeTraitObject) {
+ visit_type_trait_object(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_tuple(&mut self, i: &'ast TypeTuple) {
+ visit_type_tuple(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_un_op(&mut self, i: &'ast UnOp) {
+ visit_un_op(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_use_glob(&mut self, i: &'ast UseGlob) {
+ visit_use_glob(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_use_group(&mut self, i: &'ast UseGroup) {
+ visit_use_group(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_use_name(&mut self, i: &'ast UseName) {
+ visit_use_name(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_use_path(&mut self, i: &'ast UsePath) {
+ visit_use_path(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_use_rename(&mut self, i: &'ast UseRename) {
+ visit_use_rename(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_use_tree(&mut self, i: &'ast UseTree) {
+ visit_use_tree(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_variadic(&mut self, i: &'ast Variadic) {
+ visit_variadic(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_variant(&mut self, i: &'ast Variant) {
+ visit_variant(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_vis_crate(&mut self, i: &'ast VisCrate) {
+ visit_vis_crate(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_vis_public(&mut self, i: &'ast VisPublic) {
+ visit_vis_public(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_vis_restricted(&mut self, i: &'ast VisRestricted) {
+ visit_vis_restricted(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_visibility(&mut self, i: &'ast Visibility) {
+ visit_visibility(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_where_clause(&mut self, i: &'ast WhereClause) {
+ visit_where_clause(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_where_predicate(&mut self, i: &'ast WherePredicate) {
+ visit_where_predicate(self, i);
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_abi<'ast, V>(v: &mut V, node: &'ast Abi)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.extern_token.span);
+ if let Some(it) = &node.name {
+ v.visit_lit_str(it);
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_angle_bracketed_generic_arguments<'ast, V>(
+ v: &mut V,
+ node: &'ast AngleBracketedGenericArguments,
+)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ if let Some(it) = &node.colon2_token {
+ tokens_helper(v, &it.spans);
+ }
+ tokens_helper(v, &node.lt_token.spans);
+ for el in Punctuated::pairs(&node.args) {
+ let (it, p) = el.into_tuple();
+ v.visit_generic_argument(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+ tokens_helper(v, &node.gt_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_arm<'ast, V>(v: &mut V, node: &'ast Arm)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_pat(&node.pat);
+ if let Some(it) = &node.guard {
+ tokens_helper(v, &(it).0.span);
+ v.visit_expr(&*(it).1);
+ }
+ tokens_helper(v, &node.fat_arrow_token.spans);
+ v.visit_expr(&*node.body);
+ if let Some(it) = &node.comma {
+ tokens_helper(v, &it.spans);
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_attr_style<'ast, V>(v: &mut V, node: &'ast AttrStyle)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ AttrStyle::Outer => {}
+ AttrStyle::Inner(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_attribute<'ast, V>(v: &mut V, node: &'ast Attribute)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.pound_token.spans);
+ v.visit_attr_style(&node.style);
+ tokens_helper(v, &node.bracket_token.span);
+ v.visit_path(&node.path);
+ skip!(node.tokens);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_bare_fn_arg<'ast, V>(v: &mut V, node: &'ast BareFnArg)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ if let Some(it) = &node.name {
+ v.visit_ident(&(it).0);
+ tokens_helper(v, &(it).1.spans);
+ }
+ v.visit_type(&node.ty);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_bin_op<'ast, V>(v: &mut V, node: &'ast BinOp)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ BinOp::Add(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::Sub(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::Mul(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::Div(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::Rem(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::And(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::Or(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::BitXor(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::BitAnd(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::BitOr(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::Shl(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::Shr(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::Eq(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::Lt(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::Le(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::Ne(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::Ge(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::Gt(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::AddEq(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::SubEq(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::MulEq(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::DivEq(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::RemEq(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::BitXorEq(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::BitAndEq(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::BitOrEq(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::ShlEq(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ BinOp::ShrEq(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_binding<'ast, V>(v: &mut V, node: &'ast Binding)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ v.visit_ident(&node.ident);
+ tokens_helper(v, &node.eq_token.spans);
+ v.visit_type(&node.ty);
+}
+#[cfg(feature = "full")]
+pub fn visit_block<'ast, V>(v: &mut V, node: &'ast Block)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.brace_token.span);
+ for it in &node.stmts {
+ v.visit_stmt(it);
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_bound_lifetimes<'ast, V>(v: &mut V, node: &'ast BoundLifetimes)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.for_token.span);
+ tokens_helper(v, &node.lt_token.spans);
+ for el in Punctuated::pairs(&node.lifetimes) {
+ let (it, p) = el.into_tuple();
+ v.visit_lifetime_def(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+ tokens_helper(v, &node.gt_token.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_const_param<'ast, V>(v: &mut V, node: &'ast ConstParam)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ tokens_helper(v, &node.const_token.span);
+ v.visit_ident(&node.ident);
+ tokens_helper(v, &node.colon_token.spans);
+ v.visit_type(&node.ty);
+ if let Some(it) = &node.eq_token {
+ tokens_helper(v, &it.spans);
+ }
+ if let Some(it) = &node.default {
+ v.visit_expr(it);
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_constraint<'ast, V>(v: &mut V, node: &'ast Constraint)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ v.visit_ident(&node.ident);
+ tokens_helper(v, &node.colon_token.spans);
+ for el in Punctuated::pairs(&node.bounds) {
+ let (it, p) = el.into_tuple();
+ v.visit_type_param_bound(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(feature = "derive")]
+pub fn visit_data<'ast, V>(v: &mut V, node: &'ast Data)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ Data::Struct(_binding_0) => {
+ v.visit_data_struct(_binding_0);
+ }
+ Data::Enum(_binding_0) => {
+ v.visit_data_enum(_binding_0);
+ }
+ Data::Union(_binding_0) => {
+ v.visit_data_union(_binding_0);
+ }
+ }
+}
+#[cfg(feature = "derive")]
+pub fn visit_data_enum<'ast, V>(v: &mut V, node: &'ast DataEnum)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.enum_token.span);
+ tokens_helper(v, &node.brace_token.span);
+ for el in Punctuated::pairs(&node.variants) {
+ let (it, p) = el.into_tuple();
+ v.visit_variant(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(feature = "derive")]
+pub fn visit_data_struct<'ast, V>(v: &mut V, node: &'ast DataStruct)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.struct_token.span);
+ v.visit_fields(&node.fields);
+ if let Some(it) = &node.semi_token {
+ tokens_helper(v, &it.spans);
+ }
+}
+#[cfg(feature = "derive")]
+pub fn visit_data_union<'ast, V>(v: &mut V, node: &'ast DataUnion)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.union_token.span);
+ v.visit_fields_named(&node.fields);
+}
+#[cfg(feature = "derive")]
+pub fn visit_derive_input<'ast, V>(v: &mut V, node: &'ast DeriveInput)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_visibility(&node.vis);
+ v.visit_ident(&node.ident);
+ v.visit_generics(&node.generics);
+ v.visit_data(&node.data);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr<'ast, V>(v: &mut V, node: &'ast Expr)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ Expr::Array(_binding_0) => {
+ full!(v.visit_expr_array(_binding_0));
+ }
+ Expr::Assign(_binding_0) => {
+ full!(v.visit_expr_assign(_binding_0));
+ }
+ Expr::AssignOp(_binding_0) => {
+ full!(v.visit_expr_assign_op(_binding_0));
+ }
+ Expr::Async(_binding_0) => {
+ full!(v.visit_expr_async(_binding_0));
+ }
+ Expr::Await(_binding_0) => {
+ full!(v.visit_expr_await(_binding_0));
+ }
+ Expr::Binary(_binding_0) => {
+ v.visit_expr_binary(_binding_0);
+ }
+ Expr::Block(_binding_0) => {
+ full!(v.visit_expr_block(_binding_0));
+ }
+ Expr::Box(_binding_0) => {
+ full!(v.visit_expr_box(_binding_0));
+ }
+ Expr::Break(_binding_0) => {
+ full!(v.visit_expr_break(_binding_0));
+ }
+ Expr::Call(_binding_0) => {
+ v.visit_expr_call(_binding_0);
+ }
+ Expr::Cast(_binding_0) => {
+ v.visit_expr_cast(_binding_0);
+ }
+ Expr::Closure(_binding_0) => {
+ full!(v.visit_expr_closure(_binding_0));
+ }
+ Expr::Continue(_binding_0) => {
+ full!(v.visit_expr_continue(_binding_0));
+ }
+ Expr::Field(_binding_0) => {
+ v.visit_expr_field(_binding_0);
+ }
+ Expr::ForLoop(_binding_0) => {
+ full!(v.visit_expr_for_loop(_binding_0));
+ }
+ Expr::Group(_binding_0) => {
+ full!(v.visit_expr_group(_binding_0));
+ }
+ Expr::If(_binding_0) => {
+ full!(v.visit_expr_if(_binding_0));
+ }
+ Expr::Index(_binding_0) => {
+ v.visit_expr_index(_binding_0);
+ }
+ Expr::Let(_binding_0) => {
+ full!(v.visit_expr_let(_binding_0));
+ }
+ Expr::Lit(_binding_0) => {
+ v.visit_expr_lit(_binding_0);
+ }
+ Expr::Loop(_binding_0) => {
+ full!(v.visit_expr_loop(_binding_0));
+ }
+ Expr::Macro(_binding_0) => {
+ full!(v.visit_expr_macro(_binding_0));
+ }
+ Expr::Match(_binding_0) => {
+ full!(v.visit_expr_match(_binding_0));
+ }
+ Expr::MethodCall(_binding_0) => {
+ full!(v.visit_expr_method_call(_binding_0));
+ }
+ Expr::Paren(_binding_0) => {
+ v.visit_expr_paren(_binding_0);
+ }
+ Expr::Path(_binding_0) => {
+ v.visit_expr_path(_binding_0);
+ }
+ Expr::Range(_binding_0) => {
+ full!(v.visit_expr_range(_binding_0));
+ }
+ Expr::Reference(_binding_0) => {
+ full!(v.visit_expr_reference(_binding_0));
+ }
+ Expr::Repeat(_binding_0) => {
+ full!(v.visit_expr_repeat(_binding_0));
+ }
+ Expr::Return(_binding_0) => {
+ full!(v.visit_expr_return(_binding_0));
+ }
+ Expr::Struct(_binding_0) => {
+ full!(v.visit_expr_struct(_binding_0));
+ }
+ Expr::Try(_binding_0) => {
+ full!(v.visit_expr_try(_binding_0));
+ }
+ Expr::TryBlock(_binding_0) => {
+ full!(v.visit_expr_try_block(_binding_0));
+ }
+ Expr::Tuple(_binding_0) => {
+ full!(v.visit_expr_tuple(_binding_0));
+ }
+ Expr::Type(_binding_0) => {
+ full!(v.visit_expr_type(_binding_0));
+ }
+ Expr::Unary(_binding_0) => {
+ v.visit_expr_unary(_binding_0);
+ }
+ Expr::Unsafe(_binding_0) => {
+ full!(v.visit_expr_unsafe(_binding_0));
+ }
+ Expr::Verbatim(_binding_0) => {
+ skip!(_binding_0);
+ }
+ Expr::While(_binding_0) => {
+ full!(v.visit_expr_while(_binding_0));
+ }
+ Expr::Yield(_binding_0) => {
+ full!(v.visit_expr_yield(_binding_0));
+ }
+ #[cfg(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_array<'ast, V>(v: &mut V, node: &'ast ExprArray)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ tokens_helper(v, &node.bracket_token.span);
+ for el in Punctuated::pairs(&node.elems) {
+ let (it, p) = el.into_tuple();
+ v.visit_expr(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_assign<'ast, V>(v: &mut V, node: &'ast ExprAssign)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_expr(&*node.left);
+ tokens_helper(v, &node.eq_token.spans);
+ v.visit_expr(&*node.right);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_assign_op<'ast, V>(v: &mut V, node: &'ast ExprAssignOp)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_expr(&*node.left);
+ v.visit_bin_op(&node.op);
+ v.visit_expr(&*node.right);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_async<'ast, V>(v: &mut V, node: &'ast ExprAsync)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ tokens_helper(v, &node.async_token.span);
+ if let Some(it) = &node.capture {
+ tokens_helper(v, &it.span);
+ }
+ v.visit_block(&node.block);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_await<'ast, V>(v: &mut V, node: &'ast ExprAwait)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_expr(&*node.base);
+ tokens_helper(v, &node.dot_token.spans);
+ tokens_helper(v, &node.await_token.span);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr_binary<'ast, V>(v: &mut V, node: &'ast ExprBinary)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_expr(&*node.left);
+ v.visit_bin_op(&node.op);
+ v.visit_expr(&*node.right);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_block<'ast, V>(v: &mut V, node: &'ast ExprBlock)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ if let Some(it) = &node.label {
+ v.visit_label(it);
+ }
+ v.visit_block(&node.block);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_box<'ast, V>(v: &mut V, node: &'ast ExprBox)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ tokens_helper(v, &node.box_token.span);
+ v.visit_expr(&*node.expr);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_break<'ast, V>(v: &mut V, node: &'ast ExprBreak)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ tokens_helper(v, &node.break_token.span);
+ if let Some(it) = &node.label {
+ v.visit_lifetime(it);
+ }
+ if let Some(it) = &node.expr {
+ v.visit_expr(&**it);
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr_call<'ast, V>(v: &mut V, node: &'ast ExprCall)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_expr(&*node.func);
+ tokens_helper(v, &node.paren_token.span);
+ for el in Punctuated::pairs(&node.args) {
+ let (it, p) = el.into_tuple();
+ v.visit_expr(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr_cast<'ast, V>(v: &mut V, node: &'ast ExprCast)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_expr(&*node.expr);
+ tokens_helper(v, &node.as_token.span);
+ v.visit_type(&*node.ty);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_closure<'ast, V>(v: &mut V, node: &'ast ExprClosure)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ if let Some(it) = &node.movability {
+ tokens_helper(v, &it.span);
+ }
+ if let Some(it) = &node.asyncness {
+ tokens_helper(v, &it.span);
+ }
+ if let Some(it) = &node.capture {
+ tokens_helper(v, &it.span);
+ }
+ tokens_helper(v, &node.or1_token.spans);
+ for el in Punctuated::pairs(&node.inputs) {
+ let (it, p) = el.into_tuple();
+ v.visit_pat(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+ tokens_helper(v, &node.or2_token.spans);
+ v.visit_return_type(&node.output);
+ v.visit_expr(&*node.body);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_continue<'ast, V>(v: &mut V, node: &'ast ExprContinue)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ tokens_helper(v, &node.continue_token.span);
+ if let Some(it) = &node.label {
+ v.visit_lifetime(it);
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr_field<'ast, V>(v: &mut V, node: &'ast ExprField)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_expr(&*node.base);
+ tokens_helper(v, &node.dot_token.spans);
+ v.visit_member(&node.member);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_for_loop<'ast, V>(v: &mut V, node: &'ast ExprForLoop)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ if let Some(it) = &node.label {
+ v.visit_label(it);
+ }
+ tokens_helper(v, &node.for_token.span);
+ v.visit_pat(&node.pat);
+ tokens_helper(v, &node.in_token.span);
+ v.visit_expr(&*node.expr);
+ v.visit_block(&node.body);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_group<'ast, V>(v: &mut V, node: &'ast ExprGroup)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ tokens_helper(v, &node.group_token.span);
+ v.visit_expr(&*node.expr);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_if<'ast, V>(v: &mut V, node: &'ast ExprIf)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ tokens_helper(v, &node.if_token.span);
+ v.visit_expr(&*node.cond);
+ v.visit_block(&node.then_branch);
+ if let Some(it) = &node.else_branch {
+ tokens_helper(v, &(it).0.span);
+ v.visit_expr(&*(it).1);
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr_index<'ast, V>(v: &mut V, node: &'ast ExprIndex)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_expr(&*node.expr);
+ tokens_helper(v, &node.bracket_token.span);
+ v.visit_expr(&*node.index);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_let<'ast, V>(v: &mut V, node: &'ast ExprLet)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ tokens_helper(v, &node.let_token.span);
+ v.visit_pat(&node.pat);
+ tokens_helper(v, &node.eq_token.spans);
+ v.visit_expr(&*node.expr);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr_lit<'ast, V>(v: &mut V, node: &'ast ExprLit)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_lit(&node.lit);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_loop<'ast, V>(v: &mut V, node: &'ast ExprLoop)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ if let Some(it) = &node.label {
+ v.visit_label(it);
+ }
+ tokens_helper(v, &node.loop_token.span);
+ v.visit_block(&node.body);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_macro<'ast, V>(v: &mut V, node: &'ast ExprMacro)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_macro(&node.mac);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_match<'ast, V>(v: &mut V, node: &'ast ExprMatch)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ tokens_helper(v, &node.match_token.span);
+ v.visit_expr(&*node.expr);
+ tokens_helper(v, &node.brace_token.span);
+ for it in &node.arms {
+ v.visit_arm(it);
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_method_call<'ast, V>(v: &mut V, node: &'ast ExprMethodCall)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_expr(&*node.receiver);
+ tokens_helper(v, &node.dot_token.spans);
+ v.visit_ident(&node.method);
+ if let Some(it) = &node.turbofish {
+ v.visit_method_turbofish(it);
+ }
+ tokens_helper(v, &node.paren_token.span);
+ for el in Punctuated::pairs(&node.args) {
+ let (it, p) = el.into_tuple();
+ v.visit_expr(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr_paren<'ast, V>(v: &mut V, node: &'ast ExprParen)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ tokens_helper(v, &node.paren_token.span);
+ v.visit_expr(&*node.expr);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr_path<'ast, V>(v: &mut V, node: &'ast ExprPath)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ if let Some(it) = &node.qself {
+ v.visit_qself(it);
+ }
+ v.visit_path(&node.path);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_range<'ast, V>(v: &mut V, node: &'ast ExprRange)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ if let Some(it) = &node.from {
+ v.visit_expr(&**it);
+ }
+ v.visit_range_limits(&node.limits);
+ if let Some(it) = &node.to {
+ v.visit_expr(&**it);
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_reference<'ast, V>(v: &mut V, node: &'ast ExprReference)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ tokens_helper(v, &node.and_token.spans);
+ if let Some(it) = &node.mutability {
+ tokens_helper(v, &it.span);
+ }
+ v.visit_expr(&*node.expr);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_repeat<'ast, V>(v: &mut V, node: &'ast ExprRepeat)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ tokens_helper(v, &node.bracket_token.span);
+ v.visit_expr(&*node.expr);
+ tokens_helper(v, &node.semi_token.spans);
+ v.visit_expr(&*node.len);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_return<'ast, V>(v: &mut V, node: &'ast ExprReturn)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ tokens_helper(v, &node.return_token.span);
+ if let Some(it) = &node.expr {
+ v.visit_expr(&**it);
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_struct<'ast, V>(v: &mut V, node: &'ast ExprStruct)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_path(&node.path);
+ tokens_helper(v, &node.brace_token.span);
+ for el in Punctuated::pairs(&node.fields) {
+ let (it, p) = el.into_tuple();
+ v.visit_field_value(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+ if let Some(it) = &node.dot2_token {
+ tokens_helper(v, &it.spans);
+ }
+ if let Some(it) = &node.rest {
+ v.visit_expr(&**it);
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_try<'ast, V>(v: &mut V, node: &'ast ExprTry)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_expr(&*node.expr);
+ tokens_helper(v, &node.question_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_try_block<'ast, V>(v: &mut V, node: &'ast ExprTryBlock)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ tokens_helper(v, &node.try_token.span);
+ v.visit_block(&node.block);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_tuple<'ast, V>(v: &mut V, node: &'ast ExprTuple)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ tokens_helper(v, &node.paren_token.span);
+ for el in Punctuated::pairs(&node.elems) {
+ let (it, p) = el.into_tuple();
+ v.visit_expr(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_type<'ast, V>(v: &mut V, node: &'ast ExprType)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_expr(&*node.expr);
+ tokens_helper(v, &node.colon_token.spans);
+ v.visit_type(&*node.ty);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr_unary<'ast, V>(v: &mut V, node: &'ast ExprUnary)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_un_op(&node.op);
+ v.visit_expr(&*node.expr);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_unsafe<'ast, V>(v: &mut V, node: &'ast ExprUnsafe)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ tokens_helper(v, &node.unsafe_token.span);
+ v.visit_block(&node.block);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_while<'ast, V>(v: &mut V, node: &'ast ExprWhile)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ if let Some(it) = &node.label {
+ v.visit_label(it);
+ }
+ tokens_helper(v, &node.while_token.span);
+ v.visit_expr(&*node.cond);
+ v.visit_block(&node.body);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_yield<'ast, V>(v: &mut V, node: &'ast ExprYield)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ tokens_helper(v, &node.yield_token.span);
+ if let Some(it) = &node.expr {
+ v.visit_expr(&**it);
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_field<'ast, V>(v: &mut V, node: &'ast Field)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_visibility(&node.vis);
+ if let Some(it) = &node.ident {
+ v.visit_ident(it);
+ }
+ if let Some(it) = &node.colon_token {
+ tokens_helper(v, &it.spans);
+ }
+ v.visit_type(&node.ty);
+}
+#[cfg(feature = "full")]
+pub fn visit_field_pat<'ast, V>(v: &mut V, node: &'ast FieldPat)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_member(&node.member);
+ if let Some(it) = &node.colon_token {
+ tokens_helper(v, &it.spans);
+ }
+ v.visit_pat(&*node.pat);
+}
+#[cfg(feature = "full")]
+pub fn visit_field_value<'ast, V>(v: &mut V, node: &'ast FieldValue)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_member(&node.member);
+ if let Some(it) = &node.colon_token {
+ tokens_helper(v, &it.spans);
+ }
+ v.visit_expr(&node.expr);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_fields<'ast, V>(v: &mut V, node: &'ast Fields)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ Fields::Named(_binding_0) => {
+ v.visit_fields_named(_binding_0);
+ }
+ Fields::Unnamed(_binding_0) => {
+ v.visit_fields_unnamed(_binding_0);
+ }
+ Fields::Unit => {}
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_fields_named<'ast, V>(v: &mut V, node: &'ast FieldsNamed)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.brace_token.span);
+ for el in Punctuated::pairs(&node.named) {
+ let (it, p) = el.into_tuple();
+ v.visit_field(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_fields_unnamed<'ast, V>(v: &mut V, node: &'ast FieldsUnnamed)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.paren_token.span);
+ for el in Punctuated::pairs(&node.unnamed) {
+ let (it, p) = el.into_tuple();
+ v.visit_field(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_file<'ast, V>(v: &mut V, node: &'ast File)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ skip!(node.shebang);
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ for it in &node.items {
+ v.visit_item(it);
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_fn_arg<'ast, V>(v: &mut V, node: &'ast FnArg)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ FnArg::Receiver(_binding_0) => {
+ v.visit_receiver(_binding_0);
+ }
+ FnArg::Typed(_binding_0) => {
+ v.visit_pat_type(_binding_0);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_foreign_item<'ast, V>(v: &mut V, node: &'ast ForeignItem)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ ForeignItem::Fn(_binding_0) => {
+ v.visit_foreign_item_fn(_binding_0);
+ }
+ ForeignItem::Static(_binding_0) => {
+ v.visit_foreign_item_static(_binding_0);
+ }
+ ForeignItem::Type(_binding_0) => {
+ v.visit_foreign_item_type(_binding_0);
+ }
+ ForeignItem::Macro(_binding_0) => {
+ v.visit_foreign_item_macro(_binding_0);
+ }
+ ForeignItem::Verbatim(_binding_0) => {
+ skip!(_binding_0);
+ }
+ #[cfg(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_foreign_item_fn<'ast, V>(v: &mut V, node: &'ast ForeignItemFn)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_visibility(&node.vis);
+ v.visit_signature(&node.sig);
+ tokens_helper(v, &node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_foreign_item_macro<'ast, V>(v: &mut V, node: &'ast ForeignItemMacro)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_macro(&node.mac);
+ if let Some(it) = &node.semi_token {
+ tokens_helper(v, &it.spans);
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_foreign_item_static<'ast, V>(v: &mut V, node: &'ast ForeignItemStatic)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_visibility(&node.vis);
+ tokens_helper(v, &node.static_token.span);
+ if let Some(it) = &node.mutability {
+ tokens_helper(v, &it.span);
+ }
+ v.visit_ident(&node.ident);
+ tokens_helper(v, &node.colon_token.spans);
+ v.visit_type(&*node.ty);
+ tokens_helper(v, &node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_foreign_item_type<'ast, V>(v: &mut V, node: &'ast ForeignItemType)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_visibility(&node.vis);
+ tokens_helper(v, &node.type_token.span);
+ v.visit_ident(&node.ident);
+ tokens_helper(v, &node.semi_token.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_generic_argument<'ast, V>(v: &mut V, node: &'ast GenericArgument)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ GenericArgument::Lifetime(_binding_0) => {
+ v.visit_lifetime(_binding_0);
+ }
+ GenericArgument::Type(_binding_0) => {
+ v.visit_type(_binding_0);
+ }
+ GenericArgument::Const(_binding_0) => {
+ v.visit_expr(_binding_0);
+ }
+ GenericArgument::Binding(_binding_0) => {
+ v.visit_binding(_binding_0);
+ }
+ GenericArgument::Constraint(_binding_0) => {
+ v.visit_constraint(_binding_0);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_generic_method_argument<'ast, V>(
+ v: &mut V,
+ node: &'ast GenericMethodArgument,
+)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ GenericMethodArgument::Type(_binding_0) => {
+ v.visit_type(_binding_0);
+ }
+ GenericMethodArgument::Const(_binding_0) => {
+ v.visit_expr(_binding_0);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_generic_param<'ast, V>(v: &mut V, node: &'ast GenericParam)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ GenericParam::Type(_binding_0) => {
+ v.visit_type_param(_binding_0);
+ }
+ GenericParam::Lifetime(_binding_0) => {
+ v.visit_lifetime_def(_binding_0);
+ }
+ GenericParam::Const(_binding_0) => {
+ v.visit_const_param(_binding_0);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_generics<'ast, V>(v: &mut V, node: &'ast Generics)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ if let Some(it) = &node.lt_token {
+ tokens_helper(v, &it.spans);
+ }
+ for el in Punctuated::pairs(&node.params) {
+ let (it, p) = el.into_tuple();
+ v.visit_generic_param(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+ if let Some(it) = &node.gt_token {
+ tokens_helper(v, &it.spans);
+ }
+ if let Some(it) = &node.where_clause {
+ v.visit_where_clause(it);
+ }
+}
+pub fn visit_ident<'ast, V>(v: &mut V, node: &'ast Ident)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ v.visit_span(&node.span());
+}
+#[cfg(feature = "full")]
+pub fn visit_impl_item<'ast, V>(v: &mut V, node: &'ast ImplItem)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ ImplItem::Const(_binding_0) => {
+ v.visit_impl_item_const(_binding_0);
+ }
+ ImplItem::Method(_binding_0) => {
+ v.visit_impl_item_method(_binding_0);
+ }
+ ImplItem::Type(_binding_0) => {
+ v.visit_impl_item_type(_binding_0);
+ }
+ ImplItem::Macro(_binding_0) => {
+ v.visit_impl_item_macro(_binding_0);
+ }
+ ImplItem::Verbatim(_binding_0) => {
+ skip!(_binding_0);
+ }
+ #[cfg(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_impl_item_const<'ast, V>(v: &mut V, node: &'ast ImplItemConst)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_visibility(&node.vis);
+ if let Some(it) = &node.defaultness {
+ tokens_helper(v, &it.span);
+ }
+ tokens_helper(v, &node.const_token.span);
+ v.visit_ident(&node.ident);
+ tokens_helper(v, &node.colon_token.spans);
+ v.visit_type(&node.ty);
+ tokens_helper(v, &node.eq_token.spans);
+ v.visit_expr(&node.expr);
+ tokens_helper(v, &node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_impl_item_macro<'ast, V>(v: &mut V, node: &'ast ImplItemMacro)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_macro(&node.mac);
+ if let Some(it) = &node.semi_token {
+ tokens_helper(v, &it.spans);
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_impl_item_method<'ast, V>(v: &mut V, node: &'ast ImplItemMethod)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_visibility(&node.vis);
+ if let Some(it) = &node.defaultness {
+ tokens_helper(v, &it.span);
+ }
+ v.visit_signature(&node.sig);
+ v.visit_block(&node.block);
+}
+#[cfg(feature = "full")]
+pub fn visit_impl_item_type<'ast, V>(v: &mut V, node: &'ast ImplItemType)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_visibility(&node.vis);
+ if let Some(it) = &node.defaultness {
+ tokens_helper(v, &it.span);
+ }
+ tokens_helper(v, &node.type_token.span);
+ v.visit_ident(&node.ident);
+ v.visit_generics(&node.generics);
+ tokens_helper(v, &node.eq_token.spans);
+ v.visit_type(&node.ty);
+ tokens_helper(v, &node.semi_token.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_index<'ast, V>(v: &mut V, node: &'ast Index)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ skip!(node.index);
+ v.visit_span(&node.span);
+}
+#[cfg(feature = "full")]
+pub fn visit_item<'ast, V>(v: &mut V, node: &'ast Item)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ Item::Const(_binding_0) => {
+ v.visit_item_const(_binding_0);
+ }
+ Item::Enum(_binding_0) => {
+ v.visit_item_enum(_binding_0);
+ }
+ Item::ExternCrate(_binding_0) => {
+ v.visit_item_extern_crate(_binding_0);
+ }
+ Item::Fn(_binding_0) => {
+ v.visit_item_fn(_binding_0);
+ }
+ Item::ForeignMod(_binding_0) => {
+ v.visit_item_foreign_mod(_binding_0);
+ }
+ Item::Impl(_binding_0) => {
+ v.visit_item_impl(_binding_0);
+ }
+ Item::Macro(_binding_0) => {
+ v.visit_item_macro(_binding_0);
+ }
+ Item::Macro2(_binding_0) => {
+ v.visit_item_macro2(_binding_0);
+ }
+ Item::Mod(_binding_0) => {
+ v.visit_item_mod(_binding_0);
+ }
+ Item::Static(_binding_0) => {
+ v.visit_item_static(_binding_0);
+ }
+ Item::Struct(_binding_0) => {
+ v.visit_item_struct(_binding_0);
+ }
+ Item::Trait(_binding_0) => {
+ v.visit_item_trait(_binding_0);
+ }
+ Item::TraitAlias(_binding_0) => {
+ v.visit_item_trait_alias(_binding_0);
+ }
+ Item::Type(_binding_0) => {
+ v.visit_item_type(_binding_0);
+ }
+ Item::Union(_binding_0) => {
+ v.visit_item_union(_binding_0);
+ }
+ Item::Use(_binding_0) => {
+ v.visit_item_use(_binding_0);
+ }
+ Item::Verbatim(_binding_0) => {
+ skip!(_binding_0);
+ }
+ #[cfg(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_item_const<'ast, V>(v: &mut V, node: &'ast ItemConst)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_visibility(&node.vis);
+ tokens_helper(v, &node.const_token.span);
+ v.visit_ident(&node.ident);
+ tokens_helper(v, &node.colon_token.spans);
+ v.visit_type(&*node.ty);
+ tokens_helper(v, &node.eq_token.spans);
+ v.visit_expr(&*node.expr);
+ tokens_helper(v, &node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_item_enum<'ast, V>(v: &mut V, node: &'ast ItemEnum)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_visibility(&node.vis);
+ tokens_helper(v, &node.enum_token.span);
+ v.visit_ident(&node.ident);
+ v.visit_generics(&node.generics);
+ tokens_helper(v, &node.brace_token.span);
+ for el in Punctuated::pairs(&node.variants) {
+ let (it, p) = el.into_tuple();
+ v.visit_variant(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_item_extern_crate<'ast, V>(v: &mut V, node: &'ast ItemExternCrate)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_visibility(&node.vis);
+ tokens_helper(v, &node.extern_token.span);
+ tokens_helper(v, &node.crate_token.span);
+ v.visit_ident(&node.ident);
+ if let Some(it) = &node.rename {
+ tokens_helper(v, &(it).0.span);
+ v.visit_ident(&(it).1);
+ }
+ tokens_helper(v, &node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_item_fn<'ast, V>(v: &mut V, node: &'ast ItemFn)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_visibility(&node.vis);
+ v.visit_signature(&node.sig);
+ v.visit_block(&*node.block);
+}
+#[cfg(feature = "full")]
+pub fn visit_item_foreign_mod<'ast, V>(v: &mut V, node: &'ast ItemForeignMod)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_abi(&node.abi);
+ tokens_helper(v, &node.brace_token.span);
+ for it in &node.items {
+ v.visit_foreign_item(it);
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_item_impl<'ast, V>(v: &mut V, node: &'ast ItemImpl)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ if let Some(it) = &node.defaultness {
+ tokens_helper(v, &it.span);
+ }
+ if let Some(it) = &node.unsafety {
+ tokens_helper(v, &it.span);
+ }
+ tokens_helper(v, &node.impl_token.span);
+ v.visit_generics(&node.generics);
+ if let Some(it) = &node.trait_ {
+ if let Some(it) = &(it).0 {
+ tokens_helper(v, &it.spans);
+ }
+ v.visit_path(&(it).1);
+ tokens_helper(v, &(it).2.span);
+ }
+ v.visit_type(&*node.self_ty);
+ tokens_helper(v, &node.brace_token.span);
+ for it in &node.items {
+ v.visit_impl_item(it);
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_item_macro<'ast, V>(v: &mut V, node: &'ast ItemMacro)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ if let Some(it) = &node.ident {
+ v.visit_ident(it);
+ }
+ v.visit_macro(&node.mac);
+ if let Some(it) = &node.semi_token {
+ tokens_helper(v, &it.spans);
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_item_macro2<'ast, V>(v: &mut V, node: &'ast ItemMacro2)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_visibility(&node.vis);
+ tokens_helper(v, &node.macro_token.span);
+ v.visit_ident(&node.ident);
+ skip!(node.rules);
+}
+#[cfg(feature = "full")]
+pub fn visit_item_mod<'ast, V>(v: &mut V, node: &'ast ItemMod)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_visibility(&node.vis);
+ tokens_helper(v, &node.mod_token.span);
+ v.visit_ident(&node.ident);
+ if let Some(it) = &node.content {
+ tokens_helper(v, &(it).0.span);
+ for it in &(it).1 {
+ v.visit_item(it);
+ }
+ }
+ if let Some(it) = &node.semi {
+ tokens_helper(v, &it.spans);
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_item_static<'ast, V>(v: &mut V, node: &'ast ItemStatic)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_visibility(&node.vis);
+ tokens_helper(v, &node.static_token.span);
+ if let Some(it) = &node.mutability {
+ tokens_helper(v, &it.span);
+ }
+ v.visit_ident(&node.ident);
+ tokens_helper(v, &node.colon_token.spans);
+ v.visit_type(&*node.ty);
+ tokens_helper(v, &node.eq_token.spans);
+ v.visit_expr(&*node.expr);
+ tokens_helper(v, &node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_item_struct<'ast, V>(v: &mut V, node: &'ast ItemStruct)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_visibility(&node.vis);
+ tokens_helper(v, &node.struct_token.span);
+ v.visit_ident(&node.ident);
+ v.visit_generics(&node.generics);
+ v.visit_fields(&node.fields);
+ if let Some(it) = &node.semi_token {
+ tokens_helper(v, &it.spans);
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_item_trait<'ast, V>(v: &mut V, node: &'ast ItemTrait)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_visibility(&node.vis);
+ if let Some(it) = &node.unsafety {
+ tokens_helper(v, &it.span);
+ }
+ if let Some(it) = &node.auto_token {
+ tokens_helper(v, &it.span);
+ }
+ tokens_helper(v, &node.trait_token.span);
+ v.visit_ident(&node.ident);
+ v.visit_generics(&node.generics);
+ if let Some(it) = &node.colon_token {
+ tokens_helper(v, &it.spans);
+ }
+ for el in Punctuated::pairs(&node.supertraits) {
+ let (it, p) = el.into_tuple();
+ v.visit_type_param_bound(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+ tokens_helper(v, &node.brace_token.span);
+ for it in &node.items {
+ v.visit_trait_item(it);
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_item_trait_alias<'ast, V>(v: &mut V, node: &'ast ItemTraitAlias)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_visibility(&node.vis);
+ tokens_helper(v, &node.trait_token.span);
+ v.visit_ident(&node.ident);
+ v.visit_generics(&node.generics);
+ tokens_helper(v, &node.eq_token.spans);
+ for el in Punctuated::pairs(&node.bounds) {
+ let (it, p) = el.into_tuple();
+ v.visit_type_param_bound(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+ tokens_helper(v, &node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_item_type<'ast, V>(v: &mut V, node: &'ast ItemType)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_visibility(&node.vis);
+ tokens_helper(v, &node.type_token.span);
+ v.visit_ident(&node.ident);
+ v.visit_generics(&node.generics);
+ tokens_helper(v, &node.eq_token.spans);
+ v.visit_type(&*node.ty);
+ tokens_helper(v, &node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_item_union<'ast, V>(v: &mut V, node: &'ast ItemUnion)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_visibility(&node.vis);
+ tokens_helper(v, &node.union_token.span);
+ v.visit_ident(&node.ident);
+ v.visit_generics(&node.generics);
+ v.visit_fields_named(&node.fields);
+}
+#[cfg(feature = "full")]
+pub fn visit_item_use<'ast, V>(v: &mut V, node: &'ast ItemUse)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_visibility(&node.vis);
+ tokens_helper(v, &node.use_token.span);
+ if let Some(it) = &node.leading_colon {
+ tokens_helper(v, &it.spans);
+ }
+ v.visit_use_tree(&node.tree);
+ tokens_helper(v, &node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_label<'ast, V>(v: &mut V, node: &'ast Label)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ v.visit_lifetime(&node.name);
+ tokens_helper(v, &node.colon_token.spans);
+}
+pub fn visit_lifetime<'ast, V>(v: &mut V, node: &'ast Lifetime)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ v.visit_span(&node.apostrophe);
+ v.visit_ident(&node.ident);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_lifetime_def<'ast, V>(v: &mut V, node: &'ast LifetimeDef)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_lifetime(&node.lifetime);
+ if let Some(it) = &node.colon_token {
+ tokens_helper(v, &it.spans);
+ }
+ for el in Punctuated::pairs(&node.bounds) {
+ let (it, p) = el.into_tuple();
+ v.visit_lifetime(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+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")]
+pub fn visit_local<'ast, V>(v: &mut V, node: &'ast Local)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ tokens_helper(v, &node.let_token.span);
+ v.visit_pat(&node.pat);
+ if let Some(it) = &node.init {
+ tokens_helper(v, &(it).0.spans);
+ v.visit_expr(&*(it).1);
+ }
+ tokens_helper(v, &node.semi_token.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_macro<'ast, V>(v: &mut V, node: &'ast Macro)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ v.visit_path(&node.path);
+ tokens_helper(v, &node.bang_token.spans);
+ v.visit_macro_delimiter(&node.delimiter);
+ skip!(node.tokens);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_macro_delimiter<'ast, V>(v: &mut V, node: &'ast MacroDelimiter)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ MacroDelimiter::Paren(_binding_0) => {
+ tokens_helper(v, &_binding_0.span);
+ }
+ MacroDelimiter::Brace(_binding_0) => {
+ tokens_helper(v, &_binding_0.span);
+ }
+ MacroDelimiter::Bracket(_binding_0) => {
+ tokens_helper(v, &_binding_0.span);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_member<'ast, V>(v: &mut V, node: &'ast Member)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ Member::Named(_binding_0) => {
+ v.visit_ident(_binding_0);
+ }
+ Member::Unnamed(_binding_0) => {
+ v.visit_index(_binding_0);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_meta<'ast, V>(v: &mut V, node: &'ast Meta)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ Meta::Path(_binding_0) => {
+ v.visit_path(_binding_0);
+ }
+ Meta::List(_binding_0) => {
+ v.visit_meta_list(_binding_0);
+ }
+ Meta::NameValue(_binding_0) => {
+ v.visit_meta_name_value(_binding_0);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_meta_list<'ast, V>(v: &mut V, node: &'ast MetaList)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ v.visit_path(&node.path);
+ tokens_helper(v, &node.paren_token.span);
+ for el in Punctuated::pairs(&node.nested) {
+ let (it, p) = el.into_tuple();
+ v.visit_nested_meta(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_meta_name_value<'ast, V>(v: &mut V, node: &'ast MetaNameValue)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ v.visit_path(&node.path);
+ tokens_helper(v, &node.eq_token.spans);
+ v.visit_lit(&node.lit);
+}
+#[cfg(feature = "full")]
+pub fn visit_method_turbofish<'ast, V>(v: &mut V, node: &'ast MethodTurbofish)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.colon2_token.spans);
+ tokens_helper(v, &node.lt_token.spans);
+ for el in Punctuated::pairs(&node.args) {
+ let (it, p) = el.into_tuple();
+ v.visit_generic_method_argument(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+ tokens_helper(v, &node.gt_token.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_nested_meta<'ast, V>(v: &mut V, node: &'ast NestedMeta)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ NestedMeta::Meta(_binding_0) => {
+ v.visit_meta(_binding_0);
+ }
+ NestedMeta::Lit(_binding_0) => {
+ v.visit_lit(_binding_0);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_parenthesized_generic_arguments<'ast, V>(
+ v: &mut V,
+ node: &'ast ParenthesizedGenericArguments,
+)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.paren_token.span);
+ for el in Punctuated::pairs(&node.inputs) {
+ let (it, p) = el.into_tuple();
+ v.visit_type(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+ v.visit_return_type(&node.output);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat<'ast, V>(v: &mut V, node: &'ast Pat)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ Pat::Box(_binding_0) => {
+ v.visit_pat_box(_binding_0);
+ }
+ Pat::Ident(_binding_0) => {
+ v.visit_pat_ident(_binding_0);
+ }
+ Pat::Lit(_binding_0) => {
+ v.visit_pat_lit(_binding_0);
+ }
+ Pat::Macro(_binding_0) => {
+ v.visit_pat_macro(_binding_0);
+ }
+ Pat::Or(_binding_0) => {
+ v.visit_pat_or(_binding_0);
+ }
+ Pat::Path(_binding_0) => {
+ v.visit_pat_path(_binding_0);
+ }
+ Pat::Range(_binding_0) => {
+ v.visit_pat_range(_binding_0);
+ }
+ Pat::Reference(_binding_0) => {
+ v.visit_pat_reference(_binding_0);
+ }
+ Pat::Rest(_binding_0) => {
+ v.visit_pat_rest(_binding_0);
+ }
+ Pat::Slice(_binding_0) => {
+ v.visit_pat_slice(_binding_0);
+ }
+ Pat::Struct(_binding_0) => {
+ v.visit_pat_struct(_binding_0);
+ }
+ Pat::Tuple(_binding_0) => {
+ v.visit_pat_tuple(_binding_0);
+ }
+ Pat::TupleStruct(_binding_0) => {
+ v.visit_pat_tuple_struct(_binding_0);
+ }
+ Pat::Type(_binding_0) => {
+ v.visit_pat_type(_binding_0);
+ }
+ Pat::Verbatim(_binding_0) => {
+ skip!(_binding_0);
+ }
+ Pat::Wild(_binding_0) => {
+ v.visit_pat_wild(_binding_0);
+ }
+ #[cfg(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_box<'ast, V>(v: &mut V, node: &'ast PatBox)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ tokens_helper(v, &node.box_token.span);
+ v.visit_pat(&*node.pat);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_ident<'ast, V>(v: &mut V, node: &'ast PatIdent)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ if let Some(it) = &node.by_ref {
+ tokens_helper(v, &it.span);
+ }
+ if let Some(it) = &node.mutability {
+ tokens_helper(v, &it.span);
+ }
+ v.visit_ident(&node.ident);
+ if let Some(it) = &node.subpat {
+ tokens_helper(v, &(it).0.spans);
+ v.visit_pat(&*(it).1);
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_lit<'ast, V>(v: &mut V, node: &'ast PatLit)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_expr(&*node.expr);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_macro<'ast, V>(v: &mut V, node: &'ast PatMacro)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_macro(&node.mac);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_or<'ast, V>(v: &mut V, node: &'ast PatOr)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ if let Some(it) = &node.leading_vert {
+ tokens_helper(v, &it.spans);
+ }
+ for el in Punctuated::pairs(&node.cases) {
+ let (it, p) = el.into_tuple();
+ v.visit_pat(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_path<'ast, V>(v: &mut V, node: &'ast PatPath)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ if let Some(it) = &node.qself {
+ v.visit_qself(it);
+ }
+ v.visit_path(&node.path);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_range<'ast, V>(v: &mut V, node: &'ast PatRange)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_expr(&*node.lo);
+ v.visit_range_limits(&node.limits);
+ v.visit_expr(&*node.hi);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_reference<'ast, V>(v: &mut V, node: &'ast PatReference)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ tokens_helper(v, &node.and_token.spans);
+ if let Some(it) = &node.mutability {
+ tokens_helper(v, &it.span);
+ }
+ v.visit_pat(&*node.pat);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_rest<'ast, V>(v: &mut V, node: &'ast PatRest)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ tokens_helper(v, &node.dot2_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_slice<'ast, V>(v: &mut V, node: &'ast PatSlice)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ tokens_helper(v, &node.bracket_token.span);
+ for el in Punctuated::pairs(&node.elems) {
+ let (it, p) = el.into_tuple();
+ v.visit_pat(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_struct<'ast, V>(v: &mut V, node: &'ast PatStruct)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_path(&node.path);
+ tokens_helper(v, &node.brace_token.span);
+ for el in Punctuated::pairs(&node.fields) {
+ let (it, p) = el.into_tuple();
+ v.visit_field_pat(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+ if let Some(it) = &node.dot2_token {
+ tokens_helper(v, &it.spans);
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_tuple<'ast, V>(v: &mut V, node: &'ast PatTuple)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ tokens_helper(v, &node.paren_token.span);
+ for el in Punctuated::pairs(&node.elems) {
+ let (it, p) = el.into_tuple();
+ v.visit_pat(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_tuple_struct<'ast, V>(v: &mut V, node: &'ast PatTupleStruct)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_path(&node.path);
+ v.visit_pat_tuple(&node.pat);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_type<'ast, V>(v: &mut V, node: &'ast PatType)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_pat(&*node.pat);
+ tokens_helper(v, &node.colon_token.spans);
+ v.visit_type(&*node.ty);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_wild<'ast, V>(v: &mut V, node: &'ast PatWild)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ tokens_helper(v, &node.underscore_token.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_path<'ast, V>(v: &mut V, node: &'ast Path)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ if let Some(it) = &node.leading_colon {
+ tokens_helper(v, &it.spans);
+ }
+ for el in Punctuated::pairs(&node.segments) {
+ let (it, p) = el.into_tuple();
+ v.visit_path_segment(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_path_arguments<'ast, V>(v: &mut V, node: &'ast PathArguments)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ PathArguments::None => {}
+ PathArguments::AngleBracketed(_binding_0) => {
+ v.visit_angle_bracketed_generic_arguments(_binding_0);
+ }
+ PathArguments::Parenthesized(_binding_0) => {
+ v.visit_parenthesized_generic_arguments(_binding_0);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_path_segment<'ast, V>(v: &mut V, node: &'ast PathSegment)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ v.visit_ident(&node.ident);
+ v.visit_path_arguments(&node.arguments);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_predicate_eq<'ast, V>(v: &mut V, node: &'ast PredicateEq)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ v.visit_type(&node.lhs_ty);
+ tokens_helper(v, &node.eq_token.spans);
+ v.visit_type(&node.rhs_ty);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_predicate_lifetime<'ast, V>(v: &mut V, node: &'ast PredicateLifetime)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ v.visit_lifetime(&node.lifetime);
+ tokens_helper(v, &node.colon_token.spans);
+ for el in Punctuated::pairs(&node.bounds) {
+ let (it, p) = el.into_tuple();
+ v.visit_lifetime(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_predicate_type<'ast, V>(v: &mut V, node: &'ast PredicateType)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ if let Some(it) = &node.lifetimes {
+ v.visit_bound_lifetimes(it);
+ }
+ v.visit_type(&node.bounded_ty);
+ tokens_helper(v, &node.colon_token.spans);
+ for el in Punctuated::pairs(&node.bounds) {
+ let (it, p) = el.into_tuple();
+ v.visit_type_param_bound(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_qself<'ast, V>(v: &mut V, node: &'ast QSelf)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.lt_token.spans);
+ v.visit_type(&*node.ty);
+ skip!(node.position);
+ if let Some(it) = &node.as_token {
+ tokens_helper(v, &it.span);
+ }
+ tokens_helper(v, &node.gt_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_range_limits<'ast, V>(v: &mut V, node: &'ast RangeLimits)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ RangeLimits::HalfOpen(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ RangeLimits::Closed(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_receiver<'ast, V>(v: &mut V, node: &'ast Receiver)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ if let Some(it) = &node.reference {
+ tokens_helper(v, &(it).0.spans);
+ if let Some(it) = &(it).1 {
+ v.visit_lifetime(it);
+ }
+ }
+ if let Some(it) = &node.mutability {
+ tokens_helper(v, &it.span);
+ }
+ tokens_helper(v, &node.self_token.span);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_return_type<'ast, V>(v: &mut V, node: &'ast ReturnType)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ ReturnType::Default => {}
+ ReturnType::Type(_binding_0, _binding_1) => {
+ tokens_helper(v, &_binding_0.spans);
+ v.visit_type(&**_binding_1);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_signature<'ast, V>(v: &mut V, node: &'ast Signature)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ if let Some(it) = &node.constness {
+ tokens_helper(v, &it.span);
+ }
+ if let Some(it) = &node.asyncness {
+ tokens_helper(v, &it.span);
+ }
+ if let Some(it) = &node.unsafety {
+ tokens_helper(v, &it.span);
+ }
+ if let Some(it) = &node.abi {
+ v.visit_abi(it);
+ }
+ tokens_helper(v, &node.fn_token.span);
+ v.visit_ident(&node.ident);
+ v.visit_generics(&node.generics);
+ tokens_helper(v, &node.paren_token.span);
+ for el in Punctuated::pairs(&node.inputs) {
+ let (it, p) = el.into_tuple();
+ v.visit_fn_arg(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+ if let Some(it) = &node.variadic {
+ v.visit_variadic(it);
+ }
+ v.visit_return_type(&node.output);
+}
+pub fn visit_span<'ast, V>(v: &mut V, node: &Span)
+where
+ V: Visit<'ast> + ?Sized,
+{}
+#[cfg(feature = "full")]
+pub fn visit_stmt<'ast, V>(v: &mut V, node: &'ast Stmt)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ Stmt::Local(_binding_0) => {
+ v.visit_local(_binding_0);
+ }
+ Stmt::Item(_binding_0) => {
+ v.visit_item(_binding_0);
+ }
+ Stmt::Expr(_binding_0) => {
+ v.visit_expr(_binding_0);
+ }
+ Stmt::Semi(_binding_0, _binding_1) => {
+ v.visit_expr(_binding_0);
+ tokens_helper(v, &_binding_1.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_trait_bound<'ast, V>(v: &mut V, node: &'ast TraitBound)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ if let Some(it) = &node.paren_token {
+ tokens_helper(v, &it.span);
+ }
+ v.visit_trait_bound_modifier(&node.modifier);
+ if let Some(it) = &node.lifetimes {
+ v.visit_bound_lifetimes(it);
+ }
+ v.visit_path(&node.path);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_trait_bound_modifier<'ast, V>(v: &mut V, node: &'ast TraitBoundModifier)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ TraitBoundModifier::None => {}
+ TraitBoundModifier::Maybe(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_trait_item<'ast, V>(v: &mut V, node: &'ast TraitItem)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ TraitItem::Const(_binding_0) => {
+ v.visit_trait_item_const(_binding_0);
+ }
+ TraitItem::Method(_binding_0) => {
+ v.visit_trait_item_method(_binding_0);
+ }
+ TraitItem::Type(_binding_0) => {
+ v.visit_trait_item_type(_binding_0);
+ }
+ TraitItem::Macro(_binding_0) => {
+ v.visit_trait_item_macro(_binding_0);
+ }
+ TraitItem::Verbatim(_binding_0) => {
+ skip!(_binding_0);
+ }
+ #[cfg(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_trait_item_const<'ast, V>(v: &mut V, node: &'ast TraitItemConst)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ tokens_helper(v, &node.const_token.span);
+ v.visit_ident(&node.ident);
+ tokens_helper(v, &node.colon_token.spans);
+ v.visit_type(&node.ty);
+ if let Some(it) = &node.default {
+ tokens_helper(v, &(it).0.spans);
+ v.visit_expr(&(it).1);
+ }
+ tokens_helper(v, &node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_trait_item_macro<'ast, V>(v: &mut V, node: &'ast TraitItemMacro)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_macro(&node.mac);
+ if let Some(it) = &node.semi_token {
+ tokens_helper(v, &it.spans);
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_trait_item_method<'ast, V>(v: &mut V, node: &'ast TraitItemMethod)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_signature(&node.sig);
+ if let Some(it) = &node.default {
+ v.visit_block(it);
+ }
+ if let Some(it) = &node.semi_token {
+ tokens_helper(v, &it.spans);
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_trait_item_type<'ast, V>(v: &mut V, node: &'ast TraitItemType)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ tokens_helper(v, &node.type_token.span);
+ v.visit_ident(&node.ident);
+ v.visit_generics(&node.generics);
+ if let Some(it) = &node.colon_token {
+ tokens_helper(v, &it.spans);
+ }
+ for el in Punctuated::pairs(&node.bounds) {
+ let (it, p) = el.into_tuple();
+ v.visit_type_param_bound(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+ if let Some(it) = &node.default {
+ tokens_helper(v, &(it).0.spans);
+ v.visit_type(&(it).1);
+ }
+ tokens_helper(v, &node.semi_token.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type<'ast, V>(v: &mut V, node: &'ast Type)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ Type::Array(_binding_0) => {
+ v.visit_type_array(_binding_0);
+ }
+ Type::BareFn(_binding_0) => {
+ v.visit_type_bare_fn(_binding_0);
+ }
+ Type::Group(_binding_0) => {
+ v.visit_type_group(_binding_0);
+ }
+ Type::ImplTrait(_binding_0) => {
+ v.visit_type_impl_trait(_binding_0);
+ }
+ Type::Infer(_binding_0) => {
+ v.visit_type_infer(_binding_0);
+ }
+ Type::Macro(_binding_0) => {
+ v.visit_type_macro(_binding_0);
+ }
+ Type::Never(_binding_0) => {
+ v.visit_type_never(_binding_0);
+ }
+ Type::Paren(_binding_0) => {
+ v.visit_type_paren(_binding_0);
+ }
+ Type::Path(_binding_0) => {
+ v.visit_type_path(_binding_0);
+ }
+ Type::Ptr(_binding_0) => {
+ v.visit_type_ptr(_binding_0);
+ }
+ Type::Reference(_binding_0) => {
+ v.visit_type_reference(_binding_0);
+ }
+ Type::Slice(_binding_0) => {
+ v.visit_type_slice(_binding_0);
+ }
+ Type::TraitObject(_binding_0) => {
+ v.visit_type_trait_object(_binding_0);
+ }
+ Type::Tuple(_binding_0) => {
+ v.visit_type_tuple(_binding_0);
+ }
+ Type::Verbatim(_binding_0) => {
+ skip!(_binding_0);
+ }
+ #[cfg(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_array<'ast, V>(v: &mut V, node: &'ast TypeArray)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.bracket_token.span);
+ v.visit_type(&*node.elem);
+ tokens_helper(v, &node.semi_token.spans);
+ v.visit_expr(&node.len);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_bare_fn<'ast, V>(v: &mut V, node: &'ast TypeBareFn)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ if let Some(it) = &node.lifetimes {
+ v.visit_bound_lifetimes(it);
+ }
+ if let Some(it) = &node.unsafety {
+ tokens_helper(v, &it.span);
+ }
+ if let Some(it) = &node.abi {
+ v.visit_abi(it);
+ }
+ tokens_helper(v, &node.fn_token.span);
+ tokens_helper(v, &node.paren_token.span);
+ for el in Punctuated::pairs(&node.inputs) {
+ let (it, p) = el.into_tuple();
+ v.visit_bare_fn_arg(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+ if let Some(it) = &node.variadic {
+ v.visit_variadic(it);
+ }
+ v.visit_return_type(&node.output);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_group<'ast, V>(v: &mut V, node: &'ast TypeGroup)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.group_token.span);
+ v.visit_type(&*node.elem);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_impl_trait<'ast, V>(v: &mut V, node: &'ast TypeImplTrait)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.impl_token.span);
+ for el in Punctuated::pairs(&node.bounds) {
+ let (it, p) = el.into_tuple();
+ v.visit_type_param_bound(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_infer<'ast, V>(v: &mut V, node: &'ast TypeInfer)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.underscore_token.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_macro<'ast, V>(v: &mut V, node: &'ast TypeMacro)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ v.visit_macro(&node.mac);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_never<'ast, V>(v: &mut V, node: &'ast TypeNever)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.bang_token.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_param<'ast, V>(v: &mut V, node: &'ast TypeParam)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_ident(&node.ident);
+ if let Some(it) = &node.colon_token {
+ tokens_helper(v, &it.spans);
+ }
+ for el in Punctuated::pairs(&node.bounds) {
+ let (it, p) = el.into_tuple();
+ v.visit_type_param_bound(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+ if let Some(it) = &node.eq_token {
+ tokens_helper(v, &it.spans);
+ }
+ if let Some(it) = &node.default {
+ v.visit_type(it);
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_param_bound<'ast, V>(v: &mut V, node: &'ast TypeParamBound)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ TypeParamBound::Trait(_binding_0) => {
+ v.visit_trait_bound(_binding_0);
+ }
+ TypeParamBound::Lifetime(_binding_0) => {
+ v.visit_lifetime(_binding_0);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_paren<'ast, V>(v: &mut V, node: &'ast TypeParen)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.paren_token.span);
+ v.visit_type(&*node.elem);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_path<'ast, V>(v: &mut V, node: &'ast TypePath)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ if let Some(it) = &node.qself {
+ v.visit_qself(it);
+ }
+ v.visit_path(&node.path);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_ptr<'ast, V>(v: &mut V, node: &'ast TypePtr)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.star_token.spans);
+ if let Some(it) = &node.const_token {
+ tokens_helper(v, &it.span);
+ }
+ if let Some(it) = &node.mutability {
+ tokens_helper(v, &it.span);
+ }
+ v.visit_type(&*node.elem);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_reference<'ast, V>(v: &mut V, node: &'ast TypeReference)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.and_token.spans);
+ if let Some(it) = &node.lifetime {
+ v.visit_lifetime(it);
+ }
+ if let Some(it) = &node.mutability {
+ tokens_helper(v, &it.span);
+ }
+ v.visit_type(&*node.elem);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_slice<'ast, V>(v: &mut V, node: &'ast TypeSlice)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.bracket_token.span);
+ v.visit_type(&*node.elem);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_trait_object<'ast, V>(v: &mut V, node: &'ast TypeTraitObject)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ if let Some(it) = &node.dyn_token {
+ tokens_helper(v, &it.span);
+ }
+ for el in Punctuated::pairs(&node.bounds) {
+ let (it, p) = el.into_tuple();
+ v.visit_type_param_bound(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_tuple<'ast, V>(v: &mut V, node: &'ast TypeTuple)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.paren_token.span);
+ for el in Punctuated::pairs(&node.elems) {
+ let (it, p) = el.into_tuple();
+ v.visit_type(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_un_op<'ast, V>(v: &mut V, node: &'ast UnOp)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ UnOp::Deref(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ UnOp::Not(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ UnOp::Neg(_binding_0) => {
+ tokens_helper(v, &_binding_0.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_use_glob<'ast, V>(v: &mut V, node: &'ast UseGlob)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.star_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_use_group<'ast, V>(v: &mut V, node: &'ast UseGroup)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.brace_token.span);
+ for el in Punctuated::pairs(&node.items) {
+ let (it, p) = el.into_tuple();
+ v.visit_use_tree(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_use_name<'ast, V>(v: &mut V, node: &'ast UseName)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ v.visit_ident(&node.ident);
+}
+#[cfg(feature = "full")]
+pub fn visit_use_path<'ast, V>(v: &mut V, node: &'ast UsePath)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ v.visit_ident(&node.ident);
+ tokens_helper(v, &node.colon2_token.spans);
+ v.visit_use_tree(&*node.tree);
+}
+#[cfg(feature = "full")]
+pub fn visit_use_rename<'ast, V>(v: &mut V, node: &'ast UseRename)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ v.visit_ident(&node.ident);
+ tokens_helper(v, &node.as_token.span);
+ v.visit_ident(&node.rename);
+}
+#[cfg(feature = "full")]
+pub fn visit_use_tree<'ast, V>(v: &mut V, node: &'ast UseTree)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ UseTree::Path(_binding_0) => {
+ v.visit_use_path(_binding_0);
+ }
+ UseTree::Name(_binding_0) => {
+ v.visit_use_name(_binding_0);
+ }
+ UseTree::Rename(_binding_0) => {
+ v.visit_use_rename(_binding_0);
+ }
+ UseTree::Glob(_binding_0) => {
+ v.visit_use_glob(_binding_0);
+ }
+ UseTree::Group(_binding_0) => {
+ v.visit_use_group(_binding_0);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_variadic<'ast, V>(v: &mut V, node: &'ast Variadic)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ tokens_helper(v, &node.dots.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_variant<'ast, V>(v: &mut V, node: &'ast Variant)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ for it in &node.attrs {
+ v.visit_attribute(it);
+ }
+ v.visit_ident(&node.ident);
+ v.visit_fields(&node.fields);
+ if let Some(it) = &node.discriminant {
+ tokens_helper(v, &(it).0.spans);
+ v.visit_expr(&(it).1);
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_vis_crate<'ast, V>(v: &mut V, node: &'ast VisCrate)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.crate_token.span);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_vis_public<'ast, V>(v: &mut V, node: &'ast VisPublic)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.pub_token.span);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_vis_restricted<'ast, V>(v: &mut V, node: &'ast VisRestricted)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.pub_token.span);
+ tokens_helper(v, &node.paren_token.span);
+ if let Some(it) = &node.in_token {
+ tokens_helper(v, &it.span);
+ }
+ v.visit_path(&*node.path);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_visibility<'ast, V>(v: &mut V, node: &'ast Visibility)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ Visibility::Public(_binding_0) => {
+ v.visit_vis_public(_binding_0);
+ }
+ Visibility::Crate(_binding_0) => {
+ v.visit_vis_crate(_binding_0);
+ }
+ Visibility::Restricted(_binding_0) => {
+ v.visit_vis_restricted(_binding_0);
+ }
+ Visibility::Inherited => {}
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_where_clause<'ast, V>(v: &mut V, node: &'ast WhereClause)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ tokens_helper(v, &node.where_token.span);
+ for el in Punctuated::pairs(&node.predicates) {
+ let (it, p) = el.into_tuple();
+ v.visit_where_predicate(it);
+ if let Some(p) = p {
+ tokens_helper(v, &p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_where_predicate<'ast, V>(v: &mut V, node: &'ast WherePredicate)
+where
+ V: Visit<'ast> + ?Sized,
+{
+ match node {
+ WherePredicate::Type(_binding_0) => {
+ v.visit_predicate_type(_binding_0);
+ }
+ WherePredicate::Lifetime(_binding_0) => {
+ v.visit_predicate_lifetime(_binding_0);
+ }
+ WherePredicate::Eq(_binding_0) => {
+ v.visit_predicate_eq(_binding_0);
+ }
+ }
+}
diff --git a/third_party/rust/syn/src/gen/visit_mut.rs b/third_party/rust/syn/src/gen/visit_mut.rs
new file mode 100644
index 0000000000..239709d194
--- /dev/null
+++ b/third_party/rust/syn/src/gen/visit_mut.rs
@@ -0,0 +1,3786 @@
+// This file is @generated by syn-internal-codegen.
+// It is not intended for manual editing.
+
+#![allow(unused_variables)]
+#[cfg(any(feature = "full", feature = "derive"))]
+use crate::gen::helper::visit_mut::*;
+#[cfg(any(feature = "full", feature = "derive"))]
+use crate::punctuated::Punctuated;
+use crate::*;
+use proc_macro2::Span;
+#[cfg(feature = "full")]
+macro_rules! full {
+ ($e:expr) => {
+ $e
+ };
+}
+#[cfg(all(feature = "derive", not(feature = "full")))]
+macro_rules! full {
+ ($e:expr) => {
+ unreachable!()
+ };
+}
+macro_rules! skip {
+ ($($tt:tt)*) => {};
+}
+/// Syntax tree traversal to mutate an exclusive borrow of a syntax tree in
+/// place.
+///
+/// See the [module documentation] for details.
+///
+/// [module documentation]: self
+///
+/// *This trait is available only if Syn is built with the `"visit-mut"` feature.*
+pub trait VisitMut {
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_abi_mut(&mut self, i: &mut Abi) {
+ visit_abi_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_angle_bracketed_generic_arguments_mut(
+ &mut self,
+ i: &mut AngleBracketedGenericArguments,
+ ) {
+ visit_angle_bracketed_generic_arguments_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_arm_mut(&mut self, i: &mut Arm) {
+ visit_arm_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_attr_style_mut(&mut self, i: &mut AttrStyle) {
+ visit_attr_style_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_attribute_mut(&mut self, i: &mut Attribute) {
+ visit_attribute_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_bare_fn_arg_mut(&mut self, i: &mut BareFnArg) {
+ visit_bare_fn_arg_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_bin_op_mut(&mut self, i: &mut BinOp) {
+ visit_bin_op_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_binding_mut(&mut self, i: &mut Binding) {
+ visit_binding_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_block_mut(&mut self, i: &mut Block) {
+ visit_block_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_bound_lifetimes_mut(&mut self, i: &mut BoundLifetimes) {
+ visit_bound_lifetimes_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_const_param_mut(&mut self, i: &mut ConstParam) {
+ visit_const_param_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_constraint_mut(&mut self, i: &mut Constraint) {
+ visit_constraint_mut(self, i);
+ }
+ #[cfg(feature = "derive")]
+ fn visit_data_mut(&mut self, i: &mut Data) {
+ visit_data_mut(self, i);
+ }
+ #[cfg(feature = "derive")]
+ fn visit_data_enum_mut(&mut self, i: &mut DataEnum) {
+ visit_data_enum_mut(self, i);
+ }
+ #[cfg(feature = "derive")]
+ fn visit_data_struct_mut(&mut self, i: &mut DataStruct) {
+ visit_data_struct_mut(self, i);
+ }
+ #[cfg(feature = "derive")]
+ fn visit_data_union_mut(&mut self, i: &mut DataUnion) {
+ visit_data_union_mut(self, i);
+ }
+ #[cfg(feature = "derive")]
+ fn visit_derive_input_mut(&mut self, i: &mut DeriveInput) {
+ visit_derive_input_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr_mut(&mut self, i: &mut Expr) {
+ visit_expr_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_array_mut(&mut self, i: &mut ExprArray) {
+ visit_expr_array_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_assign_mut(&mut self, i: &mut ExprAssign) {
+ visit_expr_assign_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_assign_op_mut(&mut self, i: &mut ExprAssignOp) {
+ visit_expr_assign_op_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_async_mut(&mut self, i: &mut ExprAsync) {
+ visit_expr_async_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_await_mut(&mut self, i: &mut ExprAwait) {
+ visit_expr_await_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr_binary_mut(&mut self, i: &mut ExprBinary) {
+ visit_expr_binary_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_block_mut(&mut self, i: &mut ExprBlock) {
+ visit_expr_block_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_box_mut(&mut self, i: &mut ExprBox) {
+ visit_expr_box_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_break_mut(&mut self, i: &mut ExprBreak) {
+ visit_expr_break_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr_call_mut(&mut self, i: &mut ExprCall) {
+ visit_expr_call_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr_cast_mut(&mut self, i: &mut ExprCast) {
+ visit_expr_cast_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_closure_mut(&mut self, i: &mut ExprClosure) {
+ visit_expr_closure_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_continue_mut(&mut self, i: &mut ExprContinue) {
+ visit_expr_continue_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr_field_mut(&mut self, i: &mut ExprField) {
+ visit_expr_field_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_for_loop_mut(&mut self, i: &mut ExprForLoop) {
+ visit_expr_for_loop_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_group_mut(&mut self, i: &mut ExprGroup) {
+ visit_expr_group_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_if_mut(&mut self, i: &mut ExprIf) {
+ visit_expr_if_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr_index_mut(&mut self, i: &mut ExprIndex) {
+ visit_expr_index_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_let_mut(&mut self, i: &mut ExprLet) {
+ visit_expr_let_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr_lit_mut(&mut self, i: &mut ExprLit) {
+ visit_expr_lit_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_loop_mut(&mut self, i: &mut ExprLoop) {
+ visit_expr_loop_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_macro_mut(&mut self, i: &mut ExprMacro) {
+ visit_expr_macro_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_match_mut(&mut self, i: &mut ExprMatch) {
+ visit_expr_match_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_method_call_mut(&mut self, i: &mut ExprMethodCall) {
+ visit_expr_method_call_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr_paren_mut(&mut self, i: &mut ExprParen) {
+ visit_expr_paren_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr_path_mut(&mut self, i: &mut ExprPath) {
+ visit_expr_path_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_range_mut(&mut self, i: &mut ExprRange) {
+ visit_expr_range_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_reference_mut(&mut self, i: &mut ExprReference) {
+ visit_expr_reference_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_repeat_mut(&mut self, i: &mut ExprRepeat) {
+ visit_expr_repeat_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_return_mut(&mut self, i: &mut ExprReturn) {
+ visit_expr_return_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_struct_mut(&mut self, i: &mut ExprStruct) {
+ visit_expr_struct_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_try_mut(&mut self, i: &mut ExprTry) {
+ visit_expr_try_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_try_block_mut(&mut self, i: &mut ExprTryBlock) {
+ visit_expr_try_block_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_tuple_mut(&mut self, i: &mut ExprTuple) {
+ visit_expr_tuple_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_type_mut(&mut self, i: &mut ExprType) {
+ visit_expr_type_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_expr_unary_mut(&mut self, i: &mut ExprUnary) {
+ visit_expr_unary_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_unsafe_mut(&mut self, i: &mut ExprUnsafe) {
+ visit_expr_unsafe_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_while_mut(&mut self, i: &mut ExprWhile) {
+ visit_expr_while_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_expr_yield_mut(&mut self, i: &mut ExprYield) {
+ visit_expr_yield_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_field_mut(&mut self, i: &mut Field) {
+ visit_field_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_field_pat_mut(&mut self, i: &mut FieldPat) {
+ visit_field_pat_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_field_value_mut(&mut self, i: &mut FieldValue) {
+ visit_field_value_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_fields_mut(&mut self, i: &mut Fields) {
+ visit_fields_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_fields_named_mut(&mut self, i: &mut FieldsNamed) {
+ visit_fields_named_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_fields_unnamed_mut(&mut self, i: &mut FieldsUnnamed) {
+ visit_fields_unnamed_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_file_mut(&mut self, i: &mut File) {
+ visit_file_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_fn_arg_mut(&mut self, i: &mut FnArg) {
+ visit_fn_arg_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_foreign_item_mut(&mut self, i: &mut ForeignItem) {
+ visit_foreign_item_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_foreign_item_fn_mut(&mut self, i: &mut ForeignItemFn) {
+ visit_foreign_item_fn_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_foreign_item_macro_mut(&mut self, i: &mut ForeignItemMacro) {
+ visit_foreign_item_macro_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_foreign_item_static_mut(&mut self, i: &mut ForeignItemStatic) {
+ visit_foreign_item_static_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_foreign_item_type_mut(&mut self, i: &mut ForeignItemType) {
+ visit_foreign_item_type_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_generic_argument_mut(&mut self, i: &mut GenericArgument) {
+ visit_generic_argument_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_generic_method_argument_mut(&mut self, i: &mut GenericMethodArgument) {
+ visit_generic_method_argument_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_generic_param_mut(&mut self, i: &mut GenericParam) {
+ visit_generic_param_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_generics_mut(&mut self, i: &mut Generics) {
+ visit_generics_mut(self, i);
+ }
+ fn visit_ident_mut(&mut self, i: &mut Ident) {
+ visit_ident_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_impl_item_mut(&mut self, i: &mut ImplItem) {
+ visit_impl_item_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_impl_item_const_mut(&mut self, i: &mut ImplItemConst) {
+ visit_impl_item_const_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_impl_item_macro_mut(&mut self, i: &mut ImplItemMacro) {
+ visit_impl_item_macro_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_impl_item_method_mut(&mut self, i: &mut ImplItemMethod) {
+ visit_impl_item_method_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_impl_item_type_mut(&mut self, i: &mut ImplItemType) {
+ visit_impl_item_type_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_index_mut(&mut self, i: &mut Index) {
+ visit_index_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_mut(&mut self, i: &mut Item) {
+ visit_item_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_const_mut(&mut self, i: &mut ItemConst) {
+ visit_item_const_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_enum_mut(&mut self, i: &mut ItemEnum) {
+ visit_item_enum_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_extern_crate_mut(&mut self, i: &mut ItemExternCrate) {
+ visit_item_extern_crate_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_fn_mut(&mut self, i: &mut ItemFn) {
+ visit_item_fn_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_foreign_mod_mut(&mut self, i: &mut ItemForeignMod) {
+ visit_item_foreign_mod_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_impl_mut(&mut self, i: &mut ItemImpl) {
+ visit_item_impl_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_macro_mut(&mut self, i: &mut ItemMacro) {
+ visit_item_macro_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_macro2_mut(&mut self, i: &mut ItemMacro2) {
+ visit_item_macro2_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_mod_mut(&mut self, i: &mut ItemMod) {
+ visit_item_mod_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_static_mut(&mut self, i: &mut ItemStatic) {
+ visit_item_static_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_struct_mut(&mut self, i: &mut ItemStruct) {
+ visit_item_struct_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_trait_mut(&mut self, i: &mut ItemTrait) {
+ visit_item_trait_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_trait_alias_mut(&mut self, i: &mut ItemTraitAlias) {
+ visit_item_trait_alias_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_type_mut(&mut self, i: &mut ItemType) {
+ visit_item_type_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_union_mut(&mut self, i: &mut ItemUnion) {
+ visit_item_union_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_item_use_mut(&mut self, i: &mut ItemUse) {
+ visit_item_use_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_label_mut(&mut self, i: &mut Label) {
+ visit_label_mut(self, i);
+ }
+ fn visit_lifetime_mut(&mut self, i: &mut Lifetime) {
+ visit_lifetime_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_lifetime_def_mut(&mut self, i: &mut LifetimeDef) {
+ visit_lifetime_def_mut(self, i);
+ }
+ 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")]
+ fn visit_local_mut(&mut self, i: &mut Local) {
+ visit_local_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_macro_mut(&mut self, i: &mut Macro) {
+ visit_macro_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_macro_delimiter_mut(&mut self, i: &mut MacroDelimiter) {
+ visit_macro_delimiter_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_member_mut(&mut self, i: &mut Member) {
+ visit_member_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_meta_mut(&mut self, i: &mut Meta) {
+ visit_meta_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_meta_list_mut(&mut self, i: &mut MetaList) {
+ visit_meta_list_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_meta_name_value_mut(&mut self, i: &mut MetaNameValue) {
+ visit_meta_name_value_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_method_turbofish_mut(&mut self, i: &mut MethodTurbofish) {
+ visit_method_turbofish_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_nested_meta_mut(&mut self, i: &mut NestedMeta) {
+ visit_nested_meta_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_parenthesized_generic_arguments_mut(
+ &mut self,
+ i: &mut ParenthesizedGenericArguments,
+ ) {
+ visit_parenthesized_generic_arguments_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_mut(&mut self, i: &mut Pat) {
+ visit_pat_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_box_mut(&mut self, i: &mut PatBox) {
+ visit_pat_box_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_ident_mut(&mut self, i: &mut PatIdent) {
+ visit_pat_ident_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_lit_mut(&mut self, i: &mut PatLit) {
+ visit_pat_lit_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_macro_mut(&mut self, i: &mut PatMacro) {
+ visit_pat_macro_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_or_mut(&mut self, i: &mut PatOr) {
+ visit_pat_or_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_path_mut(&mut self, i: &mut PatPath) {
+ visit_pat_path_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_range_mut(&mut self, i: &mut PatRange) {
+ visit_pat_range_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_reference_mut(&mut self, i: &mut PatReference) {
+ visit_pat_reference_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_rest_mut(&mut self, i: &mut PatRest) {
+ visit_pat_rest_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_slice_mut(&mut self, i: &mut PatSlice) {
+ visit_pat_slice_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_struct_mut(&mut self, i: &mut PatStruct) {
+ visit_pat_struct_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_tuple_mut(&mut self, i: &mut PatTuple) {
+ visit_pat_tuple_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_tuple_struct_mut(&mut self, i: &mut PatTupleStruct) {
+ visit_pat_tuple_struct_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_type_mut(&mut self, i: &mut PatType) {
+ visit_pat_type_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_pat_wild_mut(&mut self, i: &mut PatWild) {
+ visit_pat_wild_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_path_mut(&mut self, i: &mut Path) {
+ visit_path_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_path_arguments_mut(&mut self, i: &mut PathArguments) {
+ visit_path_arguments_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_path_segment_mut(&mut self, i: &mut PathSegment) {
+ visit_path_segment_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_predicate_eq_mut(&mut self, i: &mut PredicateEq) {
+ visit_predicate_eq_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_predicate_lifetime_mut(&mut self, i: &mut PredicateLifetime) {
+ visit_predicate_lifetime_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_predicate_type_mut(&mut self, i: &mut PredicateType) {
+ visit_predicate_type_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_qself_mut(&mut self, i: &mut QSelf) {
+ visit_qself_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_range_limits_mut(&mut self, i: &mut RangeLimits) {
+ visit_range_limits_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_receiver_mut(&mut self, i: &mut Receiver) {
+ visit_receiver_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_return_type_mut(&mut self, i: &mut ReturnType) {
+ visit_return_type_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_signature_mut(&mut self, i: &mut Signature) {
+ visit_signature_mut(self, i);
+ }
+ fn visit_span_mut(&mut self, i: &mut Span) {
+ visit_span_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_stmt_mut(&mut self, i: &mut Stmt) {
+ visit_stmt_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_trait_bound_mut(&mut self, i: &mut TraitBound) {
+ visit_trait_bound_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_trait_bound_modifier_mut(&mut self, i: &mut TraitBoundModifier) {
+ visit_trait_bound_modifier_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_trait_item_mut(&mut self, i: &mut TraitItem) {
+ visit_trait_item_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_trait_item_const_mut(&mut self, i: &mut TraitItemConst) {
+ visit_trait_item_const_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_trait_item_macro_mut(&mut self, i: &mut TraitItemMacro) {
+ visit_trait_item_macro_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_trait_item_method_mut(&mut self, i: &mut TraitItemMethod) {
+ visit_trait_item_method_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_trait_item_type_mut(&mut self, i: &mut TraitItemType) {
+ visit_trait_item_type_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_mut(&mut self, i: &mut Type) {
+ visit_type_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_array_mut(&mut self, i: &mut TypeArray) {
+ visit_type_array_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_bare_fn_mut(&mut self, i: &mut TypeBareFn) {
+ visit_type_bare_fn_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_group_mut(&mut self, i: &mut TypeGroup) {
+ visit_type_group_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_impl_trait_mut(&mut self, i: &mut TypeImplTrait) {
+ visit_type_impl_trait_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_infer_mut(&mut self, i: &mut TypeInfer) {
+ visit_type_infer_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_macro_mut(&mut self, i: &mut TypeMacro) {
+ visit_type_macro_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_never_mut(&mut self, i: &mut TypeNever) {
+ visit_type_never_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_param_mut(&mut self, i: &mut TypeParam) {
+ visit_type_param_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_param_bound_mut(&mut self, i: &mut TypeParamBound) {
+ visit_type_param_bound_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_paren_mut(&mut self, i: &mut TypeParen) {
+ visit_type_paren_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_path_mut(&mut self, i: &mut TypePath) {
+ visit_type_path_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_ptr_mut(&mut self, i: &mut TypePtr) {
+ visit_type_ptr_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_reference_mut(&mut self, i: &mut TypeReference) {
+ visit_type_reference_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_slice_mut(&mut self, i: &mut TypeSlice) {
+ visit_type_slice_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_trait_object_mut(&mut self, i: &mut TypeTraitObject) {
+ visit_type_trait_object_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_type_tuple_mut(&mut self, i: &mut TypeTuple) {
+ visit_type_tuple_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_un_op_mut(&mut self, i: &mut UnOp) {
+ visit_un_op_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_use_glob_mut(&mut self, i: &mut UseGlob) {
+ visit_use_glob_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_use_group_mut(&mut self, i: &mut UseGroup) {
+ visit_use_group_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_use_name_mut(&mut self, i: &mut UseName) {
+ visit_use_name_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_use_path_mut(&mut self, i: &mut UsePath) {
+ visit_use_path_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_use_rename_mut(&mut self, i: &mut UseRename) {
+ visit_use_rename_mut(self, i);
+ }
+ #[cfg(feature = "full")]
+ fn visit_use_tree_mut(&mut self, i: &mut UseTree) {
+ visit_use_tree_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_variadic_mut(&mut self, i: &mut Variadic) {
+ visit_variadic_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_variant_mut(&mut self, i: &mut Variant) {
+ visit_variant_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_vis_crate_mut(&mut self, i: &mut VisCrate) {
+ visit_vis_crate_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_vis_public_mut(&mut self, i: &mut VisPublic) {
+ visit_vis_public_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_vis_restricted_mut(&mut self, i: &mut VisRestricted) {
+ visit_vis_restricted_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_visibility_mut(&mut self, i: &mut Visibility) {
+ visit_visibility_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_where_clause_mut(&mut self, i: &mut WhereClause) {
+ visit_where_clause_mut(self, i);
+ }
+ #[cfg(any(feature = "derive", feature = "full"))]
+ fn visit_where_predicate_mut(&mut self, i: &mut WherePredicate) {
+ visit_where_predicate_mut(self, i);
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_abi_mut<V>(v: &mut V, node: &mut Abi)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.extern_token.span);
+ if let Some(it) = &mut node.name {
+ v.visit_lit_str_mut(it);
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_angle_bracketed_generic_arguments_mut<V>(
+ v: &mut V,
+ node: &mut AngleBracketedGenericArguments,
+)
+where
+ V: VisitMut + ?Sized,
+{
+ if let Some(it) = &mut node.colon2_token {
+ tokens_helper(v, &mut it.spans);
+ }
+ tokens_helper(v, &mut node.lt_token.spans);
+ for el in Punctuated::pairs_mut(&mut node.args) {
+ let (it, p) = el.into_tuple();
+ v.visit_generic_argument_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+ tokens_helper(v, &mut node.gt_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_arm_mut<V>(v: &mut V, node: &mut Arm)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_pat_mut(&mut node.pat);
+ if let Some(it) = &mut node.guard {
+ tokens_helper(v, &mut (it).0.span);
+ v.visit_expr_mut(&mut *(it).1);
+ }
+ tokens_helper(v, &mut node.fat_arrow_token.spans);
+ v.visit_expr_mut(&mut *node.body);
+ if let Some(it) = &mut node.comma {
+ tokens_helper(v, &mut it.spans);
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_attr_style_mut<V>(v: &mut V, node: &mut AttrStyle)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ AttrStyle::Outer => {}
+ AttrStyle::Inner(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_attribute_mut<V>(v: &mut V, node: &mut Attribute)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.pound_token.spans);
+ v.visit_attr_style_mut(&mut node.style);
+ tokens_helper(v, &mut node.bracket_token.span);
+ v.visit_path_mut(&mut node.path);
+ skip!(node.tokens);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_bare_fn_arg_mut<V>(v: &mut V, node: &mut BareFnArg)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ if let Some(it) = &mut node.name {
+ v.visit_ident_mut(&mut (it).0);
+ tokens_helper(v, &mut (it).1.spans);
+ }
+ v.visit_type_mut(&mut node.ty);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_bin_op_mut<V>(v: &mut V, node: &mut BinOp)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ BinOp::Add(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::Sub(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::Mul(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::Div(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::Rem(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::And(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::Or(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::BitXor(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::BitAnd(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::BitOr(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::Shl(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::Shr(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::Eq(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::Lt(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::Le(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::Ne(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::Ge(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::Gt(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::AddEq(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::SubEq(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::MulEq(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::DivEq(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::RemEq(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::BitXorEq(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::BitAndEq(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::BitOrEq(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::ShlEq(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ BinOp::ShrEq(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_binding_mut<V>(v: &mut V, node: &mut Binding)
+where
+ V: VisitMut + ?Sized,
+{
+ v.visit_ident_mut(&mut node.ident);
+ tokens_helper(v, &mut node.eq_token.spans);
+ v.visit_type_mut(&mut node.ty);
+}
+#[cfg(feature = "full")]
+pub fn visit_block_mut<V>(v: &mut V, node: &mut Block)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.brace_token.span);
+ for it in &mut node.stmts {
+ v.visit_stmt_mut(it);
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_bound_lifetimes_mut<V>(v: &mut V, node: &mut BoundLifetimes)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.for_token.span);
+ tokens_helper(v, &mut node.lt_token.spans);
+ for el in Punctuated::pairs_mut(&mut node.lifetimes) {
+ let (it, p) = el.into_tuple();
+ v.visit_lifetime_def_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+ tokens_helper(v, &mut node.gt_token.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_const_param_mut<V>(v: &mut V, node: &mut ConstParam)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ tokens_helper(v, &mut node.const_token.span);
+ v.visit_ident_mut(&mut node.ident);
+ tokens_helper(v, &mut node.colon_token.spans);
+ v.visit_type_mut(&mut node.ty);
+ if let Some(it) = &mut node.eq_token {
+ tokens_helper(v, &mut it.spans);
+ }
+ if let Some(it) = &mut node.default {
+ v.visit_expr_mut(it);
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_constraint_mut<V>(v: &mut V, node: &mut Constraint)
+where
+ V: VisitMut + ?Sized,
+{
+ v.visit_ident_mut(&mut node.ident);
+ tokens_helper(v, &mut node.colon_token.spans);
+ for el in Punctuated::pairs_mut(&mut node.bounds) {
+ let (it, p) = el.into_tuple();
+ v.visit_type_param_bound_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(feature = "derive")]
+pub fn visit_data_mut<V>(v: &mut V, node: &mut Data)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ Data::Struct(_binding_0) => {
+ v.visit_data_struct_mut(_binding_0);
+ }
+ Data::Enum(_binding_0) => {
+ v.visit_data_enum_mut(_binding_0);
+ }
+ Data::Union(_binding_0) => {
+ v.visit_data_union_mut(_binding_0);
+ }
+ }
+}
+#[cfg(feature = "derive")]
+pub fn visit_data_enum_mut<V>(v: &mut V, node: &mut DataEnum)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.enum_token.span);
+ tokens_helper(v, &mut node.brace_token.span);
+ for el in Punctuated::pairs_mut(&mut node.variants) {
+ let (it, p) = el.into_tuple();
+ v.visit_variant_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(feature = "derive")]
+pub fn visit_data_struct_mut<V>(v: &mut V, node: &mut DataStruct)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.struct_token.span);
+ v.visit_fields_mut(&mut node.fields);
+ if let Some(it) = &mut node.semi_token {
+ tokens_helper(v, &mut it.spans);
+ }
+}
+#[cfg(feature = "derive")]
+pub fn visit_data_union_mut<V>(v: &mut V, node: &mut DataUnion)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.union_token.span);
+ v.visit_fields_named_mut(&mut node.fields);
+}
+#[cfg(feature = "derive")]
+pub fn visit_derive_input_mut<V>(v: &mut V, node: &mut DeriveInput)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ v.visit_ident_mut(&mut node.ident);
+ v.visit_generics_mut(&mut node.generics);
+ v.visit_data_mut(&mut node.data);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr_mut<V>(v: &mut V, node: &mut Expr)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ Expr::Array(_binding_0) => {
+ full!(v.visit_expr_array_mut(_binding_0));
+ }
+ Expr::Assign(_binding_0) => {
+ full!(v.visit_expr_assign_mut(_binding_0));
+ }
+ Expr::AssignOp(_binding_0) => {
+ full!(v.visit_expr_assign_op_mut(_binding_0));
+ }
+ Expr::Async(_binding_0) => {
+ full!(v.visit_expr_async_mut(_binding_0));
+ }
+ Expr::Await(_binding_0) => {
+ full!(v.visit_expr_await_mut(_binding_0));
+ }
+ Expr::Binary(_binding_0) => {
+ v.visit_expr_binary_mut(_binding_0);
+ }
+ Expr::Block(_binding_0) => {
+ full!(v.visit_expr_block_mut(_binding_0));
+ }
+ Expr::Box(_binding_0) => {
+ full!(v.visit_expr_box_mut(_binding_0));
+ }
+ Expr::Break(_binding_0) => {
+ full!(v.visit_expr_break_mut(_binding_0));
+ }
+ Expr::Call(_binding_0) => {
+ v.visit_expr_call_mut(_binding_0);
+ }
+ Expr::Cast(_binding_0) => {
+ v.visit_expr_cast_mut(_binding_0);
+ }
+ Expr::Closure(_binding_0) => {
+ full!(v.visit_expr_closure_mut(_binding_0));
+ }
+ Expr::Continue(_binding_0) => {
+ full!(v.visit_expr_continue_mut(_binding_0));
+ }
+ Expr::Field(_binding_0) => {
+ v.visit_expr_field_mut(_binding_0);
+ }
+ Expr::ForLoop(_binding_0) => {
+ full!(v.visit_expr_for_loop_mut(_binding_0));
+ }
+ Expr::Group(_binding_0) => {
+ full!(v.visit_expr_group_mut(_binding_0));
+ }
+ Expr::If(_binding_0) => {
+ full!(v.visit_expr_if_mut(_binding_0));
+ }
+ Expr::Index(_binding_0) => {
+ v.visit_expr_index_mut(_binding_0);
+ }
+ Expr::Let(_binding_0) => {
+ full!(v.visit_expr_let_mut(_binding_0));
+ }
+ Expr::Lit(_binding_0) => {
+ v.visit_expr_lit_mut(_binding_0);
+ }
+ Expr::Loop(_binding_0) => {
+ full!(v.visit_expr_loop_mut(_binding_0));
+ }
+ Expr::Macro(_binding_0) => {
+ full!(v.visit_expr_macro_mut(_binding_0));
+ }
+ Expr::Match(_binding_0) => {
+ full!(v.visit_expr_match_mut(_binding_0));
+ }
+ Expr::MethodCall(_binding_0) => {
+ full!(v.visit_expr_method_call_mut(_binding_0));
+ }
+ Expr::Paren(_binding_0) => {
+ v.visit_expr_paren_mut(_binding_0);
+ }
+ Expr::Path(_binding_0) => {
+ v.visit_expr_path_mut(_binding_0);
+ }
+ Expr::Range(_binding_0) => {
+ full!(v.visit_expr_range_mut(_binding_0));
+ }
+ Expr::Reference(_binding_0) => {
+ full!(v.visit_expr_reference_mut(_binding_0));
+ }
+ Expr::Repeat(_binding_0) => {
+ full!(v.visit_expr_repeat_mut(_binding_0));
+ }
+ Expr::Return(_binding_0) => {
+ full!(v.visit_expr_return_mut(_binding_0));
+ }
+ Expr::Struct(_binding_0) => {
+ full!(v.visit_expr_struct_mut(_binding_0));
+ }
+ Expr::Try(_binding_0) => {
+ full!(v.visit_expr_try_mut(_binding_0));
+ }
+ Expr::TryBlock(_binding_0) => {
+ full!(v.visit_expr_try_block_mut(_binding_0));
+ }
+ Expr::Tuple(_binding_0) => {
+ full!(v.visit_expr_tuple_mut(_binding_0));
+ }
+ Expr::Type(_binding_0) => {
+ full!(v.visit_expr_type_mut(_binding_0));
+ }
+ Expr::Unary(_binding_0) => {
+ v.visit_expr_unary_mut(_binding_0);
+ }
+ Expr::Unsafe(_binding_0) => {
+ full!(v.visit_expr_unsafe_mut(_binding_0));
+ }
+ Expr::Verbatim(_binding_0) => {
+ skip!(_binding_0);
+ }
+ Expr::While(_binding_0) => {
+ full!(v.visit_expr_while_mut(_binding_0));
+ }
+ Expr::Yield(_binding_0) => {
+ full!(v.visit_expr_yield_mut(_binding_0));
+ }
+ #[cfg(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_array_mut<V>(v: &mut V, node: &mut ExprArray)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ tokens_helper(v, &mut node.bracket_token.span);
+ for el in Punctuated::pairs_mut(&mut node.elems) {
+ let (it, p) = el.into_tuple();
+ v.visit_expr_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_assign_mut<V>(v: &mut V, node: &mut ExprAssign)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_expr_mut(&mut *node.left);
+ tokens_helper(v, &mut node.eq_token.spans);
+ v.visit_expr_mut(&mut *node.right);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_assign_op_mut<V>(v: &mut V, node: &mut ExprAssignOp)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_expr_mut(&mut *node.left);
+ v.visit_bin_op_mut(&mut node.op);
+ v.visit_expr_mut(&mut *node.right);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_async_mut<V>(v: &mut V, node: &mut ExprAsync)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ tokens_helper(v, &mut node.async_token.span);
+ if let Some(it) = &mut node.capture {
+ tokens_helper(v, &mut it.span);
+ }
+ v.visit_block_mut(&mut node.block);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_await_mut<V>(v: &mut V, node: &mut ExprAwait)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_expr_mut(&mut *node.base);
+ tokens_helper(v, &mut node.dot_token.spans);
+ tokens_helper(v, &mut node.await_token.span);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr_binary_mut<V>(v: &mut V, node: &mut ExprBinary)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_expr_mut(&mut *node.left);
+ v.visit_bin_op_mut(&mut node.op);
+ v.visit_expr_mut(&mut *node.right);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_block_mut<V>(v: &mut V, node: &mut ExprBlock)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ if let Some(it) = &mut node.label {
+ v.visit_label_mut(it);
+ }
+ v.visit_block_mut(&mut node.block);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_box_mut<V>(v: &mut V, node: &mut ExprBox)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ tokens_helper(v, &mut node.box_token.span);
+ v.visit_expr_mut(&mut *node.expr);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_break_mut<V>(v: &mut V, node: &mut ExprBreak)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ tokens_helper(v, &mut node.break_token.span);
+ if let Some(it) = &mut node.label {
+ v.visit_lifetime_mut(it);
+ }
+ if let Some(it) = &mut node.expr {
+ v.visit_expr_mut(&mut **it);
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr_call_mut<V>(v: &mut V, node: &mut ExprCall)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_expr_mut(&mut *node.func);
+ tokens_helper(v, &mut node.paren_token.span);
+ for el in Punctuated::pairs_mut(&mut node.args) {
+ let (it, p) = el.into_tuple();
+ v.visit_expr_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr_cast_mut<V>(v: &mut V, node: &mut ExprCast)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_expr_mut(&mut *node.expr);
+ tokens_helper(v, &mut node.as_token.span);
+ v.visit_type_mut(&mut *node.ty);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_closure_mut<V>(v: &mut V, node: &mut ExprClosure)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ if let Some(it) = &mut node.movability {
+ tokens_helper(v, &mut it.span);
+ }
+ if let Some(it) = &mut node.asyncness {
+ tokens_helper(v, &mut it.span);
+ }
+ if let Some(it) = &mut node.capture {
+ tokens_helper(v, &mut it.span);
+ }
+ tokens_helper(v, &mut node.or1_token.spans);
+ for el in Punctuated::pairs_mut(&mut node.inputs) {
+ let (it, p) = el.into_tuple();
+ v.visit_pat_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+ tokens_helper(v, &mut node.or2_token.spans);
+ v.visit_return_type_mut(&mut node.output);
+ v.visit_expr_mut(&mut *node.body);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_continue_mut<V>(v: &mut V, node: &mut ExprContinue)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ tokens_helper(v, &mut node.continue_token.span);
+ if let Some(it) = &mut node.label {
+ v.visit_lifetime_mut(it);
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr_field_mut<V>(v: &mut V, node: &mut ExprField)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_expr_mut(&mut *node.base);
+ tokens_helper(v, &mut node.dot_token.spans);
+ v.visit_member_mut(&mut node.member);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_for_loop_mut<V>(v: &mut V, node: &mut ExprForLoop)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ if let Some(it) = &mut node.label {
+ v.visit_label_mut(it);
+ }
+ tokens_helper(v, &mut node.for_token.span);
+ v.visit_pat_mut(&mut node.pat);
+ tokens_helper(v, &mut node.in_token.span);
+ v.visit_expr_mut(&mut *node.expr);
+ v.visit_block_mut(&mut node.body);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_group_mut<V>(v: &mut V, node: &mut ExprGroup)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ tokens_helper(v, &mut node.group_token.span);
+ v.visit_expr_mut(&mut *node.expr);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_if_mut<V>(v: &mut V, node: &mut ExprIf)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ tokens_helper(v, &mut node.if_token.span);
+ v.visit_expr_mut(&mut *node.cond);
+ v.visit_block_mut(&mut node.then_branch);
+ if let Some(it) = &mut node.else_branch {
+ tokens_helper(v, &mut (it).0.span);
+ v.visit_expr_mut(&mut *(it).1);
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr_index_mut<V>(v: &mut V, node: &mut ExprIndex)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_expr_mut(&mut *node.expr);
+ tokens_helper(v, &mut node.bracket_token.span);
+ v.visit_expr_mut(&mut *node.index);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_let_mut<V>(v: &mut V, node: &mut ExprLet)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ tokens_helper(v, &mut node.let_token.span);
+ v.visit_pat_mut(&mut node.pat);
+ tokens_helper(v, &mut node.eq_token.spans);
+ v.visit_expr_mut(&mut *node.expr);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr_lit_mut<V>(v: &mut V, node: &mut ExprLit)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_lit_mut(&mut node.lit);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_loop_mut<V>(v: &mut V, node: &mut ExprLoop)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ if let Some(it) = &mut node.label {
+ v.visit_label_mut(it);
+ }
+ tokens_helper(v, &mut node.loop_token.span);
+ v.visit_block_mut(&mut node.body);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_macro_mut<V>(v: &mut V, node: &mut ExprMacro)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_macro_mut(&mut node.mac);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_match_mut<V>(v: &mut V, node: &mut ExprMatch)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ tokens_helper(v, &mut node.match_token.span);
+ v.visit_expr_mut(&mut *node.expr);
+ tokens_helper(v, &mut node.brace_token.span);
+ for it in &mut node.arms {
+ v.visit_arm_mut(it);
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_method_call_mut<V>(v: &mut V, node: &mut ExprMethodCall)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_expr_mut(&mut *node.receiver);
+ tokens_helper(v, &mut node.dot_token.spans);
+ v.visit_ident_mut(&mut node.method);
+ if let Some(it) = &mut node.turbofish {
+ v.visit_method_turbofish_mut(it);
+ }
+ tokens_helper(v, &mut node.paren_token.span);
+ for el in Punctuated::pairs_mut(&mut node.args) {
+ let (it, p) = el.into_tuple();
+ v.visit_expr_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr_paren_mut<V>(v: &mut V, node: &mut ExprParen)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ tokens_helper(v, &mut node.paren_token.span);
+ v.visit_expr_mut(&mut *node.expr);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr_path_mut<V>(v: &mut V, node: &mut ExprPath)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ if let Some(it) = &mut node.qself {
+ v.visit_qself_mut(it);
+ }
+ v.visit_path_mut(&mut node.path);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_range_mut<V>(v: &mut V, node: &mut ExprRange)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ if let Some(it) = &mut node.from {
+ v.visit_expr_mut(&mut **it);
+ }
+ v.visit_range_limits_mut(&mut node.limits);
+ if let Some(it) = &mut node.to {
+ v.visit_expr_mut(&mut **it);
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_reference_mut<V>(v: &mut V, node: &mut ExprReference)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ tokens_helper(v, &mut node.and_token.spans);
+ if let Some(it) = &mut node.mutability {
+ tokens_helper(v, &mut it.span);
+ }
+ v.visit_expr_mut(&mut *node.expr);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_repeat_mut<V>(v: &mut V, node: &mut ExprRepeat)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ tokens_helper(v, &mut node.bracket_token.span);
+ v.visit_expr_mut(&mut *node.expr);
+ tokens_helper(v, &mut node.semi_token.spans);
+ v.visit_expr_mut(&mut *node.len);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_return_mut<V>(v: &mut V, node: &mut ExprReturn)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ tokens_helper(v, &mut node.return_token.span);
+ if let Some(it) = &mut node.expr {
+ v.visit_expr_mut(&mut **it);
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_struct_mut<V>(v: &mut V, node: &mut ExprStruct)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_path_mut(&mut node.path);
+ tokens_helper(v, &mut node.brace_token.span);
+ for el in Punctuated::pairs_mut(&mut node.fields) {
+ let (it, p) = el.into_tuple();
+ v.visit_field_value_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+ if let Some(it) = &mut node.dot2_token {
+ tokens_helper(v, &mut it.spans);
+ }
+ if let Some(it) = &mut node.rest {
+ v.visit_expr_mut(&mut **it);
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_try_mut<V>(v: &mut V, node: &mut ExprTry)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_expr_mut(&mut *node.expr);
+ tokens_helper(v, &mut node.question_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_try_block_mut<V>(v: &mut V, node: &mut ExprTryBlock)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ tokens_helper(v, &mut node.try_token.span);
+ v.visit_block_mut(&mut node.block);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_tuple_mut<V>(v: &mut V, node: &mut ExprTuple)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ tokens_helper(v, &mut node.paren_token.span);
+ for el in Punctuated::pairs_mut(&mut node.elems) {
+ let (it, p) = el.into_tuple();
+ v.visit_expr_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_type_mut<V>(v: &mut V, node: &mut ExprType)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_expr_mut(&mut *node.expr);
+ tokens_helper(v, &mut node.colon_token.spans);
+ v.visit_type_mut(&mut *node.ty);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_expr_unary_mut<V>(v: &mut V, node: &mut ExprUnary)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_un_op_mut(&mut node.op);
+ v.visit_expr_mut(&mut *node.expr);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_unsafe_mut<V>(v: &mut V, node: &mut ExprUnsafe)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ tokens_helper(v, &mut node.unsafe_token.span);
+ v.visit_block_mut(&mut node.block);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_while_mut<V>(v: &mut V, node: &mut ExprWhile)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ if let Some(it) = &mut node.label {
+ v.visit_label_mut(it);
+ }
+ tokens_helper(v, &mut node.while_token.span);
+ v.visit_expr_mut(&mut *node.cond);
+ v.visit_block_mut(&mut node.body);
+}
+#[cfg(feature = "full")]
+pub fn visit_expr_yield_mut<V>(v: &mut V, node: &mut ExprYield)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ tokens_helper(v, &mut node.yield_token.span);
+ if let Some(it) = &mut node.expr {
+ v.visit_expr_mut(&mut **it);
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_field_mut<V>(v: &mut V, node: &mut Field)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ if let Some(it) = &mut node.ident {
+ v.visit_ident_mut(it);
+ }
+ if let Some(it) = &mut node.colon_token {
+ tokens_helper(v, &mut it.spans);
+ }
+ v.visit_type_mut(&mut node.ty);
+}
+#[cfg(feature = "full")]
+pub fn visit_field_pat_mut<V>(v: &mut V, node: &mut FieldPat)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_member_mut(&mut node.member);
+ if let Some(it) = &mut node.colon_token {
+ tokens_helper(v, &mut it.spans);
+ }
+ v.visit_pat_mut(&mut *node.pat);
+}
+#[cfg(feature = "full")]
+pub fn visit_field_value_mut<V>(v: &mut V, node: &mut FieldValue)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_member_mut(&mut node.member);
+ if let Some(it) = &mut node.colon_token {
+ tokens_helper(v, &mut it.spans);
+ }
+ v.visit_expr_mut(&mut node.expr);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_fields_mut<V>(v: &mut V, node: &mut Fields)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ Fields::Named(_binding_0) => {
+ v.visit_fields_named_mut(_binding_0);
+ }
+ Fields::Unnamed(_binding_0) => {
+ v.visit_fields_unnamed_mut(_binding_0);
+ }
+ Fields::Unit => {}
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_fields_named_mut<V>(v: &mut V, node: &mut FieldsNamed)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.brace_token.span);
+ for el in Punctuated::pairs_mut(&mut node.named) {
+ let (it, p) = el.into_tuple();
+ v.visit_field_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_fields_unnamed_mut<V>(v: &mut V, node: &mut FieldsUnnamed)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.paren_token.span);
+ for el in Punctuated::pairs_mut(&mut node.unnamed) {
+ let (it, p) = el.into_tuple();
+ v.visit_field_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_file_mut<V>(v: &mut V, node: &mut File)
+where
+ V: VisitMut + ?Sized,
+{
+ skip!(node.shebang);
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ for it in &mut node.items {
+ v.visit_item_mut(it);
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_fn_arg_mut<V>(v: &mut V, node: &mut FnArg)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ FnArg::Receiver(_binding_0) => {
+ v.visit_receiver_mut(_binding_0);
+ }
+ FnArg::Typed(_binding_0) => {
+ v.visit_pat_type_mut(_binding_0);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_foreign_item_mut<V>(v: &mut V, node: &mut ForeignItem)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ ForeignItem::Fn(_binding_0) => {
+ v.visit_foreign_item_fn_mut(_binding_0);
+ }
+ ForeignItem::Static(_binding_0) => {
+ v.visit_foreign_item_static_mut(_binding_0);
+ }
+ ForeignItem::Type(_binding_0) => {
+ v.visit_foreign_item_type_mut(_binding_0);
+ }
+ ForeignItem::Macro(_binding_0) => {
+ v.visit_foreign_item_macro_mut(_binding_0);
+ }
+ ForeignItem::Verbatim(_binding_0) => {
+ skip!(_binding_0);
+ }
+ #[cfg(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_foreign_item_fn_mut<V>(v: &mut V, node: &mut ForeignItemFn)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ v.visit_signature_mut(&mut node.sig);
+ tokens_helper(v, &mut node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_foreign_item_macro_mut<V>(v: &mut V, node: &mut ForeignItemMacro)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_macro_mut(&mut node.mac);
+ if let Some(it) = &mut node.semi_token {
+ tokens_helper(v, &mut it.spans);
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_foreign_item_static_mut<V>(v: &mut V, node: &mut ForeignItemStatic)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ tokens_helper(v, &mut node.static_token.span);
+ if let Some(it) = &mut node.mutability {
+ tokens_helper(v, &mut it.span);
+ }
+ v.visit_ident_mut(&mut node.ident);
+ tokens_helper(v, &mut node.colon_token.spans);
+ v.visit_type_mut(&mut *node.ty);
+ tokens_helper(v, &mut node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_foreign_item_type_mut<V>(v: &mut V, node: &mut ForeignItemType)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ tokens_helper(v, &mut node.type_token.span);
+ v.visit_ident_mut(&mut node.ident);
+ tokens_helper(v, &mut node.semi_token.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_generic_argument_mut<V>(v: &mut V, node: &mut GenericArgument)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ GenericArgument::Lifetime(_binding_0) => {
+ v.visit_lifetime_mut(_binding_0);
+ }
+ GenericArgument::Type(_binding_0) => {
+ v.visit_type_mut(_binding_0);
+ }
+ GenericArgument::Const(_binding_0) => {
+ v.visit_expr_mut(_binding_0);
+ }
+ GenericArgument::Binding(_binding_0) => {
+ v.visit_binding_mut(_binding_0);
+ }
+ GenericArgument::Constraint(_binding_0) => {
+ v.visit_constraint_mut(_binding_0);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_generic_method_argument_mut<V>(v: &mut V, node: &mut GenericMethodArgument)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ GenericMethodArgument::Type(_binding_0) => {
+ v.visit_type_mut(_binding_0);
+ }
+ GenericMethodArgument::Const(_binding_0) => {
+ v.visit_expr_mut(_binding_0);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_generic_param_mut<V>(v: &mut V, node: &mut GenericParam)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ GenericParam::Type(_binding_0) => {
+ v.visit_type_param_mut(_binding_0);
+ }
+ GenericParam::Lifetime(_binding_0) => {
+ v.visit_lifetime_def_mut(_binding_0);
+ }
+ GenericParam::Const(_binding_0) => {
+ v.visit_const_param_mut(_binding_0);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_generics_mut<V>(v: &mut V, node: &mut Generics)
+where
+ V: VisitMut + ?Sized,
+{
+ if let Some(it) = &mut node.lt_token {
+ tokens_helper(v, &mut it.spans);
+ }
+ for el in Punctuated::pairs_mut(&mut node.params) {
+ let (it, p) = el.into_tuple();
+ v.visit_generic_param_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+ if let Some(it) = &mut node.gt_token {
+ tokens_helper(v, &mut it.spans);
+ }
+ if let Some(it) = &mut node.where_clause {
+ v.visit_where_clause_mut(it);
+ }
+}
+pub fn visit_ident_mut<V>(v: &mut V, node: &mut Ident)
+where
+ V: VisitMut + ?Sized,
+{
+ let mut span = node.span();
+ v.visit_span_mut(&mut span);
+ node.set_span(span);
+}
+#[cfg(feature = "full")]
+pub fn visit_impl_item_mut<V>(v: &mut V, node: &mut ImplItem)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ ImplItem::Const(_binding_0) => {
+ v.visit_impl_item_const_mut(_binding_0);
+ }
+ ImplItem::Method(_binding_0) => {
+ v.visit_impl_item_method_mut(_binding_0);
+ }
+ ImplItem::Type(_binding_0) => {
+ v.visit_impl_item_type_mut(_binding_0);
+ }
+ ImplItem::Macro(_binding_0) => {
+ v.visit_impl_item_macro_mut(_binding_0);
+ }
+ ImplItem::Verbatim(_binding_0) => {
+ skip!(_binding_0);
+ }
+ #[cfg(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_impl_item_const_mut<V>(v: &mut V, node: &mut ImplItemConst)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ if let Some(it) = &mut node.defaultness {
+ tokens_helper(v, &mut it.span);
+ }
+ tokens_helper(v, &mut node.const_token.span);
+ v.visit_ident_mut(&mut node.ident);
+ tokens_helper(v, &mut node.colon_token.spans);
+ v.visit_type_mut(&mut node.ty);
+ tokens_helper(v, &mut node.eq_token.spans);
+ v.visit_expr_mut(&mut node.expr);
+ tokens_helper(v, &mut node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_impl_item_macro_mut<V>(v: &mut V, node: &mut ImplItemMacro)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_macro_mut(&mut node.mac);
+ if let Some(it) = &mut node.semi_token {
+ tokens_helper(v, &mut it.spans);
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_impl_item_method_mut<V>(v: &mut V, node: &mut ImplItemMethod)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ if let Some(it) = &mut node.defaultness {
+ tokens_helper(v, &mut it.span);
+ }
+ v.visit_signature_mut(&mut node.sig);
+ v.visit_block_mut(&mut node.block);
+}
+#[cfg(feature = "full")]
+pub fn visit_impl_item_type_mut<V>(v: &mut V, node: &mut ImplItemType)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ if let Some(it) = &mut node.defaultness {
+ tokens_helper(v, &mut it.span);
+ }
+ tokens_helper(v, &mut node.type_token.span);
+ v.visit_ident_mut(&mut node.ident);
+ v.visit_generics_mut(&mut node.generics);
+ tokens_helper(v, &mut node.eq_token.spans);
+ v.visit_type_mut(&mut node.ty);
+ tokens_helper(v, &mut node.semi_token.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_index_mut<V>(v: &mut V, node: &mut Index)
+where
+ V: VisitMut + ?Sized,
+{
+ skip!(node.index);
+ v.visit_span_mut(&mut node.span);
+}
+#[cfg(feature = "full")]
+pub fn visit_item_mut<V>(v: &mut V, node: &mut Item)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ Item::Const(_binding_0) => {
+ v.visit_item_const_mut(_binding_0);
+ }
+ Item::Enum(_binding_0) => {
+ v.visit_item_enum_mut(_binding_0);
+ }
+ Item::ExternCrate(_binding_0) => {
+ v.visit_item_extern_crate_mut(_binding_0);
+ }
+ Item::Fn(_binding_0) => {
+ v.visit_item_fn_mut(_binding_0);
+ }
+ Item::ForeignMod(_binding_0) => {
+ v.visit_item_foreign_mod_mut(_binding_0);
+ }
+ Item::Impl(_binding_0) => {
+ v.visit_item_impl_mut(_binding_0);
+ }
+ Item::Macro(_binding_0) => {
+ v.visit_item_macro_mut(_binding_0);
+ }
+ Item::Macro2(_binding_0) => {
+ v.visit_item_macro2_mut(_binding_0);
+ }
+ Item::Mod(_binding_0) => {
+ v.visit_item_mod_mut(_binding_0);
+ }
+ Item::Static(_binding_0) => {
+ v.visit_item_static_mut(_binding_0);
+ }
+ Item::Struct(_binding_0) => {
+ v.visit_item_struct_mut(_binding_0);
+ }
+ Item::Trait(_binding_0) => {
+ v.visit_item_trait_mut(_binding_0);
+ }
+ Item::TraitAlias(_binding_0) => {
+ v.visit_item_trait_alias_mut(_binding_0);
+ }
+ Item::Type(_binding_0) => {
+ v.visit_item_type_mut(_binding_0);
+ }
+ Item::Union(_binding_0) => {
+ v.visit_item_union_mut(_binding_0);
+ }
+ Item::Use(_binding_0) => {
+ v.visit_item_use_mut(_binding_0);
+ }
+ Item::Verbatim(_binding_0) => {
+ skip!(_binding_0);
+ }
+ #[cfg(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_item_const_mut<V>(v: &mut V, node: &mut ItemConst)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ tokens_helper(v, &mut node.const_token.span);
+ v.visit_ident_mut(&mut node.ident);
+ tokens_helper(v, &mut node.colon_token.spans);
+ v.visit_type_mut(&mut *node.ty);
+ tokens_helper(v, &mut node.eq_token.spans);
+ v.visit_expr_mut(&mut *node.expr);
+ tokens_helper(v, &mut node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_item_enum_mut<V>(v: &mut V, node: &mut ItemEnum)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ tokens_helper(v, &mut node.enum_token.span);
+ v.visit_ident_mut(&mut node.ident);
+ v.visit_generics_mut(&mut node.generics);
+ tokens_helper(v, &mut node.brace_token.span);
+ for el in Punctuated::pairs_mut(&mut node.variants) {
+ let (it, p) = el.into_tuple();
+ v.visit_variant_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_item_extern_crate_mut<V>(v: &mut V, node: &mut ItemExternCrate)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ tokens_helper(v, &mut node.extern_token.span);
+ tokens_helper(v, &mut node.crate_token.span);
+ v.visit_ident_mut(&mut node.ident);
+ if let Some(it) = &mut node.rename {
+ tokens_helper(v, &mut (it).0.span);
+ v.visit_ident_mut(&mut (it).1);
+ }
+ tokens_helper(v, &mut node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_item_fn_mut<V>(v: &mut V, node: &mut ItemFn)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ v.visit_signature_mut(&mut node.sig);
+ v.visit_block_mut(&mut *node.block);
+}
+#[cfg(feature = "full")]
+pub fn visit_item_foreign_mod_mut<V>(v: &mut V, node: &mut ItemForeignMod)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_abi_mut(&mut node.abi);
+ tokens_helper(v, &mut node.brace_token.span);
+ for it in &mut node.items {
+ v.visit_foreign_item_mut(it);
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_item_impl_mut<V>(v: &mut V, node: &mut ItemImpl)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ if let Some(it) = &mut node.defaultness {
+ tokens_helper(v, &mut it.span);
+ }
+ if let Some(it) = &mut node.unsafety {
+ tokens_helper(v, &mut it.span);
+ }
+ tokens_helper(v, &mut node.impl_token.span);
+ v.visit_generics_mut(&mut node.generics);
+ if let Some(it) = &mut node.trait_ {
+ if let Some(it) = &mut (it).0 {
+ tokens_helper(v, &mut it.spans);
+ }
+ v.visit_path_mut(&mut (it).1);
+ tokens_helper(v, &mut (it).2.span);
+ }
+ v.visit_type_mut(&mut *node.self_ty);
+ tokens_helper(v, &mut node.brace_token.span);
+ for it in &mut node.items {
+ v.visit_impl_item_mut(it);
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_item_macro_mut<V>(v: &mut V, node: &mut ItemMacro)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ if let Some(it) = &mut node.ident {
+ v.visit_ident_mut(it);
+ }
+ v.visit_macro_mut(&mut node.mac);
+ if let Some(it) = &mut node.semi_token {
+ tokens_helper(v, &mut it.spans);
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_item_macro2_mut<V>(v: &mut V, node: &mut ItemMacro2)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ tokens_helper(v, &mut node.macro_token.span);
+ v.visit_ident_mut(&mut node.ident);
+ skip!(node.rules);
+}
+#[cfg(feature = "full")]
+pub fn visit_item_mod_mut<V>(v: &mut V, node: &mut ItemMod)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ tokens_helper(v, &mut node.mod_token.span);
+ v.visit_ident_mut(&mut node.ident);
+ if let Some(it) = &mut node.content {
+ tokens_helper(v, &mut (it).0.span);
+ for it in &mut (it).1 {
+ v.visit_item_mut(it);
+ }
+ }
+ if let Some(it) = &mut node.semi {
+ tokens_helper(v, &mut it.spans);
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_item_static_mut<V>(v: &mut V, node: &mut ItemStatic)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ tokens_helper(v, &mut node.static_token.span);
+ if let Some(it) = &mut node.mutability {
+ tokens_helper(v, &mut it.span);
+ }
+ v.visit_ident_mut(&mut node.ident);
+ tokens_helper(v, &mut node.colon_token.spans);
+ v.visit_type_mut(&mut *node.ty);
+ tokens_helper(v, &mut node.eq_token.spans);
+ v.visit_expr_mut(&mut *node.expr);
+ tokens_helper(v, &mut node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_item_struct_mut<V>(v: &mut V, node: &mut ItemStruct)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ tokens_helper(v, &mut node.struct_token.span);
+ v.visit_ident_mut(&mut node.ident);
+ v.visit_generics_mut(&mut node.generics);
+ v.visit_fields_mut(&mut node.fields);
+ if let Some(it) = &mut node.semi_token {
+ tokens_helper(v, &mut it.spans);
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_item_trait_mut<V>(v: &mut V, node: &mut ItemTrait)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ if let Some(it) = &mut node.unsafety {
+ tokens_helper(v, &mut it.span);
+ }
+ if let Some(it) = &mut node.auto_token {
+ tokens_helper(v, &mut it.span);
+ }
+ tokens_helper(v, &mut node.trait_token.span);
+ v.visit_ident_mut(&mut node.ident);
+ v.visit_generics_mut(&mut node.generics);
+ if let Some(it) = &mut node.colon_token {
+ tokens_helper(v, &mut it.spans);
+ }
+ for el in Punctuated::pairs_mut(&mut node.supertraits) {
+ let (it, p) = el.into_tuple();
+ v.visit_type_param_bound_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+ tokens_helper(v, &mut node.brace_token.span);
+ for it in &mut node.items {
+ v.visit_trait_item_mut(it);
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_item_trait_alias_mut<V>(v: &mut V, node: &mut ItemTraitAlias)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ tokens_helper(v, &mut node.trait_token.span);
+ v.visit_ident_mut(&mut node.ident);
+ v.visit_generics_mut(&mut node.generics);
+ tokens_helper(v, &mut node.eq_token.spans);
+ for el in Punctuated::pairs_mut(&mut node.bounds) {
+ let (it, p) = el.into_tuple();
+ v.visit_type_param_bound_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+ tokens_helper(v, &mut node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_item_type_mut<V>(v: &mut V, node: &mut ItemType)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ tokens_helper(v, &mut node.type_token.span);
+ v.visit_ident_mut(&mut node.ident);
+ v.visit_generics_mut(&mut node.generics);
+ tokens_helper(v, &mut node.eq_token.spans);
+ v.visit_type_mut(&mut *node.ty);
+ tokens_helper(v, &mut node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_item_union_mut<V>(v: &mut V, node: &mut ItemUnion)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ tokens_helper(v, &mut node.union_token.span);
+ v.visit_ident_mut(&mut node.ident);
+ v.visit_generics_mut(&mut node.generics);
+ v.visit_fields_named_mut(&mut node.fields);
+}
+#[cfg(feature = "full")]
+pub fn visit_item_use_mut<V>(v: &mut V, node: &mut ItemUse)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_visibility_mut(&mut node.vis);
+ tokens_helper(v, &mut node.use_token.span);
+ if let Some(it) = &mut node.leading_colon {
+ tokens_helper(v, &mut it.spans);
+ }
+ v.visit_use_tree_mut(&mut node.tree);
+ tokens_helper(v, &mut node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_label_mut<V>(v: &mut V, node: &mut Label)
+where
+ V: VisitMut + ?Sized,
+{
+ v.visit_lifetime_mut(&mut node.name);
+ tokens_helper(v, &mut node.colon_token.spans);
+}
+pub fn visit_lifetime_mut<V>(v: &mut V, node: &mut Lifetime)
+where
+ V: VisitMut + ?Sized,
+{
+ v.visit_span_mut(&mut node.apostrophe);
+ v.visit_ident_mut(&mut node.ident);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_lifetime_def_mut<V>(v: &mut V, node: &mut LifetimeDef)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_lifetime_mut(&mut node.lifetime);
+ if let Some(it) = &mut node.colon_token {
+ tokens_helper(v, &mut it.spans);
+ }
+ for el in Punctuated::pairs_mut(&mut node.bounds) {
+ let (it, p) = el.into_tuple();
+ v.visit_lifetime_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+pub fn visit_lit_mut<V>(v: &mut V, node: &mut Lit)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ Lit::Str(_binding_0) => {
+ v.visit_lit_str_mut(_binding_0);
+ }
+ Lit::ByteStr(_binding_0) => {
+ v.visit_lit_byte_str_mut(_binding_0);
+ }
+ Lit::Byte(_binding_0) => {
+ v.visit_lit_byte_mut(_binding_0);
+ }
+ Lit::Char(_binding_0) => {
+ v.visit_lit_char_mut(_binding_0);
+ }
+ Lit::Int(_binding_0) => {
+ v.visit_lit_int_mut(_binding_0);
+ }
+ Lit::Float(_binding_0) => {
+ v.visit_lit_float_mut(_binding_0);
+ }
+ Lit::Bool(_binding_0) => {
+ v.visit_lit_bool_mut(_binding_0);
+ }
+ Lit::Verbatim(_binding_0) => {
+ skip!(_binding_0);
+ }
+ }
+}
+pub fn visit_lit_bool_mut<V>(v: &mut V, node: &mut LitBool)
+where
+ V: VisitMut + ?Sized,
+{
+ skip!(node.value);
+ v.visit_span_mut(&mut node.span);
+}
+pub fn visit_lit_byte_mut<V>(v: &mut V, node: &mut LitByte)
+where
+ V: VisitMut + ?Sized,
+{}
+pub fn visit_lit_byte_str_mut<V>(v: &mut V, node: &mut LitByteStr)
+where
+ V: VisitMut + ?Sized,
+{}
+pub fn visit_lit_char_mut<V>(v: &mut V, node: &mut LitChar)
+where
+ V: VisitMut + ?Sized,
+{}
+pub fn visit_lit_float_mut<V>(v: &mut V, node: &mut LitFloat)
+where
+ V: VisitMut + ?Sized,
+{}
+pub fn visit_lit_int_mut<V>(v: &mut V, node: &mut LitInt)
+where
+ V: VisitMut + ?Sized,
+{}
+pub fn visit_lit_str_mut<V>(v: &mut V, node: &mut LitStr)
+where
+ V: VisitMut + ?Sized,
+{}
+#[cfg(feature = "full")]
+pub fn visit_local_mut<V>(v: &mut V, node: &mut Local)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ tokens_helper(v, &mut node.let_token.span);
+ v.visit_pat_mut(&mut node.pat);
+ if let Some(it) = &mut node.init {
+ tokens_helper(v, &mut (it).0.spans);
+ v.visit_expr_mut(&mut *(it).1);
+ }
+ tokens_helper(v, &mut node.semi_token.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_macro_mut<V>(v: &mut V, node: &mut Macro)
+where
+ V: VisitMut + ?Sized,
+{
+ v.visit_path_mut(&mut node.path);
+ tokens_helper(v, &mut node.bang_token.spans);
+ v.visit_macro_delimiter_mut(&mut node.delimiter);
+ skip!(node.tokens);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_macro_delimiter_mut<V>(v: &mut V, node: &mut MacroDelimiter)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ MacroDelimiter::Paren(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.span);
+ }
+ MacroDelimiter::Brace(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.span);
+ }
+ MacroDelimiter::Bracket(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.span);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_member_mut<V>(v: &mut V, node: &mut Member)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ Member::Named(_binding_0) => {
+ v.visit_ident_mut(_binding_0);
+ }
+ Member::Unnamed(_binding_0) => {
+ v.visit_index_mut(_binding_0);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_meta_mut<V>(v: &mut V, node: &mut Meta)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ Meta::Path(_binding_0) => {
+ v.visit_path_mut(_binding_0);
+ }
+ Meta::List(_binding_0) => {
+ v.visit_meta_list_mut(_binding_0);
+ }
+ Meta::NameValue(_binding_0) => {
+ v.visit_meta_name_value_mut(_binding_0);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_meta_list_mut<V>(v: &mut V, node: &mut MetaList)
+where
+ V: VisitMut + ?Sized,
+{
+ v.visit_path_mut(&mut node.path);
+ tokens_helper(v, &mut node.paren_token.span);
+ for el in Punctuated::pairs_mut(&mut node.nested) {
+ let (it, p) = el.into_tuple();
+ v.visit_nested_meta_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_meta_name_value_mut<V>(v: &mut V, node: &mut MetaNameValue)
+where
+ V: VisitMut + ?Sized,
+{
+ v.visit_path_mut(&mut node.path);
+ tokens_helper(v, &mut node.eq_token.spans);
+ v.visit_lit_mut(&mut node.lit);
+}
+#[cfg(feature = "full")]
+pub fn visit_method_turbofish_mut<V>(v: &mut V, node: &mut MethodTurbofish)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.colon2_token.spans);
+ tokens_helper(v, &mut node.lt_token.spans);
+ for el in Punctuated::pairs_mut(&mut node.args) {
+ let (it, p) = el.into_tuple();
+ v.visit_generic_method_argument_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+ tokens_helper(v, &mut node.gt_token.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_nested_meta_mut<V>(v: &mut V, node: &mut NestedMeta)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ NestedMeta::Meta(_binding_0) => {
+ v.visit_meta_mut(_binding_0);
+ }
+ NestedMeta::Lit(_binding_0) => {
+ v.visit_lit_mut(_binding_0);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_parenthesized_generic_arguments_mut<V>(
+ v: &mut V,
+ node: &mut ParenthesizedGenericArguments,
+)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.paren_token.span);
+ for el in Punctuated::pairs_mut(&mut node.inputs) {
+ let (it, p) = el.into_tuple();
+ v.visit_type_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+ v.visit_return_type_mut(&mut node.output);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_mut<V>(v: &mut V, node: &mut Pat)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ Pat::Box(_binding_0) => {
+ v.visit_pat_box_mut(_binding_0);
+ }
+ Pat::Ident(_binding_0) => {
+ v.visit_pat_ident_mut(_binding_0);
+ }
+ Pat::Lit(_binding_0) => {
+ v.visit_pat_lit_mut(_binding_0);
+ }
+ Pat::Macro(_binding_0) => {
+ v.visit_pat_macro_mut(_binding_0);
+ }
+ Pat::Or(_binding_0) => {
+ v.visit_pat_or_mut(_binding_0);
+ }
+ Pat::Path(_binding_0) => {
+ v.visit_pat_path_mut(_binding_0);
+ }
+ Pat::Range(_binding_0) => {
+ v.visit_pat_range_mut(_binding_0);
+ }
+ Pat::Reference(_binding_0) => {
+ v.visit_pat_reference_mut(_binding_0);
+ }
+ Pat::Rest(_binding_0) => {
+ v.visit_pat_rest_mut(_binding_0);
+ }
+ Pat::Slice(_binding_0) => {
+ v.visit_pat_slice_mut(_binding_0);
+ }
+ Pat::Struct(_binding_0) => {
+ v.visit_pat_struct_mut(_binding_0);
+ }
+ Pat::Tuple(_binding_0) => {
+ v.visit_pat_tuple_mut(_binding_0);
+ }
+ Pat::TupleStruct(_binding_0) => {
+ v.visit_pat_tuple_struct_mut(_binding_0);
+ }
+ Pat::Type(_binding_0) => {
+ v.visit_pat_type_mut(_binding_0);
+ }
+ Pat::Verbatim(_binding_0) => {
+ skip!(_binding_0);
+ }
+ Pat::Wild(_binding_0) => {
+ v.visit_pat_wild_mut(_binding_0);
+ }
+ #[cfg(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_box_mut<V>(v: &mut V, node: &mut PatBox)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ tokens_helper(v, &mut node.box_token.span);
+ v.visit_pat_mut(&mut *node.pat);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_ident_mut<V>(v: &mut V, node: &mut PatIdent)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ if let Some(it) = &mut node.by_ref {
+ tokens_helper(v, &mut it.span);
+ }
+ if let Some(it) = &mut node.mutability {
+ tokens_helper(v, &mut it.span);
+ }
+ v.visit_ident_mut(&mut node.ident);
+ if let Some(it) = &mut node.subpat {
+ tokens_helper(v, &mut (it).0.spans);
+ v.visit_pat_mut(&mut *(it).1);
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_lit_mut<V>(v: &mut V, node: &mut PatLit)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_expr_mut(&mut *node.expr);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_macro_mut<V>(v: &mut V, node: &mut PatMacro)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_macro_mut(&mut node.mac);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_or_mut<V>(v: &mut V, node: &mut PatOr)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ if let Some(it) = &mut node.leading_vert {
+ tokens_helper(v, &mut it.spans);
+ }
+ for el in Punctuated::pairs_mut(&mut node.cases) {
+ let (it, p) = el.into_tuple();
+ v.visit_pat_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_path_mut<V>(v: &mut V, node: &mut PatPath)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ if let Some(it) = &mut node.qself {
+ v.visit_qself_mut(it);
+ }
+ v.visit_path_mut(&mut node.path);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_range_mut<V>(v: &mut V, node: &mut PatRange)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_expr_mut(&mut *node.lo);
+ v.visit_range_limits_mut(&mut node.limits);
+ v.visit_expr_mut(&mut *node.hi);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_reference_mut<V>(v: &mut V, node: &mut PatReference)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ tokens_helper(v, &mut node.and_token.spans);
+ if let Some(it) = &mut node.mutability {
+ tokens_helper(v, &mut it.span);
+ }
+ v.visit_pat_mut(&mut *node.pat);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_rest_mut<V>(v: &mut V, node: &mut PatRest)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ tokens_helper(v, &mut node.dot2_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_slice_mut<V>(v: &mut V, node: &mut PatSlice)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ tokens_helper(v, &mut node.bracket_token.span);
+ for el in Punctuated::pairs_mut(&mut node.elems) {
+ let (it, p) = el.into_tuple();
+ v.visit_pat_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_struct_mut<V>(v: &mut V, node: &mut PatStruct)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_path_mut(&mut node.path);
+ tokens_helper(v, &mut node.brace_token.span);
+ for el in Punctuated::pairs_mut(&mut node.fields) {
+ let (it, p) = el.into_tuple();
+ v.visit_field_pat_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+ if let Some(it) = &mut node.dot2_token {
+ tokens_helper(v, &mut it.spans);
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_tuple_mut<V>(v: &mut V, node: &mut PatTuple)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ tokens_helper(v, &mut node.paren_token.span);
+ for el in Punctuated::pairs_mut(&mut node.elems) {
+ let (it, p) = el.into_tuple();
+ v.visit_pat_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_tuple_struct_mut<V>(v: &mut V, node: &mut PatTupleStruct)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_path_mut(&mut node.path);
+ v.visit_pat_tuple_mut(&mut node.pat);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_type_mut<V>(v: &mut V, node: &mut PatType)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_pat_mut(&mut *node.pat);
+ tokens_helper(v, &mut node.colon_token.spans);
+ v.visit_type_mut(&mut *node.ty);
+}
+#[cfg(feature = "full")]
+pub fn visit_pat_wild_mut<V>(v: &mut V, node: &mut PatWild)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ tokens_helper(v, &mut node.underscore_token.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_path_mut<V>(v: &mut V, node: &mut Path)
+where
+ V: VisitMut + ?Sized,
+{
+ if let Some(it) = &mut node.leading_colon {
+ tokens_helper(v, &mut it.spans);
+ }
+ for el in Punctuated::pairs_mut(&mut node.segments) {
+ let (it, p) = el.into_tuple();
+ v.visit_path_segment_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_path_arguments_mut<V>(v: &mut V, node: &mut PathArguments)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ PathArguments::None => {}
+ PathArguments::AngleBracketed(_binding_0) => {
+ v.visit_angle_bracketed_generic_arguments_mut(_binding_0);
+ }
+ PathArguments::Parenthesized(_binding_0) => {
+ v.visit_parenthesized_generic_arguments_mut(_binding_0);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_path_segment_mut<V>(v: &mut V, node: &mut PathSegment)
+where
+ V: VisitMut + ?Sized,
+{
+ v.visit_ident_mut(&mut node.ident);
+ v.visit_path_arguments_mut(&mut node.arguments);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_predicate_eq_mut<V>(v: &mut V, node: &mut PredicateEq)
+where
+ V: VisitMut + ?Sized,
+{
+ v.visit_type_mut(&mut node.lhs_ty);
+ tokens_helper(v, &mut node.eq_token.spans);
+ v.visit_type_mut(&mut node.rhs_ty);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_predicate_lifetime_mut<V>(v: &mut V, node: &mut PredicateLifetime)
+where
+ V: VisitMut + ?Sized,
+{
+ v.visit_lifetime_mut(&mut node.lifetime);
+ tokens_helper(v, &mut node.colon_token.spans);
+ for el in Punctuated::pairs_mut(&mut node.bounds) {
+ let (it, p) = el.into_tuple();
+ v.visit_lifetime_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_predicate_type_mut<V>(v: &mut V, node: &mut PredicateType)
+where
+ V: VisitMut + ?Sized,
+{
+ if let Some(it) = &mut node.lifetimes {
+ v.visit_bound_lifetimes_mut(it);
+ }
+ v.visit_type_mut(&mut node.bounded_ty);
+ tokens_helper(v, &mut node.colon_token.spans);
+ for el in Punctuated::pairs_mut(&mut node.bounds) {
+ let (it, p) = el.into_tuple();
+ v.visit_type_param_bound_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_qself_mut<V>(v: &mut V, node: &mut QSelf)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.lt_token.spans);
+ v.visit_type_mut(&mut *node.ty);
+ skip!(node.position);
+ if let Some(it) = &mut node.as_token {
+ tokens_helper(v, &mut it.span);
+ }
+ tokens_helper(v, &mut node.gt_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_range_limits_mut<V>(v: &mut V, node: &mut RangeLimits)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ RangeLimits::HalfOpen(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ RangeLimits::Closed(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_receiver_mut<V>(v: &mut V, node: &mut Receiver)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ if let Some(it) = &mut node.reference {
+ tokens_helper(v, &mut (it).0.spans);
+ if let Some(it) = &mut (it).1 {
+ v.visit_lifetime_mut(it);
+ }
+ }
+ if let Some(it) = &mut node.mutability {
+ tokens_helper(v, &mut it.span);
+ }
+ tokens_helper(v, &mut node.self_token.span);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_return_type_mut<V>(v: &mut V, node: &mut ReturnType)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ ReturnType::Default => {}
+ ReturnType::Type(_binding_0, _binding_1) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ v.visit_type_mut(&mut **_binding_1);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_signature_mut<V>(v: &mut V, node: &mut Signature)
+where
+ V: VisitMut + ?Sized,
+{
+ if let Some(it) = &mut node.constness {
+ tokens_helper(v, &mut it.span);
+ }
+ if let Some(it) = &mut node.asyncness {
+ tokens_helper(v, &mut it.span);
+ }
+ if let Some(it) = &mut node.unsafety {
+ tokens_helper(v, &mut it.span);
+ }
+ if let Some(it) = &mut node.abi {
+ v.visit_abi_mut(it);
+ }
+ tokens_helper(v, &mut node.fn_token.span);
+ v.visit_ident_mut(&mut node.ident);
+ v.visit_generics_mut(&mut node.generics);
+ tokens_helper(v, &mut node.paren_token.span);
+ for el in Punctuated::pairs_mut(&mut node.inputs) {
+ let (it, p) = el.into_tuple();
+ v.visit_fn_arg_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+ if let Some(it) = &mut node.variadic {
+ v.visit_variadic_mut(it);
+ }
+ v.visit_return_type_mut(&mut node.output);
+}
+pub fn visit_span_mut<V>(v: &mut V, node: &mut Span)
+where
+ V: VisitMut + ?Sized,
+{}
+#[cfg(feature = "full")]
+pub fn visit_stmt_mut<V>(v: &mut V, node: &mut Stmt)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ Stmt::Local(_binding_0) => {
+ v.visit_local_mut(_binding_0);
+ }
+ Stmt::Item(_binding_0) => {
+ v.visit_item_mut(_binding_0);
+ }
+ Stmt::Expr(_binding_0) => {
+ v.visit_expr_mut(_binding_0);
+ }
+ Stmt::Semi(_binding_0, _binding_1) => {
+ v.visit_expr_mut(_binding_0);
+ tokens_helper(v, &mut _binding_1.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_trait_bound_mut<V>(v: &mut V, node: &mut TraitBound)
+where
+ V: VisitMut + ?Sized,
+{
+ if let Some(it) = &mut node.paren_token {
+ tokens_helper(v, &mut it.span);
+ }
+ v.visit_trait_bound_modifier_mut(&mut node.modifier);
+ if let Some(it) = &mut node.lifetimes {
+ v.visit_bound_lifetimes_mut(it);
+ }
+ v.visit_path_mut(&mut node.path);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_trait_bound_modifier_mut<V>(v: &mut V, node: &mut TraitBoundModifier)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ TraitBoundModifier::None => {}
+ TraitBoundModifier::Maybe(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_trait_item_mut<V>(v: &mut V, node: &mut TraitItem)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ TraitItem::Const(_binding_0) => {
+ v.visit_trait_item_const_mut(_binding_0);
+ }
+ TraitItem::Method(_binding_0) => {
+ v.visit_trait_item_method_mut(_binding_0);
+ }
+ TraitItem::Type(_binding_0) => {
+ v.visit_trait_item_type_mut(_binding_0);
+ }
+ TraitItem::Macro(_binding_0) => {
+ v.visit_trait_item_macro_mut(_binding_0);
+ }
+ TraitItem::Verbatim(_binding_0) => {
+ skip!(_binding_0);
+ }
+ #[cfg(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_trait_item_const_mut<V>(v: &mut V, node: &mut TraitItemConst)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ tokens_helper(v, &mut node.const_token.span);
+ v.visit_ident_mut(&mut node.ident);
+ tokens_helper(v, &mut node.colon_token.spans);
+ v.visit_type_mut(&mut node.ty);
+ if let Some(it) = &mut node.default {
+ tokens_helper(v, &mut (it).0.spans);
+ v.visit_expr_mut(&mut (it).1);
+ }
+ tokens_helper(v, &mut node.semi_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_trait_item_macro_mut<V>(v: &mut V, node: &mut TraitItemMacro)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_macro_mut(&mut node.mac);
+ if let Some(it) = &mut node.semi_token {
+ tokens_helper(v, &mut it.spans);
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_trait_item_method_mut<V>(v: &mut V, node: &mut TraitItemMethod)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_signature_mut(&mut node.sig);
+ if let Some(it) = &mut node.default {
+ v.visit_block_mut(it);
+ }
+ if let Some(it) = &mut node.semi_token {
+ tokens_helper(v, &mut it.spans);
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_trait_item_type_mut<V>(v: &mut V, node: &mut TraitItemType)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ tokens_helper(v, &mut node.type_token.span);
+ v.visit_ident_mut(&mut node.ident);
+ v.visit_generics_mut(&mut node.generics);
+ if let Some(it) = &mut node.colon_token {
+ tokens_helper(v, &mut it.spans);
+ }
+ for el in Punctuated::pairs_mut(&mut node.bounds) {
+ let (it, p) = el.into_tuple();
+ v.visit_type_param_bound_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+ if let Some(it) = &mut node.default {
+ tokens_helper(v, &mut (it).0.spans);
+ v.visit_type_mut(&mut (it).1);
+ }
+ tokens_helper(v, &mut node.semi_token.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_mut<V>(v: &mut V, node: &mut Type)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ Type::Array(_binding_0) => {
+ v.visit_type_array_mut(_binding_0);
+ }
+ Type::BareFn(_binding_0) => {
+ v.visit_type_bare_fn_mut(_binding_0);
+ }
+ Type::Group(_binding_0) => {
+ v.visit_type_group_mut(_binding_0);
+ }
+ Type::ImplTrait(_binding_0) => {
+ v.visit_type_impl_trait_mut(_binding_0);
+ }
+ Type::Infer(_binding_0) => {
+ v.visit_type_infer_mut(_binding_0);
+ }
+ Type::Macro(_binding_0) => {
+ v.visit_type_macro_mut(_binding_0);
+ }
+ Type::Never(_binding_0) => {
+ v.visit_type_never_mut(_binding_0);
+ }
+ Type::Paren(_binding_0) => {
+ v.visit_type_paren_mut(_binding_0);
+ }
+ Type::Path(_binding_0) => {
+ v.visit_type_path_mut(_binding_0);
+ }
+ Type::Ptr(_binding_0) => {
+ v.visit_type_ptr_mut(_binding_0);
+ }
+ Type::Reference(_binding_0) => {
+ v.visit_type_reference_mut(_binding_0);
+ }
+ Type::Slice(_binding_0) => {
+ v.visit_type_slice_mut(_binding_0);
+ }
+ Type::TraitObject(_binding_0) => {
+ v.visit_type_trait_object_mut(_binding_0);
+ }
+ Type::Tuple(_binding_0) => {
+ v.visit_type_tuple_mut(_binding_0);
+ }
+ Type::Verbatim(_binding_0) => {
+ skip!(_binding_0);
+ }
+ #[cfg(syn_no_non_exhaustive)]
+ _ => unreachable!(),
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_array_mut<V>(v: &mut V, node: &mut TypeArray)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.bracket_token.span);
+ v.visit_type_mut(&mut *node.elem);
+ tokens_helper(v, &mut node.semi_token.spans);
+ v.visit_expr_mut(&mut node.len);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_bare_fn_mut<V>(v: &mut V, node: &mut TypeBareFn)
+where
+ V: VisitMut + ?Sized,
+{
+ if let Some(it) = &mut node.lifetimes {
+ v.visit_bound_lifetimes_mut(it);
+ }
+ if let Some(it) = &mut node.unsafety {
+ tokens_helper(v, &mut it.span);
+ }
+ if let Some(it) = &mut node.abi {
+ v.visit_abi_mut(it);
+ }
+ tokens_helper(v, &mut node.fn_token.span);
+ tokens_helper(v, &mut node.paren_token.span);
+ for el in Punctuated::pairs_mut(&mut node.inputs) {
+ let (it, p) = el.into_tuple();
+ v.visit_bare_fn_arg_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+ if let Some(it) = &mut node.variadic {
+ v.visit_variadic_mut(it);
+ }
+ v.visit_return_type_mut(&mut node.output);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_group_mut<V>(v: &mut V, node: &mut TypeGroup)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.group_token.span);
+ v.visit_type_mut(&mut *node.elem);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_impl_trait_mut<V>(v: &mut V, node: &mut TypeImplTrait)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.impl_token.span);
+ for el in Punctuated::pairs_mut(&mut node.bounds) {
+ let (it, p) = el.into_tuple();
+ v.visit_type_param_bound_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_infer_mut<V>(v: &mut V, node: &mut TypeInfer)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.underscore_token.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_macro_mut<V>(v: &mut V, node: &mut TypeMacro)
+where
+ V: VisitMut + ?Sized,
+{
+ v.visit_macro_mut(&mut node.mac);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_never_mut<V>(v: &mut V, node: &mut TypeNever)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.bang_token.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_param_mut<V>(v: &mut V, node: &mut TypeParam)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_ident_mut(&mut node.ident);
+ if let Some(it) = &mut node.colon_token {
+ tokens_helper(v, &mut it.spans);
+ }
+ for el in Punctuated::pairs_mut(&mut node.bounds) {
+ let (it, p) = el.into_tuple();
+ v.visit_type_param_bound_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+ if let Some(it) = &mut node.eq_token {
+ tokens_helper(v, &mut it.spans);
+ }
+ if let Some(it) = &mut node.default {
+ v.visit_type_mut(it);
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_param_bound_mut<V>(v: &mut V, node: &mut TypeParamBound)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ TypeParamBound::Trait(_binding_0) => {
+ v.visit_trait_bound_mut(_binding_0);
+ }
+ TypeParamBound::Lifetime(_binding_0) => {
+ v.visit_lifetime_mut(_binding_0);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_paren_mut<V>(v: &mut V, node: &mut TypeParen)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.paren_token.span);
+ v.visit_type_mut(&mut *node.elem);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_path_mut<V>(v: &mut V, node: &mut TypePath)
+where
+ V: VisitMut + ?Sized,
+{
+ if let Some(it) = &mut node.qself {
+ v.visit_qself_mut(it);
+ }
+ v.visit_path_mut(&mut node.path);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_ptr_mut<V>(v: &mut V, node: &mut TypePtr)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.star_token.spans);
+ if let Some(it) = &mut node.const_token {
+ tokens_helper(v, &mut it.span);
+ }
+ if let Some(it) = &mut node.mutability {
+ tokens_helper(v, &mut it.span);
+ }
+ v.visit_type_mut(&mut *node.elem);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_reference_mut<V>(v: &mut V, node: &mut TypeReference)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.and_token.spans);
+ if let Some(it) = &mut node.lifetime {
+ v.visit_lifetime_mut(it);
+ }
+ if let Some(it) = &mut node.mutability {
+ tokens_helper(v, &mut it.span);
+ }
+ v.visit_type_mut(&mut *node.elem);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_slice_mut<V>(v: &mut V, node: &mut TypeSlice)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.bracket_token.span);
+ v.visit_type_mut(&mut *node.elem);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_trait_object_mut<V>(v: &mut V, node: &mut TypeTraitObject)
+where
+ V: VisitMut + ?Sized,
+{
+ if let Some(it) = &mut node.dyn_token {
+ tokens_helper(v, &mut it.span);
+ }
+ for el in Punctuated::pairs_mut(&mut node.bounds) {
+ let (it, p) = el.into_tuple();
+ v.visit_type_param_bound_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_type_tuple_mut<V>(v: &mut V, node: &mut TypeTuple)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.paren_token.span);
+ for el in Punctuated::pairs_mut(&mut node.elems) {
+ let (it, p) = el.into_tuple();
+ v.visit_type_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_un_op_mut<V>(v: &mut V, node: &mut UnOp)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ UnOp::Deref(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ UnOp::Not(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ UnOp::Neg(_binding_0) => {
+ tokens_helper(v, &mut _binding_0.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_use_glob_mut<V>(v: &mut V, node: &mut UseGlob)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.star_token.spans);
+}
+#[cfg(feature = "full")]
+pub fn visit_use_group_mut<V>(v: &mut V, node: &mut UseGroup)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.brace_token.span);
+ for el in Punctuated::pairs_mut(&mut node.items) {
+ let (it, p) = el.into_tuple();
+ v.visit_use_tree_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(feature = "full")]
+pub fn visit_use_name_mut<V>(v: &mut V, node: &mut UseName)
+where
+ V: VisitMut + ?Sized,
+{
+ v.visit_ident_mut(&mut node.ident);
+}
+#[cfg(feature = "full")]
+pub fn visit_use_path_mut<V>(v: &mut V, node: &mut UsePath)
+where
+ V: VisitMut + ?Sized,
+{
+ v.visit_ident_mut(&mut node.ident);
+ tokens_helper(v, &mut node.colon2_token.spans);
+ v.visit_use_tree_mut(&mut *node.tree);
+}
+#[cfg(feature = "full")]
+pub fn visit_use_rename_mut<V>(v: &mut V, node: &mut UseRename)
+where
+ V: VisitMut + ?Sized,
+{
+ v.visit_ident_mut(&mut node.ident);
+ tokens_helper(v, &mut node.as_token.span);
+ v.visit_ident_mut(&mut node.rename);
+}
+#[cfg(feature = "full")]
+pub fn visit_use_tree_mut<V>(v: &mut V, node: &mut UseTree)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ UseTree::Path(_binding_0) => {
+ v.visit_use_path_mut(_binding_0);
+ }
+ UseTree::Name(_binding_0) => {
+ v.visit_use_name_mut(_binding_0);
+ }
+ UseTree::Rename(_binding_0) => {
+ v.visit_use_rename_mut(_binding_0);
+ }
+ UseTree::Glob(_binding_0) => {
+ v.visit_use_glob_mut(_binding_0);
+ }
+ UseTree::Group(_binding_0) => {
+ v.visit_use_group_mut(_binding_0);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_variadic_mut<V>(v: &mut V, node: &mut Variadic)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ tokens_helper(v, &mut node.dots.spans);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_variant_mut<V>(v: &mut V, node: &mut Variant)
+where
+ V: VisitMut + ?Sized,
+{
+ for it in &mut node.attrs {
+ v.visit_attribute_mut(it);
+ }
+ v.visit_ident_mut(&mut node.ident);
+ v.visit_fields_mut(&mut node.fields);
+ if let Some(it) = &mut node.discriminant {
+ tokens_helper(v, &mut (it).0.spans);
+ v.visit_expr_mut(&mut (it).1);
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_vis_crate_mut<V>(v: &mut V, node: &mut VisCrate)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.crate_token.span);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_vis_public_mut<V>(v: &mut V, node: &mut VisPublic)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.pub_token.span);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_vis_restricted_mut<V>(v: &mut V, node: &mut VisRestricted)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.pub_token.span);
+ tokens_helper(v, &mut node.paren_token.span);
+ if let Some(it) = &mut node.in_token {
+ tokens_helper(v, &mut it.span);
+ }
+ v.visit_path_mut(&mut *node.path);
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_visibility_mut<V>(v: &mut V, node: &mut Visibility)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ Visibility::Public(_binding_0) => {
+ v.visit_vis_public_mut(_binding_0);
+ }
+ Visibility::Crate(_binding_0) => {
+ v.visit_vis_crate_mut(_binding_0);
+ }
+ Visibility::Restricted(_binding_0) => {
+ v.visit_vis_restricted_mut(_binding_0);
+ }
+ Visibility::Inherited => {}
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_where_clause_mut<V>(v: &mut V, node: &mut WhereClause)
+where
+ V: VisitMut + ?Sized,
+{
+ tokens_helper(v, &mut node.where_token.span);
+ for el in Punctuated::pairs_mut(&mut node.predicates) {
+ let (it, p) = el.into_tuple();
+ v.visit_where_predicate_mut(it);
+ if let Some(p) = p {
+ tokens_helper(v, &mut p.spans);
+ }
+ }
+}
+#[cfg(any(feature = "derive", feature = "full"))]
+pub fn visit_where_predicate_mut<V>(v: &mut V, node: &mut WherePredicate)
+where
+ V: VisitMut + ?Sized,
+{
+ match node {
+ WherePredicate::Type(_binding_0) => {
+ v.visit_predicate_type_mut(_binding_0);
+ }
+ WherePredicate::Lifetime(_binding_0) => {
+ v.visit_predicate_lifetime_mut(_binding_0);
+ }
+ WherePredicate::Eq(_binding_0) => {
+ v.visit_predicate_eq_mut(_binding_0);
+ }
+ }
+}