Fix generated PartialEq::ne

This commit is contained in:
Michael Chisolm 2022-07-20 00:26:50 -04:00
parent 0e7135615f
commit 1c32fcfeb4
No known key found for this signature in database
GPG key ID: E6E2A2D1AF130BF0
3 changed files with 33 additions and 1 deletions

View file

@ -354,6 +354,9 @@ pub mod cmp {
#[lang = "eq"]
pub trait PartialEq<Rhs: ?Sized = Self> {
fn eq(&self, other: &Rhs) -> bool;
fn ne(&self, other: &Rhs) -> bool {
!self.eq(other)
}
}
pub trait Eq: PartialEq<Self> {}