about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/lib.rs12
-rw-r--r--src/libstd/sys/common/wtf8.rs4
-rw-r--r--src/libstd/sys/windows/fs.rs2
3 files changed, 3 insertions, 15 deletions
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index a396c7be09a..d05a5a09614 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -468,15 +468,3 @@ pub mod __rand {
 // the rustdoc documentation for primitive types. Using `include!`
 // because rustdoc only looks for these modules at the crate level.
 include!("primitive_docs.rs");
-
-// FIXME(stage0): remove this after a snapshot
-// HACK: this is needed because the interpretation of slice
-// patterns changed between stage0 and now.
-#[cfg(stage0)]
-fn slice_pat<'a, 'b, T>(t: &'a &'b [T]) -> &'a &'b [T] {
-    t
-}
-#[cfg(not(stage0))]
-fn slice_pat<'a, 'b, T>(t: &'a &'b [T]) -> &'b [T] {
-    *t
-}
diff --git a/src/libstd/sys/common/wtf8.rs b/src/libstd/sys/common/wtf8.rs
index b6be85a4dfa..2c1a656290f 100644
--- a/src/libstd/sys/common/wtf8.rs
+++ b/src/libstd/sys/common/wtf8.rs
@@ -566,7 +566,7 @@ impl Wtf8 {
         if len < 3 {
             return None
         }
-        match ::slice_pat(&&self.bytes[(len - 3)..]) {
+        match &self.bytes[(len - 3)..] {
             &[0xED, b2 @ 0xA0...0xAF, b3] => Some(decode_surrogate(b2, b3)),
             _ => None
         }
@@ -578,7 +578,7 @@ impl Wtf8 {
         if len < 3 {
             return None
         }
-        match ::slice_pat(&&self.bytes[..3]) {
+        match &self.bytes[..3] {
             &[0xED, b2 @ 0xB0...0xBF, b3] => Some(decode_surrogate(b2, b3)),
             _ => None
         }
diff --git a/src/libstd/sys/windows/fs.rs b/src/libstd/sys/windows/fs.rs
index c243e890526..38a17caa2f6 100644
--- a/src/libstd/sys/windows/fs.rs
+++ b/src/libstd/sys/windows/fs.rs
@@ -117,7 +117,7 @@ impl Drop for FindNextFileHandle {
 
 impl DirEntry {
     fn new(root: &Arc<PathBuf>, wfd: &c::WIN32_FIND_DATAW) -> Option<DirEntry> {
-        match ::slice_pat(&&wfd.cFileName[0..3]) {
+        match &wfd.cFileName[0..3] {
             // check for '.' and '..'
             &[46, 0, ..] |
             &[46, 46, 0, ..] => return None,