diff options
Diffstat (limited to 'crates/ra_hir/src/db.rs')
-rw-r--r-- | crates/ra_hir/src/db.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/crates/ra_hir/src/db.rs b/crates/ra_hir/src/db.rs index d94f75857..113790ee9 100644 --- a/crates/ra_hir/src/db.rs +++ b/crates/ra_hir/src/db.rs | |||
@@ -15,6 +15,7 @@ use crate::{ | |||
15 | module::{ModuleId, ModuleTree, ModuleSource, | 15 | module::{ModuleId, ModuleTree, ModuleSource, |
16 | nameres::{ItemMap, InputModuleItems}}, | 16 | nameres::{ItemMap, InputModuleItems}}, |
17 | ty::{InferenceResult, Ty}, | 17 | ty::{InferenceResult, Ty}, |
18 | adt::{StructData, EnumData}, | ||
18 | }; | 19 | }; |
19 | 20 | ||
20 | salsa::query_group! { | 21 | salsa::query_group! { |
@@ -31,6 +32,16 @@ pub trait HirDatabase: SyntaxDatabase | |||
31 | use fn query_definitions::fn_syntax; | 32 | use fn query_definitions::fn_syntax; |
32 | } | 33 | } |
33 | 34 | ||
35 | fn struct_data(def_id: DefId) -> Cancelable<Arc<StructData>> { | ||
36 | type StructDataQuery; | ||
37 | use fn query_definitions::struct_data; | ||
38 | } | ||
39 | |||
40 | fn enum_data(def_id: DefId) -> Cancelable<Arc<EnumData>> { | ||
41 | type EnumDataQuery; | ||
42 | use fn query_definitions::enum_data; | ||
43 | } | ||
44 | |||
34 | fn infer(fn_id: FnId) -> Cancelable<Arc<InferenceResult>> { | 45 | fn infer(fn_id: FnId) -> Cancelable<Arc<InferenceResult>> { |
35 | type InferQuery; | 46 | type InferQuery; |
36 | use fn query_definitions::infer; | 47 | use fn query_definitions::infer; |