diff options
| author | bors <bors@rust-lang.org> | 2017-11-07 18:04:33 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-11-07 18:04:33 +0000 |
| commit | 7f6417e9b72de63666fd92caf1a6b96a778b60ed (patch) | |
| tree | cbdb0b5298e76188aea3582191e2ad82dfc811b9 /src/libstd/sync | |
| parent | 7ade24f67201531778e7674b4b63ebf1a23c9643 (diff) | |
| parent | 0d53ecd0c788d5c492cf5023c8c76420ef349244 (diff) | |
| download | rust-7f6417e9b72de63666fd92caf1a6b96a778b60ed.tar.gz rust-7f6417e9b72de63666fd92caf1a6b96a778b60ed.zip | |
Auto merge of #45822 - kennytm:rollup, r=kennytm
Rollup of 9 pull requests - Successful merges: #45470, #45588, #45682, #45714, #45751, #45764, #45778, #45782, #45784 - Failed merges:
Diffstat (limited to 'src/libstd/sync')
| -rw-r--r-- | src/libstd/sync/rwlock.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/libstd/sync/rwlock.rs b/src/libstd/sync/rwlock.rs index 5555f364e6e..d59a0b65a69 100644 --- a/src/libstd/sync/rwlock.rs +++ b/src/libstd/sync/rwlock.rs @@ -10,7 +10,6 @@ use cell::UnsafeCell; use fmt; -use marker; use mem; use ops::{Deref, DerefMut}; use ptr; @@ -102,7 +101,10 @@ pub struct RwLockReadGuard<'a, T: ?Sized + 'a> { } #[stable(feature = "rust1", since = "1.0.0")] -impl<'a, T: ?Sized> !marker::Send for RwLockReadGuard<'a, T> {} +impl<'a, T: ?Sized> !Send for RwLockReadGuard<'a, T> {} + +#[stable(feature = "rwlock_guard_sync", since = "1.23.0")] +unsafe impl<'a, T: ?Sized + Sync> Sync for RwLockReadGuard<'a, T> {} /// RAII structure used to release the exclusive write access of a lock when /// dropped. @@ -121,7 +123,10 @@ pub struct RwLockWriteGuard<'a, T: ?Sized + 'a> { } #[stable(feature = "rust1", since = "1.0.0")] -impl<'a, T: ?Sized> !marker::Send for RwLockWriteGuard<'a, T> {} +impl<'a, T: ?Sized> !Send for RwLockWriteGuard<'a, T> {} + +#[stable(feature = "rwlock_guard_sync", since = "1.23.0")] +unsafe impl<'a, T: ?Sized + Sync> Sync for RwLockWriteGuard<'a, T> {} impl<T> RwLock<T> { /// Creates a new instance of an `RwLock<T>` which is unlocked. |
