]> git.lizzy.rs Git - rust.git/commitdiff
remove SliceWithSubslice, only used from old trans
authorAriel Ben-Yehuda <ariel.byd@gmail.com>
Sat, 24 Sep 2016 13:42:10 +0000 (16:42 +0300)
committerAriel Ben-Yehuda <ariel.byd@gmail.com>
Wed, 26 Oct 2016 19:41:16 +0000 (22:41 +0300)
src/librustc_const_eval/check_match.rs

index 709eb49dfccf081647c227258c797ae8bdf02f92..135e14aeaaf4f736206f94579d01e8b8c7d75d93 100644 (file)
@@ -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
             }
         }