pub struct HirBody {
pub exprs: Arena<HirExpr>,
pub stmts: Arena<HirStmt>,
pub blocks: Arena<HirBlock>,
pub source_map: BodySourceMap,
pub root_block: HirBlockId,
pub owner: BodyOwnerKind,
}Expand description
Arena-based expression/statement/block graph for one body owner.
This is the unit of lowering produced by lower_body. It is separate
from crate::hir::HirFile’s flat item list — flat items remain for
compile-time fact extraction; bodies are the new representation for data-flow
analysis, context propagation, and PIR-A lowering.
Fields§
§exprs: Arena<HirExpr>All expression nodes, indexed by HirExprId.
stmts: Arena<HirStmt>All statement nodes, indexed by HirStmtId.
blocks: Arena<HirBlock>All block nodes (ordered statement sequences), indexed by HirBlockId.
source_map: BodySourceMapSource map: maps each expr/stmt/block index to its SourceLocation.
root_block: HirBlockIdRoot block — the entry point for the body.
owner: BodyOwnerKindWhat syntactic construct owns this body.
Implementations§
Trait Implementations§
impl Eq for HirBody
impl StructuralPartialEq for HirBody
Auto Trait Implementations§
impl Freeze for HirBody
impl RefUnwindSafe for HirBody
impl Send for HirBody
impl Sync for HirBody
impl Unpin for HirBody
impl UnsafeUnpin for HirBody
impl UnwindSafe for HirBody
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