pub enum Body {
Structured(Vec<Stmt>),
Cfg(Cfg),
}Expand description
How a function’s body is lowered.
Nearly every C function maps onto Rust’s own control flow, which is what
makes the expansion readable. A function that jumps around — a goto, or a
case label the enclosing switch cannot reach without one — cannot, and
is lowered into a control-flow graph instead.
Variants§
Structured(Vec<Stmt>)
Rust control flow mirrors C’s.
Cfg(Cfg)
A graph of basic blocks; see crate::cfg.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Body
impl RefUnwindSafe for Body
impl Send for Body
impl Sync for Body
impl Unpin for Body
impl UnsafeUnpin for Body
impl UnwindSafe for Body
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