mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-18 09:03:18 +00:00
74 lines
1.6 KiB
Text
74 lines
1.6 KiB
Text
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
|
|
|