1
1
error: 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
3
3
|
4
4
LL | / impl PartialOrd for A {
5
5
LL | |
@@ -15,7 +15,7 @@ LL | | }
15
15
= help: to override `-D warnings` add `#[allow(clippy::non_canonical_partial_ord_impl)]`
16
16
17
17
error: 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
19
19
|
20
20
LL | / impl PartialOrd for C {
21
21
LL | |
@@ -32,7 +32,22 @@ LL + fn partial_cmp(&self, other: &Self) -> Option<Ordering> { Some(self.cmp
32
32
|
33
33
34
34
error: 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
36
51
|
37
52
LL | / impl PartialOrd for K {
38
53
LL | |
@@ -45,7 +60,7 @@ LL | | }
45
60
| |__^
46
61
47
62
error: 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
49
64
|
50
65
LL | / impl PartialOrd for L {
51
66
LL | |
@@ -57,5 +72,5 @@ LL | || }
57
72
LL | | }
58
73
| |__^
59
74
60
- error: aborting due to 4 previous errors
75
+ error: aborting due to 5 previous errors
61
76
0 commit comments