diff --git a/compiler/rustc_type_ir/src/canonical.rs b/compiler/rustc_type_ir/src/canonical.rs index 4e46a3a13aa5..f02ada152a44 100644 --- a/compiler/rustc_type_ir/src/canonical.rs +++ b/compiler/rustc_type_ir/src/canonical.rs @@ -1,3 +1,5 @@ +#![allow(clippy::derived_hash_with_manual_eq)] + use derive_where::derive_where; #[cfg(feature = "nightly")] use rustc_macros::{HashStable_NoContext, TyDecodable, TyEncodable}; @@ -167,6 +169,7 @@ pub enum CanonicalVarKind { PlaceholderConst(I::PlaceholderConst), } +// FIXME(GrigorenkoPV): consider not implementing PartialEq manually impl PartialEq for CanonicalVarKind { fn eq(&self, other: &Self) -> bool { match (self, other) { diff --git a/compiler/rustc_type_ir/src/const_kind.rs b/compiler/rustc_type_ir/src/const_kind.rs index dab2d3bf695c..685bb5f9a8bf 100644 --- a/compiler/rustc_type_ir/src/const_kind.rs +++ b/compiler/rustc_type_ir/src/const_kind.rs @@ -1,3 +1,5 @@ +#![allow(clippy::derived_hash_with_manual_eq)] + use derive_where::derive_where; #[cfg(feature = "nightly")] use rustc_data_structures::stable_hasher::{HashStable, StableHasher}; @@ -43,6 +45,7 @@ pub enum ConstKind { Expr(I::ExprConst), } +// FIXME(GrigorenkoPV): consider not implementing PartialEq manually impl PartialEq for ConstKind { fn eq(&self, other: &Self) -> bool { match (self, other) { diff --git a/compiler/rustc_type_ir/src/predicate_kind.rs b/compiler/rustc_type_ir/src/predicate_kind.rs index 5b8b22244ba6..70b7c29bdfcc 100644 --- a/compiler/rustc_type_ir/src/predicate_kind.rs +++ b/compiler/rustc_type_ir/src/predicate_kind.rs @@ -1,3 +1,5 @@ +#![allow(clippy::derived_hash_with_manual_eq)] + use derive_where::derive_where; #[cfg(feature = "nightly")] use rustc_macros::{Decodable, Encodable, HashStable_NoContext, TyDecodable, TyEncodable}; @@ -38,6 +40,7 @@ pub enum ClauseKind { ConstEvaluatable(I::Const), } +// FIXME(GrigorenkoPV): consider not implementing PartialEq manually impl PartialEq for ClauseKind { fn eq(&self, other: &Self) -> bool { match (self, other) { diff --git a/compiler/rustc_type_ir/src/region_kind.rs b/compiler/rustc_type_ir/src/region_kind.rs index d56700f52eb8..61ac83fcc98c 100644 --- a/compiler/rustc_type_ir/src/region_kind.rs +++ b/compiler/rustc_type_ir/src/region_kind.rs @@ -1,3 +1,5 @@ +#![allow(clippy::derived_hash_with_manual_eq)] + use derive_where::derive_where; #[cfg(feature = "nightly")] use rustc_data_structures::stable_hasher::{HashStable, StableHasher}; @@ -193,6 +195,7 @@ const fn regionkind_discriminant(value: &RegionKind) -> usize { } } +// FIXME(GrigorenkoPV): consider not implementing PartialEq manually // This is manually implemented because a derive would require `I: PartialEq` impl PartialEq for RegionKind { #[inline] diff --git a/compiler/rustc_type_ir/src/ty_kind.rs b/compiler/rustc_type_ir/src/ty_kind.rs index 29993a50aeea..db883511d75a 100644 --- a/compiler/rustc_type_ir/src/ty_kind.rs +++ b/compiler/rustc_type_ir/src/ty_kind.rs @@ -1,3 +1,5 @@ +#![allow(clippy::derived_hash_with_manual_eq)] + use derive_where::derive_where; #[cfg(feature = "nightly")] @@ -293,6 +295,7 @@ const fn tykind_discriminant(value: &TyKind) -> usize { } } +// FIXME(GrigorenkoPV): consider not implementing PartialEq manually // This is manually implemented because a derive would require `I: PartialEq` impl PartialEq for TyKind { #[inline]