]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/sync/mpsc/mpsc_queue.rs
Replace `0 as *const/mut T` with `ptr::null/null_mut()`
[rust.git] / src / libstd / sync / mpsc / mpsc_queue.rs
index f8eae1322bf1f7b9bbeb5e2c6b38d870d6c1a018..ea81ed30a9c603b6b72e2ca1473c920444916cf4 100644 (file)
@@ -35,7 +35,7 @@
 //! method, and see the method for more information about it. Due to this
 //! caveat, this queue may not be appropriate for all use-cases.
 
-#![experimental]
+#![unstable]
 
 // http://www.1024cores.net/home/lock-free-algorithms
 //                         /queues/non-intrusive-mpsc-node-based-queue
@@ -46,6 +46,7 @@
 
 use alloc::boxed::Box;
 use core::mem;
+use core::ptr;
 use core::cell::UnsafeCell;
 
 use sync::atomic::{AtomicPtr, Ordering};
@@ -82,7 +83,7 @@ unsafe impl<T:Send> Sync for Queue<T> { }
 impl<T> Node<T> {
     unsafe fn new(v: Option<T>) -> *mut Node<T> {
         mem::transmute(box Node {
-            next: AtomicPtr::new(0 as *mut Node<T>),
+            next: AtomicPtr::new(ptr::null_mut()),
             value: v,
         })
     }