diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-11-09 12:37:49 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-11-09 12:37:49 +0000 |
commit | 9d786ea221b27fbdf7c7f7beea0290db448e0611 (patch) | |
tree | 312ae071afe742011c1e396d63123729e31f9815 /crates/ra_hir_def/src/db.rs | |
parent | defc7ad772123a449f7cc384dd46d88c3a45fb53 (diff) | |
parent | 6294fd5ec9c6946bdd91f1274956c573f9f2a136 (diff) |
Merge #2198
2198: Unfork struct and union ids r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir_def/src/db.rs')
-rw-r--r-- | crates/ra_hir_def/src/db.rs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/crates/ra_hir_def/src/db.rs b/crates/ra_hir_def/src/db.rs index a42348101..29cf71a59 100644 --- a/crates/ra_hir_def/src/db.rs +++ b/crates/ra_hir_def/src/db.rs | |||
@@ -11,7 +11,7 @@ use crate::{ | |||
11 | raw::{ImportSourceMap, RawItems}, | 11 | raw::{ImportSourceMap, RawItems}, |
12 | CrateDefMap, | 12 | CrateDefMap, |
13 | }, | 13 | }, |
14 | EnumId, StructId, UnionId, | 14 | EnumId, StructOrUnionId, |
15 | }; | 15 | }; |
16 | 16 | ||
17 | #[salsa::query_group(InternDatabaseStorage)] | 17 | #[salsa::query_group(InternDatabaseStorage)] |
@@ -19,9 +19,8 @@ pub trait InternDatabase: SourceDatabase { | |||
19 | #[salsa::interned] | 19 | #[salsa::interned] |
20 | fn intern_function(&self, loc: crate::ItemLoc<ast::FnDef>) -> crate::FunctionId; | 20 | fn intern_function(&self, loc: crate::ItemLoc<ast::FnDef>) -> crate::FunctionId; |
21 | #[salsa::interned] | 21 | #[salsa::interned] |
22 | fn intern_struct(&self, loc: crate::ItemLoc<ast::StructDef>) -> crate::StructId; | 22 | fn intern_struct_or_union(&self, loc: crate::ItemLoc<ast::StructDef>) |
23 | #[salsa::interned] | 23 | -> crate::StructOrUnionId; |
24 | fn intern_union(&self, loc: crate::ItemLoc<ast::StructDef>) -> crate::UnionId; | ||
25 | #[salsa::interned] | 24 | #[salsa::interned] |
26 | fn intern_enum(&self, loc: crate::ItemLoc<ast::EnumDef>) -> crate::EnumId; | 25 | fn intern_enum(&self, loc: crate::ItemLoc<ast::EnumDef>) -> crate::EnumId; |
27 | #[salsa::interned] | 26 | #[salsa::interned] |
@@ -49,10 +48,7 @@ pub trait DefDatabase2: InternDatabase + AstDatabase { | |||
49 | fn crate_def_map(&self, krate: CrateId) -> Arc<CrateDefMap>; | 48 | fn crate_def_map(&self, krate: CrateId) -> Arc<CrateDefMap>; |
50 | 49 | ||
51 | #[salsa::invoke(StructData::struct_data_query)] | 50 | #[salsa::invoke(StructData::struct_data_query)] |
52 | fn struct_data(&self, s: StructId) -> Arc<StructData>; | 51 | fn struct_data(&self, id: StructOrUnionId) -> Arc<StructData>; |
53 | |||
54 | #[salsa::invoke(StructData::union_data_query)] | ||
55 | fn union_data(&self, s: UnionId) -> Arc<StructData>; | ||
56 | 52 | ||
57 | #[salsa::invoke(EnumData::enum_data_query)] | 53 | #[salsa::invoke(EnumData::enum_data_query)] |
58 | fn enum_data(&self, e: EnumId) -> Arc<EnumData>; | 54 | fn enum_data(&self, e: EnumId) -> Arc<EnumData>; |