From 42772e98e0d1d3ca0f6660c697e881f5de4b392e Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Fri, 5 Jul 2024 22:23:14 +0200 Subject: [PATCH] Address review comments --- compiler/rustc_mir_build/src/build/matches/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/rustc_mir_build/src/build/matches/mod.rs b/compiler/rustc_mir_build/src/build/matches/mod.rs index 2fc510a222b60..841ef2719c99d 100644 --- a/compiler/rustc_mir_build/src/build/matches/mod.rs +++ b/compiler/rustc_mir_build/src/build/matches/mod.rs @@ -1437,17 +1437,17 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { candidates: &mut [&mut Candidate<'_, 'tcx>], ) -> BasicBlock { ensure_sufficient_stack(|| { - self.match_candidates_with_enough_stack(span, scrutinee_span, start_block, candidates) + self.match_candidates_inner(span, scrutinee_span, start_block, candidates) }) } /// Construct the decision tree for `candidates`. Don't call this, call `match_candidates` /// instead to reserve sufficient stack space. - fn match_candidates_with_enough_stack( + fn match_candidates_inner( &mut self, span: Span, scrutinee_span: Span, - start_block: BasicBlock, + mut start_block: BasicBlock, candidates: &mut [&mut Candidate<'_, 'tcx>], ) -> BasicBlock { if let [first, ..] = candidates { @@ -1480,7 +1480,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { }; // Process any candidates that remain. - let BlockAnd(start_block, remaining_candidates) = rest; + let remaining_candidates = unpack!(start_block = rest); self.match_candidates(span, scrutinee_span, start_block, remaining_candidates) }