diff options
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r-- | crates/ra_hir/src/db.rs | 4 | ||||
-rw-r--r-- | crates/ra_hir/src/impl_block.rs | 9 |
2 files changed, 2 insertions, 11 deletions
diff --git a/crates/ra_hir/src/db.rs b/crates/ra_hir/src/db.rs index d84e1598b..e8b4f0ddc 100644 --- a/crates/ra_hir/src/db.rs +++ b/crates/ra_hir/src/db.rs | |||
@@ -74,6 +74,7 @@ pub trait DefDatabase: SourceDatabase { | |||
74 | fn ast_id_map(&self, file_id: HirFileId) -> Arc<AstIdMap>; | 74 | fn ast_id_map(&self, file_id: HirFileId) -> Arc<AstIdMap>; |
75 | 75 | ||
76 | #[salsa::invoke(crate::source_id::AstIdMap::file_item_query)] | 76 | #[salsa::invoke(crate::source_id::AstIdMap::file_item_query)] |
77 | #[salsa::transparent] | ||
77 | fn ast_id_to_node(&self, file_id: HirFileId, ast_id: ErasedFileAstId) -> TreeArc<SyntaxNode>; | 78 | fn ast_id_to_node(&self, file_id: HirFileId, ast_id: ErasedFileAstId) -> TreeArc<SyntaxNode>; |
78 | 79 | ||
79 | #[salsa::invoke(RawItems::raw_items_query)] | 80 | #[salsa::invoke(RawItems::raw_items_query)] |
@@ -91,9 +92,6 @@ pub trait DefDatabase: SourceDatabase { | |||
91 | #[salsa::invoke(crate::impl_block::impls_in_module)] | 92 | #[salsa::invoke(crate::impl_block::impls_in_module)] |
92 | fn impls_in_module(&self, module: Module) -> Arc<ModuleImplBlocks>; | 93 | fn impls_in_module(&self, module: Module) -> Arc<ModuleImplBlocks>; |
93 | 94 | ||
94 | #[salsa::invoke(crate::impl_block::impls_in_module_source_map_query)] | ||
95 | fn impls_in_module_source_map(&self, module: Module) -> Arc<ImplSourceMap>; | ||
96 | |||
97 | #[salsa::invoke(crate::impl_block::impls_in_module_with_source_map_query)] | 95 | #[salsa::invoke(crate::impl_block::impls_in_module_with_source_map_query)] |
98 | fn impls_in_module_with_source_map( | 96 | fn impls_in_module_with_source_map( |
99 | &self, | 97 | &self, |
diff --git a/crates/ra_hir/src/impl_block.rs b/crates/ra_hir/src/impl_block.rs index 637f6ab83..072670444 100644 --- a/crates/ra_hir/src/impl_block.rs +++ b/crates/ra_hir/src/impl_block.rs | |||
@@ -59,7 +59,7 @@ impl ImplBlock { | |||
59 | 59 | ||
60 | /// Returns the syntax of the impl block | 60 | /// Returns the syntax of the impl block |
61 | pub fn source(&self, db: &impl DefDatabase) -> (HirFileId, TreeArc<ast::ImplBlock>) { | 61 | pub fn source(&self, db: &impl DefDatabase) -> (HirFileId, TreeArc<ast::ImplBlock>) { |
62 | let source_map = db.impls_in_module_source_map(self.module); | 62 | let source_map = db.impls_in_module_with_source_map(self.module).1; |
63 | let (file_id, source) = self.module.definition_source(db); | 63 | let (file_id, source) = self.module.definition_source(db); |
64 | (file_id, source_map.get(&source, self.impl_id)) | 64 | (file_id, source_map.get(&source, self.impl_id)) |
65 | } | 65 | } |
@@ -231,10 +231,3 @@ pub(crate) fn impls_in_module_with_source_map_query( | |||
231 | pub(crate) fn impls_in_module(db: &impl DefDatabase, module: Module) -> Arc<ModuleImplBlocks> { | 231 | pub(crate) fn impls_in_module(db: &impl DefDatabase, module: Module) -> Arc<ModuleImplBlocks> { |
232 | db.impls_in_module_with_source_map(module).0 | 232 | db.impls_in_module_with_source_map(module).0 |
233 | } | 233 | } |
234 | |||
235 | pub(crate) fn impls_in_module_source_map_query( | ||
236 | db: &impl DefDatabase, | ||
237 | module: Module, | ||
238 | ) -> Arc<ImplSourceMap> { | ||
239 | db.impls_in_module_with_source_map(module).1 | ||
240 | } | ||