]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/unit_arg.stderr
Add 'src/tools/clippy/' from commit 'd2708873ef711ec8ab45df1e984ecf24a96cd369'
[rust.git] / src / tools / clippy / tests / ui / unit_arg.stderr
1 error: passing a unit value to a function
2   --> $DIR/unit_arg.rs:24:9
3    |
4 LL |     foo({});
5    |         ^^
6    |
7    = note: `-D clippy::unit-arg` implied by `-D warnings`
8 help: if you intended to pass a unit value, use a unit literal instead
9    |
10 LL |     foo(());
11    |         ^^
12
13 error: passing a unit value to a function
14   --> $DIR/unit_arg.rs:25:9
15    |
16 LL |       foo({
17    |  _________^
18 LL | |         1;
19 LL | |     });
20    | |_____^
21    |
22 help: if you intended to pass a unit value, use a unit literal instead
23    |
24 LL |     foo(());
25    |         ^^
26
27 error: passing a unit value to a function
28   --> $DIR/unit_arg.rs:28:9
29    |
30 LL |     foo(foo(1));
31    |         ^^^^^^
32    |
33 help: if you intended to pass a unit value, use a unit literal instead
34    |
35 LL |     foo(());
36    |         ^^
37
38 error: passing a unit value to a function
39   --> $DIR/unit_arg.rs:29:9
40    |
41 LL |       foo({
42    |  _________^
43 LL | |         foo(1);
44 LL | |         foo(2);
45 LL | |     });
46    | |_____^
47    |
48 help: if you intended to pass a unit value, use a unit literal instead
49    |
50 LL |     foo(());
51    |         ^^
52
53 error: passing a unit value to a function
54   --> $DIR/unit_arg.rs:33:10
55    |
56 LL |     foo3({}, 2, 2);
57    |          ^^
58    |
59 help: if you intended to pass a unit value, use a unit literal instead
60    |
61 LL |     foo3((), 2, 2);
62    |          ^^
63
64 error: passing a unit value to a function
65   --> $DIR/unit_arg.rs:35:11
66    |
67 LL |       b.bar({
68    |  ___________^
69 LL | |         1;
70 LL | |     });
71    | |_____^
72    |
73 help: if you intended to pass a unit value, use a unit literal instead
74    |
75 LL |     b.bar(());
76    |           ^^
77
78 error: aborting due to 6 previous errors
79