2020-06-09 09:36:01 -05:00
|
|
|
error: passing a unit value to a function
|
2022-05-19 08:03:38 -05:00
|
|
|
--> $DIR/unit_arg_empty_blocks.rs:16:5
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
|
LL | foo({});
|
|
|
|
| ^^^^--^
|
|
|
|
| |
|
|
|
|
| help: use a unit literal instead: `()`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::unit-arg` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: passing a unit value to a function
|
2022-05-19 08:03:38 -05:00
|
|
|
--> $DIR/unit_arg_empty_blocks.rs:17:5
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
|
LL | foo3({}, 2, 2);
|
|
|
|
| ^^^^^--^^^^^^^
|
|
|
|
| |
|
|
|
|
| help: use a unit literal instead: `()`
|
|
|
|
|
|
|
|
error: passing unit values to a function
|
2022-05-19 08:03:38 -05:00
|
|
|
--> $DIR/unit_arg_empty_blocks.rs:18:5
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
|
LL | taking_two_units({}, foo(0));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2020-09-10 10:47:07 -05:00
|
|
|
help: move the expression in front of the call and replace it with the unit literal `()`
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
2021-08-11 09:21:33 -05:00
|
|
|
LL ~ foo(0);
|
|
|
|
LL ~ taking_two_units((), ());
|
2020-09-10 10:47:07 -05:00
|
|
|
|
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
error: passing unit values to a function
|
2022-05-19 08:03:38 -05:00
|
|
|
--> $DIR/unit_arg_empty_blocks.rs:19:5
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
|
LL | taking_three_units({}, foo(0), foo(1));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2020-09-10 10:47:07 -05:00
|
|
|
help: move the expressions in front of the call and replace them with the unit literal `()`
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
2021-08-11 09:21:33 -05:00
|
|
|
LL ~ foo(0);
|
|
|
|
LL + foo(1);
|
|
|
|
LL ~ taking_three_units((), (), ());
|
2020-09-10 10:47:07 -05:00
|
|
|
|
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
|