@@ -1824,8 +1824,6 @@ mod impls {
1824
1824
impl const PartialEq for $t {
1825
1825
#[ inline]
1826
1826
fn eq( & self , other: & Self ) -> bool { * self == * other }
1827
- #[ inline]
1828
- fn ne( & self , other: & Self ) -> bool { * self != * other }
1829
1827
}
1830
1828
) * )
1831
1829
}
@@ -1836,10 +1834,6 @@ mod impls {
1836
1834
fn eq ( & self , _other : & ( ) ) -> bool {
1837
1835
true
1838
1836
}
1839
- #[ inline]
1840
- fn ne ( & self , _other : & ( ) ) -> bool {
1841
- false
1842
- }
1843
1837
}
1844
1838
1845
1839
partial_eq_impl ! {
@@ -2037,6 +2031,8 @@ mod impls {
2037
2031
fn eq ( & self , other : & & B ) -> bool {
2038
2032
PartialEq :: eq ( * self , * other)
2039
2033
}
2034
+ // if <A as PartialEq<B>>::ne uses inline assembly or FFI, then
2035
+ // this forwarding impl may be more efficient than the default impl
2040
2036
#[ inline]
2041
2037
fn ne ( & self , other : & & B ) -> bool {
2042
2038
PartialEq :: ne ( * self , * other)
@@ -2109,6 +2105,8 @@ mod impls {
2109
2105
fn eq ( & self , other : & & mut B ) -> bool {
2110
2106
PartialEq :: eq ( * self , * other)
2111
2107
}
2108
+ // if <A as PartialEq<B>>::ne uses inline assembly or FFI, then
2109
+ // this forwarding impl may be more efficient than the default impl
2112
2110
#[ inline]
2113
2111
fn ne ( & self , other : & & mut B ) -> bool {
2114
2112
PartialEq :: ne ( * self , * other)
@@ -2179,6 +2177,8 @@ mod impls {
2179
2177
fn eq ( & self , other : & & mut B ) -> bool {
2180
2178
PartialEq :: eq ( * self , * other)
2181
2179
}
2180
+ // if <A as PartialEq<B>>::ne uses inline assembly or FFI, then
2181
+ // this forwarding impl may be more efficient than the default impl
2182
2182
#[ inline]
2183
2183
fn ne ( & self , other : & & mut B ) -> bool {
2184
2184
PartialEq :: ne ( * self , * other)
@@ -2195,6 +2195,8 @@ mod impls {
2195
2195
fn eq ( & self , other : & & B ) -> bool {
2196
2196
PartialEq :: eq ( * self , * other)
2197
2197
}
2198
+ // if <A as PartialEq<B>>::ne uses inline assembly or FFI, then
2199
+ // this forwarding impl may be more efficient than the default impl
2198
2200
#[ inline]
2199
2201
fn ne ( & self , other : & & B ) -> bool {
2200
2202
PartialEq :: ne ( * self , * other)
0 commit comments