Enum spirt::cfg::ControlInstKind
source · pub enum ControlInstKind {
Unreachable,
Return,
ExitInvocation(ExitInvocationKind),
Branch,
SelectBranch(SelectionKind),
}
Variants§
Unreachable
Reaching this point in the control-flow is undefined behavior, e.g.:
- a
SelectBranch
case that’s known to be impossible - after a function call, where the function never returns
Optimizations can take advantage of this information, to assume that any necessary preconditions for reaching this point, are never met.
Return
Leave the current function, optionally returning a value.
ExitInvocation(ExitInvocationKind)
Leave the current invocation, similar to returning from every function call in the stack (up to and including the entry-point), but potentially indicating a fatal error as well.
Branch
Unconditional branch to a single target.
SelectBranch(SelectionKind)
Branch to one of several targets, chosen by a single value input.
Trait Implementations§
source§impl Clone for ControlInstKind
impl Clone for ControlInstKind
source§fn clone(&self) -> ControlInstKind
fn clone(&self) -> ControlInstKind
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for ControlInstKind
impl Send for ControlInstKind
impl Sync for ControlInstKind
impl Unpin for ControlInstKind
impl UnwindSafe for ControlInstKind
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more