Skip to content

Commit cd61dc0

Browse files
inline in check_let
1 parent 157edbc commit cd61dc0

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

compiler/rustc_mir_build/src/thir/pattern/check_match.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -445,15 +445,8 @@ impl<'p, 'tcx> MatchVisitor<'p, 'tcx> {
445445
if let LetSource::PlainLet = self.let_source {
446446
self.check_binding_is_irrefutable(pat, "local binding", scrut, Some(span))
447447
} else {
448-
let Ok(refutability) = self.is_let_irrefutable(pat, scrut) else { return };
449-
if matches!(refutability, Irrefutable) {
450-
report_irrefutable_let_patterns(
451-
self.tcx,
452-
self.lint_level,
453-
self.let_source,
454-
1,
455-
span,
456-
);
448+
if let Ok(Irrefutable) = self.is_let_irrefutable(pat, scrut) {
449+
self.lint_single_let(span);
457450
}
458451
}
459452
}

0 commit comments

Comments
 (0)