lower_pattern_unadjusted: cleanup Slice(..) branch.

This commit is contained in:
Mazdak Farrokhzad 2019-12-19 22:45:42 +01:00
parent 2a9f1f8c02
commit 3b0af1d87d

View file

@ -550,15 +550,10 @@ impl<'a, 'tcx> PatCtxt<'a, 'tcx> {
hir::PatKind::Slice(ref prefix, ref slice, ref suffix) => {
match ty.kind {
ty::Slice(..) |
ty::Array(..) =>
self.slice_or_array_pattern(pat.span, ty, prefix, slice, suffix),
_ => span_bug!(
pat.span,
"unexpanded type for vector pattern: {:?}",
ty
),
ty::Slice(..) | ty::Array(..) => {}
_ => span_bug!(pat.span, "unexpanded type for vector pattern: {:?}", ty),
}
self.slice_or_array_pattern(pat.span, ty, prefix, slice, suffix)
}
hir::PatKind::Tuple(ref subpatterns, ddpos) => {