Remove bodies from code_model

This commit is contained in:
Aleksey Kladov 2019-12-08 12:27:21 +01:00
parent b017bae837
commit b77d7c24aa

View file

@ -7,7 +7,6 @@ use std::sync::Arc;
use either::Either; use either::Either;
use hir_def::{ use hir_def::{
adt::VariantData, adt::VariantData,
body::{Body, BodySourceMap},
builtin_type::BuiltinType, builtin_type::BuiltinType,
docs::Documentation, docs::Documentation,
expr::{BindingAnnotation, Pat, PatId}, expr::{BindingAnnotation, Pat, PatId},
@ -511,14 +510,6 @@ impl Function {
db.function_data(self.id).params.clone() db.function_data(self.id).params.clone()
} }
pub fn body_source_map(self, db: &impl HirDatabase) -> Arc<BodySourceMap> {
db.body_with_source_map(self.id.into()).1
}
pub fn body(self, db: &impl HirDatabase) -> Arc<Body> {
db.body(self.id.into())
}
/// The containing impl block, if this is a method. /// The containing impl block, if this is a method.
pub fn impl_block(self, db: &impl DefDatabase) -> Option<ImplBlock> { pub fn impl_block(self, db: &impl DefDatabase) -> Option<ImplBlock> {
match self.container(db) { match self.container(db) {