summary refs log tree commit diff
path: root/src/libcore/str
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-03-24 18:13:54 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-03-26 09:57:05 -0700
commit36ef29abf7fa14dc9361d6b30ff7f8d18bfb4157 (patch)
tree7769ba1cae0d202a55b219efb2a04032f3bf70eb /src/libcore/str
parent557d4346a26266d2eb13f6b0adf106b8873b0da1 (diff)
downloadrust-36ef29abf7fa14dc9361d6b30ff7f8d18bfb4157.tar.gz
rust-36ef29abf7fa14dc9361d6b30ff7f8d18bfb4157.zip
Register new snapshots
Diffstat (limited to 'src/libcore/str')
-rw-r--r--src/libcore/str/mod.rs88
1 files changed, 0 insertions, 88 deletions
diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs
index a629e0308e9..7fe3758ed95 100644
--- a/src/libcore/str/mod.rs
+++ b/src/libcore/str/mod.rs
@@ -541,17 +541,6 @@ delegate_iter!{exact u8 : Bytes<'a>}
 #[derive(Copy, Clone)]
 struct BytesDeref;
 
-#[cfg(stage0)]
-impl<'a> Fn<(&'a u8,)> for BytesDeref {
-    type Output = u8;
-
-    #[inline]
-    extern "rust-call" fn call(&self, (ptr,): (&'a u8,)) -> u8 {
-        *ptr
-    }
-}
-
-#[cfg(not(stage0))]
 impl<'a> Fn<(&'a u8,)> for BytesDeref {
     #[inline]
     extern "rust-call" fn call(&self, (ptr,): (&'a u8,)) -> u8 {
@@ -559,7 +548,6 @@ impl<'a> Fn<(&'a u8,)> for BytesDeref {
     }
 }
 
-#[cfg(not(stage0))]
 impl<'a> FnMut<(&'a u8,)> for BytesDeref {
     #[inline]
     extern "rust-call" fn call_mut(&mut self, (ptr,): (&'a u8,)) -> u8 {
@@ -567,7 +555,6 @@ impl<'a> FnMut<(&'a u8,)> for BytesDeref {
     }
 }
 
-#[cfg(not(stage0))]
 impl<'a> FnOnce<(&'a u8,)> for BytesDeref {
     type Output = u8;
 
@@ -1319,50 +1306,6 @@ mod traits {
     /// // byte 100 is outside the string
     /// // &s[3 .. 100];
     /// ```
-    #[cfg(stage0)]
-    #[stable(feature = "rust1", since = "1.0.0")]
-    impl ops::Index<ops::Range<usize>> for str {
-        type Output = str;
-        #[inline]
-        fn index(&self, index: &ops::Range<usize>) -> &str {
-            // is_char_boundary checks that the index is in [0, .len()]
-            if index.start <= index.end &&
-               self.is_char_boundary(index.start) &&
-               self.is_char_boundary(index.end) {
-                unsafe { self.slice_unchecked(index.start, index.end) }
-            } else {
-                super::slice_error_fail(self, index.start, index.end)
-            }
-        }
-    }
-
-    /// Returns a slice of the given string from the byte range
-    /// [`begin`..`end`).
-    ///
-    /// This operation is `O(1)`.
-    ///
-    /// Panics when `begin` and `end` do not point to valid characters
-    /// or point beyond the last character of the string.
-    ///
-    /// # Examples
-    ///
-    /// ```
-    /// let s = "Löwe 老虎 Léopard";
-    /// assert_eq!(&s[0 .. 1], "L");
-    ///
-    /// assert_eq!(&s[1 .. 9], "öwe 老");
-    ///
-    /// // these will panic:
-    /// // byte 2 lies within `ö`:
-    /// // &s[2 ..3];
-    ///
-    /// // byte 8 lies within `老`
-    /// // &s[1 .. 8];
-    ///
-    /// // byte 100 is outside the string
-    /// // &s[3 .. 100];
-    /// ```
-    #[cfg(not(stage0))]
     #[stable(feature = "rust1", since = "1.0.0")]
     impl ops::Index<ops::Range<usize>> for str {
         type Output = str;
@@ -1390,18 +1333,6 @@ mod traits {
     impl ops::Index<ops::RangeTo<usize>> for str {
         type Output = str;
 
-        #[cfg(stage0)]
-        #[inline]
-        fn index(&self, index: &ops::RangeTo<usize>) -> &str {
-            // is_char_boundary checks that the index is in [0, .len()]
-            if self.is_char_boundary(index.end) {
-                unsafe { self.slice_unchecked(0, index.end) }
-            } else {
-                super::slice_error_fail(self, 0, index.end)
-            }
-        }
-
-        #[cfg(not(stage0))]
         #[inline]
         fn index(&self, index: ops::RangeTo<usize>) -> &str {
             // is_char_boundary checks that the index is in [0, .len()]
@@ -1423,18 +1354,6 @@ mod traits {
     impl ops::Index<ops::RangeFrom<usize>> for str {
         type Output = str;
 
-        #[cfg(stage0)]
-        #[inline]
-        fn index(&self, index: &ops::RangeFrom<usize>) -> &str {
-            // is_char_boundary checks that the index is in [0, .len()]
-            if self.is_char_boundary(index.start) {
-                unsafe { self.slice_unchecked(index.start, self.len()) }
-            } else {
-                super::slice_error_fail(self, index.start, self.len())
-            }
-        }
-
-        #[cfg(not(stage0))]
         #[inline]
         fn index(&self, index: ops::RangeFrom<usize>) -> &str {
             // is_char_boundary checks that the index is in [0, .len()]
@@ -1450,13 +1369,6 @@ mod traits {
     impl ops::Index<ops::RangeFull> for str {
         type Output = str;
 
-        #[cfg(stage0)]
-        #[inline]
-        fn index(&self, _index: &ops::RangeFull) -> &str {
-            self
-        }
-
-        #[cfg(not(stage0))]
         #[inline]
         fn index(&self, _index: ops::RangeFull) -> &str {
             self