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