@@ -262,6 +262,9 @@ struct PoloniusOutOfScopePrecomputer<'a, 'tcx> {
262262
263263impl < ' a , ' tcx > PoloniusOutOfScopePrecomputer < ' a , ' tcx > {
264264 fn new ( body : & ' a Body < ' tcx > , regioncx : & ' a RegionInferenceContext < ' tcx > ) -> Self {
265+ let sccs = regioncx. constraint_sccs ( ) ;
266+ let num_sccs = sccs. num_sccs ( ) ;
267+
265268 // Compute the list of SCCs that are live at all points, as it will be used for all the
266269 // loan scopes we'll compute.
267270 // FIXME: they're surely already available somewhere.
@@ -279,13 +282,12 @@ impl<'a, 'tcx> PoloniusOutOfScopePrecomputer<'a, 'tcx> {
279282 ) ;
280283 live_at_all_points
281284 } )
282- . map ( |r| regioncx . constraint_sccs . scc ( r) )
285+ . map ( |r| sccs . scc ( r) )
283286 . collect ( ) ;
284287
285288 // Pre-compute the set of live SCCs per point
286289 let liveness = & regioncx. liveness_constraints ;
287- let sccs = & regioncx. constraint_sccs ;
288- let mut live_sccs_per_point = SparseBitMatrix :: new ( sccs. num_sccs ( ) ) ;
290+ let mut live_sccs_per_point = SparseBitMatrix :: new ( num_sccs) ;
289291
290292 for region in liveness. rows ( ) {
291293 let scc = sccs. scc ( region) ;
@@ -306,7 +308,7 @@ impl<'a, 'tcx> PoloniusOutOfScopePrecomputer<'a, 'tcx> {
306308 loans_out_of_scope_at_location : FxIndexMap :: default ( ) ,
307309 sccs_live_at_all_points,
308310 live_sccs_per_point,
309- reachability : BitSet :: new_empty ( regioncx . constraint_sccs . num_sccs ( ) ) ,
311+ reachability : BitSet :: new_empty ( num_sccs) ,
310312 reachability_stack : vec ! [ ] ,
311313 }
312314 }
@@ -327,7 +329,7 @@ impl<'tcx> PoloniusOutOfScopePrecomputer<'_, 'tcx> {
327329 // regions via member constraints. (The `OutOfScopePrecomputer` wouldn't be called on a
328330 // region that outlives free regions via outlives constraints.)
329331
330- let sccs = & self . regioncx . constraint_sccs ;
332+ let sccs = self . regioncx . constraint_sccs ( ) ;
331333 let member_constraints = & self . regioncx . member_constraints ;
332334
333335 let issuing_region_scc = sccs. scc ( issuing_region) ;
0 commit comments