aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_hir/src/db.rs3
-rw-r--r--crates/ra_hir/src/impl_block.rs9
-rw-r--r--crates/ra_ide_api/src/change.rs1
3 files changed, 2 insertions, 11 deletions
diff --git a/crates/ra_hir/src/db.rs b/crates/ra_hir/src/db.rs
index dcc881a36..e8b4f0ddc 100644
--- a/crates/ra_hir/src/db.rs
+++ b/crates/ra_hir/src/db.rs
@@ -92,9 +92,6 @@ pub trait DefDatabase: SourceDatabase {
92 #[salsa::invoke(crate::impl_block::impls_in_module)] 92 #[salsa::invoke(crate::impl_block::impls_in_module)]
93 fn impls_in_module(&self, module: Module) -> Arc<ModuleImplBlocks>; 93 fn impls_in_module(&self, module: Module) -> Arc<ModuleImplBlocks>;
94 94
95 #[salsa::invoke(crate::impl_block::impls_in_module_source_map_query)]
96 fn impls_in_module_source_map(&self, module: Module) -> Arc<ImplSourceMap>;
97
98 #[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)]
99 fn impls_in_module_with_source_map( 96 fn impls_in_module_with_source_map(
100 &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(
231pub(crate) fn impls_in_module(db: &impl DefDatabase, module: Module) -> Arc<ModuleImplBlocks> { 231pub(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
235pub(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}
diff --git a/crates/ra_ide_api/src/change.rs b/crates/ra_ide_api/src/change.rs
index 4196a3853..445a94aa8 100644
--- a/crates/ra_ide_api/src/change.rs
+++ b/crates/ra_ide_api/src/change.rs
@@ -230,6 +230,7 @@ impl RootDatabase {
230 self.query(hir::db::AstIdMapQuery).sweep(sweep); 230 self.query(hir::db::AstIdMapQuery).sweep(sweep);
231 231
232 self.query(hir::db::RawItemsWithSourceMapQuery).sweep(sweep); 232 self.query(hir::db::RawItemsWithSourceMapQuery).sweep(sweep);
233 self.query(hir::db::ImplsInModuleWithSourceMapQuery).sweep(sweep);
233 self.query(hir::db::BodyWithSourceMapQuery).sweep(sweep); 234 self.query(hir::db::BodyWithSourceMapQuery).sweep(sweep);
234 } 235 }
235} 236}