From f7d3a873050fb8360b663ca281a805de8cf7f30d Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 1 Jun 2019 22:31:22 +0300 Subject: collect impl source maps --- crates/ra_hir/src/db.rs | 3 --- crates/ra_hir/src/impl_block.rs | 9 +-------- 2 files changed, 1 insertion(+), 11 deletions(-) (limited to 'crates/ra_hir') 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 { #[salsa::invoke(crate::impl_block::impls_in_module)] fn impls_in_module(&self, module: Module) -> Arc; - #[salsa::invoke(crate::impl_block::impls_in_module_source_map_query)] - fn impls_in_module_source_map(&self, module: Module) -> Arc; - #[salsa::invoke(crate::impl_block::impls_in_module_with_source_map_query)] fn impls_in_module_with_source_map( &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 { /// Returns the syntax of the impl block pub fn source(&self, db: &impl DefDatabase) -> (HirFileId, TreeArc) { - let source_map = db.impls_in_module_source_map(self.module); + let source_map = db.impls_in_module_with_source_map(self.module).1; let (file_id, source) = self.module.definition_source(db); (file_id, source_map.get(&source, self.impl_id)) } @@ -231,10 +231,3 @@ pub(crate) fn impls_in_module_with_source_map_query( pub(crate) fn impls_in_module(db: &impl DefDatabase, module: Module) -> Arc { db.impls_in_module_with_source_map(module).0 } - -pub(crate) fn impls_in_module_source_map_query( - db: &impl DefDatabase, - module: Module, -) -> Arc { - db.impls_in_module_with_source_map(module).1 -} -- cgit v1.2.3