diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-12-19 22:45:42 +0100 |
|---|---|---|
| committer | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-12-19 22:45:42 +0100 |
| commit | 3b0af1d87d53a070c3c046a223b78ad62ec901a8 (patch) | |
| tree | 31750e3ce333d56a07522827a461eff637c48b90 | |
| parent | 2a9f1f8c02f8eb87cebe75c6fb8413ae79123c31 (diff) | |
| download | rust-3b0af1d87d53a070c3c046a223b78ad62ec901a8.tar.gz rust-3b0af1d87d53a070c3c046a223b78ad62ec901a8.zip | |
`lower_pattern_unadjusted`: cleanup `Slice(..)` branch.
| -rw-r--r-- | src/librustc_mir/hair/pattern/mod.rs | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/librustc_mir/hair/pattern/mod.rs b/src/librustc_mir/hair/pattern/mod.rs index 8517e2e6fb3..817ba67c763 100644 --- a/src/librustc_mir/hair/pattern/mod.rs +++ b/src/librustc_mir/hair/pattern/mod.rs @@ -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) => { |
