Closed c410-f3r closed 1 year ago
@c410-f3r, should we also apply this to all the other guards, like the RwLock
guards and the reentrant mutex guard, as well as their mapped variants?
Yes, any lock primitive should apply #[clippy::has_significant_drop]
in order to trigger the two mentioned lints.
Moreover, it is very likely that other lints will also use #[clippy::has_significant_drop]
in the future.
Nice! Thank you
#[clippy::has_significant_drop]
tells that a structure should be considered when evaluating some lints. Examples of such behavior are the existentclippy::significant_drop_in_scrutinee
and the soon-to-be-finished https://github.com/rust-lang/rust-clippy/issues/9399.