From 3a2ccfe1237ada1123aa9ae1bc9e161247501d7e Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Wed, 10 Jan 2024 02:34:25 +0900 Subject: [PATCH] Ignore more clippy lints at workspace level --- Cargo.toml | 2 ++ pin-project-internal/src/lib.rs | 2 +- tests/pinned_drop.rs | 6 +----- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7e3ed761..ed6d9b45 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -68,6 +68,7 @@ trailing_empty_array = "warn" transmute_undefined_repr = "warn" undocumented_unsafe_blocks = "warn" # Suppress buggy or noisy clippy lints +bool_assert_comparison = { level = "allow", priority = 1 } borrow_as_ptr = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/8286 doc_markdown = { level = "allow", priority = 1 } float_cmp = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/7725 @@ -79,6 +80,7 @@ similar_names = { level = "allow", priority = 1 } single_match = { level = "allow", priority = 1 } single_match_else = { level = "allow", priority = 1 } struct_excessive_bools = { level = "allow", priority = 1 } +struct_field_names = { level = "allow", priority = 1 } too_many_arguments = { level = "allow", priority = 1 } too_many_lines = { level = "allow", priority = 1 } type_complexity = { level = "allow", priority = 1 } diff --git a/pin-project-internal/src/lib.rs b/pin-project-internal/src/lib.rs index c236a3b4..768461a3 100644 --- a/pin-project-internal/src/lib.rs +++ b/pin-project-internal/src/lib.rs @@ -10,7 +10,7 @@ ) ))] #![forbid(unsafe_code)] -#![allow(clippy::needless_doctest_main, clippy::struct_field_names)] +#![allow(clippy::needless_doctest_main)] #[macro_use] mod error; diff --git a/tests/pinned_drop.rs b/tests/pinned_drop.rs index 6d6335cb..80451fe7 100644 --- a/tests/pinned_drop.rs +++ b/tests/pinned_drop.rs @@ -1,7 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 OR MIT -#![allow(clippy::match_same_arms)] - use std::pin::Pin; use pin_project::{pin_project, pinned_drop}; @@ -115,9 +113,7 @@ fn self_ty() { // pat match *self { - Self::Struct { f: () } => {} - Self::Tuple(()) => {} - Self::Unit => {} + Self::Struct { f: () } | Self::Tuple(()) | Self::Unit => {} } if let Self::Struct { f: () } = *self {} if let Self::Tuple(()) = *self {}