remove SliceWithSubslice, only used from old trans

This commit is contained in:
Ariel Ben-Yehuda 2016-09-24 16:42:10 +03:00
parent e5c01f4633
commit b69cca6da4
1 changed files with 0 additions and 12 deletions

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