Add diagnostic item to PartialEq::{eq,ne}
This commit is contained in:
parent
7be0546bd1
commit
26cbb10a5c
@ -516,6 +516,8 @@
|
|||||||
cmp,
|
cmp,
|
||||||
cmp_max,
|
cmp_max,
|
||||||
cmp_min,
|
cmp_min,
|
||||||
|
cmp_partialeq_eq,
|
||||||
|
cmp_partialeq_ne,
|
||||||
cmpxchg16b_target_feature,
|
cmpxchg16b_target_feature,
|
||||||
cmse_nonsecure_entry,
|
cmse_nonsecure_entry,
|
||||||
coerce_unsized,
|
coerce_unsized,
|
||||||
|
@ -229,6 +229,7 @@ pub trait PartialEq<Rhs: ?Sized = Self> {
|
|||||||
/// by `==`.
|
/// by `==`.
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[cfg_attr(not(bootstrap), rustc_diagnostic_item = "cmp_partialeq_eq")]
|
||||||
fn eq(&self, other: &Rhs) -> bool;
|
fn eq(&self, other: &Rhs) -> bool;
|
||||||
|
|
||||||
/// This method tests for `!=`. The default implementation is almost always
|
/// This method tests for `!=`. The default implementation is almost always
|
||||||
@ -236,6 +237,7 @@ pub trait PartialEq<Rhs: ?Sized = Self> {
|
|||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[cfg_attr(not(bootstrap), rustc_diagnostic_item = "cmp_partialeq_ne")]
|
||||||
fn ne(&self, other: &Rhs) -> bool {
|
fn ne(&self, other: &Rhs) -> bool {
|
||||||
!self.eq(other)
|
!self.eq(other)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user