cairo_lang_lowering::borrow_check::demand

Trait DemandReporter

source
pub trait DemandReporter<Var, Aux = ()> {
    type UsePosition: Copy;
    type IntroducePosition: Copy;

    // Provided methods
    fn drop_aux(
        &mut self,
        position: Self::IntroducePosition,
        var: Var,
        _aux: Aux,
    ) { ... }
    fn drop(&mut self, _position: Self::IntroducePosition, _var: Var) { ... }
    fn dup(
        &mut self,
        _position: Self::UsePosition,
        _var: Var,
        _next_usage_position: Self::UsePosition,
    ) { ... }
    fn last_use(&mut self, _position: Self::UsePosition, _var: Var) { ... }
    fn unused_mapped_var(&mut self, _var: Var) { ... }
}
Expand description

A reporting trait that reports each variables dup, drop and last_use positions.

Required Associated Types§

Provided Methods§

source

fn drop_aux(&mut self, position: Self::IntroducePosition, var: Var, _aux: Aux)

source

fn drop(&mut self, _position: Self::IntroducePosition, _var: Var)

source

fn dup( &mut self, _position: Self::UsePosition, _var: Var, _next_usage_position: Self::UsePosition, )

source

fn last_use(&mut self, _position: Self::UsePosition, _var: Var)

source

fn unused_mapped_var(&mut self, _var: Var)

Implementors§