rustc_mir_dataflow::framework

Trait GenKill

Source
pub trait GenKill<T> {
    // Required methods
    fn gen_(&mut self, elem: T);
    fn kill(&mut self, elem: T);

    // Provided methods
    fn gen_all(&mut self, elems: impl IntoIterator<Item = T>) { ... }
    fn kill_all(&mut self, elems: impl IntoIterator<Item = T>) { ... }
}
Expand description

The legal operations for a transfer function in a gen/kill problem.

Required Methods§

Source

fn gen_(&mut self, elem: T)

Inserts elem into the state vector.

Source

fn kill(&mut self, elem: T)

Removes elem from the state vector.

Provided Methods§

Source

fn gen_all(&mut self, elems: impl IntoIterator<Item = T>)

Calls gen for each element in elems.

Source

fn kill_all(&mut self, elems: impl IntoIterator<Item = T>)

Calls kill for each element in elems.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T: Idx> GenKill<T> for MixedBitSet<T>

Source§

fn gen_(&mut self, elem: T)

Source§

fn kill(&mut self, elem: T)

Source§

impl<T: Idx> GenKill<T> for BitSet<T>

Source§

fn gen_(&mut self, elem: T)

Source§

fn kill(&mut self, elem: T)

Implementors§

Source§

impl<T, S: GenKill<T>> GenKill<T> for MaybeReachable<S>