mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Fix generated PartialEq::ne
This commit is contained in:
parent
0e7135615f
commit
1c32fcfeb4
3 changed files with 33 additions and 1 deletions
|
@ -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> {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue