]> git.lizzy.rs Git - rust.git/blob - tests/ui/unit_arg.stderr
Auto merge of #3646 - matthiaskrgr:travis, r=phansch
[rust.git] / tests / ui / unit_arg.stderr
1 error: passing a unit value to a function
2   --> $DIR/unit_arg.rs:23: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:24:9
15    |
16 LL |       foo({
17    |  _________^
18 LL | |         1;
19 LL | |     });
20    | |_____^
21 help: if you intended to pass a unit value, use a unit literal instead
22    |
23 LL |     foo(());
24    |         ^^
25
26 error: passing a unit value to a function
27   --> $DIR/unit_arg.rs:27:9
28    |
29 LL |     foo(foo(1));
30    |         ^^^^^^
31 help: if you intended to pass a unit value, use a unit literal instead
32    |
33 LL |     foo(());
34    |         ^^
35
36 error: passing a unit value to a function
37   --> $DIR/unit_arg.rs:28:9
38    |
39 LL |       foo({
40    |  _________^
41 LL | |         foo(1);
42 LL | |         foo(2);
43 LL | |     });
44    | |_____^
45 help: if you intended to pass a unit value, use a unit literal instead
46    |
47 LL |     foo(());
48    |         ^^
49
50 error: passing a unit value to a function
51   --> $DIR/unit_arg.rs:32:10
52    |
53 LL |     foo3({}, 2, 2);
54    |          ^^
55 help: if you intended to pass a unit value, use a unit literal instead
56    |
57 LL |     foo3((), 2, 2);
58    |          ^^
59
60 error: passing a unit value to a function
61   --> $DIR/unit_arg.rs:34:11
62    |
63 LL |       b.bar({
64    |  ___________^
65 LL | |         1;
66 LL | |     });
67    | |_____^
68 help: if you intended to pass a unit value, use a unit literal instead
69    |
70 LL |     b.bar(());
71    |           ^^
72
73 error: aborting due to 6 previous errors
74