fn run_post_borrowck_cleanup_passes<'tcx>(
    tcx: TyCtxt<'tcx>,
    body: &mut Body<'tcx>,
    def_id: LocalDefId,
    promoted: Option<Promoted>,
) {
    debug!("post_borrowck_cleanup({:?})", def_id);

    let post_borrowck_cleanup: &[&dyn MirPass<'tcx>] = &[
        // Remove all things only needed by analysis
        &no_landing_pads::NoLandingPads::new(tcx),
        &simplify_branches::SimplifyBranches::new("initial"),
        &remove_noop_landing_pads::RemoveNoopLandingPads,
        &cleanup_post_borrowck::CleanupNonCodegenStatements,
        &simplify::SimplifyCfg::new("early-opt"),
        // These next passes must be executed together
        &add_call_guards::CriticalCallEdges,
        &elaborate_drops::ElaborateDrops,
        &no_landing_pads::NoLandingPads::new(tcx),
        // AddMovesForPackedDrops needs to run after drop
        // elaboration.
        &add_moves_for_packed_drops::AddMovesForPackedDrops,
        // `AddRetag` needs to run after `ElaborateDrops`. Otherwise it should run fairly late,
        // but before optimizations begin.
        &add_retag::AddRetag,
        &simplify::SimplifyCfg::new("elaborate-drops"),
    ];

    run_passes(
        tcx,
        body,
        InstanceDef::Item(def_id.to_def_id()),
        promoted,
        MirPhase::DropElab,
        &[post_borrowck_cleanup],
    );
}
/// After this series of passes, no lifetime analysis based on borrowing can be done.
After this series of passes, no lifetime analysis based on borrowing can be done.
After this series of passes no lifetime analysis based on borrowing can be done .
fn run_post_borrowck_cleanup_passes<'tcx>(
    tcx: TyCtxt<'tcx>,
    body: &mut Body<'tcx>,
    def_id: LocalDefId,
    promoted: Option<Promoted>,
) {
    debug!("post_borrowck_cleanup({:?})", def_id);
    let post_borrowck_cleanup: &[&dyn MirPass<'tcx>] = &[
        // Remove all things only needed by analysis
        &no_landing_pads::NoLandingPads::new(tcx),
        &simplify_branches::SimplifyBranches::new("initial"),
        &remove_noop_landing_pads::RemoveNoopLandingPads,
        &cleanup_post_borrowck::CleanupNonCodegenStatements,
        &simplify::SimplifyCfg::new("early-opt"),
        // These next passes must be executed together
        &add_call_guards::CriticalCallEdges,
        &elaborate_drops::ElaborateDrops,
        &no_landing_pads::NoLandingPads::new(tcx),
        // AddMovesForPackedDrops needs to run after drop
        // elaboration.
        &add_moves_for_packed_drops::AddMovesForPackedDrops,
        // `AddRetag` needs to run after `ElaborateDrops`. Otherwise it should run fairly late,
        // but before optimizations begin.
        &add_retag::AddRetag,
        &simplify::SimplifyCfg::new("elaborate-drops"),
    ];
    run_passes(
        tcx,
        body,
        InstanceDef::Item(def_id.to_def_id()),
        promoted,
        MirPhase::DropElab,
        &[post_borrowck_cleanup],
    );
}
fn run_post_borrowck_cleanup_passes < ' tcx > ( tcx : TyCtxt < ' tcx > , body : & mut Body < ' tcx > , def_id : LocalDefId , promoted : Option < Promoted > , ) { debug ! ( " " def_id ) ; let post_borrowck_cleanup : & [ & dyn MirPass < ' tcx > ] = & [ // Remove all things only needed by analysis & no_landing_pads :: NoLandingPads :: new ( tcx ) , & simplify_branches :: SimplifyBranches :: new ( " " ) , & remove_noop_landing_pads :: RemoveNoopLandingPads , & cleanup_post_borrowck :: CleanupNonCodegenStatements , & simplify :: SimplifyCfg :: new ( " " ) , // These next passes must be executed together & add_call_guards :: CriticalCallEdges , & elaborate_drops :: ElaborateDrops , & no_landing_pads :: NoLandingPads :: new ( tcx ) , // AddMovesForPackedDrops needs to run after drop // elaboration. & add_moves_for_packed_drops :: AddMovesForPackedDrops , // `AddRetag` needs to run after `ElaborateDrops`. Otherwise it should run fairly late, // but before optimizations begin. & add_retag :: AddRetag , & simplify :: SimplifyCfg :: new ( " " ) , ] ; run_passes ( tcx , body , InstanceDef :: Item ( def_id . to_def_id ( ) ) , promoted , MirPhase :: DropElab , & [ post_borrowck_cleanup ] , ) ; }
After this series of passes, no lifetime analysis based on borrowing can be done.
After this series of passes no lifetime analysis based on borrowing can be done .
tcx
TyCtxt<'tcx>
body
&mut Body<'tcx>
def_id
LocalDefId
promoted
Option<Promoted>
tcx
TyCtxt<'tcx>
body
&mut Body<'tcx>
def_id
LocalDefId
promoted
Option<Promoted>