]> git.lizzy.rs Git - rust.git/blobdiff - src/libcore/slice.rs
register snapshot
[rust.git] / src / libcore / slice.rs
index f17a775cf42407e2981e45b440793cf783c5a33c..7aed16173e988bbd852cc1fd1566de977f297eb5 100644 (file)
@@ -531,17 +531,6 @@ fn clone_from_slice(&mut self, src: &[T]) -> uint where T: Clone {
     }
 }
 
-// NOTE(stage0) remove impl after a snapshot
-#[cfg(stage0)]
-impl<T> ops::Index<uint, T> for [T] {
-    fn index(&self, &index: &uint) -> &T {
-        assert!(index < self.len());
-
-        unsafe { mem::transmute(self.repr().data.offset(index as int)) }
-    }
-}
-
-#[cfg(not(stage0))]  // NOTE(stage0) remove cfg after a snapshot
 impl<T> ops::Index<uint> for [T] {
     type Output = T;
 
@@ -552,17 +541,6 @@ fn index(&self, &index: &uint) -> &T {
     }
 }
 
-// NOTE(stage0) remove impl after a snapshot
-#[cfg(stage0)]
-impl<T> ops::IndexMut<uint, T> for [T] {
-    fn index_mut(&mut self, &index: &uint) -> &mut T {
-        assert!(index < self.len());
-
-        unsafe { mem::transmute(self.repr().data.offset(index as int)) }
-    }
-}
-
-#[cfg(not(stage0))]  // NOTE(stage0) remove cfg after a snapshot
 impl<T> ops::IndexMut<uint> for [T] {
     type Output = T;