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