mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
75 lines
1.6 KiB
Plaintext
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
|
|
|