diff options
author | Florian Diebold <[email protected]> | 2018-12-20 20:56:28 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2018-12-23 12:48:04 +0000 |
commit | 3ac605e6876056fa56098231cc2f96553faab8f0 (patch) | |
tree | 82294448f696bae2ba640c4fb74dac9b929265a3 /crates/ra_hir/src/function.rs | |
parent | d77520fde3c953968beb09a3da80a0e7b17bbc04 (diff) |
Add beginnings of type infrastructure
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)] |