pub enum TerminatorKind {
Show 15 variants
Goto {
target: BasicBlock,
},
SwitchInt {
discr: Operand,
targets: SwitchTargets,
},
Return,
Unreachable,
Drop {
place: Place,
target: BasicBlock,
unwind: UnwindAction,
replace: bool,
},
Call {
fun: FunOperand,
generics: Vec<GenericArg>,
args: Vec<Spanned<Operand>>,
destination: Place,
target: Option<BasicBlock>,
unwind: UnwindAction,
call_source: CallSource,
fn_span: Span,
trait_refs: Vec<ImplExpr>,
trait_info: Option<ImplExpr>,
},
TailCall {
func: Operand,
args: Vec<Spanned<Operand>>,
fn_span: Span,
},
Assert {
cond: Operand,
expected: bool,
msg: AssertMessage,
target: BasicBlock,
unwind: UnwindAction,
},
Yield {
value: Operand,
resume: BasicBlock,
resume_arg: Place,
drop: Option<BasicBlock>,
},
CoroutineDrop,
FalseEdge {
real_target: BasicBlock,
imaginary_target: BasicBlock,
},
FalseUnwind {
real_target: BasicBlock,
unwind: UnwindAction,
},
UnwindResume,
UnwindTerminate(UnwindTerminateReason),
InlineAsm {
template: Vec<InlineAsmTemplatePiece>,
operands: Vec<InlineAsmOperand>,
options: InlineAsmOptions,
line_spans: Vec<Span>,
targets: Vec<BasicBlock>,
unwind: UnwindAction,
},
}
Variants§
Goto
Fields
§
target: BasicBlock
SwitchInt
Return
Unreachable
Drop
Call
Fields
§
fun: FunOperand
§
generics: Vec<GenericArg>
We truncate the substitution so as to only include the arguments relevant to the method (and not the trait) if it is a trait method call. See [ParamsInfo] for the full details.
§
target: Option<BasicBlock>
§
unwind: UnwindAction
§
call_source: CallSource
TailCall
Assert
Yield
CoroutineDrop
FalseEdge
FalseUnwind
UnwindResume
UnwindTerminate(UnwindTerminateReason)
InlineAsm
Fields
§
template: Vec<InlineAsmTemplatePiece>
§
operands: Vec<InlineAsmOperand>
§
options: InlineAsmOptions
§
targets: Vec<BasicBlock>
§
unwind: UnwindAction
Trait Implementations§
source§impl Clone for TerminatorKind
impl Clone for TerminatorKind
source§fn clone(&self) -> TerminatorKind
fn clone(&self) -> TerminatorKind
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 moresource§impl Debug for TerminatorKind
impl Debug for TerminatorKind
source§impl<'de> Deserialize<'de> for TerminatorKind
impl<'de> Deserialize<'de> for TerminatorKind
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl JsonSchema for TerminatorKind
impl JsonSchema for TerminatorKind
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moresource§impl<'tcx, S: UnderOwnerState<'tcx> + HasMir<'tcx>> SInto<S, TerminatorKind> for TerminatorKind<'tcx>
impl<'tcx, S: UnderOwnerState<'tcx> + HasMir<'tcx>> SInto<S, TerminatorKind> for TerminatorKind<'tcx>
fn sinto(&self, s: &S) -> TerminatorKind
Auto Trait Implementations§
impl Freeze for TerminatorKind
impl RefUnwindSafe for TerminatorKind
impl Send for TerminatorKind
impl Sync for TerminatorKind
impl Unpin for TerminatorKind
impl UnwindSafe for TerminatorKind
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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