aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/db.rs
diff options
context:
space:
mode:
authorSeivan Heidari <[email protected]>2019-11-09 15:27:40 +0000
committerSeivan Heidari <[email protected]>2019-11-09 15:27:40 +0000
commit529b227d42951feabf64c8c964b00e726dd92d46 (patch)
treed54ea1a30905d4fd8798129103bb13921fb55c94 /crates/ra_hir_def/src/db.rs
parent81662d23a64c7eb7ea10cb7bbf316f17d78dc4bc (diff)
parent9d786ea221b27fbdf7c7f7beea0290db448e0611 (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, 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>;