//! Defines `Body`: a lowered representation of bodies of functions, statics and //! consts. mod lower; mod pretty; pub mod scope; #[cfg(test)] mod tests; use std::ops::{Deref, Index}; use base_db::CrateId; use cfg::{CfgExpr, CfgOptions}; use hir_expand::{name::Name, ExpandError, InFile}; use la_arena::{Arena, ArenaMap, Idx, RawIdx}; use rustc_hash::FxHashMap; use smallvec::SmallVec; use span::MacroFileId; use syntax::{ast, AstPtr, SyntaxNodePtr}; use triomphe::Arc; use crate::{ db::DefDatabase, expander::Expander, hir::{ dummy_expr_id, Binding, BindingId, Expr, ExprId, Label, LabelId, Pat, PatId, RecordFieldPat, }, item_tree::AttrOwner, nameres::DefMap, path::{ModPath, Path}, src::HasSource, BlockId, DefWithBodyId, HasModule, Lookup, }; /// The body of an item (function, const etc.). #[derive(Debug, Eq, PartialEq)] pub struct Body { pub exprs: Arena, pub pats: Arena, pub bindings: Arena, pub labels: Arena