Skip to content

Commit 9a05cf2

Browse files
committed
tweak
1 parent 480576f commit 9a05cf2

File tree

1 file changed

+2
-3
lines changed
  • compiler/rustc_mir_build/src/build/matches

1 file changed

+2
-3
lines changed

compiler/rustc_mir_build/src/build/matches/mod.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -1464,11 +1464,11 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
14641464
fake_borrows: &mut Option<FxIndexSet<Place<'tcx>>>,
14651465
) {
14661466
debug!("candidate={:#?}\npats={:#?}", candidate, pats);
1467-
let mut or_candidates: Vec<_> = pats
1467+
candidate.subcandidates = pats
14681468
.iter()
14691469
.map(|pat| Candidate::new(place.clone(), pat, candidate.has_guard, self))
14701470
.collect();
1471-
let mut or_candidate_refs: Vec<_> = or_candidates.iter_mut().collect();
1471+
let mut or_candidate_refs: Vec<_> = candidate.subcandidates.iter_mut().collect();
14721472
let otherwise = if candidate.otherwise_block.is_some() {
14731473
&mut candidate.otherwise_block
14741474
} else {
@@ -1482,7 +1482,6 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
14821482
&mut or_candidate_refs,
14831483
fake_borrows,
14841484
);
1485-
candidate.subcandidates = or_candidates;
14861485
self.merge_trivial_subcandidates(candidate, self.source_info(or_span));
14871486
}
14881487

0 commit comments

Comments
 (0)