about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/infer.rs
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-05-15 10:05:25 -0400
committerMichael Goulet <michael@errs.io>2024-05-16 14:23:47 -0400
commit11ec3eca740d128eee15c40f930c4d13d72be7dd (patch)
tree5a504a05011ac96618088805bc6ddf97abb6bc48 /compiler/rustc_trait_selection/src/infer.rs
parent97bf25c8cf6c7c97c851c6e8bc94fd0824885e6f (diff)
downloadrust-11ec3eca740d128eee15c40f930c4d13d72be7dd.tar.gz
rust-11ec3eca740d128eee15c40f930c4d13d72be7dd.zip
Rename ToPredicate for Upcast
Diffstat (limited to 'compiler/rustc_trait_selection/src/infer.rs')
-rw-r--r--compiler/rustc_trait_selection/src/infer.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/infer.rs b/compiler/rustc_trait_selection/src/infer.rs
index 3dc55509dad..6797be5cdd0 100644
--- a/compiler/rustc_trait_selection/src/infer.rs
+++ b/compiler/rustc_trait_selection/src/infer.rs
@@ -10,7 +10,7 @@ use rustc_middle::infer::canonical::{Canonical, CanonicalQueryResponse, QueryRes
 use rustc_middle::traits::query::NoSolution;
 use rustc_middle::traits::ObligationCause;
 use rustc_middle::ty::{self, Ty, TyCtxt, TypeFoldable, TypeVisitableExt};
-use rustc_middle::ty::{GenericArg, ToPredicate};
+use rustc_middle::ty::{GenericArg, Upcast};
 use rustc_span::DUMMY_SP;
 
 use std::fmt::Debug;
@@ -63,7 +63,7 @@ impl<'tcx> InferCtxt<'tcx> {
             cause: traits::ObligationCause::dummy(),
             param_env,
             recursion_depth: 0,
-            predicate: ty::Binder::dummy(trait_ref).to_predicate(self.tcx),
+            predicate: ty::Binder::dummy(trait_ref).upcast(self.tcx),
         };
         self.evaluate_obligation(&obligation).unwrap_or(traits::EvaluationResult::EvaluatedToErr)
     }