@@ -1813,8 +1813,6 @@ mod impls {
18131813 impl const PartialEq for $t {
18141814 #[ inline]
18151815 fn eq( & self , other: & Self ) -> bool { * self == * other }
1816- #[ inline]
1817- fn ne( & self , other: & Self ) -> bool { * self != * other }
18181816 }
18191817 ) * )
18201818 }
@@ -1825,10 +1823,6 @@ mod impls {
18251823 fn eq ( & self , _other : & ( ) ) -> bool {
18261824 true
18271825 }
1828- #[ inline]
1829- fn ne ( & self , _other : & ( ) ) -> bool {
1830- false
1831- }
18321826 }
18331827
18341828 partial_eq_impl ! {
@@ -2026,6 +2020,8 @@ mod impls {
20262020 fn eq ( & self , other : & & B ) -> bool {
20272021 PartialEq :: eq ( * self , * other)
20282022 }
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
20292025 #[ inline]
20302026 fn ne ( & self , other : & & B ) -> bool {
20312027 PartialEq :: ne ( * self , * other)
@@ -2098,6 +2094,8 @@ mod impls {
20982094 fn eq ( & self , other : & & mut B ) -> bool {
20992095 PartialEq :: eq ( * self , * other)
21002096 }
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
21012099 #[ inline]
21022100 fn ne ( & self , other : & & mut B ) -> bool {
21032101 PartialEq :: ne ( * self , * other)
@@ -2168,6 +2166,8 @@ mod impls {
21682166 fn eq ( & self , other : & & mut B ) -> bool {
21692167 PartialEq :: eq ( * self , * other)
21702168 }
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
21712171 #[ inline]
21722172 fn ne ( & self , other : & & mut B ) -> bool {
21732173 PartialEq :: ne ( * self , * other)
@@ -2184,6 +2184,8 @@ mod impls {
21842184 fn eq ( & self , other : & & B ) -> bool {
21852185 PartialEq :: eq ( * self , * other)
21862186 }
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
21872189 #[ inline]
21882190 fn ne ( & self , other : & & B ) -> bool {
21892191 PartialEq :: ne ( * self , * other)
0 commit comments