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