diff --git a/src/mutex.rs b/src/mutex.rs index 142dc86..7087dd8 100644 --- a/src/mutex.rs +++ b/src/mutex.rs @@ -536,6 +536,7 @@ impl>> Drop for AcquireSlow { } /// A guard that releases the mutex when dropped. +#[clippy::has_significant_drop] pub struct MutexGuard<'a, T: ?Sized>(&'a Mutex); unsafe impl Send for MutexGuard<'_, T> {} @@ -595,6 +596,7 @@ impl DerefMut for MutexGuard<'_, T> { } /// An owned guard that releases the mutex when dropped. +#[clippy::has_significant_drop] pub struct MutexGuardArc(Arc>); unsafe impl Send for MutexGuardArc {} diff --git a/src/rwlock.rs b/src/rwlock.rs index 53bc871..a1b9154 100644 --- a/src/rwlock.rs +++ b/src/rwlock.rs @@ -604,6 +604,7 @@ impl<'a, T: ?Sized> Future for Write<'a, T> { } /// A guard that releases the read lock when dropped. +#[clippy::has_significant_drop] pub struct RwLockReadGuard<'a, T: ?Sized>(&'a RwLock); unsafe impl Send for RwLockReadGuard<'_, T> {} @@ -640,6 +641,7 @@ impl Deref for RwLockReadGuard<'_, T> { } /// A guard that releases the upgradable read lock when dropped. +#[clippy::has_significant_drop] pub struct RwLockUpgradableReadGuard<'a, T: ?Sized> { reader: RwLockReadGuard<'a, T>, reserved: MutexGuard<'a, ()>, @@ -851,6 +853,7 @@ impl Drop for RwLockWriteGuardInner<'_, T> { } /// A guard that releases the write lock when dropped. +#[clippy::has_significant_drop] pub struct RwLockWriteGuard<'a, T: ?Sized> { writer: RwLockWriteGuardInner<'a, T>, reserved: MutexGuard<'a, ()>, diff --git a/src/semaphore.rs b/src/semaphore.rs index 4174781..0de4f53 100644 --- a/src/semaphore.rs +++ b/src/semaphore.rs @@ -244,6 +244,7 @@ impl Future for AcquireArc { } /// A guard that releases the acquired permit. +#[clippy::has_significant_drop] #[derive(Debug)] pub struct SemaphoreGuard<'a>(&'a Semaphore); @@ -255,6 +256,7 @@ impl Drop for SemaphoreGuard<'_> { } /// An owned guard that releases the acquired permit. +#[clippy::has_significant_drop] #[derive(Debug)] pub struct SemaphoreGuardArc(Arc);