pub enum TerminatorKind<'tcx> {
Return,
Call {
kind: CallKind<'tcx>,
args: Vec<Operand>,
destination: Place,
target: Option<BasicBlock>,
unwind: UnwindAction,
},
SwitchInt {
discr: Operand,
targets: SwitchTargets,
},
Goto {
target: BasicBlock,
},
Drop {
place: Place,
target: BasicBlock,
unwind: UnwindAction,
},
Assert {
cond: Operand,
expected: bool,
target: BasicBlock,
msg: AssertKind,
},
Unreachable,
FalseEdge {
real_target: BasicBlock,
imaginary_target: BasicBlock,
},
FalseUnwind {
real_target: BasicBlock,
unwind: UnwindAction,
},
Yield {
value: Operand,
resume: BasicBlock,
resume_arg: Place,
drop: Option<BasicBlock>,
},
CoroutineDrop,
UnwindResume,
}
Variants§
Return
Call
SwitchInt
Goto
Fields
§
target: BasicBlock
Drop
Assert
Unreachable
FalseEdge
FalseUnwind
Yield
CoroutineDrop
UnwindResume
Trait Implementations§
Auto Trait Implementations§
impl<'tcx> Freeze for TerminatorKind<'tcx>
impl<'tcx> !RefUnwindSafe for TerminatorKind<'tcx>
impl<'tcx> Send for TerminatorKind<'tcx>
impl<'tcx> Sync for TerminatorKind<'tcx>
impl<'tcx> Unpin for TerminatorKind<'tcx>
impl<'tcx> !UnwindSafe for TerminatorKind<'tcx>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more