diff options
author | Florian Diebold <[email protected]> | 2018-12-23 16:13:11 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2018-12-23 16:13:11 +0000 |
commit | ef67581104eb00a0c199f0b2a3b558da8a6f90a2 (patch) | |
tree | b6cf180b26152fa06ec4b2d02e22221fb7ba7fad /crates/ra_hir/src/db.rs | |
parent | 93ffbf80c632a7d38fc8bbdf6357bfd26a96a35a (diff) |
Resolve paths to defs (functions currently) during type inference
Diffstat (limited to 'crates/ra_hir/src/db.rs')
-rw-r--r-- | crates/ra_hir/src/db.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/crates/ra_hir/src/db.rs b/crates/ra_hir/src/db.rs index f0bff3c02..d94f75857 100644 --- a/crates/ra_hir/src/db.rs +++ b/crates/ra_hir/src/db.rs | |||
@@ -14,7 +14,7 @@ use crate::{ | |||
14 | function::FnId, | 14 | function::FnId, |
15 | module::{ModuleId, ModuleTree, ModuleSource, | 15 | module::{ModuleId, ModuleTree, ModuleSource, |
16 | nameres::{ItemMap, InputModuleItems}}, | 16 | nameres::{ItemMap, InputModuleItems}}, |
17 | ty::InferenceResult, | 17 | ty::{InferenceResult, Ty}, |
18 | }; | 18 | }; |
19 | 19 | ||
20 | salsa::query_group! { | 20 | salsa::query_group! { |
@@ -31,11 +31,16 @@ pub trait HirDatabase: SyntaxDatabase | |||
31 | use fn query_definitions::fn_syntax; | 31 | use fn query_definitions::fn_syntax; |
32 | } | 32 | } |
33 | 33 | ||
34 | fn infer(fn_id: FnId) -> Arc<InferenceResult> { | 34 | fn infer(fn_id: FnId) -> Cancelable<Arc<InferenceResult>> { |
35 | type InferQuery; | 35 | type InferQuery; |
36 | use fn query_definitions::infer; | 36 | use fn query_definitions::infer; |
37 | } | 37 | } |
38 | 38 | ||
39 | fn type_for_def(def_id: DefId) -> Cancelable<Ty> { | ||
40 | type TypeForDefQuery; | ||
41 | use fn query_definitions::type_for_def; | ||
42 | } | ||
43 | |||
39 | fn file_items(file_id: FileId) -> Arc<SourceFileItems> { | 44 | fn file_items(file_id: FileId) -> Arc<SourceFileItems> { |
40 | type SourceFileItemsQuery; | 45 | type SourceFileItemsQuery; |
41 | use fn query_definitions::file_items; | 46 | use fn query_definitions::file_items; |