mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-04 18:40:18 +00:00
eb3970285b
In order to switch `clippy::uninlined_format_args` from pedantic to style, all existing tests must not raise a warning. I did not want to change the actual tests, so this is a relatively minor change that: * add `#![allow(clippy::uninlined_format_args)]` where needed * normalizes all allow/deny/warn attributes * all allow attributes are grouped together * sorted alphabetically * the `clippy::*` attributes are listed separate from the other ones. * deny and warn attributes are listed before the allowed ones changelog: none
45 lines
1.2 KiB
Text
45 lines
1.2 KiB
Text
error: passing a unit value to a function
|
|
--> $DIR/unit_arg_empty_blocks.rs:17:5
|
|
|
|
|
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
|
|
--> $DIR/unit_arg_empty_blocks.rs:18:5
|
|
|
|
|
LL | foo3({}, 2, 2);
|
|
| ^^^^^--^^^^^^^
|
|
| |
|
|
| help: use a unit literal instead: `()`
|
|
|
|
error: passing unit values to a function
|
|
--> $DIR/unit_arg_empty_blocks.rs:19:5
|
|
|
|
|
LL | taking_two_units({}, foo(0));
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
help: move the expression in front of the call and replace it with the unit literal `()`
|
|
|
|
|
LL ~ foo(0);
|
|
LL ~ taking_two_units((), ());
|
|
|
|
|
|
|
error: passing unit values to a function
|
|
--> $DIR/unit_arg_empty_blocks.rs:20:5
|
|
|
|
|
LL | taking_three_units({}, foo(0), foo(1));
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
help: move the expressions in front of the call and replace them with the unit literal `()`
|
|
|
|
|
LL ~ foo(0);
|
|
LL + foo(1);
|
|
LL ~ taking_three_units((), (), ());
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
|
|