dont store body inside source map

This commit is contained in:
Aleksey Kladov 2019-03-02 16:18:40 +03:00
parent eaf1df26e9
commit f4c5383103
5 changed files with 54 additions and 61 deletions

View file

@ -484,7 +484,7 @@ impl Function {
}
pub fn body_source_map(&self, db: &impl HirDatabase) -> Arc<BodySourceMap> {
db.body_source_map(*self)
db.body_with_source_map(*self).1
}
pub fn body(&self, db: &impl HirDatabase) -> Arc<Body> {
@ -497,7 +497,7 @@ impl Function {
pub fn scopes(&self, db: &impl HirDatabase) -> ScopesWithSyntaxMapping {
let scopes = db.expr_scopes(*self);
let syntax_mapping = db.body_source_map(*self);
let syntax_mapping = db.body_with_source_map(*self).1;
ScopesWithSyntaxMapping { scopes, syntax_mapping }
}