diff options
Diffstat (limited to 'crates/ra_hir/src/code_model_impl')
-rw-r--r-- | crates/ra_hir/src/code_model_impl/function.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/ra_hir/src/code_model_impl/function.rs b/crates/ra_hir/src/code_model_impl/function.rs index d34803e32..66d7e1713 100644 --- a/crates/ra_hir/src/code_model_impl/function.rs +++ b/crates/ra_hir/src/code_model_impl/function.rs | |||
@@ -2,7 +2,6 @@ mod scope; | |||
2 | 2 | ||
3 | use std::sync::Arc; | 3 | use std::sync::Arc; |
4 | 4 | ||
5 | use ra_db::Cancelable; | ||
6 | use ra_syntax::{TreeArc, ast::{self, NameOwner}}; | 5 | use ra_syntax::{TreeArc, ast::{self, NameOwner}}; |
7 | 6 | ||
8 | use crate::{ | 7 | use crate::{ |
@@ -24,12 +23,12 @@ impl Function { | |||
24 | db.body_hir(self.def_id) | 23 | db.body_hir(self.def_id) |
25 | } | 24 | } |
26 | 25 | ||
27 | pub(crate) fn module(&self, db: &impl HirDatabase) -> Cancelable<Module> { | 26 | pub(crate) fn module(&self, db: &impl HirDatabase) -> Module { |
28 | self.def_id.module(db) | 27 | self.def_id.module(db) |
29 | } | 28 | } |
30 | 29 | ||
31 | /// The containing impl block, if this is a method. | 30 | /// The containing impl block, if this is a method. |
32 | pub(crate) fn impl_block(&self, db: &impl HirDatabase) -> Cancelable<Option<ImplBlock>> { | 31 | pub(crate) fn impl_block(&self, db: &impl HirDatabase) -> Option<ImplBlock> { |
33 | self.def_id.impl_block(db) | 32 | self.def_id.impl_block(db) |
34 | } | 33 | } |
35 | } | 34 | } |