Struct rustc_middle::mir::BasicBlockData[][src]

pub struct BasicBlockData<'tcx> {
    pub statements: Vec<Statement<'tcx>>,
    pub terminator: Option<Terminator<'tcx>>,
    pub is_cleanup: bool,

See BasicBlock for documentation on what basic blocks are at a high level.


statements: Vec<Statement<'tcx>>

List of statements in this block.

terminator: Option<Terminator<'tcx>>

Terminator for this block.

N.B., this should generally ONLY be None during construction. Therefore, you should generally access it via the terminator() or terminator_mut() methods. The only exception is that certain passes, such as simplify_cfg, swap out the terminator temporarily with None while they continue to recurse over the set of basic blocks.

is_cleanup: bool

If true, this block lies on an unwind path. This is used during codegen where distinct kinds of basic blocks may be generated (particularly for MSVC cleanup). Unwind blocks must only branch to other unwind blocks.


impl<'tcx> BasicBlockData<'tcx>[src]

pub fn new(terminator: Option<Terminator<'tcx>>) -> BasicBlockData<'tcx>[src]

pub fn terminator(&self) -> &Terminator<'tcx>[src]

Accessor for terminator.

Terminator may not be None after construction of the basic block is complete. This accessor provides a convenience way to reach the terminator.

pub fn terminator_mut(&mut self) -> &mut Terminator<'tcx>[src]

pub fn retain_statements<F>(&mut self, f: F) where
    F: FnMut(&mut Statement<'_>) -> bool

pub fn expand_statements<F, I>(&mut self, f: F) where
    F: FnMut(&mut Statement<'tcx>) -> Option<I>,
    I: TrustedLen<Item = Statement<'tcx>>, 

pub fn visitable(&self, index: usize) -> &dyn MirVisitable<'tcx>[src]

Trait Implementations

impl<'tcx> Clone for BasicBlockData<'tcx>[src]

impl<'tcx> Debug for BasicBlockData<'tcx>[src]

impl<'tcx, __D: TyDecoder<'tcx>> Decodable<__D> for BasicBlockData<'tcx>[src]

impl<'tcx, __E: TyEncoder<'tcx>> Encodable<__E> for BasicBlockData<'tcx>[src]

impl<'tcx, '__ctx> HashStable<StableHashingContext<'__ctx>> for BasicBlockData<'tcx>[src]

impl<'tcx> TypeFoldable<'tcx> for BasicBlockData<'tcx>[src]

Auto Trait Implementations

impl<'tcx> !RefUnwindSafe for BasicBlockData<'tcx>

impl<'tcx> !Send for BasicBlockData<'tcx>

impl<'tcx> !Sync for BasicBlockData<'tcx>

impl<'tcx> Unpin for BasicBlockData<'tcx>

impl<'tcx> !UnwindSafe for BasicBlockData<'tcx>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<'a, T> Captures<'a> for T where
    T: ?Sized

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

impl<T, U> Into<U> for T where
    U: From<T>, 

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

type Error = !

impl<'tcx, T> Subst<'tcx> for T where
    T: TypeFoldable<'tcx>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.

impl<T> WithConstness for T[src]