about summary refs log tree commit diff
path: root/compiler/rustc_next_trait_solver/src/delegate.rs
diff options
context:
space:
mode:
authorlcnr <rust@lcnr.de>2025-05-03 03:40:23 +0000
committerlcnr <rust@lcnr.de>2025-05-06 14:59:09 +0000
commit431f02d5312544d222a63d40586527ec704f2d13 (patch)
tree62a78076e94b0fff02d1bd85f40922210b3f74bd /compiler/rustc_next_trait_solver/src/delegate.rs
parentf5d3fe273b8b9e7125bf8856d44793b6cc4b6735 (diff)
downloadrust-431f02d5312544d222a63d40586527ec704f2d13.tar.gz
rust-431f02d5312544d222a63d40586527ec704f2d13.zip
support duplicates in the opaque_types_storage
Diffstat (limited to 'compiler/rustc_next_trait_solver/src/delegate.rs')
-rw-r--r--compiler/rustc_next_trait_solver/src/delegate.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/compiler/rustc_next_trait_solver/src/delegate.rs b/compiler/rustc_next_trait_solver/src/delegate.rs
index 25493970a0c..9e8fbd66b70 100644
--- a/compiler/rustc_next_trait_solver/src/delegate.rs
+++ b/compiler/rustc_next_trait_solver/src/delegate.rs
@@ -39,7 +39,10 @@ pub trait SolverDelegate: Deref<Target = Self::Infcx> + Sized {
         term: <Self::Interner as Interner>::Term,
     ) -> Option<Vec<Goal<Self::Interner, <Self::Interner as Interner>::Predicate>>>;
 
-    fn clone_opaque_types_for_query_response(
+    fn clone_opaque_types_lookup_table(
+        &self,
+    ) -> Vec<(ty::OpaqueTypeKey<Self::Interner>, <Self::Interner as Interner>::Ty)>;
+    fn clone_duplicate_opaque_types(
         &self,
     ) -> Vec<(ty::OpaqueTypeKey<Self::Interner>, <Self::Interner as Interner>::Ty)>;
 
@@ -68,6 +71,12 @@ pub trait SolverDelegate: Deref<Target = Self::Infcx> + Sized {
         hidden_ty: <Self::Interner as Interner>::Ty,
         span: <Self::Interner as Interner>::Span,
     ) -> Option<<Self::Interner as Interner>::Ty>;
+    fn add_duplicate_opaque_type(
+        &self,
+        opaque_type_key: ty::OpaqueTypeKey<Self::Interner>,
+        hidden_ty: <Self::Interner as Interner>::Ty,
+        span: <Self::Interner as Interner>::Span,
+    );
 
     fn add_item_bounds_for_hidden_type(
         &self,