@@ -75,7 +75,7 @@ use crate::thir::Thir;
7575use crate :: traits;
7676use crate :: traits:: solve:: {
7777 self , CanonicalInput , ExternalConstraints , ExternalConstraintsData , PredefinedOpaques ,
78- PredefinedOpaquesData , QueryResult , inspect,
78+ QueryResult , inspect,
7979} ;
8080use crate :: ty:: predicate:: ExistentialPredicateStableCmpExt as _;
8181use crate :: ty:: {
@@ -116,7 +116,7 @@ impl<'tcx> Interner for TyCtxt<'tcx> {
116116
117117 fn mk_predefined_opaques_in_body (
118118 self ,
119- data : PredefinedOpaquesData < Self > ,
119+ data : & [ ( ty :: OpaqueTypeKey < ' tcx > , Ty < ' tcx > ) ] ,
120120 ) -> Self :: PredefinedOpaques {
121121 self . mk_predefined_opaques_in_body ( data)
122122 }
@@ -941,7 +941,7 @@ pub struct CtxtInterners<'tcx> {
941941 layout : InternedSet < ' tcx , LayoutData < FieldIdx , VariantIdx > > ,
942942 adt_def : InternedSet < ' tcx , AdtDefData > ,
943943 external_constraints : InternedSet < ' tcx , ExternalConstraintsData < TyCtxt < ' tcx > > > ,
944- predefined_opaques_in_body : InternedSet < ' tcx , PredefinedOpaquesData < TyCtxt < ' tcx > > > ,
944+ predefined_opaques_in_body : InternedSet < ' tcx , List < ( ty :: OpaqueTypeKey < ' tcx > , Ty < ' tcx > ) > > ,
945945 fields : InternedSet < ' tcx , List < FieldIdx > > ,
946946 local_def_ids : InternedSet < ' tcx , List < LocalDefId > > ,
947947 captures : InternedSet < ' tcx , List < & ' tcx ty:: CapturedPlace < ' tcx > > > ,
@@ -2748,8 +2748,6 @@ direct_interners! {
27482748 adt_def: pub mk_adt_def_from_data( AdtDefData ) : AdtDef -> AdtDef <' tcx>,
27492749 external_constraints: pub mk_external_constraints( ExternalConstraintsData <TyCtxt <' tcx>>) :
27502750 ExternalConstraints -> ExternalConstraints <' tcx>,
2751- predefined_opaques_in_body: pub mk_predefined_opaques_in_body( PredefinedOpaquesData <TyCtxt <' tcx>>) :
2752- PredefinedOpaques -> PredefinedOpaques <' tcx>,
27532751}
27542752
27552753macro_rules! slice_interners {
@@ -2786,6 +2784,7 @@ slice_interners!(
27862784 offset_of: pub mk_offset_of( ( VariantIdx , FieldIdx ) ) ,
27872785 patterns: pub mk_patterns( Pattern <' tcx>) ,
27882786 outlives: pub mk_outlives( ty:: ArgOutlivesPredicate <' tcx>) ,
2787+ predefined_opaques_in_body: pub mk_predefined_opaques_in_body( ( ty:: OpaqueTypeKey <' tcx>, Ty <' tcx>) ) ,
27892788) ;
27902789
27912790impl < ' tcx > TyCtxt < ' tcx > {
@@ -3129,6 +3128,14 @@ impl<'tcx> TyCtxt<'tcx> {
31293128 T :: collect_and_apply ( iter, |xs| self . mk_poly_existential_predicates ( xs) )
31303129 }
31313130
3131+ pub fn mk_predefined_opaques_in_body_from_iter < I , T > ( self , iter : I ) -> T :: Output
3132+ where
3133+ I : Iterator < Item = T > ,
3134+ T : CollectAndApply < ( ty:: OpaqueTypeKey < ' tcx > , Ty < ' tcx > ) , PredefinedOpaques < ' tcx > > ,
3135+ {
3136+ T :: collect_and_apply ( iter, |xs| self . mk_predefined_opaques_in_body ( xs) )
3137+ }
3138+
31323139 pub fn mk_clauses_from_iter < I , T > ( self , iter : I ) -> T :: Output
31333140 where
31343141 I : Iterator < Item = T > ,
0 commit comments