Skip to content

Commit f193593

Browse files
committed
array pattern
1 parent 2793672 commit f193593

File tree

1 file changed

+4
-4
lines changed
  • compiler/rustc_mir_build/src/thir/pattern

1 file changed

+4
-4
lines changed

compiler/rustc_mir_build/src/thir/pattern/_match.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -2300,18 +2300,18 @@ fn split_grouped_constructors<'p, 'tcx>(
23002300
split_ctors.extend(
23012301
borders
23022302
.array_windows()
2303-
.filter_map(|&[fst, snd]| match (fst, snd) {
2304-
(Border::JustBefore(n), Border::JustBefore(m)) => {
2303+
.filter_map(|&pair| match pair {
2304+
[Border::JustBefore(n), Border::JustBefore(m)] => {
23052305
if n < m {
23062306
Some(IntRange { range: n..=(m - 1), ty, span })
23072307
} else {
23082308
None
23092309
}
23102310
}
2311-
(Border::JustBefore(n), Border::AfterMax) => {
2311+
[Border::JustBefore(n), Border::AfterMax] => {
23122312
Some(IntRange { range: n..=u128::MAX, ty, span })
23132313
}
2314-
(Border::AfterMax, _) => None,
2314+
[Border::AfterMax, _] => None,
23152315
})
23162316
.map(IntRange),
23172317
);

0 commit comments

Comments
 (0)