//! Defines `Body`: a lowered representation of bodies of functions, statics and //! consts. mod lower; #[cfg(test)] mod tests; pub mod scope; mod pretty; use std::{ops::Index, sync::Arc}; use base_db::CrateId; use cfg::{CfgExpr, CfgOptions}; use either::Either; use hir_expand::{name::Name, HirFileId, InFile}; use la_arena::{Arena, ArenaMap}; use profile::Count; use rustc_hash::FxHashMap; use syntax::{ast, AstPtr, SyntaxNodePtr}; 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::{HasChildSource, 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