remove SliceWithSubslice, only used from old trans
This commit is contained in:
parent
e5c01f4633
commit
b69cca6da4
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user