diff options
| author | Urgau <urgau@numericable.fr> | 2023-11-22 18:25:08 +0100 |
|---|---|---|
| committer | Urgau <urgau@numericable.fr> | 2023-12-02 15:36:07 +0100 |
| commit | 26cbb10a5c6885d629cde3f8235800147b198bc0 (patch) | |
| tree | a45e2e3eba6394ccd6f1fb67d6a1a02c2cc63dc2 | |
| parent | 7be0546bd121c06b37cce9139af8b7c7e012cb25 (diff) | |
| download | rust-26cbb10a5c6885d629cde3f8235800147b198bc0.tar.gz rust-26cbb10a5c6885d629cde3f8235800147b198bc0.zip | |
Add diagnostic item to PartialEq::{eq,ne}
| -rw-r--r-- | compiler/rustc_span/src/symbol.rs | 2 | ||||
| -rw-r--r-- | library/core/src/cmp.rs | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index d7e822382ef..93d542cd437 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -516,6 +516,8 @@ symbols! { cmp, cmp_max, cmp_min, + cmp_partialeq_eq, + cmp_partialeq_ne, cmpxchg16b_target_feature, cmse_nonsecure_entry, coerce_unsized, diff --git a/library/core/src/cmp.rs b/library/core/src/cmp.rs index fadf2fcc9fc..68543592dbc 100644 --- a/library/core/src/cmp.rs +++ b/library/core/src/cmp.rs @@ -229,6 +229,7 @@ pub trait PartialEq<Rhs: ?Sized = Self> { /// by `==`. #[must_use] #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(not(bootstrap), rustc_diagnostic_item = "cmp_partialeq_eq")] fn eq(&self, other: &Rhs) -> bool; /// This method tests for `!=`. The default implementation is almost always @@ -236,6 +237,7 @@ pub trait PartialEq<Rhs: ?Sized = Self> { #[inline] #[must_use] #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(not(bootstrap), rustc_diagnostic_item = "cmp_partialeq_ne")] fn ne(&self, other: &Rhs) -> bool { !self.eq(other) } |
