X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=library%2Falloc%2Fsrc%2Fstring.rs;fp=library%2Falloc%2Fsrc%2Fstring.rs;h=be41919b9dc23b351b6b400c106d0755ad56f5e7;hb=e83d0c4048c901374302ef8d1eefbeb1aef6c87d;hp=c7e7ed3e95e0282358297ecbeb10d5a371158024;hpb=1812ffc342b212016a5bec5bb390dc09c217f18f;p=rustc.git diff --git a/library/alloc/src/string.rs b/library/alloc/src/string.rs index c7e7ed3e95..be41919b9d 100644 --- a/library/alloc/src/string.rs +++ b/library/alloc/src/string.rs @@ -45,9 +45,9 @@ use core::error::Error; use core::fmt; use core::hash; -use core::iter::FusedIterator; #[cfg(not(no_global_oom_handling))] -use core::iter::{from_fn, FromIterator}; +use core::iter::from_fn; +use core::iter::FusedIterator; #[cfg(not(no_global_oom_handling))] use core::ops::Add; #[cfg(not(no_global_oom_handling))] @@ -359,7 +359,7 @@ use crate::vec::Vec; /// [Deref]: core::ops::Deref "ops::Deref" /// [`Deref`]: core::ops::Deref "ops::Deref" /// [`as_str()`]: String::as_str -#[derive(PartialOrd, Eq, Ord)] +#[derive(PartialEq, PartialOrd, Eq, Ord)] #[stable(feature = "rust1", since = "1.0.0")] #[cfg_attr(not(test), lang = "String")] pub struct String { @@ -2207,14 +2207,6 @@ impl<'a, 'b> Pattern<'a> for &'b String { } } -#[stable(feature = "rust1", since = "1.0.0")] -impl PartialEq for String { - #[inline] - fn eq(&self, other: &String) -> bool { - PartialEq::eq(&self[..], &other[..]) - } -} - macro_rules! impl_eq { ($lhs:ty, $rhs: ty) => { #[stable(feature = "rust1", since = "1.0.0")]