]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/unit_arg_empty_blocks.stderr
Merge commit '5034d47f721ff4c3a3ff2aca9ef2ef3e1d067f9f' into clippyup
[rust.git] / src / tools / clippy / tests / ui / unit_arg_empty_blocks.stderr
1 error: passing a unit value to a function
2   --> $DIR/unit_arg_empty_blocks.rs:15:5
3    |
4 LL |     foo({});
5    |     ^^^^--^
6    |         |
7    |         help: use a unit literal instead: `()`
8    |
9    = note: `-D clippy::unit-arg` implied by `-D warnings`
10
11 error: passing a unit value to a function
12   --> $DIR/unit_arg_empty_blocks.rs:16:5
13    |
14 LL |     foo3({}, 2, 2);
15    |     ^^^^^--^^^^^^^
16    |          |
17    |          help: use a unit literal instead: `()`
18
19 error: passing unit values to a function
20   --> $DIR/unit_arg_empty_blocks.rs:17:5
21    |
22 LL |     taking_two_units({}, foo(0));
23    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24    |
25 help: move the expression in front of the call and replace it with the unit literal `()`
26    |
27 LL |     foo(0);
28 LL |     taking_two_units((), ());
29    |
30
31 error: passing unit values to a function
32   --> $DIR/unit_arg_empty_blocks.rs:18:5
33    |
34 LL |     taking_three_units({}, foo(0), foo(1));
35    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
36    |
37 help: move the expressions in front of the call and replace them with the unit literal `()`
38    |
39 LL |     foo(0);
40 LL |     foo(1);
41 LL |     taking_three_units((), (), ());
42    |
43
44 error: aborting due to 4 previous errors
45