@@ -446,9 +446,9 @@ fn do_mir_borrowck<'tcx>(
446446 local_names,
447447 region_names : RefCell :: default ( ) ,
448448 next_region_name : RefCell :: new ( 1 ) ,
449- polonius_output,
450449 move_errors : Vec :: new ( ) ,
451450 diags_buffer,
451+ polonius_output : polonius_output. as_deref ( ) ,
452452 polonius_diagnostics : polonius_diagnostics. as_ref ( ) ,
453453 } ;
454454
@@ -505,15 +505,14 @@ fn do_mir_borrowck<'tcx>(
505505 } ;
506506
507507 let body_with_facts = if consumer_options. is_some ( ) {
508- let output_facts = mbcx. polonius_output ;
509508 Some ( Box :: new ( BodyWithBorrowckFacts {
510509 body : body_owned,
511510 promoted,
512511 borrow_set,
513512 region_inference_context : regioncx,
514513 location_table : polonius_input. as_ref ( ) . map ( |_| location_table) ,
515514 input_facts : polonius_input,
516- output_facts,
515+ output_facts : polonius_output ,
517516 } ) )
518517 } else {
519518 None
@@ -700,12 +699,11 @@ struct MirBorrowckCtxt<'a, 'infcx, 'tcx> {
700699 /// The counter for generating new region names.
701700 next_region_name : RefCell < usize > ,
702701
703- /// Results of Polonius analysis.
704- polonius_output : Option < Box < PoloniusOutput > > ,
705-
706702 diags_buffer : & ' a mut BorrowckDiagnosticsBuffer < ' infcx , ' tcx > ,
707703 move_errors : Vec < MoveError < ' tcx > > ,
708704
705+ /// Results of Polonius analysis.
706+ polonius_output : Option < & ' a PoloniusOutput > ,
709707 /// When using `-Zpolonius=next`: the data used to compute errors and diagnostics.
710708 polonius_diagnostics : Option < & ' a PoloniusDiagnosticsContext > ,
711709}
0 commit comments