diff options
| author | Aaron Turon <aturon@mozilla.com> | 2015-01-04 16:16:55 -0800 |
|---|---|---|
| committer | Aaron Turon <aturon@mozilla.com> | 2015-01-05 14:26:04 -0800 |
| commit | c6f4a03d12d97162e2775c14ab006d355b04126d (patch) | |
| tree | b579b493904ab0721365f959b1b692edf3a51d0f /src/libstd/sync | |
| parent | cb765ce7e190c70313858738e7427d99338a4f3f (diff) | |
| download | rust-c6f4a03d12d97162e2775c14ab006d355b04126d.tar.gz rust-c6f4a03d12d97162e2775c14ab006d355b04126d.zip | |
Stabilization of impls and fallout from stabilization
Diffstat (limited to 'src/libstd/sync')
| -rw-r--r-- | src/libstd/sync/condvar.rs | 1 | ||||
| -rw-r--r-- | src/libstd/sync/mpsc/mod.rs | 5 | ||||
| -rw-r--r-- | src/libstd/sync/mpsc/mpsc_queue.rs | 1 | ||||
| -rw-r--r-- | src/libstd/sync/mutex.rs | 4 | ||||
| -rw-r--r-- | src/libstd/sync/rwlock.rs | 6 | ||||
| -rw-r--r-- | src/libstd/sync/semaphore.rs | 1 |
6 files changed, 17 insertions, 1 deletions
diff --git a/src/libstd/sync/condvar.rs b/src/libstd/sync/condvar.rs index 7734f655ed2..e97be51fdbc 100644 --- a/src/libstd/sync/condvar.rs +++ b/src/libstd/sync/condvar.rs @@ -188,6 +188,7 @@ impl Condvar { pub fn notify_all(&self) { unsafe { self.inner.inner.notify_all() } } } +#[stable] impl Drop for Condvar { fn drop(&mut self) { unsafe { self.inner.inner.destroy() } diff --git a/src/libstd/sync/mpsc/mod.rs b/src/libstd/sync/mpsc/mod.rs index 6bc3f561bb3..09ff8f440f3 100644 --- a/src/libstd/sync/mpsc/mod.rs +++ b/src/libstd/sync/mpsc/mod.rs @@ -657,6 +657,7 @@ impl<T: Send> Clone for Sender<T> { } #[unsafe_destructor] +#[stable] impl<T: Send> Drop for Sender<T> { fn drop(&mut self) { match *unsafe { self.inner_mut() } { @@ -720,6 +721,7 @@ impl<T: Send> Clone for SyncSender<T> { } #[unsafe_destructor] +#[stable] impl<T: Send> Drop for SyncSender<T> { fn drop(&mut self) { unsafe { (*self.inner.get()).drop_chan(); } @@ -935,7 +937,7 @@ impl<T: Send> select::Packet for Receiver<T> { } } -#[unstable] +#[stable] impl<'a, T: Send> Iterator for Iter<'a, T> { type Item = T; @@ -943,6 +945,7 @@ impl<'a, T: Send> Iterator for Iter<'a, T> { } #[unsafe_destructor] +#[stable] impl<T: Send> Drop for Receiver<T> { fn drop(&mut self) { match *unsafe { self.inner_mut() } { diff --git a/src/libstd/sync/mpsc/mpsc_queue.rs b/src/libstd/sync/mpsc/mpsc_queue.rs index 8f85dc6e043..9ad24a5a11e 100644 --- a/src/libstd/sync/mpsc/mpsc_queue.rs +++ b/src/libstd/sync/mpsc/mpsc_queue.rs @@ -138,6 +138,7 @@ impl<T: Send> Queue<T> { } #[unsafe_destructor] +#[stable] impl<T: Send> Drop for Queue<T> { fn drop(&mut self) { unsafe { diff --git a/src/libstd/sync/mutex.rs b/src/libstd/sync/mutex.rs index b158bd69c7b..6b3dd89f33b 100644 --- a/src/libstd/sync/mutex.rs +++ b/src/libstd/sync/mutex.rs @@ -228,6 +228,7 @@ impl<T: Send> Mutex<T> { } #[unsafe_destructor] +#[stable] impl<T: Send> Drop for Mutex<T> { fn drop(&mut self) { // This is actually safe b/c we know that there is no further usage of @@ -291,6 +292,7 @@ impl<'mutex, T> MutexGuard<'mutex, T> { } } +#[stable] impl<'mutex, T> Deref for MutexGuard<'mutex, T> { type Target = T; @@ -298,6 +300,7 @@ impl<'mutex, T> Deref for MutexGuard<'mutex, T> { unsafe { &*self.__data.get() } } } +#[stable] impl<'mutex, T> DerefMut for MutexGuard<'mutex, T> { fn deref_mut<'a>(&'a mut self) -> &'a mut T { unsafe { &mut *self.__data.get() } @@ -305,6 +308,7 @@ impl<'mutex, T> DerefMut for MutexGuard<'mutex, T> { } #[unsafe_destructor] +#[stable] impl<'a, T> Drop for MutexGuard<'a, T> { #[inline] fn drop(&mut self) { diff --git a/src/libstd/sync/rwlock.rs b/src/libstd/sync/rwlock.rs index b2367ff8352..c8ca1b02aab 100644 --- a/src/libstd/sync/rwlock.rs +++ b/src/libstd/sync/rwlock.rs @@ -228,6 +228,7 @@ impl<T: Send + Sync> RWLock<T> { } #[unsafe_destructor] +#[stable] impl<T> Drop for RWLock<T> { fn drop(&mut self) { unsafe { self.inner.lock.destroy() } @@ -327,16 +328,19 @@ impl<'rwlock, T> RWLockWriteGuard<'rwlock, T> { } } +#[stable] impl<'rwlock, T> Deref for RWLockReadGuard<'rwlock, T> { type Target = T; fn deref(&self) -> &T { unsafe { &*self.__data.get() } } } +#[stable] impl<'rwlock, T> Deref for RWLockWriteGuard<'rwlock, T> { type Target = T; fn deref(&self) -> &T { unsafe { &*self.__data.get() } } } +#[stable] impl<'rwlock, T> DerefMut for RWLockWriteGuard<'rwlock, T> { fn deref_mut(&mut self) -> &mut T { unsafe { &mut *self.__data.get() } @@ -344,6 +348,7 @@ impl<'rwlock, T> DerefMut for RWLockWriteGuard<'rwlock, T> { } #[unsafe_destructor] +#[stable] impl<'a, T> Drop for RWLockReadGuard<'a, T> { fn drop(&mut self) { unsafe { self.__lock.lock.read_unlock(); } @@ -351,6 +356,7 @@ impl<'a, T> Drop for RWLockReadGuard<'a, T> { } #[unsafe_destructor] +#[stable] impl<'a, T> Drop for RWLockWriteGuard<'a, T> { fn drop(&mut self) { self.__lock.poison.done(&self.__poison); diff --git a/src/libstd/sync/semaphore.rs b/src/libstd/sync/semaphore.rs index c0ff674ba0f..505819fbf8a 100644 --- a/src/libstd/sync/semaphore.rs +++ b/src/libstd/sync/semaphore.rs @@ -99,6 +99,7 @@ impl Semaphore { } #[unsafe_destructor] +#[stable] impl<'a> Drop for SemaphoreGuard<'a> { fn drop(&mut self) { self.sem.release(); |
