diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-01-01 23:53:35 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-01-03 23:43:57 -0800 |
| commit | 7d8d06f86b48520814596bd5363d2b82bc619774 (patch) | |
| tree | eda093ca208286fd8679da8de9f3597b7a024c50 /src/libstd/sync/mpsc/mpsc_queue.rs | |
| parent | 470118f3e915cdc8f936aca0640b28a7a3d8dc6c (diff) | |
| download | rust-7d8d06f86b48520814596bd5363d2b82bc619774.tar.gz rust-7d8d06f86b48520814596bd5363d2b82bc619774.zip | |
Remove deprecated functionality
This removes a large array of deprecated functionality, regardless of how recently it was deprecated. The purpose of this commit is to clean out the standard libraries and compiler for the upcoming alpha release. Some notable compiler changes were to enable warnings for all now-deprecated command line arguments (previously the deprecated versions were silently accepted) as well as removing deriving(Zero) entirely (the trait was removed). The distribution no longer contains the libtime or libregex_macros crates. Both of these have been deprecated for some time and are available externally.
Diffstat (limited to 'src/libstd/sync/mpsc/mpsc_queue.rs')
| -rw-r--r-- | src/libstd/sync/mpsc/mpsc_queue.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libstd/sync/mpsc/mpsc_queue.rs b/src/libstd/sync/mpsc/mpsc_queue.rs index 8945233dac9..8f85dc6e043 100644 --- a/src/libstd/sync/mpsc/mpsc_queue.rs +++ b/src/libstd/sync/mpsc/mpsc_queue.rs @@ -48,7 +48,7 @@ use alloc::boxed::Box; use core::mem; use core::cell::UnsafeCell; -use sync::atomic::{AtomicPtr, Release, Acquire, AcqRel, Relaxed}; +use sync::atomic::{AtomicPtr, Ordering}; /// A result of the `pop` function. pub enum PopResult<T> { @@ -103,8 +103,8 @@ impl<T: Send> Queue<T> { pub fn push(&self, t: T) { unsafe { let n = Node::new(Some(t)); - let prev = self.head.swap(n, AcqRel); - (*prev).next.store(n, Release); + let prev = self.head.swap(n, Ordering::AcqRel); + (*prev).next.store(n, Ordering::Release); } } @@ -121,7 +121,7 @@ impl<T: Send> Queue<T> { pub fn pop(&self) -> PopResult<T> { unsafe { let tail = *self.tail.get(); - let next = (*tail).next.load(Acquire); + let next = (*tail).next.load(Ordering::Acquire); if !next.is_null() { *self.tail.get() = next; @@ -132,7 +132,7 @@ impl<T: Send> Queue<T> { return Data(ret); } - if self.head.load(Acquire) == tail {Empty} else {Inconsistent} + if self.head.load(Ordering::Acquire) == tail {Empty} else {Inconsistent} } } } @@ -143,7 +143,7 @@ impl<T: Send> Drop for Queue<T> { unsafe { let mut cur = *self.tail.get(); while !cur.is_null() { - let next = (*cur).next.load(Relaxed); + let next = (*cur).next.load(Ordering::Relaxed); let _: Box<Node<T>> = mem::transmute(cur); cur = next; } |
