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

Data for a basic block, including a list of its statements.

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

Fields§

§statements: Vec<Statement<'tcx>, Global>

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.

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§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.