Skip to content

Commit 2e5f68c

Browse files
committed
fmt
1 parent a059b15 commit 2e5f68c

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

compiler/rustc_mir_build/src/builder/matches/match_pair.rs

+21-4
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,11 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
174174

175175
if !not {
176176
match_pairs.extend(prefix.iter().enumerate().map(|(idx, subpattern)| {
177-
let elem =
178-
ProjectionElem::ConstantIndex { offset: idx as u64, min_length, from_end: false };
177+
let elem = ProjectionElem::ConstantIndex {
178+
offset: idx as u64,
179+
min_length,
180+
from_end: false,
181+
};
179182
MatchPairTree::for_pattern(place.clone_project(elem), subpattern, self)
180183
}));
181184
}
@@ -312,11 +315,25 @@ impl<'pat, 'tcx> MatchPairTree<'pat, 'tcx> {
312315
}
313316

314317
PatKind::Array { ref prefix, ref slice, ref suffix } => {
315-
cx.prefix_slice_suffix(pattern, &mut subpairs, &place_builder, prefix, slice, suffix);
318+
cx.prefix_slice_suffix(
319+
pattern,
320+
&mut subpairs,
321+
&place_builder,
322+
prefix,
323+
slice,
324+
suffix,
325+
);
316326
default_irrefutable()
317327
}
318328
PatKind::Slice { ref prefix, ref slice, ref suffix } => {
319-
cx.prefix_slice_suffix(pattern, &mut subpairs, &place_builder, prefix, slice, suffix);
329+
cx.prefix_slice_suffix(
330+
pattern,
331+
&mut subpairs,
332+
&place_builder,
333+
prefix,
334+
slice,
335+
suffix,
336+
);
320337

321338
if prefix.is_empty() && slice.is_some() && suffix.is_empty() {
322339
default_irrefutable()

0 commit comments

Comments
 (0)