rustc_borrowck::type_check::liveness

Function generate

Source
pub(super) fn generate<'a, 'tcx>(
    typeck: &mut TypeChecker<'_, 'tcx>,
    body: &Body<'tcx>,
    location_map: &DenseLocationMap,
    flow_inits: ResultsCursor<'a, 'tcx, MaybeInitializedPlaces<'a, 'tcx>>,
    move_data: &MoveData<'tcx>,
)
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