]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/unit_arg_empty_blocks.stderr
Merge commit 'da5a6fb1b65ec6581a67e942a3850f6bc15a552c' 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...
26    |
27 LL |     foo(0);
28    |
29 help: ...and use unit literals instead
30    |
31 LL |     taking_two_units((), ());
32    |                      ^^  ^^
33
34 error: passing unit values to a function
35   --> $DIR/unit_arg_empty_blocks.rs:18:5
36    |
37 LL |     taking_three_units({}, foo(0), foo(1));
38    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
39    |
40 help: move the expressions in front of the call...
41    |
42 LL |     foo(0);
43 LL |     foo(1);
44    |
45 help: ...and use unit literals instead
46    |
47 LL |     taking_three_units((), (), ());
48    |                        ^^  ^^  ^^
49
50 error: aborting due to 4 previous errors
51