diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-02-17 17:32:16 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-02-17 17:32:16 -0800 |
| commit | ba8ce4c2c27643cccfbbc481a19bcf4b7747cc89 (patch) | |
| tree | 158a22ef66d1d80f0e9e5d01dffb13496af236c2 /src/libstd/sync/mpsc/spsc_queue.rs | |
| parent | 6ac3799b75780f8c18bc38331403e1e517b89bab (diff) | |
| parent | 7a14f4994eb4527a38d02c61fa83822df02f7b5d (diff) | |
| download | rust-ba8ce4c2c27643cccfbbc481a19bcf4b7747cc89.tar.gz rust-ba8ce4c2c27643cccfbbc481a19bcf4b7747cc89.zip | |
rollup merge of #22319: huonw/send-is-not-static
Conflicts: src/libstd/sync/task_pool.rs src/libstd/thread.rs src/libtest/lib.rs src/test/bench/shootout-reverse-complement.rs src/test/bench/shootout-spectralnorm.rs
Diffstat (limited to 'src/libstd/sync/mpsc/spsc_queue.rs')
| -rw-r--r-- | src/libstd/sync/mpsc/spsc_queue.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libstd/sync/mpsc/spsc_queue.rs b/src/libstd/sync/mpsc/spsc_queue.rs index c03bf024818..b8f835bde51 100644 --- a/src/libstd/sync/mpsc/spsc_queue.rs +++ b/src/libstd/sync/mpsc/spsc_queue.rs @@ -74,11 +74,11 @@ pub struct Queue<T> { cache_subtractions: AtomicUsize, } -unsafe impl<T: Send> Send for Queue<T> { } +unsafe impl<T: Send + 'static> Send for Queue<T> { } -unsafe impl<T: Send> Sync for Queue<T> { } +unsafe impl<T: Send + 'static> Sync for Queue<T> { } -impl<T: Send> Node<T> { +impl<T: Send + 'static> Node<T> { fn new() -> *mut Node<T> { unsafe { mem::transmute(box Node { @@ -89,7 +89,7 @@ impl<T: Send> Node<T> { } } -impl<T: Send> Queue<T> { +impl<T: Send + 'static> Queue<T> { /// Creates a new queue. /// /// This is unsafe as the type system doesn't enforce a single @@ -227,7 +227,7 @@ impl<T: Send> Queue<T> { } #[unsafe_destructor] -impl<T: Send> Drop for Queue<T> { +impl<T: Send + 'static> Drop for Queue<T> { fn drop(&mut self) { unsafe { let mut cur = *self.first.get(); |
