diff options
| author | Bastian Kauschke <bastian_kauschke@hotmail.de> | 2020-09-17 10:01:24 +0200 |
|---|---|---|
| committer | Bastian Kauschke <bastian_kauschke@hotmail.de> | 2020-09-20 08:11:05 +0200 |
| commit | bfb221b21e13e8fd71a8fc3a2df23e7f0e775df3 (patch) | |
| tree | edce7d6a554e51ffff551f21b3e18ee2fe836fd0 | |
| parent | 3435683fd5930676b5a7ccd40dc08e4758e8b90a (diff) | |
| download | rust-bfb221b21e13e8fd71a8fc3a2df23e7f0e775df3.tar.gz rust-bfb221b21e13e8fd71a8fc3a2df23e7f0e775df3.zip | |
array pattern
| -rw-r--r-- | compiler/rustc_mir_build/src/thir/pattern/_match.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_mir_build/src/thir/pattern/_match.rs b/compiler/rustc_mir_build/src/thir/pattern/_match.rs index e71e1abd680..eddd2882406 100644 --- a/compiler/rustc_mir_build/src/thir/pattern/_match.rs +++ b/compiler/rustc_mir_build/src/thir/pattern/_match.rs @@ -2300,18 +2300,18 @@ fn split_grouped_constructors<'p, 'tcx>( split_ctors.extend( borders .array_windows() - .filter_map(|&[fst, snd]| match (fst, snd) { - (Border::JustBefore(n), Border::JustBefore(m)) => { + .filter_map(|&pair| match pair { + [Border::JustBefore(n), Border::JustBefore(m)] => { if n < m { Some(IntRange { range: n..=(m - 1), ty, span }) } else { None } } - (Border::JustBefore(n), Border::AfterMax) => { + [Border::JustBefore(n), Border::AfterMax] => { Some(IntRange { range: n..=u128::MAX, ty, span }) } - (Border::AfterMax, _) => None, + [Border::AfterMax, _] => None, }) .map(IntRange), ); |
