lower_pattern_unadjusted: cleanup Slice(..) branch.
This commit is contained in:
parent
2a9f1f8c02
commit
3b0af1d87d
1 changed files with 3 additions and 8 deletions
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue