@@ -963,15 +963,15 @@ impl PartialEq for String {
963
963
macro_rules! impl_eq {
964
964
( $lhs: ty, $rhs: ty) => {
965
965
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
966
- impl <' a> PartialEq <$rhs> for $lhs {
966
+ impl <' a, ' b > PartialEq <$rhs> for $lhs {
967
967
#[ inline]
968
968
fn eq( & self , other: & $rhs) -> bool { PartialEq :: eq( & self [ ..] , & other[ ..] ) }
969
969
#[ inline]
970
970
fn ne( & self , other: & $rhs) -> bool { PartialEq :: ne( & self [ ..] , & other[ ..] ) }
971
971
}
972
972
973
973
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
974
- impl <' a> PartialEq <$lhs> for $rhs {
974
+ impl <' a, ' b > PartialEq <$lhs> for $rhs {
975
975
#[ inline]
976
976
fn eq( & self , other: & $lhs) -> bool { PartialEq :: eq( & self [ ..] , & other[ ..] ) }
977
977
#[ inline]
@@ -984,24 +984,9 @@ macro_rules! impl_eq {
984
984
impl_eq ! { String , str }
985
985
impl_eq ! { String , & ' a str }
986
986
impl_eq ! { Cow <' a, str >, str }
987
+ impl_eq ! { Cow <' a, str >, & ' b str }
987
988
impl_eq ! { Cow <' a, str >, String }
988
989
989
- #[ stable( feature = "rust1" , since = "1.0.0" ) ]
990
- impl < ' a , ' b > PartialEq < & ' b str > for Cow < ' a , str > {
991
- #[ inline]
992
- fn eq ( & self , other : & & ' b str ) -> bool { PartialEq :: eq ( & self [ ..] , & other[ ..] ) }
993
- #[ inline]
994
- fn ne ( & self , other : & & ' b str ) -> bool { PartialEq :: ne ( & self [ ..] , & other[ ..] ) }
995
- }
996
-
997
- #[ stable( feature = "rust1" , since = "1.0.0" ) ]
998
- impl < ' a , ' b > PartialEq < Cow < ' a , str > > for & ' b str {
999
- #[ inline]
1000
- fn eq ( & self , other : & Cow < ' a , str > ) -> bool { PartialEq :: eq ( & self [ ..] , & other[ ..] ) }
1001
- #[ inline]
1002
- fn ne ( & self , other : & Cow < ' a , str > ) -> bool { PartialEq :: ne ( & self [ ..] , & other[ ..] ) }
1003
- }
1004
-
1005
990
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1006
991
impl Default for String {
1007
992
#[ inline]
0 commit comments