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 f549eac commit 59dfa3d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lock_api/src/mutex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,7 @@ where
///
/// The data protected by the mutex can be accessed through this guard via its
/// `Deref` and `DerefMut` implementations.
#[clippy::has_significant_drop]`
#[must_use = "if unused the Mutex will immediately unlock"]
pub struct MutexGuard<'a, R: RawMutex, T: ?Sized> {
mutex: &'a Mutex<R, T>,
Expand Down

0 comments on commit 59dfa3d

Please sign in to comment.