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