aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/db.rs
diff options
context:
space:
mode:
authorSeivan Heidari <[email protected]>2019-11-28 07:19:14 +0000
committerSeivan Heidari <[email protected]>2019-11-28 07:19:14 +0000
commit18a0937585b836ec5ed054b9ae48e0156ab6d9ef (patch)
tree9de2c0267ddcc00df717f90034d0843d751a851b /crates/ra_hir_def/src/db.rs
parenta7394b44c870f585eacfeb3036a33471aff49ff8 (diff)
parent484acc8a61d599662ed63a4cbda091d38a982551 (diff)
Merge branch 'master' of https://github.com/rust-analyzer/rust-analyzer into feature/themes
Diffstat (limited to 'crates/ra_hir_def/src/db.rs')
-rw-r--r--crates/ra_hir_def/src/db.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/crates/ra_hir_def/src/db.rs b/crates/ra_hir_def/src/db.rs
index 32adb11bd..ef5611ffc 100644
--- a/crates/ra_hir_def/src/db.rs
+++ b/crates/ra_hir_def/src/db.rs
@@ -18,8 +18,8 @@ use crate::{
18 CrateDefMap, 18 CrateDefMap,
19 }, 19 },
20 AttrDefId, ConstId, ConstLoc, DefWithBodyId, EnumId, FunctionId, FunctionLoc, GenericDefId, 20 AttrDefId, ConstId, ConstLoc, DefWithBodyId, EnumId, FunctionId, FunctionLoc, GenericDefId,
21 ImplId, ItemLoc, ModuleId, StaticId, StaticLoc, StructOrUnionId, TraitId, TypeAliasId, 21 ImplId, ItemLoc, ModuleId, StaticId, StaticLoc, StructId, TraitId, TypeAliasId, TypeAliasLoc,
22 TypeAliasLoc, 22 UnionId,
23}; 23};
24 24
25#[salsa::query_group(InternDatabaseStorage)] 25#[salsa::query_group(InternDatabaseStorage)]
@@ -27,7 +27,9 @@ pub trait InternDatabase: SourceDatabase {
27 #[salsa::interned] 27 #[salsa::interned]
28 fn intern_function(&self, loc: FunctionLoc) -> FunctionId; 28 fn intern_function(&self, loc: FunctionLoc) -> FunctionId;
29 #[salsa::interned] 29 #[salsa::interned]
30 fn intern_struct_or_union(&self, loc: ItemLoc<ast::StructDef>) -> StructOrUnionId; 30 fn intern_struct(&self, loc: ItemLoc<ast::StructDef>) -> StructId;
31 #[salsa::interned]
32 fn intern_union(&self, loc: ItemLoc<ast::UnionDef>) -> UnionId;
31 #[salsa::interned] 33 #[salsa::interned]
32 fn intern_enum(&self, loc: ItemLoc<ast::EnumDef>) -> EnumId; 34 fn intern_enum(&self, loc: ItemLoc<ast::EnumDef>) -> EnumId;
33 #[salsa::interned] 35 #[salsa::interned]
@@ -57,7 +59,9 @@ pub trait DefDatabase: InternDatabase + AstDatabase {
57 fn crate_def_map(&self, krate: CrateId) -> Arc<CrateDefMap>; 59 fn crate_def_map(&self, krate: CrateId) -> Arc<CrateDefMap>;
58 60
59 #[salsa::invoke(StructData::struct_data_query)] 61 #[salsa::invoke(StructData::struct_data_query)]
60 fn struct_data(&self, id: StructOrUnionId) -> Arc<StructData>; 62 fn struct_data(&self, id: StructId) -> Arc<StructData>;
63 #[salsa::invoke(StructData::union_data_query)]
64 fn union_data(&self, id: UnionId) -> Arc<StructData>;
61 65
62 #[salsa::invoke(EnumData::enum_data_query)] 66 #[salsa::invoke(EnumData::enum_data_query)]
63 fn enum_data(&self, e: EnumId) -> Arc<EnumData>; 67 fn enum_data(&self, e: EnumId) -> Arc<EnumData>;