remove SliceWithSubslice, only used from old trans
This commit is contained in:
@@ -127,8 +127,6 @@ pub enum Constructor {
|
|||||||
ConstantRange(ConstVal, ConstVal),
|
ConstantRange(ConstVal, ConstVal),
|
||||||
/// Array patterns of length n.
|
/// Array patterns of length n.
|
||||||
Slice(usize),
|
Slice(usize),
|
||||||
/// Array patterns with a subslice.
|
|
||||||
SliceWithSubslice(usize, usize)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq)]
|
#[derive(Clone, PartialEq)]
|
||||||
@@ -1042,16 +1040,6 @@ pub fn specialize<'a, 'b, 'tcx>(
|
|||||||
after.iter().map(|p| wpat(p))
|
after.iter().map(|p| wpat(p))
|
||||||
).collect())
|
).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
|
_ => None
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user