// SPDX-License-Identifier: Apache-2.0 OR MIT // 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 std::hash::{Hash, Hasher};#[cfg(any(feature = "derive", feature = "full"))]#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]impl Hash for crate::Abi { fn hash<H>(&self, state: &mut H) where H: Hasher, { self.name.hash(state); }}#[cfg(any(feature = "derive", feature = "full"))]#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]impl Hash for crate::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(docsrs, doc(cfg(feature = "extra-traits")))]impl Hash for crate::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(docsrs, doc(cfg(feature = "extra-traits")))]impl Hash for crate::AssocConst { fn hash<H>(&self, state: &mut H) where H: Hasher, { self.ident.hash(state); self.generics.hash(state); self.value.hash(state); }}#[cfg(any(feature = "derive", feature = "full"))]#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]impl Hash for crate::AssocType { fn hash<H>(&self, state: &mut H) where H: Hasher, { self.ident.hash(state); self.generics.hash(state); self.ty.hash(state); }}#[cfg(any(feature = "derive", feature = "full"))]#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]impl Hash for crate::AttrStyle { fn hash<H>(&self, state: &mut H) where H: Hasher, { match self { crate::AttrStyle::Outer => { state.write_u8(0u8); } crate::AttrStyle::Inner(_) => { state.write_u8(1u8); } } }}#[cfg(any(feature = "derive", feature = "full"))]#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]impl Hash for crate::Attribute { fn hash<H>(&self, state: &mut H) where H: Hasher, { self.style.hash(state); self.meta.hash(state); }}#[cfg(any(feature = "derive", feature = "full"))]#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]impl Hash for crate::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(docsrs, doc(cfg(feature = "extra-traits")))]impl Hash for crate::BareVariadic { fn hash<H>(&self, state: &mut H) where H: Hasher, { self.attrs.hash(state); self.name.hash(state); self.comma.hash(state); }}#[cfg(any(feature = "derive", feature = "full"))]#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]impl Hash for crate::BinOp { fn hash<H>(&self, state: &mut H) where H: Hasher, { match self { crate::BinOp::Add(_) => { state.write_u8(0u8); } crate::BinOp::Sub(_) => { state.write_u8(1u8); } crate::BinOp::Mul(_) => { state.write_u8(2u8); } crate::BinOp::Div(_) => { state.write_u8(3u8); } crate::BinOp::Rem(_) => { state.write_u8(4u8); } crate::BinOp::And(_) => { state.write_u8(5u8); } crate::BinOp::Or(_) => { state.write_u8(6u8); } crate::BinOp::BitXor(_) => { state.write_u8(7u8); } crate::BinOp::BitAnd(_) => { state.write_u8(8u8); } crate::BinOp::BitOr(_) => { state.write_u8(9u8); } crate::BinOp::Shl(_) => { state.write_u8(10u8); } crate::BinOp::Shr(_) => { state.write_u8(11u8); } crate::BinOp::Eq(_) => { state.write_u8(12u8); } crate::BinOp::Lt(_) => { state.write_u8(13u8); } crate::BinOp::Le(_) => { state.write_u8(14u8); } crate::BinOp::Ne(_) => { state.write_u8(15u8); } crate::BinOp::Ge(_) => { state.write_u8(16u8); } crate::BinOp::Gt(_) => { state.write_u8(17u8); } crate::BinOp::AddAssign(_) => { state.write_u8(18u8); } crate::BinOp::SubAssign(_) => { state.write_u8(19u8); } crate::BinOp::MulAssign(_) => { state.write_u8(20u8); } crate::BinOp::DivAssign(_) => { state.write_u8(21u8); } crate::BinOp::RemAssign(_) => { state.write_u8(22u8); } crate::BinOp::BitXorAssign(_) => { state.write_u8(23u8); } crate::BinOp::BitAndAssign(_) => { state.write_u8(24u8); } crate::BinOp::BitOrAssign(_) => { state.write_u8(25u8); } crate::BinOp::ShlAssign(_) => { state.write_u8(26u8); } crate::BinOp::ShrAssign(_) => { state.write_u8(27u8); } } }}#[cfg(feature = "full")]#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]impl Hash for crate::Block { fn hash<H>(&self, state: &mut H) where H: Hasher, { self.stmts.hash(state); }}#[cfg(any(feature = "derive", feature = "full"))]#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]impl Hash for crate::BoundLifetimes { fn hash<H>(&self, state: &mut H) where H: Hasher, { self.lifetimes.hash(state); }}#[cfg(feature = "full")]#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]impl Hash for crate::CapturedParam { fn hash<H>(&self, state: &mut H) where H: Hasher, { match self { crate::CapturedParam::Lifetime(v0) => { state.write_u8(0u8); v0.hash(state); } crate::CapturedParam::Ident(v0) => { state.write_u8(1u8); v0.hash(state); } } }}#[cfg(any(feature = "derive", feature = "full"))]#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]impl Hash for crate::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(docsrs, doc(cfg(feature = "extra-traits")))]impl Hash for crate::Constraint { fn hash<H>(&self, state: &mut H) where H: Hasher, { self.ident.hash(state); self.generics.hash(state); self.bounds.hash(state); }}#[cfg(feature = "derive")]#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]impl Hash for crate::Data { fn hash<H>(&self, state: &mut H) where H: Hasher, { match self { crate::Data::Struct(v0) => { state.write_u8(0u8); v0.hash(state); } crate::Data::Enum(v0) => { state.write_u8(1u8); v0.hash(state); } crate::Data::Union(v0) => { state.write_u8(2u8); v0.hash(state); } } }}#[cfg(feature = "derive")]#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]impl Hash for crate::DataEnum { fn hash<H>(&self, state: &mut H) where H: Hasher, { self.variants.hash(state); }}#[cfg(feature = "derive")]#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]impl Hash for crate::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(docsrs, doc(cfg(feature = "extra-traits")))]impl Hash for crate::DataUnion { fn hash<H>(&self, state: &mut H) where H: Hasher, { self.fields.hash(state); }}#[cfg(feature = "derive")]#[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))]impl Hash for crate::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(docsrs, doc(cfg(feature = "extra-traits")))]impl Hash for crate::Expr { fn hash<H>(&self, state: &mut H) where H: Hasher, { match self { #[cfg(feature = "full")] crate::Expr::Array(v0) => { state.write_u8(0u8); v0.hash(state); } #[cfg(feature = "full")] crate::Expr::Assign(v0) => { state.write_u8(1u8); v0.hash(state); } #[cfg(feature = "full")] crate::Expr::Async(v0) => { state.write_u8(2u8); v0.hash(state); } #[cfg(feature = "full")] crate::Expr::Await(v0) => { state.write_u8(3u8); v0.hash(state); } crate::Expr::Binary(v0) => { state.write_u8(4u8); v0.hash(state); } #[cfg(feature = "full")] crate::Expr::Block(v0) => { state.write_u8(5u8); v0.hash(state); } #[cfg(feature = "full")] crate::Expr::Break(v0) => { state.write_u8(6u8); v0.hash(state); } crate::Expr::Call(v0) => { state.write_u8(7u8); v0.hash(state); } crate::Expr::Cast(v0) => { state.write_u8(8u8); v0.hash(state); } #[cfg(feature = "full")] crate::Expr::Closure(v0) => { state.write_u8(9u8); v0.hash(state); } #[cfg(feature = "full")] crate::Expr::Const(v0) => { state.write_u8(10u8); v0.hash(state); } #[cfg(feature = "full")] crate::Expr::Continue(v0) => { state.write_u8(11u8); v0.hash(state); } crate::Expr::Field(v0) => { state.write_u8(12u8); v0.hash(state); } #[cfg(feature = "full")] crate::Expr::ForLoop(v0) => { state.write_u8(13u8); v0.hash(state); } crate::Expr::Group(v0) => { state.write_u8(14u8); v0.hash(state); } #[cfg(feature = "full")] crate::Expr::If(v0) => { state.write_u8(15u8); v0.hash(state); } crate::Expr::Index(v0) => { state.write_u8(16u8); v0.hash(state); } #[cfg(feature = "full")] crate::Expr::Infer(v0) => { state.write_u8(17u8); v0.hash(state); } #[cfg(feature = "full")] crate::Expr::Let(v0) => { state.write_u8(18u8); v0.hash(state); } crate::Expr::Lit(v0) => { state.write_u8(19u8); v0.hash(state); } #[cfg(feature = "full")] crate::Expr::Loop(v0) => { state.write_u8(20u8); v0.hash(state); } crate::Expr::Macro(v0) => { state.write_u8(21u8); v0.hash(state); } #[cfg(feature = "full")] crate::Expr::Match(v0) => { state.write_u8(22u8); v0.hash(state); } crate::Expr::MethodCall(v0) => { state.write_u8(23u8); v0.hash(state); } crate::Expr::Paren(v0) => { state.write_u8(24u8); v0.hash(state); } crate::Expr::Path(v0) => { state.write_u8(25u8); v0.hash(state); } #[cfg(feature = "full")] crate::Expr::Range(v0) => { state.write_u8(26u8); v0.hash(state); } #[cfg(feature = "full")] crate::Expr::RawAddr(v0) => { state.write_u8(27u8); v0.hash(state); } crate::Expr::Reference(v0) => { state.write_u8(28u8); v0.hash(state); } #[cfg(feature = "full")] crate::Expr::Repeat(v0) => { state.write_u8(29u8); v0.hash(state); } #[cfg(feature = "full")] crate::Expr::Return(v0) => { state.write_u8(30u8); v0.hash(state); } crate::Expr::Struct(v0) => { state.write_u8(31u8);Lines 1–500 of 2878. Load more
// SPDX-License-Identifier: Apache-2.0 OR MIT // 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 std::hash::{Hash, Hasher}; #[cfg(any(feature = "derive", feature = "full"))] #[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))] impl Hash for crate::Abi { fn hash<H>(&self, state: &mut H) where H: Hasher, { self.name.hash(state); } } #[cfg(any(feature = "derive", feature = "full"))] #[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))] impl Hash for crate::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(docsrs, doc(cfg(feature = "extra-traits")))] impl Hash for crate::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(docsrs, doc(cfg(feature = "extra-traits")))] impl Hash for crate::AssocConst { fn hash<H>(&self, state: &mut H) where H: Hasher, { self.ident.hash(state); self.generics.hash(state); self.value.hash(state); } } #[cfg(any(feature = "derive", feature = "full"))] #[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))] impl Hash for crate::AssocType { fn hash<H>(&self, state: &mut H) where H: Hasher, { self.ident.hash(state); self.generics.hash(state); self.ty.hash(state); } } #[cfg(any(feature = "derive", feature = "full"))] #[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))] impl Hash for crate::AttrStyle { fn hash<H>(&self, state: &mut H) where H: Hasher, { match self { crate::AttrStyle::Outer => { state.write_u8(0u8); } crate::AttrStyle::Inner(_) => { state.write_u8(1u8); } } } } #[cfg(any(feature = "derive", feature = "full"))] #[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))] impl Hash for crate::Attribute { fn hash<H>(&self, state: &mut H) where H: Hasher, { self.style.hash(state); self.meta.hash(state); } } #[cfg(any(feature = "derive", feature = "full"))] #[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))] impl Hash for crate::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(docsrs, doc(cfg(feature = "extra-traits")))] impl Hash for crate::BareVariadic { fn hash<H>(&self, state: &mut H) where H: Hasher, { self.attrs.hash(state); self.name.hash(state); self.comma.hash(state); } } #[cfg(any(feature = "derive", feature = "full"))] #[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))] impl Hash for crate::BinOp { fn hash<H>(&self, state: &mut H) where H: Hasher, { match self { crate::BinOp::Add(_) => { state.write_u8(0u8); } crate::BinOp::Sub(_) => { state.write_u8(1u8); } crate::BinOp::Mul(_) => { state.write_u8(2u8); } crate::BinOp::Div(_) => { state.write_u8(3u8); } crate::BinOp::Rem(_) => { state.write_u8(4u8); } crate::BinOp::And(_) => { state.write_u8(5u8); } crate::BinOp::Or(_) => { state.write_u8(6u8); } crate::BinOp::BitXor(_) => { state.write_u8(7u8); } crate::BinOp::BitAnd(_) => { state.write_u8(8u8); } crate::BinOp::BitOr(_) => { state.write_u8(9u8); } crate::BinOp::Shl(_) => { state.write_u8(10u8); } crate::BinOp::Shr(_) => { state.write_u8(11u8); } crate::BinOp::Eq(_) => { state.write_u8(12u8); } crate::BinOp::Lt(_) => { state.write_u8(13u8); } crate::BinOp::Le(_) => { state.write_u8(14u8); } crate::BinOp::Ne(_) => { state.write_u8(15u8); } crate::BinOp::Ge(_) => { state.write_u8(16u8); } crate::BinOp::Gt(_) => { state.write_u8(17u8); } crate::BinOp::AddAssign(_) => { state.write_u8(18u8); } crate::BinOp::SubAssign(_) => { state.write_u8(19u8); } crate::BinOp::MulAssign(_) => { state.write_u8(20u8); } crate::BinOp::DivAssign(_) => { state.write_u8(21u8); } crate::BinOp::RemAssign(_) => { state.write_u8(22u8); } crate::BinOp::BitXorAssign(_) => { state.write_u8(23u8); } crate::BinOp::BitAndAssign(_) => { state.write_u8(24u8); } crate::BinOp::BitOrAssign(_) => { state.write_u8(25u8); } crate::BinOp::ShlAssign(_) => { state.write_u8(26u8); } crate::BinOp::ShrAssign(_) => { state.write_u8(27u8); } } } } #[cfg(feature = "full")] #[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))] impl Hash for crate::Block { fn hash<H>(&self, state: &mut H) where H: Hasher, { self.stmts.hash(state); } } #[cfg(any(feature = "derive", feature = "full"))] #[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))] impl Hash for crate::BoundLifetimes { fn hash<H>(&self, state: &mut H) where H: Hasher, { self.lifetimes.hash(state); } } #[cfg(feature = "full")] #[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))] impl Hash for crate::CapturedParam { fn hash<H>(&self, state: &mut H) where H: Hasher, { match self { crate::CapturedParam::Lifetime(v0) => { state.write_u8(0u8); v0.hash(state); } crate::CapturedParam::Ident(v0) => { state.write_u8(1u8); v0.hash(state); } } } } #[cfg(any(feature = "derive", feature = "full"))] #[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))] impl Hash for crate::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(docsrs, doc(cfg(feature = "extra-traits")))] impl Hash for crate::Constraint { fn hash<H>(&self, state: &mut H) where H: Hasher, { self.ident.hash(state); self.generics.hash(state); self.bounds.hash(state); } } #[cfg(feature = "derive")] #[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))] impl Hash for crate::Data { fn hash<H>(&self, state: &mut H) where H: Hasher, { match self { crate::Data::Struct(v0) => { state.write_u8(0u8); v0.hash(state); } crate::Data::Enum(v0) => { state.write_u8(1u8); v0.hash(state); } crate::Data::Union(v0) => { state.write_u8(2u8); v0.hash(state); } } } } #[cfg(feature = "derive")] #[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))] impl Hash for crate::DataEnum { fn hash<H>(&self, state: &mut H) where H: Hasher, { self.variants.hash(state); } } #[cfg(feature = "derive")] #[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))] impl Hash for crate::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(docsrs, doc(cfg(feature = "extra-traits")))] impl Hash for crate::DataUnion { fn hash<H>(&self, state: &mut H) where H: Hasher, { self.fields.hash(state); } } #[cfg(feature = "derive")] #[cfg_attr(docsrs, doc(cfg(feature = "extra-traits")))] impl Hash for crate::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(docsrs, doc(cfg(feature = "extra-traits")))] impl Hash for crate::Expr { fn hash<H>(&self, state: &mut H) where H: Hasher, { match self { #[cfg(feature = "full")] crate::Expr::Array(v0) => { state.write_u8(0u8); v0.hash(state); } #[cfg(feature = "full")] crate::Expr::Assign(v0) => { state.write_u8(1u8); v0.hash(state); } #[cfg(feature = "full")] crate::Expr::Async(v0) => { state.write_u8(2u8); v0.hash(state); } #[cfg(feature = "full")] crate::Expr::Await(v0) => { state.write_u8(3u8); v0.hash(state); } crate::Expr::Binary(v0) => { state.write_u8(4u8); v0.hash(state); } #[cfg(feature = "full")] crate::Expr::Block(v0) => { state.write_u8(5u8); v0.hash(state); } #[cfg(feature = "full")] crate::Expr::Break(v0) => { state.write_u8(6u8); v0.hash(state); } crate::Expr::Call(v0) => { state.write_u8(7u8); v0.hash(state); } crate::Expr::Cast(v0) => { state.write_u8(8u8); v0.hash(state); } #[cfg(feature = "full")] crate::Expr::Closure(v0) => { state.write_u8(9u8); v0.hash(state); } #[cfg(feature = "full")] crate::Expr::Const(v0) => { state.write_u8(10u8); v0.hash(state); } #[cfg(feature = "full")] crate::Expr::Continue(v0) => { state.write_u8(11u8); v0.hash(state); } crate::Expr::Field(v0) => { state.write_u8(12u8); v0.hash(state); } #[cfg(feature = "full")] crate::Expr::ForLoop(v0) => { state.write_u8(13u8); v0.hash(state); } crate::Expr::Group(v0) => { state.write_u8(14u8); v0.hash(state); } #[cfg(feature = "full")] crate::Expr::If(v0) => { state.write_u8(15u8); v0.hash(state); } crate::Expr::Index(v0) => { state.write_u8(16u8); v0.hash(state); } #[cfg(feature = "full")] crate::Expr::Infer(v0) => { state.write_u8(17u8); v0.hash(state); } #[cfg(feature = "full")] crate::Expr::Let(v0) => { state.write_u8(18u8); v0.hash(state); } crate::Expr::Lit(v0) => { state.write_u8(19u8); v0.hash(state); } #[cfg(feature = "full")] crate::Expr::Loop(v0) => { state.write_u8(20u8); v0.hash(state); } crate::Expr::Macro(v0) => { state.write_u8(21u8); v0.hash(state); } #[cfg(feature = "full")] crate::Expr::Match(v0) => { state.write_u8(22u8); v0.hash(state); } crate::Expr::MethodCall(v0) => { state.write_u8(23u8); v0.hash(state); } crate::Expr::Paren(v0) => { state.write_u8(24u8); v0.hash(state); } crate::Expr::Path(v0) => { state.write_u8(25u8); v0.hash(state); } #[cfg(feature = "full")] crate::Expr::Range(v0) => { state.write_u8(26u8); v0.hash(state); } #[cfg(feature = "full")] crate::Expr::RawAddr(v0) => { state.write_u8(27u8); v0.hash(state); } crate::Expr::Reference(v0) => { state.write_u8(28u8); v0.hash(state); } #[cfg(feature = "full")] crate::Expr::Repeat(v0) => { state.write_u8(29u8); v0.hash(state); } #[cfg(feature = "full")] crate::Expr::Return(v0) => { state.write_u8(30u8); v0.hash(state); } crate::Expr::Struct(v0) => { state.write_u8(31u8);