pub struct Body<'tcx> {
pub basic_blocks: IndexVec<BasicBlock, BasicBlockData<'tcx>>,
pub local_decls: IndexVec<Local, LocalDecl>,
pub dominator_order_rank: IndexVec<BasicBlock, u32>,
fake_predecessors: IndexVec<BasicBlock, usize>,
pub local_names: UnordMap<Local, Symbol>,
pub rustc_body: Body<'tcx>,
}Fields§
§basic_blocks: IndexVec<BasicBlock, BasicBlockData<'tcx>>§local_decls: IndexVec<Local, LocalDecl>§dominator_order_rank: IndexVec<BasicBlock, u32>§fake_predecessors: IndexVec<BasicBlock, usize>§local_names: UnordMap<Local, Symbol>§rustc_body: Body<'tcx>A mir body that contains region identifiers.
Implementations§
Source§impl<'tcx> Body<'tcx>
impl<'tcx> Body<'tcx>
pub fn new( basic_blocks: IndexVec<BasicBlock, BasicBlockData<'tcx>>, local_decls: IndexVec<Local, LocalDecl>, rustc_body: Body<'tcx>, ) -> Self
pub fn terminator_loc(&self, bb: BasicBlock) -> Location
pub fn is_join_point(&self, bb: BasicBlock) -> bool
pub fn dominators(&self) -> &Dominators<BasicBlock>
pub fn args_iter(&self) -> impl ExactSizeIterator<Item = Local>
pub fn vars_and_temps_iter(&self) -> impl ExactSizeIterator<Item = Local>
pub fn span(&self) -> Span
pub fn return_ty(&self) -> Ty
Trait Implementations§
Auto Trait Implementations§
impl<'tcx> !Freeze for Body<'tcx>
impl<'tcx> !RefUnwindSafe for Body<'tcx>
impl<'tcx> Send for Body<'tcx>
impl<'tcx> Sync for Body<'tcx>
impl<'tcx> Unpin for Body<'tcx>
impl<'tcx> !UnwindSafe for Body<'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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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