about summary refs log tree commit diff
path: root/src/libcollections/btree/node.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcollections/btree/node.rs')
-rw-r--r--src/libcollections/btree/node.rs67
1 files changed, 0 insertions, 67 deletions
diff --git a/src/libcollections/btree/node.rs b/src/libcollections/btree/node.rs
index 4f3c3b08263..2d8335d3734 100644
--- a/src/libcollections/btree/node.rs
+++ b/src/libcollections/btree/node.rs
@@ -19,7 +19,6 @@ pub use self::TraversalItem::*;
 use core::prelude::*;
 
 use core::cmp::Ordering::{Greater, Less, Equal};
-#[cfg(not(stage0))]
 use core::intrinsics::arith_offset;
 use core::iter::Zip;
 use core::marker::PhantomData;
@@ -207,22 +206,6 @@ impl<T> RawItems<T> {
         RawItems::from_parts(slice.as_ptr(), slice.len())
     }
 
-    #[cfg(stage0)]
-    unsafe fn from_parts(ptr: *const T, len: usize) -> RawItems<T> {
-        if mem::size_of::<T>() == 0 {
-            RawItems {
-                head: ptr,
-                tail: (ptr as usize + len) as *const T,
-            }
-        } else {
-            RawItems {
-                head: ptr,
-                tail: ptr.offset(len as isize),
-            }
-        }
-    }
-
-    #[cfg(not(stage0))]
     unsafe fn from_parts(ptr: *const T, len: usize) -> RawItems<T> {
         if mem::size_of::<T>() == 0 {
             RawItems {
@@ -237,18 +220,6 @@ impl<T> RawItems<T> {
         }
     }
 
-    #[cfg(stage0)]
-    unsafe fn push(&mut self, val: T) {
-        ptr::write(self.tail as *mut T, val);
-
-        if mem::size_of::<T>() == 0 {
-            self.tail = (self.tail as usize + 1) as *const T;
-        } else {
-            self.tail = self.tail.offset(1);
-        }
-    }
-
-    #[cfg(not(stage0))]
     unsafe fn push(&mut self, val: T) {
         ptr::write(self.tail as *mut T, val);
 
@@ -263,26 +234,6 @@ impl<T> RawItems<T> {
 impl<T> Iterator for RawItems<T> {
     type Item = T;
 
-    #[cfg(stage0)]
-    fn next(&mut self) -> Option<T> {
-        if self.head == self.tail {
-            None
-        } else {
-            unsafe {
-                let ret = Some(ptr::read(self.head));
-
-                if mem::size_of::<T>() == 0 {
-                    self.head = (self.head as usize + 1) as *const T;
-                } else {
-                    self.head = self.head.offset(1);
-                }
-
-                ret
-            }
-        }
-    }
-
-    #[cfg(not(stage0))]
     fn next(&mut self) -> Option<T> {
         if self.head == self.tail {
             None
@@ -303,24 +254,6 @@ impl<T> Iterator for RawItems<T> {
 }
 
 impl<T> DoubleEndedIterator for RawItems<T> {
-    #[cfg(stage0)]
-    fn next_back(&mut self) -> Option<T> {
-        if self.head == self.tail {
-            None
-        } else {
-            unsafe {
-                if mem::size_of::<T>() == 0 {
-                    self.tail = (self.tail as usize - 1) as *const T;
-                } else {
-                    self.tail = self.tail.offset(-1);
-                }
-
-                Some(ptr::read(self.tail))
-            }
-        }
-    }
-
-    #[cfg(not(stage0))]
     fn next_back(&mut self) -> Option<T> {
         if self.head == self.tail {
             None