@@ -277,15 +277,17 @@ impl<'tcx> PoloniusOutOfScopePrecomputer<'_, 'tcx> {
277
277
// We first handle the cases where the loan doesn't go out of scope, depending on the issuing
278
278
// region's successors.
279
279
for scc in sccs. depth_first_search ( issuing_region_scc) {
280
- // 1. Via member constraints
280
+ // 1. Via applied member constraints
281
281
//
282
282
// The issuing region can flow into the choice regions, and they are either:
283
283
// - placeholders or free regions themselves,
284
284
// - or also transitively outlive a free region.
285
285
//
286
- // That is to say, if there are member constraints here, the loan escapes the function
287
- // and cannot go out of scope. We can early return.
288
- if self . regioncx . scc_has_member_constraints ( scc) {
286
+ // That is to say, if there are applied member constraints here, the loan escapes the
287
+ // function and cannot go out of scope. We can early return.
288
+ let scc_has_applied_member_constraints =
289
+ !self . regioncx . applied_member_constraints ( scc) . is_empty ( ) ;
290
+ if scc_has_applied_member_constraints {
289
291
return ;
290
292
}
291
293
@@ -413,12 +415,12 @@ impl<'a, 'tcx> Borrows<'a, 'tcx> {
413
415
let mut polonius_prec = PoloniusOutOfScopePrecomputer :: new ( body, regioncx) ;
414
416
for ( loan_idx, loan_data) in borrow_set. iter_enumerated ( ) {
415
417
let issuing_region = loan_data. region ;
416
- let issued_location = loan_data. reserve_location ;
418
+ let loan_issued_at = loan_data. reserve_location ;
417
419
418
420
polonius_prec. precompute_loans_out_of_scope (
419
421
loan_idx,
420
422
issuing_region,
421
- issued_location ,
423
+ loan_issued_at ,
422
424
) ;
423
425
}
424
426
0 commit comments