about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAriel Ben-Yehuda <ariel.byd@gmail.com>2016-09-24 16:42:10 +0300
committerAriel Ben-Yehuda <ariel.byd@gmail.com>2016-10-26 22:41:16 +0300
commitb69cca6da49b2cbb1d6346b5280c464847e2fe20 (patch)
tree0e32889863499113e41603e2edc253d354a218c3
parente5c01f4633f3109914390d67856b9910042a627e (diff)
remove SliceWithSubslice, only used from old trans
-rw-r--r--src/librustc_const_eval/check_match.rs12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/librustc_const_eval/check_match.rs b/src/librustc_const_eval/check_match.rs
index 709eb49dfcc..135e14aeaaf 100644
--- a/src/librustc_const_eval/check_match.rs
+++ b/src/librustc_const_eval/check_match.rs
@@ -127,8 +127,6 @@ pub enum Constructor {
     ConstantRange(ConstVal, ConstVal),
     /// Array patterns of length n.
     Slice(usize),
-    /// Array patterns with a subslice.
-    SliceWithSubslice(usize, usize)
 }
 
 #[derive(Clone, PartialEq)]
@@ -1042,16 +1040,6 @@ pub fn specialize<'a, 'b, 'tcx>(
                         after.iter().map(|p| wpat(p))
                     ).collect())
                 }
-                SliceWithSubslice(prefix, suffix)
-                    if before.len() == prefix
-                        && after.len() == suffix
-                        && slice.is_some() => {
-                    // this is used by trans::_match only
-                    let mut pats: Vec<_> = before.iter()
-                        .map(|p| (&**p, None)).collect();
-                    pats.extend(after.iter().map(|p| (&**p, None)));
-                    Some(pats)
-                }
                 _ => None
             }
         }