blob: 9220fb89e901e364d7901b4ba007a907411c525e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
error: this closure returns the unit type which also implements Ord
--> $DIR/unit_return_expecting_ord.rs:19:25
|
LL | structs.sort_by_key(|s| {
| ^^^
|
help: probably caused by this trailing semicolon
--> $DIR/unit_return_expecting_ord.rs:21:24
|
LL | double(s.field);
| ^
= note: `-D clippy::unit-return-expecting-ord` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::unit_return_expecting_ord)]`
error: this closure returns the unit type which also implements PartialOrd
--> $DIR/unit_return_expecting_ord.rs:24:30
|
LL | structs.is_sorted_by_key(|s| {
| ^^^
|
help: probably caused by this trailing semicolon
--> $DIR/unit_return_expecting_ord.rs:26:24
|
LL | double(s.field);
| ^
error: this closure returns the unit type which also implements PartialOrd
--> $DIR/unit_return_expecting_ord.rs:28:30
|
LL | structs.is_sorted_by_key(|s| {
| ^^^
error: this closure returns the unit type which also implements Ord
--> $DIR/unit_return_expecting_ord.rs:39:25
|
LL | structs.sort_by_key(|s| unit(s.field));
| ^^^
error: aborting due to 4 previous errors
|