@@ -15,7 +15,6 @@ use tracing::debug;
15
15
use crate :: constraints:: { ConstraintSccIndex , OutlivesConstraintSet } ;
16
16
use crate :: consumers:: OutlivesConstraint ;
17
17
use crate :: diagnostics:: UniverseInfo ;
18
- use crate :: member_constraints:: MemberConstraintSet ;
19
18
use crate :: region_infer:: values:: { LivenessValues , PlaceholderIndices } ;
20
19
use crate :: region_infer:: { ConstraintSccs , RegionDefinition , Representative , TypeTest } ;
21
20
use crate :: ty:: VarianceDiagInfo ;
@@ -30,7 +29,6 @@ pub(crate) struct LoweredConstraints<'tcx> {
30
29
pub ( crate ) constraint_sccs : Sccs < RegionVid , ConstraintSccIndex > ,
31
30
pub ( crate ) definitions : Frozen < IndexVec < RegionVid , RegionDefinition < ' tcx > > > ,
32
31
pub ( crate ) scc_annotations : IndexVec < ConstraintSccIndex , RegionTracker > ,
33
- pub ( crate ) member_constraints : MemberConstraintSet < ' tcx , RegionVid > ,
34
32
pub ( crate ) outlives_constraints : Frozen < OutlivesConstraintSet < ' tcx > > ,
35
33
pub ( crate ) type_tests : Vec < TypeTest < ' tcx > > ,
36
34
pub ( crate ) liveness_constraints : LivenessValues ,
@@ -147,9 +145,10 @@ impl scc::Annotation for RegionTracker {
147
145
148
146
/// Determines if the region variable definitions contain
149
147
/// placeholders, and compute them for later use.
150
- fn region_definitions < ' tcx > (
151
- universal_regions : & UniversalRegions < ' tcx > ,
148
+ // FIXME: This is also used by opaque type handling. Move it to a separate file.
149
+ pub ( super ) fn region_definitions < ' tcx > (
152
150
infcx : & BorrowckInferCtxt < ' tcx > ,
151
+ universal_regions : & UniversalRegions < ' tcx > ,
153
152
) -> ( Frozen < IndexVec < RegionVid , RegionDefinition < ' tcx > > > , bool ) {
154
153
let var_infos = infcx. get_region_var_infos ( ) ;
155
154
// Create a RegionDefinition for each inference variable. This happens here because
@@ -213,14 +212,13 @@ pub(crate) fn compute_sccs_applying_placeholder_outlives_constraints<'tcx>(
213
212
infcx : & BorrowckInferCtxt < ' tcx > ,
214
213
) -> LoweredConstraints < ' tcx > {
215
214
let universal_regions = & universal_region_relations. universal_regions ;
216
- let ( definitions, has_placeholders) = region_definitions ( universal_regions , infcx ) ;
215
+ let ( definitions, has_placeholders) = region_definitions ( infcx , universal_regions ) ;
217
216
218
217
let MirTypeckRegionConstraints {
219
218
placeholder_indices,
220
219
placeholder_index_to_region : _,
221
220
liveness_constraints,
222
221
mut outlives_constraints,
223
- member_constraints,
224
222
universe_causes,
225
223
type_tests,
226
224
} = constraints;
@@ -246,7 +244,6 @@ pub(crate) fn compute_sccs_applying_placeholder_outlives_constraints<'tcx>(
246
244
247
245
return LoweredConstraints {
248
246
type_tests,
249
- member_constraints,
250
247
constraint_sccs,
251
248
scc_annotations : scc_annotations. scc_to_annotation ,
252
249
definitions,
@@ -283,7 +280,6 @@ pub(crate) fn compute_sccs_applying_placeholder_outlives_constraints<'tcx>(
283
280
constraint_sccs,
284
281
definitions,
285
282
scc_annotations,
286
- member_constraints,
287
283
outlives_constraints : Frozen :: freeze ( outlives_constraints) ,
288
284
type_tests,
289
285
liveness_constraints,
0 commit comments