diff options
Diffstat (limited to 'crates/ra_hir/src/code_model_impl')
-rw-r--r-- | crates/ra_hir/src/code_model_impl/function.rs | 6 |
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}; | |||
5 | use crate::{ | 5 | use 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 | ||
12 | impl Function { | 12 | impl 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> { |