aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/code_model_api.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/code_model_api.rs')
-rw-r--r--crates/ra_hir/src/code_model_api.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/crates/ra_hir/src/code_model_api.rs b/crates/ra_hir/src/code_model_api.rs
index da0f1ec94..3ac146950 100644
--- a/crates/ra_hir/src/code_model_api.rs
+++ b/crates/ra_hir/src/code_model_api.rs
@@ -5,11 +5,11 @@ use ra_db::{CrateId, SourceRootId, Edition};
5use ra_syntax::{ast::self, TreeArc, SyntaxNode}; 5use ra_syntax::{ast::self, TreeArc, SyntaxNode};
6 6
7use crate::{ 7use crate::{
8 Name, ScopesWithSyntaxMapping, Ty, HirFileId, 8 Name, ScopesWithSourceMap, Ty, HirFileId,
9 HirDatabase, PersistentHirDatabase, 9 HirDatabase, PersistentHirDatabase,
10 type_ref::TypeRef, 10 type_ref::TypeRef,
11 nameres::{ModuleScope, Namespace, lower::ImportId}, 11 nameres::{ModuleScope, Namespace, lower::ImportId},
12 expr::{Body, BodySyntaxMapping}, 12 expr::{Body, BodySourceMap},
13 ty::InferenceResult, 13 ty::InferenceResult,
14 adt::{EnumVariantId, StructFieldId, VariantDef}, 14 adt::{EnumVariantId, StructFieldId, VariantDef},
15 generics::GenericParams, 15 generics::GenericParams,
@@ -191,7 +191,7 @@ impl Module {
191 } 191 }
192 192
193 pub fn declarations(self, db: &impl HirDatabase) -> Vec<ModuleDef> { 193 pub fn declarations(self, db: &impl HirDatabase) -> Vec<ModuleDef> {
194 let (lowered_module, _) = db.lower_module(self); 194 let lowered_module = db.lower_module(self);
195 lowered_module 195 lowered_module
196 .declarations 196 .declarations
197 .values() 197 .values()
@@ -483,8 +483,8 @@ impl Function {
483 self.signature(db).name.clone() 483 self.signature(db).name.clone()
484 } 484 }
485 485
486 pub fn body_syntax_mapping(&self, db: &impl HirDatabase) -> Arc<BodySyntaxMapping> { 486 pub fn body_source_map(&self, db: &impl HirDatabase) -> Arc<BodySourceMap> {
487 db.body_syntax_mapping(*self) 487 db.body_with_source_map(*self).1
488 } 488 }
489 489
490 pub fn body(&self, db: &impl HirDatabase) -> Arc<Body> { 490 pub fn body(&self, db: &impl HirDatabase) -> Arc<Body> {
@@ -495,10 +495,10 @@ impl Function {
495 db.type_for_def((*self).into(), Namespace::Values) 495 db.type_for_def((*self).into(), Namespace::Values)
496 } 496 }
497 497
498 pub fn scopes(&self, db: &impl HirDatabase) -> ScopesWithSyntaxMapping { 498 pub fn scopes(&self, db: &impl HirDatabase) -> ScopesWithSourceMap {
499 let scopes = db.expr_scopes(*self); 499 let scopes = db.expr_scopes(*self);
500 let syntax_mapping = db.body_syntax_mapping(*self); 500 let source_map = db.body_with_source_map(*self).1;
501 ScopesWithSyntaxMapping { scopes, syntax_mapping } 501 ScopesWithSourceMap { scopes, source_map }
502 } 502 }
503 503
504 pub fn signature(&self, db: &impl HirDatabase) -> Arc<FnSignature> { 504 pub fn signature(&self, db: &impl HirDatabase) -> Arc<FnSignature> {