pub enum MirStmt {
Instr(MirInstr),
If {
cond: MirLocalId,
then_body: Vec<MirStmt>,
else_body: Vec<MirStmt>,
},
While {
loop_params: Vec<MirLocalId>,
init_args: Vec<MirLocalId>,
cond_body: Vec<MirStmt>,
cond: MirLocalId,
body: Vec<MirStmt>,
step_args: Vec<MirLocalId>,
},
Return {
value: MirLocalId,
},
}Expand description
Structured lowering helper form.
This is used while constructing CFG and is not stored as the
canonical body representation in MirFunction.
Variants§
Instr(MirInstr)
Plain instruction embedded in structured lowering output.
If
Structured conditional used during CFG construction.
Fields
§
cond: MirLocalIdLocal id holding the branch condition.
While
Structured loop used during CFG construction.
Fields
§
loop_params: Vec<MirLocalId>Loop-carried parameter locals.
§
init_args: Vec<MirLocalId>Initial arguments supplied to the loop.
§
cond: MirLocalIdLocal id holding the branch condition.
§
step_args: Vec<MirLocalId>Updated loop arguments supplied to the next iteration.
Return
Structured return used during CFG construction.
Fields
§
value: MirLocalIdLocal id returned from the surrounding function.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MirStmt
impl RefUnwindSafe for MirStmt
impl Send for MirStmt
impl Sync for MirStmt
impl Unpin for MirStmt
impl UnwindSafe for MirStmt
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