Function rustc_borrowck::type_check::liveness::generate

source ·
pub(super) fn generate<'mir, 'tcx>(
    typeck: &mut TypeChecker<'_, 'tcx>,
    body: &Body<'tcx>,
    elements: &Rc<DenseLocationMap>,
    flow_inits: &mut ResultsCursor<'mir, 'tcx, MaybeInitializedPlaces<'mir, 'tcx>>,
    move_data: &MoveData<'tcx>,
    location_table: &LocationTable,
    use_polonius: bool
Expand description

Combines liveness analysis with initialization analysis to determine which variables are live at which points, both due to ordinary uses and drops. Returns a set of (ty, location) pairs that indicate which types must be live at which point in the CFG. This vector is consumed by constraint_generation.

N.B., this computation requires normalization; therefore, it must be performed before