From 511f747fb8172dddab5e60fe5f41d6dd49a55b9d Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Tue, 19 Aug 2025 10:58:16 -0400 Subject: [PATCH] compiler/rust: Add a bunch of clippy lints Reviewed-by: Karol Herbst Part-of: --- src/compiler/rust/meson.build | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/compiler/rust/meson.build b/src/compiler/rust/meson.build index bae81e1d0b2..0274ac62668 100644 --- a/src/compiler/rust/meson.build +++ b/src/compiler/rust/meson.build @@ -37,6 +37,19 @@ _compiler_binding_types = [ _compiler_rust_args = [ rust_2024_lint_args, + '-Aclippy::identity_op', + '-Aclippy::len_zero', + '-Aclippy::manual_range_contains', + # normally this is a good one, but we use it where the "better" code is worse + '-Aclippy::needless_range_loop', + '-Aclippy::redundant_field_names', + '-Aclippy::upper_case_acronyms', + '-Aclippy::vec_box', + '-Aclippy::write_with_newline', + # warns about public function might dereference a raw pointer, but nothing is + # actually public here + '-Aclippy::not_unsafe_ptr_arg_deref', + '-Anon_snake_case', ] _compiler_bindgen_args = [