about summary refs log tree commit diff
path: root/src/libstd/sync/mpsc/spsc_queue.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-02-22 10:27:08 +0000
committerbors <bors@rust-lang.org>2015-02-22 10:27:08 +0000
commitdcc6ce2c772cb851ac35cbc2ddafcae9bf2fa9fd (patch)
tree5c395b9b0e9b905648ed6de581ec601f4cc2ba9f /src/libstd/sync/mpsc/spsc_queue.rs
parenteb1b500a9a69b149295c37c2fe2c9409f406f9ea (diff)
parent380d23b5d4b9fb8f5f0ebf178590f61528b2483e (diff)
downloadrust-dcc6ce2c772cb851ac35cbc2ddafcae9bf2fa9fd.tar.gz
rust-dcc6ce2c772cb851ac35cbc2ddafcae9bf2fa9fd.zip
Auto merge of #22574 - huonw:remove-lame-statics, r=alexcirchton
Add a basic test that checks that the types catch the most glaring
errors that could occur.

cc #22444
Diffstat (limited to 'src/libstd/sync/mpsc/spsc_queue.rs')
-rw-r--r--src/libstd/sync/mpsc/spsc_queue.rs10
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 e1a89706509..f111e13975f 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 + 'static> Send for Queue<T> { }
+unsafe impl<T: Send> Send for Queue<T> { }
 
-unsafe impl<T: Send + 'static> Sync for Queue<T> { }
+unsafe impl<T: Send> Sync for Queue<T> { }
 
-impl<T: Send + 'static> Node<T> {
+impl<T: Send> Node<T> {
     fn new() -> *mut Node<T> {
         unsafe {
             mem::transmute(box Node {
@@ -89,7 +89,7 @@ impl<T: Send + 'static> Node<T> {
     }
 }
 
-impl<T: Send + 'static> Queue<T> {
+impl<T: Send> 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 + 'static> Queue<T> {
 }
 
 #[unsafe_destructor]
-impl<T: Send + 'static> Drop for Queue<T> {
+impl<T: Send> Drop for Queue<T> {
     fn drop(&mut self) {
         unsafe {
             let mut cur = *self.first.get();