[−][src]Struct rustc_mir::transform::simplify::UsedLocals

struct UsedLocals {
    increment: bool,
    arg_count: u32,
    use_count: IndexVec<Local, u32>,
}

Keeps track of used & unused locals.

Fields

increment: boolarg_count: u32use_count: IndexVec<Local, u32>

Implementations

impl UsedLocals[src]

fn new(body: &Body<'_>) -> Self[src]

Determines which locals are used & unused in the given body.

fn is_used(&self, local: Local) -> bool[src]

Checks if local is used.

Return place and arguments are always considered used.

fn statement_removed<'tcx>(&mut self, statement: &Statement<'tcx>)[src]

Updates the use counts to reflect the removal of given statement.

fn visit_lhs<'tcx>(&mut self, place: &Place<'tcx>, location: Location)[src]

Visits a left-hand side of an assignment.

Trait Implementations

impl<'_> Visitor<'_> for UsedLocals[src]

Auto Trait Implementations

impl RefUnwindSafe for UsedLocals

impl Send for UsedLocals

impl Sync for UsedLocals

impl Unpin for UsedLocals

impl UnwindSafe for UsedLocals

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized, 
[src]

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> WithConstness for T[src]