@@ -1861,8 +1861,6 @@ mod impls {
18611861 impl const PartialEq for $t {
18621862 #[ inline]
18631863 fn eq( & self , other: & Self ) -> bool { * self == * other }
1864- #[ inline]
1865- fn ne( & self , other: & Self ) -> bool { * self != * other }
18661864 }
18671865 ) * )
18681866 }
@@ -1874,10 +1872,6 @@ mod impls {
18741872 fn eq( & self , _other: & ( ) ) -> bool {
18751873 true
18761874 }
1877- #[ inline]
1878- fn ne( & self , _other: & ( ) ) -> bool {
1879- false
1880- }
18811875 }
18821876
18831877 partial_eq_impl! {
@@ -2087,6 +2081,8 @@ mod impls {
20872081 fn eq( & self , other: &&B ) -> bool {
20882082 PartialEq :: eq( * self , * other)
20892083 }
2084+ // if <A as PartialEq<B>>::ne uses inline assembly or FFI, then
2085+ // this forwarding impl may be more efficient than the default impl
20902086 #[ inline]
20912087 fn ne( & self , other: &&B ) -> bool {
20922088 PartialEq :: ne( * self , * other)
@@ -2162,6 +2158,8 @@ mod impls {
21622158 fn eq( & self , other: &&mut B ) -> bool {
21632159 PartialEq :: eq( * self , * other)
21642160 }
2161+ // if <A as PartialEq<B>>::ne uses inline assembly or FFI, then
2162+ // this forwarding impl may be more efficient than the default impl
21652163 #[ inline]
21662164 fn ne( & self , other: &&mut B ) -> bool {
21672165 PartialEq :: ne( * self , * other)
@@ -2235,6 +2233,8 @@ mod impls {
22352233 fn eq( & self , other: &&mut B ) -> bool {
22362234 PartialEq :: eq( * self , * other)
22372235 }
2236+ // if <A as PartialEq<B>>::ne uses inline assembly or FFI, then
2237+ // this forwarding impl may be more efficient than the default impl
22382238 #[ inline]
22392239 fn ne( & self , other: &&mut B ) -> bool {
22402240 PartialEq :: ne( * self , * other)
@@ -2251,6 +2251,8 @@ mod impls {
22512251 fn eq( & self , other: &&B ) -> bool {
22522252 PartialEq :: eq( * self , * other)
22532253 }
2254+ // if <A as PartialEq<B>>::ne uses inline assembly or FFI, then
2255+ // this forwarding impl may be more efficient than the default impl
22542256 #[ inline]
22552257 fn ne( & self , other: &&B ) -> bool {
22562258 PartialEq :: ne( * self , * other)
0 commit comments