11error: non-canonical implementation of `partial_cmp` on an `Ord` type
2- --> tests/ui/non_canonical_partial_ord_impl.rs:16 :1
2+ --> tests/ui/non_canonical_partial_ord_impl.rs:20 :1
33 |
44LL | / impl PartialOrd for A {
55LL | |
@@ -15,7 +15,7 @@ LL | | }
1515 = help: to override `-D warnings` add `#[allow(clippy::non_canonical_partial_ord_impl)]`
1616
1717error: non-canonical implementation of `partial_cmp` on an `Ord` type
18- --> tests/ui/non_canonical_partial_ord_impl.rs:51 :1
18+ --> tests/ui/non_canonical_partial_ord_impl.rs:55 :1
1919 |
2020LL | / impl PartialOrd for C {
2121LL | |
@@ -32,7 +32,22 @@ LL + fn partial_cmp(&self, other: &Self) -> Option<Ordering> { Some(self.cmp
3232 |
3333
3434error: non-canonical implementation of `partial_cmp` on an `Ord` type
35- --> tests/ui/non_canonical_partial_ord_impl.rs:198:1
35+ --> tests/ui/non_canonical_partial_ord_impl.rs:191:9
36+ |
37+ LL | / impl PartialOrd for A {
38+ LL | |
39+ LL | | fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
40+ | | _____________________________________________________________________-
41+ LL | || todo!();
42+ LL | || }
43+ | ||_____________- help: change this to: `{ Some(self.cmp(other)) }`
44+ LL | | }
45+ | |__________^
46+ |
47+ = note: this error originates in the macro `__inline_mac_mod_issue12788` (in Nightly builds, run with -Z macro-backtrace for more info)
48+
49+ error: non-canonical implementation of `partial_cmp` on an `Ord` type
50+ --> tests/ui/non_canonical_partial_ord_impl.rs:271:1
3651 |
3752LL | / impl PartialOrd for K {
3853LL | |
@@ -45,7 +60,7 @@ LL | | }
4560 | |__^
4661
4762error: non-canonical implementation of `partial_cmp` on an `Ord` type
48- --> tests/ui/non_canonical_partial_ord_impl.rs:216 :1
63+ --> tests/ui/non_canonical_partial_ord_impl.rs:289 :1
4964 |
5065LL | / impl PartialOrd for L {
5166LL | |
@@ -57,5 +72,5 @@ LL | || }
5772LL | | }
5873 | |__^
5974
60- error: aborting due to 4 previous errors
75+ error: aborting due to 5 previous errors
6176
0 commit comments