2018-01-18 23:02:18 +01:00
|
|
|
error: passing a unit value to a function
|
2018-08-01 16:30:44 +02:00
|
|
|
--> $DIR/unit_arg.rs:25:9
|
2018-01-18 23:02:18 +01:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
25 | foo({});
|
2018-01-18 23:02:18 +01:00
|
|
|
| ^^
|
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
= note: `-D clippy::unit-arg` implied by `-D warnings`
|
2018-01-18 23:02:18 +01:00
|
|
|
help: if you intended to pass a unit value, use a unit literal instead
|
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
25 | foo(());
|
2018-01-18 23:02:18 +01:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
error: passing a unit value to a function
|
2018-08-01 16:30:44 +02:00
|
|
|
--> $DIR/unit_arg.rs:26:9
|
2018-01-18 23:02:18 +01:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
26 | foo({ 1; });
|
2018-01-18 23:02:18 +01:00
|
|
|
| ^^^^^^
|
|
|
|
help: if you intended to pass a unit value, use a unit literal instead
|
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
26 | foo(());
|
2018-01-18 23:02:18 +01:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
error: passing a unit value to a function
|
2018-08-01 16:30:44 +02:00
|
|
|
--> $DIR/unit_arg.rs:27:9
|
2018-01-18 23:02:18 +01:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
27 | foo(foo(1));
|
2018-01-18 23:02:18 +01:00
|
|
|
| ^^^^^^
|
|
|
|
help: if you intended to pass a unit value, use a unit literal instead
|
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
27 | foo(());
|
2018-01-18 23:02:18 +01:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
error: passing a unit value to a function
|
2018-08-01 16:30:44 +02:00
|
|
|
--> $DIR/unit_arg.rs:28:9
|
2018-01-18 23:02:18 +01:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
28 | foo({
|
2018-01-18 23:02:18 +01:00
|
|
|
| _________^
|
2018-08-01 16:30:44 +02:00
|
|
|
29 | | foo(1);
|
|
|
|
30 | | foo(2);
|
|
|
|
31 | | });
|
2018-01-18 23:02:18 +01:00
|
|
|
| |_____^
|
|
|
|
help: if you intended to pass a unit value, use a unit literal instead
|
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
28 | foo(());
|
2018-01-18 23:02:18 +01:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
error: passing a unit value to a function
|
2018-08-01 16:30:44 +02:00
|
|
|
--> $DIR/unit_arg.rs:32:10
|
2018-01-18 23:02:18 +01:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
32 | foo3({}, 2, 2);
|
2018-01-18 23:02:18 +01:00
|
|
|
| ^^
|
|
|
|
help: if you intended to pass a unit value, use a unit literal instead
|
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
32 | foo3((), 2, 2);
|
2018-01-18 23:02:18 +01:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
error: passing a unit value to a function
|
2018-08-01 16:30:44 +02:00
|
|
|
--> $DIR/unit_arg.rs:34:11
|
2018-01-18 23:02:18 +01:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
34 | b.bar({ 1; });
|
2018-01-18 23:02:18 +01:00
|
|
|
| ^^^^^^
|
|
|
|
help: if you intended to pass a unit value, use a unit literal instead
|
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
34 | b.bar(());
|
2018-01-18 23:02:18 +01:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
error: aborting due to 6 previous errors
|
|
|
|
|