Address review comments · rust-lang/rust@42772e9 (original) (raw)

Original file line number Diff line number Diff line change
@@ -1437,17 +1437,17 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
1437 1437 candidates: &mut [&mut Candidate<'_, 'tcx>],
1438 1438 ) -> BasicBlock {
1439 1439 ensure_sufficient_stack(|
1440 -self.match_candidates_with_enough_stack(span, scrutinee_span, start_block, candidates)
1440 +self.match_candidates_inner(span, scrutinee_span, start_block, candidates)
1441 1441 })
1442 1442 }
1443 1443
1444 1444 /// Construct the decision tree for `candidates`. Don't call this, call `match_candidates`
1445 1445 /// instead to reserve sufficient stack space.
1446 - fn match_candidates_with_enough_stack(
1446 + fn match_candidates_inner(
1447 1447 &mut self,
1448 1448 span: Span,
1449 1449 scrutinee_span: Span,
1450 -start_block: BasicBlock,
1450 +mut start_block: BasicBlock,
1451 1451 candidates: &mut [&mut Candidate<'_, 'tcx>],
1452 1452 ) -> BasicBlock {
1453 1453 if let [first, ..] = candidates {
@@ -1480,7 +1480,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
1480 1480 };
1481 1481
1482 1482 // Process any candidates that remain.
1483 -let BlockAnd(start_block, remaining_candidates) = rest;
1483 +let remaining_candidates = unpack!(start_block = rest);
1484 1484 self.match_candidates(span, scrutinee_span, start_block, remaining_candidates)
1485 1485 }
1486 1486