about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOliver Scherer <github35764891676564198441@oli-obk.de>2020-09-23 17:55:14 +0200
committerOliver Scherer <github35764891676564198441@oli-obk.de>2020-09-23 17:55:14 +0200
commit6a33de017007233346c26a6f7b20c3e35e6b9e90 (patch)
tree1cb364e1e6acd1660fd6f191ee7ea2806c33170f
parent9a7e66aeafe8debdee9b3b5e128c47034864f2b1 (diff)
downloadrust-6a33de017007233346c26a6f7b20c3e35e6b9e90.tar.gz
rust-6a33de017007233346c26a6f7b20c3e35e6b9e90.zip
Name function correctly
-rw-r--r--compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs b/compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs
index f80c60b181e..78b0a5a82eb 100644
--- a/compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs
+++ b/compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs
@@ -168,7 +168,7 @@ impl<'a, 'tcx> ConstToPat<'a, 'tcx> {
                     }
                 });
 
-                if !self.type_has_partial_eq_impl(cv.ty) {
+                if !self.type_may_have_partial_eq_impl(cv.ty) {
                     // span_fatal avoids ICE from resolution of non-existent method (rare case).
                     self.tcx().sess.span_fatal(self.span, &msg);
                 } else if mir_structural_match_violation && !self.saw_const_match_lint.get() {
@@ -190,7 +190,7 @@ impl<'a, 'tcx> ConstToPat<'a, 'tcx> {
         inlined_const_as_pat
     }
 
-    fn type_has_partial_eq_impl(&self, ty: Ty<'tcx>) -> bool {
+    fn type_may_have_partial_eq_impl(&self, ty: Ty<'tcx>) -> bool {
         // double-check there even *is* a semantic `PartialEq` to dispatch to.
         //
         // (If there isn't, then we can safely issue a hard
@@ -267,7 +267,7 @@ impl<'a, 'tcx> ConstToPat<'a, 'tcx> {
                 PatKind::Wild
             }
             ty::Adt(..)
-                if !self.type_has_partial_eq_impl(cv.ty)
+                if !self.type_may_have_partial_eq_impl(cv.ty)
                     // FIXME(#73448): Find a way to bring const qualification into parity with
                     // `search_for_structural_match_violation` and then remove this condition.
                     && self.search_for_structural_match_violation(cv.ty).is_some() =>