@@ -446,9 +446,9 @@ fn do_mir_borrowck<'tcx>(
446
446
local_names,
447
447
region_names : RefCell :: default ( ) ,
448
448
next_region_name : RefCell :: new ( 1 ) ,
449
- polonius_output,
450
449
move_errors : Vec :: new ( ) ,
451
450
diags_buffer,
451
+ polonius_output : polonius_output. as_deref ( ) ,
452
452
polonius_diagnostics : polonius_diagnostics. as_ref ( ) ,
453
453
} ;
454
454
@@ -505,15 +505,14 @@ fn do_mir_borrowck<'tcx>(
505
505
} ;
506
506
507
507
let body_with_facts = if consumer_options. is_some ( ) {
508
- let output_facts = mbcx. polonius_output ;
509
508
Some ( Box :: new ( BodyWithBorrowckFacts {
510
509
body : body_owned,
511
510
promoted,
512
511
borrow_set,
513
512
region_inference_context : regioncx,
514
513
location_table : polonius_input. as_ref ( ) . map ( |_| location_table) ,
515
514
input_facts : polonius_input,
516
- output_facts,
515
+ output_facts : polonius_output ,
517
516
} ) )
518
517
} else {
519
518
None
@@ -700,12 +699,11 @@ struct MirBorrowckCtxt<'a, 'infcx, 'tcx> {
700
699
/// The counter for generating new region names.
701
700
next_region_name : RefCell < usize > ,
702
701
703
- /// Results of Polonius analysis.
704
- polonius_output : Option < Box < PoloniusOutput > > ,
705
-
706
702
diags_buffer : & ' a mut BorrowckDiagnosticsBuffer < ' infcx , ' tcx > ,
707
703
move_errors : Vec < MoveError < ' tcx > > ,
708
704
705
+ /// Results of Polonius analysis.
706
+ polonius_output : Option < & ' a PoloniusOutput > ,
709
707
/// When using `-Zpolonius=next`: the data used to compute errors and diagnostics.
710
708
polonius_diagnostics : Option < & ' a PoloniusDiagnosticsContext > ,
711
709
}
0 commit comments