diff --git a/src/mutex.rs b/src/mutex.rs index 1a360a6..5f47406 100644 --- a/src/mutex.rs +++ b/src/mutex.rs @@ -268,6 +268,9 @@ pub struct Lock<'a, T: ?Sized> { acquire_slow: Option, T>>, } +unsafe impl Send for Lock<'_, T> {} +unsafe impl Sync for Lock<'_, T> {} + impl<'a, T: ?Sized> Unpin for Lock<'a, T> {} impl fmt::Debug for Lock<'_, T> { @@ -319,6 +322,9 @@ enum LockArcInnards { Empty, } +unsafe impl Send for LockArc {} +unsafe impl Sync for LockArc {} + impl Unpin for LockArc {} impl fmt::Debug for LockArc { diff --git a/src/rwlock/futures.rs b/src/rwlock/futures.rs index 73fbc17..a65d7dc 100644 --- a/src/rwlock/futures.rs +++ b/src/rwlock/futures.rs @@ -20,8 +20,8 @@ pub struct Read<'a, T: ?Sized> { pub(super) value: *const T, } -unsafe impl Send for Read<'_, T> {} -unsafe impl Sync for Read<'_, T> {} +unsafe impl Send for Read<'_, T> {} +unsafe impl Sync for Read<'_, T> {} impl fmt::Debug for Read<'_, T> { #[inline] @@ -90,7 +90,7 @@ pub struct UpgradableRead<'a, T: ?Sized> { } unsafe impl Send for UpgradableRead<'_, T> {} -unsafe impl Sync for UpgradableRead<'_, T> {} +unsafe impl Sync for UpgradableRead<'_, T> {} impl fmt::Debug for UpgradableRead<'_, T> { #[inline] @@ -156,8 +156,8 @@ pub struct Write<'a, T: ?Sized> { pub(super) value: *mut T, } -unsafe impl Send for Write<'_, T> {} -unsafe impl Sync for Write<'_, T> {} +unsafe impl Send for Write<'_, T> {} +unsafe impl Sync for Write<'_, T> {} impl fmt::Debug for Write<'_, T> { #[inline] @@ -224,6 +224,9 @@ pub struct Upgrade<'a, T: ?Sized> { pub(super) value: *mut T, } +unsafe impl Send for Upgrade<'_, T> {} +unsafe impl Sync for Upgrade<'_, T> {} + impl fmt::Debug for Upgrade<'_, T> { #[inline] fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {