From d1a5c9e6e431605b7be6ebe9227f35d977307eff Mon Sep 17 00:00:00 2001 From: Caio Date: Thu, 2 Feb 2023 11:22:18 -0300 Subject: [PATCH] Mark some structures with `#[clippy::has_significant_drop]` `#[clippy::has_significant_drop]` tells that a structure should be considered when evaluating some lints. Examples of such behavior are the existent `clippy::significant_drop_in_scrutinee` and in the soon-to-be-finished https://github.com/rust-lang/rust-clippy/issues/9399. --- crossbeam-utils/src/sync/sharded_lock.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crossbeam-utils/src/sync/sharded_lock.rs b/crossbeam-utils/src/sync/sharded_lock.rs index b43c55ea4..a8f4584e3 100644 --- a/crossbeam-utils/src/sync/sharded_lock.rs +++ b/crossbeam-utils/src/sync/sharded_lock.rs @@ -480,6 +480,7 @@ impl From for ShardedLock { } /// A guard used to release the shared read access of a [`ShardedLock`] when dropped. +#[clippy::has_significant_drop] pub struct ShardedLockReadGuard<'a, T: ?Sized> { lock: &'a ShardedLock, _guard: RwLockReadGuard<'a, ()>, @@ -511,6 +512,7 @@ impl fmt::Display for ShardedLockReadGuard<'_, T> { } /// A guard used to release the exclusive write access of a [`ShardedLock`] when dropped. +#[clippy::has_significant_drop] pub struct ShardedLockWriteGuard<'a, T: ?Sized> { lock: &'a ShardedLock, _marker: PhantomData>,