aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/db.rs
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-03-26 16:16:54 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-03-26 16:16:54 +0000
commita82755e24102bea85be450e0b210d45b05b9f246 (patch)
tree52f347ddfc4586e3dfa4467827b211d1684aaa74 /crates/ra_hir/src/db.rs
parent96acf4f7ec4257af0d5fd0415b31ab6757b475ad (diff)
parent1325a31e34a3b4bf5104a743bcb8217ef5c4f3cd (diff)
Merge #1059
1059: Typed ids r=matklad a=matklad just some type-safety and refactorings. closes https://github.com/rust-analyzer/rust-analyzer/issues/1054 bors r+ Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/db.rs')
-rw-r--r--crates/ra_hir/src/db.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/ra_hir/src/db.rs b/crates/ra_hir/src/db.rs
index 3296b9b31..147005848 100644
--- a/crates/ra_hir/src/db.rs
+++ b/crates/ra_hir/src/db.rs
@@ -4,7 +4,7 @@ use ra_syntax::{SyntaxNode, TreeArc, SourceFile};
4use ra_db::{SourceDatabase, salsa}; 4use ra_db::{SourceDatabase, salsa};
5 5
6use crate::{ 6use crate::{
7 HirFileId, MacroDefId, SourceFileItems, SourceItemId, Crate, Module, HirInterner, 7 HirFileId, MacroDefId, AstIdMap, ErasedFileAstId, Crate, Module, HirInterner,
8 Function, FnSignature, ExprScopes, TypeAlias, 8 Function, FnSignature, ExprScopes, TypeAlias,
9 Struct, Enum, StructField, 9 Struct, Enum, StructField,
10 Const, ConstSignature, Static, 10 Const, ConstSignature, Static,
@@ -22,7 +22,7 @@ pub trait DefDatabase: SourceDatabase + AsRef<HirInterner> {
22 #[salsa::invoke(crate::ids::macro_def_query)] 22 #[salsa::invoke(crate::ids::macro_def_query)]
23 fn macro_def(&self, macro_id: MacroDefId) -> Option<Arc<mbe::MacroRules>>; 23 fn macro_def(&self, macro_id: MacroDefId) -> Option<Arc<mbe::MacroRules>>;
24 24
25 #[salsa::invoke(HirFileId::hir_parse)] 25 #[salsa::invoke(HirFileId::hir_parse_query)]
26 fn hir_parse(&self, file_id: HirFileId) -> TreeArc<SourceFile>; 26 fn hir_parse(&self, file_id: HirFileId) -> TreeArc<SourceFile>;
27 27
28 #[salsa::invoke(crate::adt::StructData::struct_data_query)] 28 #[salsa::invoke(crate::adt::StructData::struct_data_query)]
@@ -34,11 +34,11 @@ pub trait DefDatabase: SourceDatabase + AsRef<HirInterner> {
34 #[salsa::invoke(crate::traits::TraitData::trait_data_query)] 34 #[salsa::invoke(crate::traits::TraitData::trait_data_query)]
35 fn trait_data(&self, t: Trait) -> Arc<TraitData>; 35 fn trait_data(&self, t: Trait) -> Arc<TraitData>;
36 36
37 #[salsa::invoke(crate::source_id::SourceFileItems::file_items_query)] 37 #[salsa::invoke(crate::source_id::AstIdMap::ast_id_map_query)]
38 fn file_items(&self, file_id: HirFileId) -> Arc<SourceFileItems>; 38 fn ast_id_map(&self, file_id: HirFileId) -> Arc<AstIdMap>;
39 39
40 #[salsa::invoke(crate::source_id::SourceFileItems::file_item_query)] 40 #[salsa::invoke(crate::source_id::AstIdMap::file_item_query)]
41 fn file_item(&self, source_item_id: SourceItemId) -> TreeArc<SyntaxNode>; 41 fn ast_id_to_node(&self, file_id: HirFileId, ast_id: ErasedFileAstId) -> TreeArc<SyntaxNode>;
42 42
43 #[salsa::invoke(RawItems::raw_items_query)] 43 #[salsa::invoke(RawItems::raw_items_query)]
44 fn raw_items(&self, file_id: HirFileId) -> Arc<RawItems>; 44 fn raw_items(&self, file_id: HirFileId) -> Arc<RawItems>;