rustc_borrowck::type_check

Module liveness

source

Modules§

Structs§

  • Visitor looking for regions that should be live within rvalues or calls.

Functions§

  • generate πŸ”’
    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.
  • Some variables are β€œregular live” at location – i.e., they may be used later. This means that all regions appearing in their type must be live at location.
  • Computes all regions that are (currently) known to outlive free regions. For these regions, we do not need to compute liveness, since the outlives constraints will ensure that they are live over the whole fn body anyhow.