about summary refs log tree commit diff
path: root/compiler/rustc_infer/src/infer/projection.rs
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2022-11-09 10:49:28 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2022-11-16 09:25:19 +0000
commit4f11f3b2571c895c08757aa91af57fc1091e45ef (patch)
treefa952f5375f2f1270bd3e4a794434e4836a383bf /compiler/rustc_infer/src/infer/projection.rs
parent634df06fae22066e2a9f2d3ce68c0fc7203bfa92 (diff)
downloadrust-4f11f3b2571c895c08757aa91af57fc1091e45ef.tar.gz
rust-4f11f3b2571c895c08757aa91af57fc1091e45ef.zip
Convert predicates into Predicate in the Obligation constructor
Diffstat (limited to 'compiler/rustc_infer/src/infer/projection.rs')
-rw-r--r--compiler/rustc_infer/src/infer/projection.rs10
1 files changed, 3 insertions, 7 deletions
diff --git a/compiler/rustc_infer/src/infer/projection.rs b/compiler/rustc_infer/src/infer/projection.rs
index 9f12bc972a8..eb6deee291c 100644
--- a/compiler/rustc_infer/src/infer/projection.rs
+++ b/compiler/rustc_infer/src/infer/projection.rs
@@ -1,5 +1,5 @@
 use rustc_middle::traits::ObligationCause;
-use rustc_middle::ty::{self, ToPredicate, Ty};
+use rustc_middle::ty::{self, Ty};
 
 use crate::traits::{Obligation, PredicateObligation};
 
@@ -28,12 +28,8 @@ impl<'tcx> InferCtxt<'tcx> {
         });
         let projection =
             ty::Binder::dummy(ty::ProjectionPredicate { projection_ty, term: ty_var.into() });
-        let obligation = Obligation::with_depth(
-            cause,
-            recursion_depth,
-            param_env,
-            projection.to_predicate(self.tcx),
-        );
+        let obligation =
+            Obligation::with_depth(self.tcx, cause, recursion_depth, param_env, projection);
         obligations.push(obligation);
         ty_var
     }