blob: d35e931697d211fcfbf6ea6ac742a47f22456b8e (
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
41
42
43
44
45
|
error: passing a unit value to a function
--> $DIR/unit_arg_empty_blocks.rs:16:5
|
LL | foo({});
| ^^^^--^
| |
| help: use a unit literal instead: `()`
|
= note: `-D clippy::unit-arg` implied by `-D warnings`
error: passing a unit value to a function
--> $DIR/unit_arg_empty_blocks.rs:17:5
|
LL | foo3({}, 2, 2);
| ^^^^^--^^^^^^^
| |
| help: use a unit literal instead: `()`
error: passing unit values to a function
--> $DIR/unit_arg_empty_blocks.rs:18:5
|
LL | taking_two_units({}, foo(0));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: move the expression in front of the call and replace it with the unit literal `()`
|
LL ~ foo(0);
LL ~ taking_two_units((), ());
|
error: passing unit values to a function
--> $DIR/unit_arg_empty_blocks.rs:19:5
|
LL | taking_three_units({}, foo(0), foo(1));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: move the expressions in front of the call and replace them with the unit literal `()`
|
LL ~ foo(0);
LL + foo(1);
LL ~ taking_three_units((), (), ());
|
error: aborting due to 4 previous errors
|