diff options
| author | bors <bors@rust-lang.org> | 2017-11-01 04:32:15 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-11-01 04:32:15 +0000 |
| commit | 31bbe57c79112e91d2d8783032231c7e1d22855b (patch) | |
| tree | bc3be5f41378322cdcf624e643e52d48013ed2ae /src/libstd/sync | |
| parent | fc3e12a03c8d5298ddfac6fb8c14c1b918eb55a8 (diff) | |
| parent | fbf6885fd3ebc28a94007ab032ef1c9f135a0b69 (diff) | |
| download | rust-31bbe57c79112e91d2d8783032231c7e1d22855b.tar.gz rust-31bbe57c79112e91d2d8783032231c7e1d22855b.zip | |
Auto merge of #45267 - oconnor663:rwlock_send, r=alexcrichton
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 https://github.com/rust-lang/rust/commit/380d23b5d4b9fb8f5f0ebf178590f61528b2483e, but it's not clear why. @hniksic and I [were discussing this on reddit](https://www.reddit.com/r/rust/comments/763o7r/blog_posts_introducing_lockfree_rust_comparing/dobcvbm/). I might be totally wrong about this change being sound, but I'm super curious to find out :)
Diffstat (limited to 'src/libstd/sync')
| -rw-r--r-- | src/libstd/sync/rwlock.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/sync/rwlock.rs b/src/libstd/sync/rwlock.rs index 5c49d6b5845..5555f364e6e 100644 --- a/src/libstd/sync/rwlock.rs +++ b/src/libstd/sync/rwlock.rs @@ -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> {} |
