review comment: add claryfing comment

This commit is contained in:
Esteban Küber 2023-08-14 19:27:12 +00:00
parent 5021dde1a0
commit 298ca6732b

View File

@ -147,6 +147,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
} }
if !arm_ty.is_never() { if !arm_ty.is_never() {
// When a match arm has type `!`, then it doesn't influence the expected type for
// the following arm. If all of the prior arms are `!`, then the influence comes
// from elsewhere and we shouldn't point to any previous arm.
prior_arm = Some((arm_block_id, arm_ty, arm_span)); prior_arm = Some((arm_block_id, arm_ty, arm_span));
} }
} }