From 68968987698ff730761e8e1e3e27c07696909098 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Fri, 12 Jan 2024 14:00:00 +0100 Subject: [PATCH] Add [lints] table to suppress lints across all our crates This was stabilized in 1.74. Until that's our MSRV, keep the warnings also in "lib.rs", to prevent warning spew on old builds (CI logs etc.). --- Cargo.toml | 24 ++++++++++++++++++++++++ fish-rust/src/lib.rs | 1 + 2 files changed, 25 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 720616672..d5532a8e5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -73,3 +73,27 @@ benchmark = [] # The following features are auto-detected by the build-script and should not be enabled manually. asan = [] bsd = [] + +[lints] +rust.non_camel_case_types = "allow" +rust.dead_code = "allow" +rust.non_upper_case_globals = "allow" +rust.unstable_name_collisions = "allow" +clippy.bool_assert_comparison = "allow" +clippy.box_default = "allow" +clippy.collapsible_if = "allow" +clippy.comparison_chain = "allow" +clippy.derivable_impls = "allow" +clippy.field_reassign_with_default = "allow" +clippy.get_first = "allow" +clippy.if_same_then_else = "allow" +clippy.manual_is_ascii_check = "allow" +clippy.mut_from_ref = "allow" +clippy.needless_return = "allow" +clippy.option_map_unit_fn = "allow" +clippy.ptr_arg = "allow" +clippy.redundant_slicing = "allow" +clippy.too_many_arguments = "allow" +clippy.uninlined_format_args = "allow" +clippy.unnecessary_to_owned = "allow" +clippy.unnecessary_unwrap = "allow" diff --git a/fish-rust/src/lib.rs b/fish-rust/src/lib.rs index e11dbcdfa..98ab3ee60 100644 --- a/fish-rust/src/lib.rs +++ b/fish-rust/src/lib.rs @@ -1,3 +1,4 @@ +// Delete this once we require Rust 1.74. #![cfg_attr(feature = "benchmark", feature(test))] #![allow(non_camel_case_types)] #![allow(dead_code)]