2018-01-18 23:02:18 +01:00
|
|
|
error: passing a unit value to a function
|
2018-10-06 18:18:06 +02:00
|
|
|
--> $DIR/unit_arg.rs:35:9
|
2018-01-18 23:02:18 +01:00
|
|
|
|
|
2018-10-06 18:18:06 +02:00
|
|
|
35 | 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-10-06 18:18:06 +02:00
|
|
|
35 | foo(());
|
2018-01-18 23:02:18 +01:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
error: passing a unit value to a function
|
2018-10-06 18:18:06 +02:00
|
|
|
--> $DIR/unit_arg.rs:36:9
|
2018-01-18 23:02:18 +01:00
|
|
|
|
|
2018-10-06 18:18:06 +02:00
|
|
|
36 | 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-10-06 18:18:06 +02:00
|
|
|
36 | foo(());
|
2018-01-18 23:02:18 +01:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
error: passing a unit value to a function
|
2018-10-06 18:18:06 +02:00
|
|
|
--> $DIR/unit_arg.rs:37:9
|
2018-01-18 23:02:18 +01:00
|
|
|
|
|
2018-10-06 18:18:06 +02:00
|
|
|
37 | 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-10-06 18:18:06 +02:00
|
|
|
37 | foo(());
|
2018-01-18 23:02:18 +01:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
error: passing a unit value to a function
|
2018-10-06 18:18:06 +02:00
|
|
|
--> $DIR/unit_arg.rs:38:9
|
2018-01-18 23:02:18 +01:00
|
|
|
|
|
2018-10-06 18:18:06 +02:00
|
|
|
38 | foo({
|
2018-01-18 23:02:18 +01:00
|
|
|
| _________^
|
2018-10-06 18:18:06 +02:00
|
|
|
39 | | foo(1);
|
|
|
|
40 | | foo(2);
|
|
|
|
41 | | });
|
2018-01-18 23:02:18 +01:00
|
|
|
| |_____^
|
|
|
|
help: if you intended to pass a unit value, use a unit literal instead
|
|
|
|
|
|
2018-10-06 18:18:06 +02:00
|
|
|
38 | foo(());
|
2018-01-18 23:02:18 +01:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
error: passing a unit value to a function
|
2018-10-06 18:18:06 +02:00
|
|
|
--> $DIR/unit_arg.rs:42:10
|
2018-01-18 23:02:18 +01:00
|
|
|
|
|
2018-10-06 18:18:06 +02:00
|
|
|
42 | 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-10-06 18:18:06 +02:00
|
|
|
42 | foo3((), 2, 2);
|
2018-01-18 23:02:18 +01:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
error: passing a unit value to a function
|
2018-10-06 18:18:06 +02:00
|
|
|
--> $DIR/unit_arg.rs:44:11
|
2018-01-18 23:02:18 +01:00
|
|
|
|
|
2018-10-06 18:18:06 +02:00
|
|
|
44 | 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-10-06 18:18:06 +02:00
|
|
|
44 | b.bar(());
|
2018-01-18 23:02:18 +01:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
error: aborting due to 6 previous errors
|
|
|
|
|