aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/code_model_impl
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2019-01-19 20:23:26 +0000
committerFlorian Diebold <[email protected]>2019-02-01 21:14:34 +0000
commit5208c2aa930ae452e062dcdc2563c1bbb67d2e4a (patch)
tree9d6c6868485a8013c420a7ba74a29930d9c85737 /crates/ra_hir/src/code_model_impl
parent2b5c226e86892113bcab478cdf4c9adaf1e7b2f6 (diff)
Sketching the resolver API
Diffstat (limited to 'crates/ra_hir/src/code_model_impl')
-rw-r--r--crates/ra_hir/src/code_model_impl/function.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/crates/ra_hir/src/code_model_impl/function.rs b/crates/ra_hir/src/code_model_impl/function.rs
index 5b0b31b1d..8326c02c7 100644
--- a/crates/ra_hir/src/code_model_impl/function.rs
+++ b/crates/ra_hir/src/code_model_impl/function.rs
@@ -5,14 +5,12 @@ use ra_syntax::ast::{self, NameOwner};
5use crate::{ 5use crate::{
6 HirDatabase, Name, AsName, Function, FnSignature, 6 HirDatabase, Name, AsName, Function, FnSignature,
7 type_ref::{TypeRef, Mutability}, 7 type_ref::{TypeRef, Mutability},
8 expr::Body, PersistentHirDatabase, 8 PersistentHirDatabase,
9 impl_block::ImplBlock, 9 impl_block::ImplBlock,
10}; 10};
11 11
12impl Function { 12impl Function {
13 pub(crate) fn body(&self, db: &impl HirDatabase) -> Arc<Body> { 13 // TODO impl_block should probably also be part of the code model API?
14 db.body_hir(*self)
15 }
16 14
17 /// The containing impl block, if this is a method. 15 /// The containing impl block, if this is a method.
18 pub(crate) fn impl_block(&self, db: &impl HirDatabase) -> Option<ImplBlock> { 16 pub(crate) fn impl_block(&self, db: &impl HirDatabase) -> Option<ImplBlock> {