diff options
author | Florian Diebold <[email protected]> | 2018-12-24 18:07:48 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2018-12-25 14:16:42 +0000 |
commit | b5b68f2094d49cacde6d7f0c49f521a0b25f34bd (patch) | |
tree | 5439bb80896c211b3cadb2c037383243fe1fc140 /crates/ra_hir/src/db.rs | |
parent | 5fb426cb9eeefa69a53d7c8c3367f7c6b714b9b8 (diff) |
Add basic HIR and types for structs/enums
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; |