diff options
Diffstat (limited to 'crates/ra_hir/src/function.rs')
-rw-r--r-- | crates/ra_hir/src/function.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/ra_hir/src/function.rs b/crates/ra_hir/src/function.rs index 2925beb16..360e9e9a0 100644 --- a/crates/ra_hir/src/function.rs +++ b/crates/ra_hir/src/function.rs | |||
@@ -10,7 +10,7 @@ use ra_syntax::{ | |||
10 | ast::{self, AstNode, DocCommentsOwner, NameOwner}, | 10 | ast::{self, AstNode, DocCommentsOwner, NameOwner}, |
11 | }; | 11 | }; |
12 | 12 | ||
13 | use crate::{ DefId, HirDatabase }; | 13 | use crate::{ DefId, HirDatabase, ty::InferenceResult }; |
14 | 14 | ||
15 | pub use self::scope::FnScopes; | 15 | pub use self::scope::FnScopes; |
16 | 16 | ||
@@ -35,6 +35,10 @@ impl Function { | |||
35 | let syntax = db.fn_syntax(self.fn_id); | 35 | let syntax = db.fn_syntax(self.fn_id); |
36 | FnSignatureInfo::new(syntax.borrowed()) | 36 | FnSignatureInfo::new(syntax.borrowed()) |
37 | } | 37 | } |
38 | |||
39 | pub fn infer(&self, db: &impl HirDatabase) -> Arc<InferenceResult> { | ||
40 | db.infer(self.fn_id) | ||
41 | } | ||
38 | } | 42 | } |
39 | 43 | ||
40 | #[derive(Debug, Clone)] | 44 | #[derive(Debug, Clone)] |