@@ -75,7 +75,7 @@ use crate::thir::Thir;
75
75
use crate :: traits;
76
76
use crate :: traits:: solve:: {
77
77
self , CanonicalInput , ExternalConstraints , ExternalConstraintsData , PredefinedOpaques ,
78
- PredefinedOpaquesData , QueryResult , inspect,
78
+ QueryResult , inspect,
79
79
} ;
80
80
use crate :: ty:: predicate:: ExistentialPredicateStableCmpExt as _;
81
81
use crate :: ty:: {
@@ -116,7 +116,7 @@ impl<'tcx> Interner for TyCtxt<'tcx> {
116
116
117
117
fn mk_predefined_opaques_in_body (
118
118
self ,
119
- data : PredefinedOpaquesData < Self > ,
119
+ data : & [ ( ty :: OpaqueTypeKey < ' tcx > , Ty < ' tcx > ) ] ,
120
120
) -> Self :: PredefinedOpaques {
121
121
self . mk_predefined_opaques_in_body ( data)
122
122
}
@@ -941,7 +941,7 @@ pub struct CtxtInterners<'tcx> {
941
941
layout : InternedSet < ' tcx , LayoutData < FieldIdx , VariantIdx > > ,
942
942
adt_def : InternedSet < ' tcx , AdtDefData > ,
943
943
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 > ) > > ,
945
945
fields : InternedSet < ' tcx , List < FieldIdx > > ,
946
946
local_def_ids : InternedSet < ' tcx , List < LocalDefId > > ,
947
947
captures : InternedSet < ' tcx , List < & ' tcx ty:: CapturedPlace < ' tcx > > > ,
@@ -2748,8 +2748,6 @@ direct_interners! {
2748
2748
adt_def: pub mk_adt_def_from_data( AdtDefData ) : AdtDef -> AdtDef <' tcx>,
2749
2749
external_constraints: pub mk_external_constraints( ExternalConstraintsData <TyCtxt <' tcx>>) :
2750
2750
ExternalConstraints -> ExternalConstraints <' tcx>,
2751
- predefined_opaques_in_body: pub mk_predefined_opaques_in_body( PredefinedOpaquesData <TyCtxt <' tcx>>) :
2752
- PredefinedOpaques -> PredefinedOpaques <' tcx>,
2753
2751
}
2754
2752
2755
2753
macro_rules! slice_interners {
@@ -2786,6 +2784,7 @@ slice_interners!(
2786
2784
offset_of: pub mk_offset_of( ( VariantIdx , FieldIdx ) ) ,
2787
2785
patterns: pub mk_patterns( Pattern <' tcx>) ,
2788
2786
outlives: pub mk_outlives( ty:: ArgOutlivesPredicate <' tcx>) ,
2787
+ predefined_opaques_in_body: pub mk_predefined_opaques_in_body( ( ty:: OpaqueTypeKey <' tcx>, Ty <' tcx>) ) ,
2789
2788
) ;
2790
2789
2791
2790
impl < ' tcx > TyCtxt < ' tcx > {
@@ -3129,6 +3128,14 @@ impl<'tcx> TyCtxt<'tcx> {
3129
3128
T :: collect_and_apply ( iter, |xs| self . mk_poly_existential_predicates ( xs) )
3130
3129
}
3131
3130
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
+
3132
3139
pub fn mk_clauses_from_iter < I , T > ( self , iter : I ) -> T :: Output
3133
3140
where
3134
3141
I : Iterator < Item = T > ,
0 commit comments