Skip to content

Commit

Permalink
review comment: add claryfing comment
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Aug 14, 2023
1 parent 5021dde commit 298ca67
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions compiler/rustc_hir_typeck/src/_match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
}

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));
}
}
Expand Down

0 comments on commit 298ca67

Please sign in to comment.