diff options
author | Aleksey Kladov <[email protected]> | 2019-01-01 18:17:52 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-01-01 19:15:35 +0000 |
commit | 4a3f76d3bb6cf75ab5a9ba3384c312a76c70564b (patch) | |
tree | 574999b6faed298abef814cdd494e002002aa31c /crates/ra_hir/src/query_definitions.rs | |
parent | f8d419ee898053777f9b615e122bd7e31142e2fe (diff) |
wip
Diffstat (limited to 'crates/ra_hir/src/query_definitions.rs')
-rw-r--r-- | crates/ra_hir/src/query_definitions.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/ra_hir/src/query_definitions.rs b/crates/ra_hir/src/query_definitions.rs index 0c07f1444..3c90e29fe 100644 --- a/crates/ra_hir/src/query_definitions.rs +++ b/crates/ra_hir/src/query_definitions.rs | |||
@@ -128,11 +128,12 @@ pub(super) fn input_module_items( | |||
128 | ) -> Cancelable<Arc<InputModuleItems>> { | 128 | ) -> Cancelable<Arc<InputModuleItems>> { |
129 | let module_tree = db.module_tree(source_root)?; | 129 | let module_tree = db.module_tree(source_root)?; |
130 | let source = module_id.source(&module_tree); | 130 | let source = module_id.source(&module_tree); |
131 | let file_items = db.file_items(source.file_id().into()); | 131 | let mfile_id = source.file_id().into(); |
132 | let file_items = db.file_items(mfile_id); | ||
132 | let res = match source.resolve(db) { | 133 | let res = match source.resolve(db) { |
133 | ModuleSourceNode::SourceFile(it) => { | 134 | ModuleSourceNode::SourceFile(it) => { |
134 | let items = it.borrowed().items(); | 135 | let items = it.borrowed().items(); |
135 | InputModuleItems::new(&file_items, items) | 136 | InputModuleItems::new(mfile_id, &file_items, items) |
136 | } | 137 | } |
137 | ModuleSourceNode::Module(it) => { | 138 | ModuleSourceNode::Module(it) => { |
138 | let items = it | 139 | let items = it |
@@ -140,7 +141,7 @@ pub(super) fn input_module_items( | |||
140 | .item_list() | 141 | .item_list() |
141 | .into_iter() | 142 | .into_iter() |
142 | .flat_map(|it| it.items()); | 143 | .flat_map(|it| it.items()); |
143 | InputModuleItems::new(&file_items, items) | 144 | InputModuleItems::new(mfile_id, &file_items, items) |
144 | } | 145 | } |
145 | }; | 146 | }; |
146 | Ok(Arc::new(res)) | 147 | Ok(Arc::new(res)) |