rust/tests/ui/unit_arg.stderr
2018-12-10 08:22:07 +01:00

75 lines
1.6 KiB
Plaintext

error: passing a unit value to a function
--> $DIR/unit_arg.rs:32:9
|
32 | foo({});
| ^^
|
= note: `-D clippy::unit-arg` implied by `-D warnings`
help: if you intended to pass a unit value, use a unit literal instead
|
32 | foo(());
| ^^
error: passing a unit value to a function
--> $DIR/unit_arg.rs:33:9
|
33 | foo({
| _________^
34 | | 1;
35 | | });
| |_____^
help: if you intended to pass a unit value, use a unit literal instead
|
33 | foo(());
| ^^
error: passing a unit value to a function
--> $DIR/unit_arg.rs:36:9
|
36 | foo(foo(1));
| ^^^^^^
help: if you intended to pass a unit value, use a unit literal instead
|
36 | foo(());
| ^^
error: passing a unit value to a function
--> $DIR/unit_arg.rs:37:9
|
37 | foo({
| _________^
38 | | foo(1);
39 | | foo(2);
40 | | });
| |_____^
help: if you intended to pass a unit value, use a unit literal instead
|
37 | foo(());
| ^^
error: passing a unit value to a function
--> $DIR/unit_arg.rs:41:10
|
41 | foo3({}, 2, 2);
| ^^
help: if you intended to pass a unit value, use a unit literal instead
|
41 | foo3((), 2, 2);
| ^^
error: passing a unit value to a function
--> $DIR/unit_arg.rs:43:11
|
43 | b.bar({
| ___________^
44 | | 1;
45 | | });
| |_____^
help: if you intended to pass a unit value, use a unit literal instead
|
43 | b.bar(());
| ^^
error: aborting due to 6 previous errors