remove the T: Sync requirement for RwLock<T>: Send
That requirement makes sense for containers like `Arc` that don't
uniquely own their contents, but `RwLock` is not one of those.
This restriction was added in
380d23b5d4,
but it's not clear why.
This commit is contained in:
@@ -82,7 +82,7 @@ pub struct RwLock<T: ?Sized> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
unsafe impl<T: ?Sized + Send + Sync> Send for RwLock<T> {}
|
unsafe impl<T: ?Sized + Send> Send for RwLock<T> {}
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
unsafe impl<T: ?Sized + Send + Sync> Sync for RwLock<T> {}
|
unsafe impl<T: ?Sized + Send + Sync> Sync for RwLock<T> {}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user