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 } }