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