@@ -403,13 +403,10 @@ impl<'a, 'tcx> Borrows<'a, 'tcx> {
403
403
regioncx : & ' a RegionInferenceContext < ' tcx > ,
404
404
borrow_set : & ' a BorrowSet < ' tcx > ,
405
405
) -> Self {
406
- let mut borrows_out_of_scope_at_location =
407
- calculate_borrows_out_of_scope_at_location ( body, regioncx, borrow_set) ;
408
-
409
- // The in-tree polonius analysis computes loans going out of scope using the set-of-loans
410
- // model, and makes sure they're identical to the existing computation of the set-of-points
411
- // model.
412
- if tcx. sess . opts . unstable_opts . polonius . is_next_enabled ( ) {
406
+ let borrows_out_of_scope_at_location = {
407
+ // The in-tree polonius analysis computes loans going out of scope using the set-of-loans
408
+ // model, and makes sure they're identical to the existing computation of the set-of-points
409
+ // model.
413
410
let mut polonius_prec = PoloniusOutOfScopePrecomputer :: new ( body, regioncx) ;
414
411
for ( loan_idx, loan_data) in borrow_set. iter_enumerated ( ) {
415
412
let issuing_region = loan_data. region ;
@@ -422,13 +419,8 @@ impl<'a, 'tcx> Borrows<'a, 'tcx> {
422
419
) ;
423
420
}
424
421
425
- assert_eq ! (
426
- borrows_out_of_scope_at_location, polonius_prec. loans_out_of_scope_at_location,
427
- "the loans out of scope must be the same as the borrows out of scope"
428
- ) ;
429
-
430
- borrows_out_of_scope_at_location = polonius_prec. loans_out_of_scope_at_location ;
431
- }
422
+ polonius_prec. loans_out_of_scope_at_location
423
+ } ;
432
424
433
425
Borrows { tcx, body, borrow_set, borrows_out_of_scope_at_location }
434
426
}
0 commit comments