@@ -72,7 +72,7 @@ impl ::core::cmp::PartialOrd for Empty {
7272 #[inline]
7373 fn partial_cmp(&self, other: &Empty)
7474 -> ::core::option::Option<::core::cmp::Ordering> {
75- ::core::option::Option::Some(self. cmp( other))
75+ ::core::option::Option::Some(::core:: cmp::Ord::cmp(self, other))
7676 }
7777}
7878#[automatically_derived]
@@ -151,7 +151,7 @@ impl ::core::cmp::PartialOrd for Point {
151151 #[inline]
152152 fn partial_cmp(&self, other: &Point)
153153 -> ::core::option::Option<::core::cmp::Ordering> {
154- ::core::option::Option::Some(self. cmp( other))
154+ ::core::option::Option::Some(::core:: cmp::Ord::cmp(self, other))
155155 }
156156}
157157#[automatically_derived]
@@ -235,7 +235,7 @@ impl ::core::cmp::PartialOrd for PackedPoint {
235235 #[inline]
236236 fn partial_cmp(&self, other: &PackedPoint)
237237 -> ::core::option::Option<::core::cmp::Ordering> {
238- ::core::option::Option::Some(self. cmp( other))
238+ ::core::option::Option::Some(::core:: cmp::Ord::cmp(self, other))
239239 }
240240}
241241#[automatically_derived]
@@ -312,7 +312,7 @@ impl ::core::cmp::PartialOrd for TupleSingleField {
312312 #[inline]
313313 fn partial_cmp(&self, other: &TupleSingleField)
314314 -> ::core::option::Option<::core::cmp::Ordering> {
315- ::core::option::Option::Some(self. cmp( other))
315+ ::core::option::Option::Some(::core:: cmp::Ord::cmp(self, other))
316316 }
317317}
318318#[automatically_derived]
@@ -387,7 +387,7 @@ impl ::core::cmp::PartialOrd for SingleField {
387387 #[inline]
388388 fn partial_cmp(&self, other: &SingleField)
389389 -> ::core::option::Option<::core::cmp::Ordering> {
390- ::core::option::Option::Some(self. cmp( other))
390+ ::core::option::Option::Some(::core:: cmp::Ord::cmp(self, other))
391391 }
392392}
393393#[automatically_derived]
@@ -492,7 +492,7 @@ impl ::core::cmp::PartialOrd for Big {
492492 #[inline]
493493 fn partial_cmp(&self, other: &Big)
494494 -> ::core::option::Option<::core::cmp::Ordering> {
495- ::core::option::Option::Some(self. cmp( other))
495+ ::core::option::Option::Some(::core:: cmp::Ord::cmp(self, other))
496496 }
497497}
498498#[automatically_derived]
@@ -716,7 +716,7 @@ impl ::core::cmp::PartialOrd for Unsized {
716716 #[inline]
717717 fn partial_cmp(&self, other: &Unsized)
718718 -> ::core::option::Option<::core::cmp::Ordering> {
719- ::core::option::Option::Some(self. cmp( other))
719+ ::core::option::Option::Some(::core:: cmp::Ord::cmp(self, other))
720720 }
721721}
722722#[automatically_derived]
@@ -1016,7 +1016,7 @@ impl ::core::cmp::PartialOrd for Enum0 {
10161016 #[inline]
10171017 fn partial_cmp(&self, other: &Enum0)
10181018 -> ::core::option::Option<::core::cmp::Ordering> {
1019- ::core::option::Option::Some(self. cmp( other))
1019+ ::core::option::Option::Some(::core:: cmp::Ord::cmp(self, other))
10201020 }
10211021}
10221022#[automatically_derived]
@@ -1088,7 +1088,7 @@ impl ::core::cmp::PartialOrd for Enum1 {
10881088 #[inline]
10891089 fn partial_cmp(&self, other: &Enum1)
10901090 -> ::core::option::Option<::core::cmp::Ordering> {
1091- ::core::option::Option::Some(self. cmp( other))
1091+ ::core::option::Option::Some(::core:: cmp::Ord::cmp(self, other))
10921092 }
10931093}
10941094#[automatically_derived]
@@ -1149,7 +1149,7 @@ impl ::core::cmp::PartialOrd for Fieldless1 {
11491149 #[inline]
11501150 fn partial_cmp(&self, other: &Fieldless1)
11511151 -> ::core::option::Option<::core::cmp::Ordering> {
1152- ::core::option::Option::Some(self. cmp( other))
1152+ ::core::option::Option::Some(::core:: cmp::Ord::cmp(self, other))
11531153 }
11541154}
11551155#[automatically_derived]
@@ -1226,7 +1226,7 @@ impl ::core::cmp::PartialOrd for Fieldless {
12261226 #[inline]
12271227 fn partial_cmp(&self, other: &Fieldless)
12281228 -> ::core::option::Option<::core::cmp::Ordering> {
1229- ::core::option::Option::Some(self. cmp( other))
1229+ ::core::option::Option::Some(::core:: cmp::Ord::cmp(self, other))
12301230 }
12311231}
12321232#[automatically_derived]
@@ -1338,7 +1338,7 @@ impl ::core::cmp::PartialOrd for Mixed {
13381338 #[inline]
13391339 fn partial_cmp(&self, other: &Mixed)
13401340 -> ::core::option::Option<::core::cmp::Ordering> {
1341- ::core::option::Option::Some(self. cmp( other))
1341+ ::core::option::Option::Some(::core:: cmp::Ord::cmp(self, other))
13421342 }
13431343}
13441344#[automatically_derived]
@@ -1520,7 +1520,7 @@ impl ::core::cmp::PartialOrd for Fielded {
15201520 #[inline]
15211521 fn partial_cmp(&self, other: &Fielded)
15221522 -> ::core::option::Option<::core::cmp::Ordering> {
1523- ::core::option::Option::Some(self. cmp( other))
1523+ ::core::option::Option::Some(::core:: cmp::Ord::cmp(self, other))
15241524 }
15251525}
15261526#[automatically_derived]
@@ -1766,3 +1766,89 @@ impl ::core::clone::Clone for FooCloneAndCopy {
17661766 FooCloneAndCopy(::core::clone::Clone::clone(&self.0))
17671767 }
17681768}
1769+
1770+ struct FooPartialOrdOrd(i32);
1771+ #[automatically_derived]
1772+ impl ::core::cmp::PartialOrd for FooPartialOrdOrd {
1773+ #[inline]
1774+ fn partial_cmp(&self, other: &FooPartialOrdOrd)
1775+ -> ::core::option::Option<::core::cmp::Ordering> {
1776+ ::core::option::Option::Some(::core::cmp::Ord::cmp(self, other))
1777+ }
1778+ }
1779+ #[automatically_derived]
1780+ impl ::core::cmp::Ord for FooPartialOrdOrd {
1781+ #[inline]
1782+ fn cmp(&self, other: &FooPartialOrdOrd) -> ::core::cmp::Ordering {
1783+ ::core::cmp::Ord::cmp(&self.0, &other.0)
1784+ }
1785+ }
1786+
1787+ struct FooOrdPartialOrd(i32);
1788+ #[automatically_derived]
1789+ impl ::core::cmp::Ord for FooOrdPartialOrd {
1790+ #[inline]
1791+ fn cmp(&self, other: &FooOrdPartialOrd) -> ::core::cmp::Ordering {
1792+ ::core::cmp::Ord::cmp(&self.0, &other.0)
1793+ }
1794+ }
1795+ #[automatically_derived]
1796+ impl ::core::cmp::PartialOrd for FooOrdPartialOrd {
1797+ #[inline]
1798+ fn partial_cmp(&self, other: &FooOrdPartialOrd)
1799+ -> ::core::option::Option<::core::cmp::Ordering> {
1800+ ::core::option::Option::Some(::core::cmp::Ord::cmp(self, other))
1801+ }
1802+ }
1803+
1804+ struct FooOrdBeforePartialOrd(i32);
1805+ #[automatically_derived]
1806+ impl ::core::cmp::PartialOrd for FooOrdBeforePartialOrd {
1807+ #[inline]
1808+ fn partial_cmp(&self, other: &FooOrdBeforePartialOrd)
1809+ -> ::core::option::Option<::core::cmp::Ordering> {
1810+ ::core::option::Option::Some(::core::cmp::Ord::cmp(self, other))
1811+ }
1812+ }
1813+ #[automatically_derived]
1814+ impl ::core::cmp::Ord for FooOrdBeforePartialOrd {
1815+ #[inline]
1816+ fn cmp(&self, other: &FooOrdBeforePartialOrd) -> ::core::cmp::Ordering {
1817+ ::core::cmp::Ord::cmp(&self.0, &other.0)
1818+ }
1819+ }
1820+
1821+ // FIXME: this case should also have a trivial `PartialOrd` impl.
1822+ struct FooPartialOrdBeforeOrd(i32);
1823+ #[automatically_derived]
1824+ impl ::core::cmp::Ord for FooPartialOrdBeforeOrd {
1825+ #[inline]
1826+ fn cmp(&self, other: &FooPartialOrdBeforeOrd) -> ::core::cmp::Ordering {
1827+ ::core::cmp::Ord::cmp(&self.0, &other.0)
1828+ }
1829+ }
1830+ #[automatically_derived]
1831+ impl ::core::cmp::PartialOrd for FooPartialOrdBeforeOrd {
1832+ #[inline]
1833+ fn partial_cmp(&self, other: &FooPartialOrdBeforeOrd)
1834+ -> ::core::option::Option<::core::cmp::Ordering> {
1835+ ::core::cmp::PartialOrd::partial_cmp(&self.0, &other.0)
1836+ }
1837+ }
1838+
1839+ struct UnitStruct;
1840+ #[automatically_derived]
1841+ impl ::core::cmp::PartialOrd for UnitStruct {
1842+ #[inline]
1843+ fn partial_cmp(&self, other: &UnitStruct)
1844+ -> ::core::option::Option<::core::cmp::Ordering> {
1845+ ::core::option::Option::Some(::core::cmp::Ord::cmp(self, other))
1846+ }
1847+ }
1848+ #[automatically_derived]
1849+ impl ::core::cmp::Ord for UnitStruct {
1850+ #[inline]
1851+ fn cmp(&self, other: &UnitStruct) -> ::core::cmp::Ordering {
1852+ ::core::cmp::Ordering::Equal
1853+ }
1854+ }
0 commit comments