2018-01-18 23:02:18 +01:00
|
|
|
error: passing a unit value to a function
|
2019-01-13 19:59:00 +01:00
|
|
|
--> $DIR/unit_arg.rs:24:9
|
2018-01-18 23:02:18 +01:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | 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-12-27 16:57:55 +01:00
|
|
|
LL | foo(());
|
2018-01-18 23:02:18 +01:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
error: passing a unit value to a function
|
2019-01-13 19:59:00 +01:00
|
|
|
--> $DIR/unit_arg.rs:25:9
|
2018-01-18 23:02:18 +01:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | foo({
|
2018-12-10 06:27:19 +01:00
|
|
|
| _________^
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | | 1;
|
|
|
|
LL | | });
|
2018-12-10 06:27:19 +01:00
|
|
|
| |_____^
|
2018-01-18 23:02:18 +01:00
|
|
|
help: if you intended to pass a unit value, use a unit literal instead
|
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | foo(());
|
2018-01-18 23:02:18 +01:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
error: passing a unit value to a function
|
2019-01-13 19:59:00 +01:00
|
|
|
--> $DIR/unit_arg.rs:28:9
|
2018-01-18 23:02:18 +01:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | 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-12-27 16:57:55 +01:00
|
|
|
LL | foo(());
|
2018-01-18 23:02:18 +01:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
error: passing a unit value to a function
|
2019-01-13 19:59:00 +01:00
|
|
|
--> $DIR/unit_arg.rs:29:9
|
2018-01-18 23:02:18 +01:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | foo({
|
2018-01-18 23:02:18 +01:00
|
|
|
| _________^
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | | foo(1);
|
|
|
|
LL | | foo(2);
|
|
|
|
LL | | });
|
2018-01-18 23:02:18 +01:00
|
|
|
| |_____^
|
|
|
|
help: if you intended to pass a unit value, use a unit literal instead
|
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | foo(());
|
2018-01-18 23:02:18 +01:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
error: passing a unit value to a function
|
2019-01-13 19:59:00 +01:00
|
|
|
--> $DIR/unit_arg.rs:33:10
|
2018-01-18 23:02:18 +01:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | 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-12-27 16:57:55 +01:00
|
|
|
LL | foo3((), 2, 2);
|
2018-01-18 23:02:18 +01:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
error: passing a unit value to a function
|
2019-01-13 19:59:00 +01:00
|
|
|
--> $DIR/unit_arg.rs:35:11
|
2018-01-18 23:02:18 +01:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | b.bar({
|
2018-12-10 06:27:19 +01:00
|
|
|
| ___________^
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | | 1;
|
|
|
|
LL | | });
|
2018-12-10 06:27:19 +01:00
|
|
|
| |_____^
|
2018-01-18 23:02:18 +01:00
|
|
|
help: if you intended to pass a unit value, use a unit literal instead
|
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | b.bar(());
|
2018-01-18 23:02:18 +01:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
error: aborting due to 6 previous errors
|
|
|
|
|