Skip to content

Commit 99ec614

Browse files
bors[bot]c410-f3r
andauthored
Merge #958
958: Mark some structures with `#[clippy::has_significant_drop]` r=taiki-e a=c410-f3r `#[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 the soon-to-be-finished rust-lang/rust-clippy#9399. Co-authored-by: Caio <[email protected]>
2 parents d2dbfaf + d1a5c9e commit 99ec614

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

crossbeam-utils/src/sync/sharded_lock.rs

+2
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,7 @@ impl<T> From<T> for ShardedLock<T> {
480480
}
481481

482482
/// A guard used to release the shared read access of a [`ShardedLock`] when dropped.
483+
#[clippy::has_significant_drop]
483484
pub struct ShardedLockReadGuard<'a, T: ?Sized> {
484485
lock: &'a ShardedLock<T>,
485486
_guard: RwLockReadGuard<'a, ()>,
@@ -511,6 +512,7 @@ impl<T: ?Sized + fmt::Display> fmt::Display for ShardedLockReadGuard<'_, T> {
511512
}
512513

513514
/// A guard used to release the exclusive write access of a [`ShardedLock`] when dropped.
515+
#[clippy::has_significant_drop]
514516
pub struct ShardedLockWriteGuard<'a, T: ?Sized> {
515517
lock: &'a ShardedLock<T>,
516518
_marker: PhantomData<RwLockWriteGuard<'a, T>>,

0 commit comments

Comments
 (0)