diff options
Diffstat (limited to 'crates/ra_hir_def/src/db.rs')
-rw-r--r-- | crates/ra_hir_def/src/db.rs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/crates/ra_hir_def/src/db.rs b/crates/ra_hir_def/src/db.rs index b271636b0..f6027013f 100644 --- a/crates/ra_hir_def/src/db.rs +++ b/crates/ra_hir_def/src/db.rs | |||
@@ -5,7 +5,11 @@ use hir_expand::{db::AstDatabase, HirFileId}; | |||
5 | use ra_db::{salsa, SourceDatabase}; | 5 | use ra_db::{salsa, SourceDatabase}; |
6 | use ra_syntax::ast; | 6 | use ra_syntax::ast; |
7 | 7 | ||
8 | use crate::nameres::raw::{ImportSourceMap, RawItems}; | 8 | use crate::{ |
9 | adt::{EnumData, StructData}, | ||
10 | nameres::raw::{ImportSourceMap, RawItems}, | ||
11 | EnumId, StructId, | ||
12 | }; | ||
9 | 13 | ||
10 | #[salsa::query_group(InternDatabaseStorage)] | 14 | #[salsa::query_group(InternDatabaseStorage)] |
11 | pub trait InternDatabase: SourceDatabase { | 15 | pub trait InternDatabase: SourceDatabase { |
@@ -37,4 +41,10 @@ pub trait DefDatabase2: InternDatabase + AstDatabase { | |||
37 | 41 | ||
38 | #[salsa::invoke(RawItems::raw_items_query)] | 42 | #[salsa::invoke(RawItems::raw_items_query)] |
39 | fn raw_items(&self, file_id: HirFileId) -> Arc<RawItems>; | 43 | fn raw_items(&self, file_id: HirFileId) -> Arc<RawItems>; |
44 | |||
45 | #[salsa::invoke(StructData::struct_data_query)] | ||
46 | fn struct_data(&self, s: StructId) -> Arc<StructData>; | ||
47 | |||
48 | #[salsa::invoke(EnumData::enum_data_query)] | ||
49 | fn enum_data(&self, e: EnumId) -> Arc<EnumData>; | ||
40 | } | 50 | } |