Small cleanup in check_pat_path.

This commit is contained in:
Mazdak Farrokhzad 2019-06-13 04:58:12 +02:00
parent 2887008e0c
commit a947b75196
1 changed files with 1 additions and 4 deletions

View File

@ -1067,10 +1067,7 @@ https://doc.rust-lang.org/reference/types.html#trait-objects");
self.set_tainted_by_errors();
return tcx.types.err;
}
Res::Def(DefKind::Method, _) => {
report_unexpected_variant_res(tcx, res, pat.span, qpath);
return tcx.types.err;
}
Res::Def(DefKind::Method, _) |
Res::Def(DefKind::Ctor(_, CtorKind::Fictive), _) |
Res::Def(DefKind::Ctor(_, CtorKind::Fn), _) => {
report_unexpected_variant_res(tcx, res, pat.span, qpath);