Skip to content

Commit

Permalink
Mark MutexGuard with #[clippy::has_significant_drop]
Browse files Browse the repository at this point in the history
`#[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 rust-lang/rust-clippy#9399.
  • Loading branch information
c410-f3r authored Feb 2, 2023
1 parent 350cda0 commit 21a1054
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/mutex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,7 @@ impl<T: ?Sized, B: Borrow<Mutex<T>>> Drop for AcquireSlow<B, T> {
}

/// A guard that releases the mutex when dropped.
#[clippy::has_significant_drop]
pub struct MutexGuard<'a, T: ?Sized>(&'a Mutex<T>);

unsafe impl<T: Send + ?Sized> Send for MutexGuard<'_, T> {}
Expand Down

0 comments on commit 21a1054

Please sign in to comment.