From 1b7c426df5d2b3f40a71279cb88a2a056aff3b09 Mon Sep 17 00:00:00 2001 From: Dimitris Apostolou Date: Mon, 4 Mar 2024 04:49:00 +0200 Subject: [PATCH] Fix feature = "cargo-clippy" deprecation (#429) --- proptest/src/arbitrary/_alloc/collections.rs | 2 +- proptest/src/arbitrary/_core/cell.rs | 4 ++-- proptest/src/bits.rs | 2 +- proptest/src/lib.rs | 2 +- proptest/src/option.rs | 2 +- proptest/src/result.rs | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/proptest/src/arbitrary/_alloc/collections.rs b/proptest/src/arbitrary/_alloc/collections.rs index 20f3a929..3d0c50bc 100644 --- a/proptest/src/arbitrary/_alloc/collections.rs +++ b/proptest/src/arbitrary/_alloc/collections.rs @@ -9,7 +9,7 @@ //! Arbitrary implementations for `std::collections`. -//#![cfg_attr(feature="cargo-clippy", allow(implicit_hasher))] +//#![cfg_attr(clippy, allow(implicit_hasher))] //============================================================================== // Imports: diff --git a/proptest/src/arbitrary/_core/cell.rs b/proptest/src/arbitrary/_core/cell.rs index c10148fb..df48a54c 100644 --- a/proptest/src/arbitrary/_core/cell.rs +++ b/proptest/src/arbitrary/_core/cell.rs @@ -17,7 +17,7 @@ wrap_from!(UnsafeCell); lazy_just!(BorrowError, || { // False positive: - #[cfg_attr(feature = "cargo-clippy", allow(let_and_return))] + #[cfg_attr(clippy, allow(let_and_return))] { let _rc = RefCell::new(()); let _bm = _rc.borrow_mut(); @@ -28,7 +28,7 @@ lazy_just!(BorrowError, || { }); lazy_just!(BorrowMutError, || { // False positive: - #[cfg_attr(feature = "cargo-clippy", allow(let_and_return))] + #[cfg_attr(clippy, allow(let_and_return))] { let _rc = RefCell::new(()); let _bm = _rc.borrow_mut(); diff --git a/proptest/src/bits.rs b/proptest/src/bits.rs index 89b183ed..699362ac 100644 --- a/proptest/src/bits.rs +++ b/proptest/src/bits.rs @@ -32,7 +32,7 @@ use crate::strategy::*; use crate::test_runner::*; /// Trait for types which can be handled with `BitSetStrategy`. -#[cfg_attr(feature = "cargo-clippy", allow(len_without_is_empty))] +#[cfg_attr(clippy, allow(len_without_is_empty))] pub trait BitSetLike: Clone + fmt::Debug { /// Create a new value of `Self` with space for up to `max` bits, all /// initialised to zero. diff --git a/proptest/src/lib.rs b/proptest/src/lib.rs index aa5c9e8c..da37075d 100644 --- a/proptest/src/lib.rs +++ b/proptest/src/lib.rs @@ -17,7 +17,7 @@ #![forbid(future_incompatible)] #![deny(missing_docs, bare_trait_objects)] #![no_std] -#![cfg_attr(feature = "cargo-clippy", allow( +#![cfg_attr(clippy, allow( doc_markdown, // We have a lot of these lints for associated types... And we don't care. type_complexity diff --git a/proptest/src/option.rs b/proptest/src/option.rs index 466ada68..53b8d270 100644 --- a/proptest/src/option.rs +++ b/proptest/src/option.rs @@ -9,7 +9,7 @@ //! Strategies for generating `std::Option` values. -#![cfg_attr(feature = "cargo-clippy", allow(expl_impl_clone_on_copy))] +#![cfg_attr(clippy, allow(expl_impl_clone_on_copy))] use core::fmt; use core::marker::PhantomData; diff --git a/proptest/src/result.rs b/proptest/src/result.rs index bdb163b3..1da107e5 100644 --- a/proptest/src/result.rs +++ b/proptest/src/result.rs @@ -26,7 +26,7 @@ //! "maybe err" since the success case results in an easier to understand code //! path. -#![cfg_attr(feature = "cargo-clippy", allow(expl_impl_clone_on_copy))] +#![cfg_attr(clippy, allow(expl_impl_clone_on_copy))] use core::fmt; use core::marker::PhantomData;