@@ -1817,8 +1817,6 @@ mod impls {
1817
1817
impl const PartialEq for $t {
1818
1818
#[ inline]
1819
1819
fn eq( & self , other: & Self ) -> bool { * self == * other }
1820
- #[ inline]
1821
- fn ne( & self , other: & Self ) -> bool { * self != * other }
1822
1820
}
1823
1821
) * )
1824
1822
}
@@ -1829,10 +1827,6 @@ mod impls {
1829
1827
fn eq ( & self , _other : & ( ) ) -> bool {
1830
1828
true
1831
1829
}
1832
- #[ inline]
1833
- fn ne ( & self , _other : & ( ) ) -> bool {
1834
- false
1835
- }
1836
1830
}
1837
1831
1838
1832
partial_eq_impl ! {
@@ -2030,6 +2024,9 @@ mod impls {
2030
2024
fn eq ( & self , other : & & B ) -> bool {
2031
2025
PartialEq :: eq ( * self , * other)
2032
2026
}
2027
+ // if <A as PartialEq<B>>::ne uses inline assembly or FFI, then
2028
+ // this forwarding impl may be more efficient than the default impl
2029
+ #[ allow( partialeq_ne_impl) ]
2033
2030
#[ inline]
2034
2031
fn ne ( & self , other : & & B ) -> bool {
2035
2032
PartialEq :: ne ( * self , * other)
@@ -2102,6 +2099,9 @@ mod impls {
2102
2099
fn eq ( & self , other : & & mut B ) -> bool {
2103
2100
PartialEq :: eq ( * self , * other)
2104
2101
}
2102
+ // if <A as PartialEq<B>>::ne uses inline assembly or FFI, then
2103
+ // this forwarding impl may be more efficient than the default impl
2104
+ #[ allow( partialeq_ne_impl) ]
2105
2105
#[ inline]
2106
2106
fn ne ( & self , other : & & mut B ) -> bool {
2107
2107
PartialEq :: ne ( * self , * other)
@@ -2172,6 +2172,9 @@ mod impls {
2172
2172
fn eq ( & self , other : & & mut B ) -> bool {
2173
2173
PartialEq :: eq ( * self , * other)
2174
2174
}
2175
+ // if <A as PartialEq<B>>::ne uses inline assembly or FFI, then
2176
+ // this forwarding impl may be more efficient than the default impl
2177
+ #[ allow( partialeq_ne_impl) ]
2175
2178
#[ inline]
2176
2179
fn ne ( & self , other : & & mut B ) -> bool {
2177
2180
PartialEq :: ne ( * self , * other)
@@ -2188,6 +2191,9 @@ mod impls {
2188
2191
fn eq ( & self , other : & & B ) -> bool {
2189
2192
PartialEq :: eq ( * self , * other)
2190
2193
}
2194
+ // if <A as PartialEq<B>>::ne uses inline assembly or FFI, then
2195
+ // this forwarding impl may be more efficient than the default impl
2196
+ #[ allow( partialeq_ne_impl) ]
2191
2197
#[ inline]
2192
2198
fn ne ( & self , other : & & B ) -> bool {
2193
2199
PartialEq :: ne ( * self , * other)
0 commit comments