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.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ra_hir/src/code_model_api.rs b/crates/ra_hir/src/code_model_api.rs
index 9da8a482d..9d0b40ce0 100644
--- a/crates/ra_hir/src/code_model_api.rs
+++ b/crates/ra_hir/src/code_model_api.rs
@@ -483,6 +483,10 @@ impl Function {
483 db.body_hir(*self) 483 db.body_hir(*self)
484 } 484 }
485 485
486 pub fn ty(&self, db: &impl HirDatabase) -> Ty {
487 db.type_for_def((*self).into(), Namespace::Values)
488 }
489
486 pub fn scopes(&self, db: &impl HirDatabase) -> ScopesWithSyntaxMapping { 490 pub fn scopes(&self, db: &impl HirDatabase) -> ScopesWithSyntaxMapping {
487 let scopes = db.expr_scopes(*self); 491 let scopes = db.expr_scopes(*self);
488 let syntax_mapping = db.body_syntax_mapping(*self); 492 let syntax_mapping = db.body_syntax_mapping(*self);