@@ -1813,8 +1813,6 @@ mod impls {
1813
1813
impl const PartialEq for $t {
1814
1814
#[ inline]
1815
1815
fn eq( & self , other: & Self ) -> bool { * self == * other }
1816
- #[ inline]
1817
- fn ne( & self , other: & Self ) -> bool { * self != * other }
1818
1816
}
1819
1817
) * )
1820
1818
}
@@ -1825,10 +1823,6 @@ mod impls {
1825
1823
fn eq ( & self , _other : & ( ) ) -> bool {
1826
1824
true
1827
1825
}
1828
- #[ inline]
1829
- fn ne ( & self , _other : & ( ) ) -> bool {
1830
- false
1831
- }
1832
1826
}
1833
1827
1834
1828
partial_eq_impl ! {
@@ -2026,6 +2020,8 @@ mod impls {
2026
2020
fn eq ( & self , other : & & B ) -> bool {
2027
2021
PartialEq :: eq ( * self , * other)
2028
2022
}
2023
+ // if <A as PartialEq<B>>::ne uses inline assembly or FFI, then
2024
+ // this forwarding impl may be more efficient than the default impl
2029
2025
#[ inline]
2030
2026
fn ne ( & self , other : & & B ) -> bool {
2031
2027
PartialEq :: ne ( * self , * other)
@@ -2098,6 +2094,8 @@ mod impls {
2098
2094
fn eq ( & self , other : & & mut B ) -> bool {
2099
2095
PartialEq :: eq ( * self , * other)
2100
2096
}
2097
+ // if <A as PartialEq<B>>::ne uses inline assembly or FFI, then
2098
+ // this forwarding impl may be more efficient than the default impl
2101
2099
#[ inline]
2102
2100
fn ne ( & self , other : & & mut B ) -> bool {
2103
2101
PartialEq :: ne ( * self , * other)
@@ -2168,6 +2166,8 @@ mod impls {
2168
2166
fn eq ( & self , other : & & mut B ) -> bool {
2169
2167
PartialEq :: eq ( * self , * other)
2170
2168
}
2169
+ // if <A as PartialEq<B>>::ne uses inline assembly or FFI, then
2170
+ // this forwarding impl may be more efficient than the default impl
2171
2171
#[ inline]
2172
2172
fn ne ( & self , other : & & mut B ) -> bool {
2173
2173
PartialEq :: ne ( * self , * other)
@@ -2184,6 +2184,8 @@ mod impls {
2184
2184
fn eq ( & self , other : & & B ) -> bool {
2185
2185
PartialEq :: eq ( * self , * other)
2186
2186
}
2187
+ // if <A as PartialEq<B>>::ne uses inline assembly or FFI, then
2188
+ // this forwarding impl may be more efficient than the default impl
2187
2189
#[ inline]
2188
2190
fn ne ( & self , other : & & B ) -> bool {
2189
2191
PartialEq :: ne ( * self , * other)
0 commit comments