Skip to main content

visit_local_usage

Function visit_local_usage 

Source
pub fn visit_local_usage<const N: usize>(
    locals: [Local; N],
    mir: &Body<'_>,
    location: Location,
) -> Option<[LocalUsage; N]>
Expand description

Collects usage locations (reads, consumes or mutations) for the set of the locals across blocks where their storage remains live relative to the location specified.

Returns:

  • Some([LocalUsage; N]) containing usage metadata for each local in locals.
  • None if the analysis fails or location is unreachable.