pub enum IrTerminator {
Return(Option<IrValueId>),
Jump(IrBlockId),
Branch {
condition: IrValueId,
then_block: IrBlockId,
else_block: IrBlockId,
},
Switch {
condition: IrValueId,
cases: Vec<(i32, IrBlockId)>,
default: IrBlockId,
},
Unreachable,
}Expand description
One control-flow terminator.
Variants§
Return(Option<IrValueId>)
Return from the current function.
Jump(IrBlockId)
Unconditional branch.
Branch
Conditional branch.
Fields
Switch
Multi-way integer branch.
Fields
Unreachable
Unreachable control flow.
Trait Implementations§
Source§impl Clone for IrTerminator
impl Clone for IrTerminator
Source§fn clone(&self) -> IrTerminator
fn clone(&self) -> IrTerminator
Returns a duplicate 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 IrTerminator
impl Debug for IrTerminator
Source§impl<'de> Deserialize<'de> for IrTerminator
impl<'de> Deserialize<'de> for IrTerminator
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 PartialEq for IrTerminator
impl PartialEq for IrTerminator
Source§impl Serialize for IrTerminator
impl Serialize for IrTerminator
impl StructuralPartialEq for IrTerminator
Auto Trait Implementations§
impl Freeze for IrTerminator
impl RefUnwindSafe for IrTerminator
impl Send for IrTerminator
impl Sync for IrTerminator
impl Unpin for IrTerminator
impl UnsafeUnpin for IrTerminator
impl UnwindSafe for IrTerminator
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