[][src]Enum rustc_mir::transform::add_call_guards::AddCallGuards

pub enum AddCallGuards {




impl AddCallGuards[src]

pub fn add_call_guards(&self, body: &mut Body<'_>)[src]

Trait Implementations

impl<'tcx> MirPass<'tcx> for AddCallGuards[src]

Breaks outgoing critical edges for call terminators in the MIR.

Critical edges are edges that are neither the only edge leaving a block, nor the only edge entering one.

When you want something to happen "along" an edge, you can either do at the end of the predecessor block, or at the start of the successor block. Critical edges have to be broken in order to prevent "edge actions" from affecting other edges. We need this for calls that are codegened to LLVM invoke instructions, because invoke is a block terminator in LLVM so we can't insert any code to handle the call's result into the block that performs the call.

This function will break those edges by inserting new blocks along them.

NOTE: Simplify CFG will happily undo most of the work this pass does.

impl PartialEq<AddCallGuards> for AddCallGuards[src]

impl StructuralPartialEq for AddCallGuards[src]

Auto Trait Implementations

impl RefUnwindSafe for AddCallGuards

impl Send for AddCallGuards

impl Sync for AddCallGuards

impl Unpin for AddCallGuards

impl UnwindSafe for AddCallGuards

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<T> From<T> for T[src]

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

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]