Rollup merge of #108660 - xfix:remove-ne-method-from-str, r=thomcc

Remove ne implementations from strings

As far as I can tell, there isn't really a reason for those.
This commit is contained in:
Dylan DPC 2023-03-04 15:24:39 +05:30 committed by GitHub
commit e700d02374
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 8 deletions

View File

@ -2213,10 +2213,6 @@ impl PartialEq for String {
fn eq(&self, other: &String) -> bool {
PartialEq::eq(&self[..], &other[..])
}
#[inline]
fn ne(&self, other: &String) -> bool {
PartialEq::ne(&self[..], &other[..])
}
}
macro_rules! impl_eq {

View File

@ -28,10 +28,6 @@ impl PartialEq for str {
fn eq(&self, other: &str) -> bool {
self.as_bytes() == other.as_bytes()
}
#[inline]
fn ne(&self, other: &str) -> bool {
!(*self).eq(other)
}
}
#[stable(feature = "rust1", since = "1.0.0")]