]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
rust: simplify Clippy warning flags set
authorMiguel Ojeda <ojeda@kernel.org>
Tue, 9 Jul 2024 16:06:00 +0000 (18:06 +0200)
committerMiguel Ojeda <ojeda@kernel.org>
Wed, 10 Jul 2024 08:28:52 +0000 (10:28 +0200)
All Clippy lint groups that we enable, except `correctness`, have a
default `warn` level, thus they may be removed now that we relaxed all
lints to `warn`.

Moreover, Clippy provides an `all` lint group that covers the groups
we enable by default. Thus just use `all` instead -- the only change is
that, if Clippy introduces a new lint group or splits an existing one,
we will cover that one automatically.

In addition, `let_unit_value` is in `style` since Rust 1.62.0, thus it
does not need to be enabled manually.

Reviewed-by: Finn Behrens <me@kloenk.dev>
Tested-by: Benno Lossin <benno.lossin@proton.me>
Tested-by: Andreas Hindborg <a.hindborg@samsung.com>
Link: https://lore.kernel.org/r/20240709160615.998336-6-ojeda@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Makefile

index 7ea526814fdb7262b5b787419ff552ee7d6c3efb..9044fdb9adb1f5a8c0d7ff5f1ffdd05fe21f852b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -467,10 +467,8 @@ export rust_common_flags := --edition=2021 \
                            -Wunreachable_pub \
                            -Wmissing_docs \
                            -Wrustdoc::missing_crate_level_docs \
-                           -Wclippy::correctness -Wclippy::style \
-                           -Wclippy::suspicious -Wclippy::complexity \
-                           -Wclippy::perf \
-                           -Wclippy::let_unit_value -Wclippy::mut_mut \
+                           -Wclippy::all \
+                           -Wclippy::mut_mut \
                            -Wclippy::needless_bitwise_bool \
                            -Wclippy::needless_continue \
                            -Wclippy::no_mangle_with_rust_abi \