about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/ty/predicate.rs
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-07-06 12:21:00 -0400
committerMichael Goulet <michael@errs.io>2024-07-07 11:28:01 -0400
commit90423a7abbddd98b6fbb22e9780991c736b51ca4 (patch)
treeba3f3def980d7945f75b3b1192099a6b7fa49b03 /compiler/rustc_middle/src/ty/predicate.rs
parent58aad3c72c32936b49f92f552e0157b9c8c862ee (diff)
downloadrust-90423a7abbddd98b6fbb22e9780991c736b51ca4.tar.gz
rust-90423a7abbddd98b6fbb22e9780991c736b51ca4.zip
Uplift elaboration
Diffstat (limited to 'compiler/rustc_middle/src/ty/predicate.rs')
-rw-r--r--compiler/rustc_middle/src/ty/predicate.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/ty/predicate.rs b/compiler/rustc_middle/src/ty/predicate.rs
index e9b37503bb3..c2cc3be3aaa 100644
--- a/compiler/rustc_middle/src/ty/predicate.rs
+++ b/compiler/rustc_middle/src/ty/predicate.rs
@@ -46,6 +46,10 @@ pub struct Predicate<'tcx>(
 );
 
 impl<'tcx> rustc_type_ir::inherent::Predicate<TyCtxt<'tcx>> for Predicate<'tcx> {
+    fn as_clause(self) -> Option<ty::Clause<'tcx>> {
+        self.as_clause()
+    }
+
     fn is_coinductive(self, interner: TyCtxt<'tcx>) -> bool {
         self.is_coinductive(interner)
     }
@@ -173,7 +177,11 @@ pub struct Clause<'tcx>(
     pub(super) Interned<'tcx, WithCachedTypeInfo<ty::Binder<'tcx, PredicateKind<'tcx>>>>,
 );
 
-impl<'tcx> rustc_type_ir::inherent::Clause<TyCtxt<'tcx>> for Clause<'tcx> {}
+impl<'tcx> rustc_type_ir::inherent::Clause<TyCtxt<'tcx>> for Clause<'tcx> {
+    fn instantiate_supertrait(self, tcx: TyCtxt<'tcx>, trait_ref: ty::PolyTraitRef<'tcx>) -> Self {
+        self.instantiate_supertrait(tcx, trait_ref)
+    }
+}
 
 impl<'tcx> rustc_type_ir::inherent::IntoKind for Clause<'tcx> {
     type Kind = ty::Binder<'tcx, ClauseKind<'tcx>>;