aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/module/imp.rs
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2018-12-18 22:51:34 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2018-12-18 22:51:34 +0000
commit0e1c01cdb8e6b346edd5d68d9cc72cbce1ce9793 (patch)
treebba7163aa81ceba1dfb26f481b8fd974421aaa8b /crates/ra_hir/src/module/imp.rs
parent9664fbcac5e53d725c6e438ffba2194921321b76 (diff)
parent1c5ce7a8682c9e14ce726388b88897644721b19b (diff)
Merge #291
291: File module source does not depend on syntax r=matklad a=matklad Fixes this problem: https://github.com/rust-analyzer/rust-analyzer/pull/289#issuecomment-448398571 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/module/imp.rs')
-rw-r--r--crates/ra_hir/src/module/imp.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/module/imp.rs b/crates/ra_hir/src/module/imp.rs
index 9f144e139..4a19842c4 100644
--- a/crates/ra_hir/src/module/imp.rs
+++ b/crates/ra_hir/src/module/imp.rs
@@ -66,7 +66,7 @@ fn create_module_tree<'a>(
66 66
67 let source_root = db.source_root(source_root); 67 let source_root = db.source_root(source_root);
68 for &file_id in source_root.files.iter() { 68 for &file_id in source_root.files.iter() {
69 let source = ModuleSource::new_file(db, file_id); 69 let source = ModuleSource::new_file(file_id);
70 if visited.contains(&source) { 70 if visited.contains(&source) {
71 continue; // TODO: use explicit crate_roots here 71 continue; // TODO: use explicit crate_roots here
72 } 72 }
@@ -126,7 +126,7 @@ fn build_subtree(
126 visited, 126 visited,
127 roots, 127 roots,
128 Some(link), 128 Some(link),
129 ModuleSource::new_file(db, file_id), 129 ModuleSource::new_file(file_id),
130 ), 130 ),
131 }) 131 })
132 .collect::<Cancelable<Vec<_>>>()?; 132 .collect::<Cancelable<Vec<_>>>()?;