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