about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-06-13 14:52:00 +0200
committerGitHub <noreply@github.com>2019-06-13 14:52:00 +0200
commit8917b8e32ca5928b83afc8da03746acb4914a53a (patch)
tree3fa262efda57b73d9e6143b9e6ee569fecccd9c4 /src
parente70a1062acc3eb66edecc4d1010a095acbcd2cf1 (diff)
parenta947b751969156d67b2a5c866d8e4d74e1a8b2e0 (diff)
Rollup merge of #61791 - Centril:cleanup-check_pat_path, r=petrochenkov
Small cleanup in `check_pat_path`
Diffstat (limited to 'src')
-rw-r--r--src/librustc_typeck/check/_match.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/librustc_typeck/check/_match.rs b/src/librustc_typeck/check/_match.rs
index 3fea080f299..b882b696938 100644
--- a/src/librustc_typeck/check/_match.rs
+++ b/src/librustc_typeck/check/_match.rs
@@ -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);