@@ -21,7 +21,9 @@ use tracing::{debug, instrument};
2121use crate :: borrow_set:: BorrowSet ;
2222use crate :: consumers:: RustcFacts ;
2323use crate :: diagnostics:: RegionErrors ;
24- use crate :: handle_placeholders:: compute_sccs_applying_placeholder_outlives_constraints;
24+ use crate :: handle_placeholders:: {
25+ LoweredConstraints , compute_sccs_applying_placeholder_outlives_constraints,
26+ } ;
2527use crate :: polonius:: legacy:: {
2628 PoloniusFacts , PoloniusFactsExt , PoloniusLocationTable , PoloniusOutput ,
2729} ;
@@ -92,17 +94,30 @@ pub(crate) fn compute_closure_requirements_modulo_opaques<'tcx>(
9294) -> Option < ClosureRegionRequirements < ' tcx > > {
9395 // FIXME(#146079): we shouldn't have to clone all this stuff here.
9496 // Computing the region graph should take at least some of it by reference/`Rc`.
95- let lowered_constraints = compute_sccs_applying_placeholder_outlives_constraints (
97+ let LoweredConstraints {
98+ constraint_sccs,
99+ definitions,
100+ scc_annotations,
101+ outlives_constraints,
102+ type_tests,
103+ liveness_constraints,
104+ universe_causes,
105+ placeholder_indices,
106+ } = compute_sccs_applying_placeholder_outlives_constraints (
96107 constraints. clone ( ) ,
97108 & universal_region_relations,
98109 infcx,
99110 ) ;
100111
101- let placeholder_indices = lowered_constraints. placeholder_indices . clone ( ) ; // FIXME!!!
102-
103112 let regioncx = RegionInferenceContext :: new (
104113 & infcx,
105- lowered_constraints,
114+ constraint_sccs,
115+ definitions,
116+ scc_annotations,
117+ outlives_constraints,
118+ type_tests,
119+ liveness_constraints,
120+ universe_causes,
106121 universal_region_relations. clone ( ) ,
107122 ) ;
108123
@@ -148,10 +163,28 @@ pub(crate) fn compute_regions<'tcx>(
148163 & lowered_constraints,
149164 ) ;
150165
151- let placeholder_indices = lowered_constraints. placeholder_indices . clone ( ) ;
152-
153- let mut regioncx =
154- RegionInferenceContext :: new ( infcx, lowered_constraints, universal_region_relations) ;
166+ let LoweredConstraints {
167+ constraint_sccs,
168+ definitions,
169+ scc_annotations,
170+ outlives_constraints,
171+ type_tests,
172+ liveness_constraints,
173+ universe_causes,
174+ placeholder_indices,
175+ } = lowered_constraints;
176+
177+ let mut regioncx = RegionInferenceContext :: new (
178+ & infcx,
179+ constraint_sccs,
180+ definitions,
181+ scc_annotations,
182+ outlives_constraints,
183+ type_tests,
184+ liveness_constraints,
185+ universe_causes,
186+ universal_region_relations,
187+ ) ;
155188
156189 // If requested for `-Zpolonius=next`, convert NLL constraints to localized outlives constraints
157190 // and use them to compute loan liveness.
0 commit comments