about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2022-10-27 15:41:50 +0000
committerMichael Goulet <michael@errs.io>2022-10-27 15:43:37 +0000
commit2f9794b84a4ae882edd428c1c3764eec99cdebff (patch)
tree6cf5e447fbaed939d98ff30c474dbfeb1f2d21db /compiler/rustc_hir_analysis/src
parentce11ae5d0de03d23b770f4d7ee912c792678f09d (diff)
downloadrust-2f9794b84a4ae882edd428c1c3764eec99cdebff.tar.gz
rust-2f9794b84a4ae882edd428c1c3764eec99cdebff.zip
remove _types from ocx method names
Diffstat (limited to 'compiler/rustc_hir_analysis/src')
-rw-r--r--compiler/rustc_hir_analysis/src/check/compare_method.rs9
-rw-r--r--compiler/rustc_hir_analysis/src/check/wfcheck.rs6
2 files changed, 6 insertions, 9 deletions
diff --git a/compiler/rustc_hir_analysis/src/check/compare_method.rs b/compiler/rustc_hir_analysis/src/check/compare_method.rs
index 616472a1a3f..1812f7a9efd 100644
--- a/compiler/rustc_hir_analysis/src/check/compare_method.rs
+++ b/compiler/rustc_hir_analysis/src/check/compare_method.rs
@@ -290,7 +290,7 @@ fn compare_predicate_entailment<'tcx>(
     // type would be more appropriate. In other places we have a `Vec<Span>`
     // corresponding to their `Vec<Predicate>`, but we don't have that here.
     // Fixing this would improve the output of test `issue-83765.rs`.
-    let mut result = ocx.sup_types(&cause, param_env, trait_fty, impl_fty);
+    let mut result = ocx.sup(&cause, param_env, trait_fty, impl_fty);
 
     // HACK(RPITIT): #101614. When we are trying to infer the hidden types for
     // RPITITs, we need to equate the output tys instead of just subtyping. If
@@ -298,9 +298,8 @@ fn compare_predicate_entailment<'tcx>(
     // us to infer `_#1t = #'_#2r str`, where `'_#2r` is unconstrained, which gets
     // fixed up to `ReEmpty`, and which is certainly not what we want.
     if trait_fty.has_infer_types() {
-        result = result.and_then(|()| {
-            ocx.equate_types(&cause, param_env, trait_sig.output(), impl_sig.output())
-        });
+        result =
+            result.and_then(|()| ocx.eq(&cause, param_env, trait_sig.output(), impl_sig.output()));
     }
 
     if let Err(terr) = result {
@@ -1383,7 +1382,7 @@ pub(crate) fn raw_compare_const_impl<'tcx>(
 
     debug!("compare_const_impl: trait_ty={:?}", trait_ty);
 
-    let err = ocx.sup_types(&cause, param_env, trait_ty, impl_ty);
+    let err = ocx.sup(&cause, param_env, trait_ty, impl_ty);
 
     if let Err(terr) = err {
         debug!(
diff --git a/compiler/rustc_hir_analysis/src/check/wfcheck.rs b/compiler/rustc_hir_analysis/src/check/wfcheck.rs
index 70a171c02b2..9689a145530 100644
--- a/compiler/rustc_hir_analysis/src/check/wfcheck.rs
+++ b/compiler/rustc_hir_analysis/src/check/wfcheck.rs
@@ -1675,7 +1675,7 @@ fn receiver_is_valid<'tcx>(
 
     // `self: Self` is always valid.
     if can_eq_self(receiver_ty) {
-        if let Err(err) = wfcx.equate_types(&cause, wfcx.param_env, self_ty, receiver_ty) {
+        if let Err(err) = wfcx.eq(&cause, wfcx.param_env, self_ty, receiver_ty) {
             infcx.err_ctxt().report_mismatched_types(&cause, self_ty, receiver_ty, err).emit();
         }
         return true;
@@ -1705,9 +1705,7 @@ fn receiver_is_valid<'tcx>(
             if can_eq_self(potential_self_ty) {
                 wfcx.register_obligations(autoderef.into_obligations());
 
-                if let Err(err) =
-                    wfcx.equate_types(&cause, wfcx.param_env, self_ty, potential_self_ty)
-                {
+                if let Err(err) = wfcx.eq(&cause, wfcx.param_env, self_ty, potential_self_ty) {
                     infcx
                         .err_ctxt()
                         .report_mismatched_types(&cause, self_ty, potential_self_ty, err)