1
Fork 0

Add postfix match MatchSource to HIR

This commit is contained in:
Ross Smyth 2024-03-02 20:55:48 -05:00
parent d4ba888787
commit 567c98b30f
4 changed files with 10 additions and 3 deletions

View file

@ -481,6 +481,7 @@ impl<'p, 'tcx> MatchVisitor<'p, 'tcx> {
// when the iterator is an uninhabited type. unreachable_code will trigger instead.
hir::MatchSource::ForLoopDesugar if arms.len() == 1 => {}
hir::MatchSource::ForLoopDesugar
| hir::MatchSource::Postfix
| hir::MatchSource::Normal
| hir::MatchSource::FormatArgs => report_arm_reachability(&cx, &report),
// Unreachable patterns in try and await expressions occur when one of