Enum rustc::mir::TerminatorKind [] [src]

pub enum TerminatorKind<'tcx> {
    Goto {
        target: BasicBlock,
    },
    SwitchInt {
        discr: Operand<'tcx>,
        switch_ty: Ty<'tcx>,
        values: Cow<'tcx, [ConstInt]>,
        targets: Vec<BasicBlock>,
    },
    Resume,
    Return,
    Unreachable,
    Drop {
        location: Lvalue<'tcx>,
        target: BasicBlock,
        unwind: Option<BasicBlock>,
    },
    DropAndReplace {
        location: Lvalue<'tcx>,
        value: Operand<'tcx>,
        target: BasicBlock,
        unwind: Option<BasicBlock>,
    },
    Call {
        func: Operand<'tcx>,
        args: Vec<Operand<'tcx>>,
        destination: Option<(Lvalue<'tcx>, BasicBlock)>,
        cleanup: Option<BasicBlock>,
    },
    Assert {
        cond: Operand<'tcx>,
        expected: bool,
        msg: AssertMessage<'tcx>,
        target: BasicBlock,
        cleanup: Option<BasicBlock>,
    },
}
🔬 This is a nightly-only experimental API. (rustc_private)

Variants

🔬 This is a nightly-only experimental API. (rustc_private)

block should have one successor in the graph; we jump there

Fields of Goto

🔬 This is a nightly-only experimental API. (rustc_private)
🔬 This is a nightly-only experimental API. (rustc_private)

operand evaluates to an integer; jump depending on its value to one of the targets, and otherwise fallback to otherwise

Fields of SwitchInt

🔬 This is a nightly-only experimental API. (rustc_private)

discriminant value being tested

🔬 This is a nightly-only experimental API. (rustc_private)

type of value being tested

🔬 This is a nightly-only experimental API. (rustc_private)

Possible values. The locations to branch to in each case are found in the corresponding indices from the targets vector.

🔬 This is a nightly-only experimental API. (rustc_private)

Possible branch sites. The last element of this vector is used for the otherwise branch, so values.len() == targets.len() + 1 should hold.

🔬 This is a nightly-only experimental API. (rustc_private)

Indicates that the landing pad is finished and unwinding should continue. Emitted by build::scope::diverge_cleanup.

🔬 This is a nightly-only experimental API. (rustc_private)

Indicates a normal return. The return pointer lvalue should have been filled in by now. This should occur at most once.

🔬 This is a nightly-only experimental API. (rustc_private)

Indicates a terminator that can never be reached.

🔬 This is a nightly-only experimental API. (rustc_private)

Drop the Lvalue

Fields of Drop

🔬 This is a nightly-only experimental API. (rustc_private)
🔬 This is a nightly-only experimental API. (rustc_private)
🔬 This is a nightly-only experimental API. (rustc_private)
🔬 This is a nightly-only experimental API. (rustc_private)

Drop the Lvalue and assign the new value over it

Fields of DropAndReplace

🔬 This is a nightly-only experimental API. (rustc_private)
🔬 This is a nightly-only experimental API. (rustc_private)
🔬 This is a nightly-only experimental API. (rustc_private)
🔬 This is a nightly-only experimental API. (rustc_private)
🔬 This is a nightly-only experimental API. (rustc_private)

Block ends with a call of a converging function

Fields of Call

🔬 This is a nightly-only experimental API. (rustc_private)

The function that’s being called

🔬 This is a nightly-only experimental API. (rustc_private)

Arguments the function is called with

🔬 This is a nightly-only experimental API. (rustc_private)

Destination for the return value. If some, the call is converging.

🔬 This is a nightly-only experimental API. (rustc_private)

Cleanups to be done if the call unwinds.

🔬 This is a nightly-only experimental API. (rustc_private)

Jump to the target if the condition has the expected value, otherwise panic with a message and a cleanup target.

Fields of Assert

🔬 This is a nightly-only experimental API. (rustc_private)
🔬 This is a nightly-only experimental API. (rustc_private)
🔬 This is a nightly-only experimental API. (rustc_private)
🔬 This is a nightly-only experimental API. (rustc_private)
🔬 This is a nightly-only experimental API. (rustc_private)

Methods

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

🔬 This is a nightly-only experimental API. (rustc_private)

🔬 This is a nightly-only experimental API. (rustc_private)

🔬 This is a nightly-only experimental API. (rustc_private)

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

🔬 This is a nightly-only experimental API. (rustc_private)

Write the "head" part of the terminator; that is, its name and the data it uses to pick the successor basic block, if any. The only information not inlcuded is the list of possible successors, which may be rendered differently between the text and the graphviz format.

🔬 This is a nightly-only experimental API. (rustc_private)

Return the list of labels for the edges to the successor basic blocks.

Trait Implementations

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'tcx> Encodable for TerminatorKind<'tcx>
[src]

🔬 This is a nightly-only experimental API. (rustc_private)

deprecated in favor of rustc-serialize on crates.io

impl<'tcx> Decodable for TerminatorKind<'tcx>
[src]

🔬 This is a nightly-only experimental API. (rustc_private)

deprecated in favor of rustc-serialize on crates.io

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

Formats the value using the given formatter.