Skip to content

Commit

Permalink
remove the T: Sync requirement for RwLock<T>: Send
Browse files Browse the repository at this point in the history
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
380d23b,
but it's not clear why.
  • Loading branch information
oconnor663 committed Oct 13, 2017
1 parent 6cb49d2 commit fbf6885
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libstd/sync/rwlock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ pub struct RwLock<T: ?Sized> {
}

#[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")]
unsafe impl<T: ?Sized + Send + Sync> Sync for RwLock<T> {}

Expand Down

0 comments on commit fbf6885

Please sign in to comment.