@@ -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 ,
@@ -143,9 +141,10 @@ impl scc::Annotation for RegionTracker {
143
141
144
142
/// Determines if the region variable definitions contain
145
143
/// placeholders, and compute them for later use.
146
- fn region_definitions < ' tcx > (
147
- universal_regions : & UniversalRegions < ' tcx > ,
144
+ // FIXME: This is also used by opaque type handling. Move it to a separate file.
145
+ pub ( super ) fn region_definitions < ' tcx > (
148
146
infcx : & BorrowckInferCtxt < ' tcx > ,
147
+ universal_regions : & UniversalRegions < ' tcx > ,
149
148
) -> ( Frozen < IndexVec < RegionVid , RegionDefinition < ' tcx > > > , bool ) {
150
149
let var_infos = infcx. get_region_var_infos ( ) ;
151
150
// Create a RegionDefinition for each inference variable. This happens here because
@@ -209,14 +208,13 @@ pub(crate) fn compute_sccs_applying_placeholder_outlives_constraints<'tcx>(
209
208
infcx : & BorrowckInferCtxt < ' tcx > ,
210
209
) -> LoweredConstraints < ' tcx > {
211
210
let universal_regions = & universal_region_relations. universal_regions ;
212
- let ( definitions, has_placeholders) = region_definitions ( universal_regions , infcx ) ;
211
+ let ( definitions, has_placeholders) = region_definitions ( infcx , universal_regions ) ;
213
212
214
213
let MirTypeckRegionConstraints {
215
214
placeholder_indices,
216
215
placeholder_index_to_region : _,
217
216
liveness_constraints,
218
217
mut outlives_constraints,
219
- member_constraints,
220
218
universe_causes,
221
219
type_tests,
222
220
} = constraints;
@@ -242,7 +240,6 @@ pub(crate) fn compute_sccs_applying_placeholder_outlives_constraints<'tcx>(
242
240
243
241
return LoweredConstraints {
244
242
type_tests,
245
- member_constraints,
246
243
constraint_sccs,
247
244
scc_annotations : scc_annotations. scc_to_annotation ,
248
245
definitions,
@@ -279,7 +276,6 @@ pub(crate) fn compute_sccs_applying_placeholder_outlives_constraints<'tcx>(
279
276
constraint_sccs,
280
277
definitions,
281
278
scc_annotations,
282
- member_constraints,
283
279
outlives_constraints : Frozen :: freeze ( outlives_constraints) ,
284
280
type_tests,
285
281
liveness_constraints,
0 commit comments