Skip to content

Commit 79b70e2

Browse files
committed
Add diagnostic item to PartialEq::{eq,ne}
1 parent 7f9b7da commit 79b70e2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/src/cmp.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,13 +229,15 @@ pub trait PartialEq<Rhs: ?Sized = Self> {
229229
/// by `==`.
230230
#[must_use]
231231
#[stable(feature = "rust1", since = "1.0.0")]
232+
#[cfg_attr(not(bootstrap), rustc_diagnostic_item = "cmp_partialeq_eq")]
232233
fn eq(&self, other: &Rhs) -> bool;
233234

234235
/// This method tests for `!=`. The default implementation is almost always
235236
/// sufficient, and should not be overridden without very good reason.
236237
#[inline]
237238
#[must_use]
238239
#[stable(feature = "rust1", since = "1.0.0")]
240+
#[cfg_attr(not(bootstrap), rustc_diagnostic_item = "cmp_partialeq_ne")]
239241
fn ne(&self, other: &Rhs) -> bool {
240242
!self.eq(other)
241243
}

0 commit comments

Comments
 (0)