//! 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::Index; use base_db::CrateId; use cfg::{CfgExpr, CfgOptions}; use hir_expand::{name::Name, InFile}; use la_arena::{Arena, ArenaMap}; use rustc_hash::FxHashMap; 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, }, 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