Mark locks in std lib with clippy::has_significant_drop
This commit is contained in:
parent
4799baa70d
commit
bbb1c5b259
2 changed files with 3 additions and 0 deletions
|
@ -192,6 +192,7 @@ unsafe impl<T: ?Sized + Send> Sync for Mutex<T> {}
|
||||||
points can cause deadlocks, delays, \
|
points can cause deadlocks, delays, \
|
||||||
and cause Futures to not implement `Send`"]
|
and cause Futures to not implement `Send`"]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[clippy::has_significant_drop]
|
||||||
pub struct MutexGuard<'a, T: ?Sized + 'a> {
|
pub struct MutexGuard<'a, T: ?Sized + 'a> {
|
||||||
lock: &'a Mutex<T>,
|
lock: &'a Mutex<T>,
|
||||||
poison: poison::Guard,
|
poison: poison::Guard,
|
||||||
|
|
|
@ -99,6 +99,7 @@ unsafe impl<T: ?Sized + Send + Sync> Sync for RwLock<T> {}
|
||||||
points can cause deadlocks, delays, \
|
points can cause deadlocks, delays, \
|
||||||
and cause Futures to not implement `Send`"]
|
and cause Futures to not implement `Send`"]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[clippy::has_significant_drop]
|
||||||
pub struct RwLockReadGuard<'a, T: ?Sized + 'a> {
|
pub struct RwLockReadGuard<'a, T: ?Sized + 'a> {
|
||||||
lock: &'a RwLock<T>,
|
lock: &'a RwLock<T>,
|
||||||
}
|
}
|
||||||
|
@ -122,6 +123,7 @@ unsafe impl<T: ?Sized + Sync> Sync for RwLockReadGuard<'_, T> {}
|
||||||
points can cause deadlocks, delays, \
|
points can cause deadlocks, delays, \
|
||||||
and cause Future's to not implement `Send`"]
|
and cause Future's to not implement `Send`"]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[clippy::has_significant_drop]
|
||||||
pub struct RwLockWriteGuard<'a, T: ?Sized + 'a> {
|
pub struct RwLockWriteGuard<'a, T: ?Sized + 'a> {
|
||||||
lock: &'a RwLock<T>,
|
lock: &'a RwLock<T>,
|
||||||
poison: poison::Guard,
|
poison: poison::Guard,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue