Skip to content

Commit 8917b8e

Browse files
authored
Rollup merge of #61791 - Centril:cleanup-check_pat_path, r=petrochenkov
Small cleanup in `check_pat_path`
2 parents e70a106 + a947b75 commit 8917b8e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/librustc_typeck/check/_match.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -1067,10 +1067,7 @@ https://doc.rust-lang.org/reference/types.html#trait-objects");
10671067
self.set_tainted_by_errors();
10681068
return tcx.types.err;
10691069
}
1070-
Res::Def(DefKind::Method, _) => {
1071-
report_unexpected_variant_res(tcx, res, pat.span, qpath);
1072-
return tcx.types.err;
1073-
}
1070+
Res::Def(DefKind::Method, _) |
10741071
Res::Def(DefKind::Ctor(_, CtorKind::Fictive), _) |
10751072
Res::Def(DefKind::Ctor(_, CtorKind::Fn), _) => {
10761073
report_unexpected_variant_res(tcx, res, pat.span, qpath);

0 commit comments

Comments
 (0)