aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/code_model_impl
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-04-02 15:58:27 +0100
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-04-02 15:58:27 +0100
commit9e46400e0ca72099fb5f464fdf6eefbace10fbd4 (patch)
treed6b13431cc32ca74c696166233aec7b44d331ea8 /crates/ra_hir/src/code_model_impl
parent0a758a2c4803c7ecc956d2aa6ed2ce48c4e4edd9 (diff)
parent0de89f786ffd71d56317853e1f3360f33b8e2ddf (diff)
Merge #1092
1092: always produce source for import r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/code_model_impl')
-rw-r--r--crates/ra_hir/src/code_model_impl/module.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/code_model_impl/module.rs b/crates/ra_hir/src/code_model_impl/module.rs
index ccca2b7e5..88dee3a69 100644
--- a/crates/ra_hir/src/code_model_impl/module.rs
+++ b/crates/ra_hir/src/code_model_impl/module.rs
@@ -5,7 +5,7 @@ use crate::{
5 Module, ModuleSource, Name, AstId, 5 Module, ModuleSource, Name, AstId,
6 nameres::{CrateModuleId, ImportId}, 6 nameres::{CrateModuleId, ImportId},
7 HirDatabase, DefDatabase, 7 HirDatabase, DefDatabase,
8 HirFileId, 8 HirFileId, ImportSource,
9}; 9};
10 10
11impl ModuleSource { 11impl ModuleSource {
@@ -72,7 +72,7 @@ impl Module {
72 &self, 72 &self,
73 db: &impl HirDatabase, 73 db: &impl HirDatabase,
74 import: ImportId, 74 import: ImportId,
75 ) -> TreeArc<ast::UseTree> { 75 ) -> ImportSource {
76 let (file_id, source) = self.definition_source(db); 76 let (file_id, source) = self.definition_source(db);
77 let (_, source_map) = db.raw_items_with_source_map(file_id); 77 let (_, source_map) = db.raw_items_with_source_map(file_id);
78 source_map.get(&source, import) 78 source_map.get(&source, import)