diff options
Diffstat (limited to 'crates/ra_hir/src/module')
-rw-r--r-- | crates/ra_hir/src/module/imp.rs | 4 | ||||
-rw-r--r-- | crates/ra_hir/src/module/nameres.rs | 4 |
2 files changed, 4 insertions, 4 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<_>>>()?; |
diff --git a/crates/ra_hir/src/module/nameres.rs b/crates/ra_hir/src/module/nameres.rs index 9afeade9e..5540b827f 100644 --- a/crates/ra_hir/src/module/nameres.rs +++ b/crates/ra_hir/src/module/nameres.rs | |||
@@ -98,7 +98,7 @@ impl NamedImport { | |||
98 | pub fn range(&self, db: &impl HirDatabase, file_id: FileId) -> TextRange { | 98 | pub fn range(&self, db: &impl HirDatabase, file_id: FileId) -> TextRange { |
99 | let source_item_id = SourceItemId { | 99 | let source_item_id = SourceItemId { |
100 | file_id, | 100 | file_id, |
101 | item_id: self.file_item_id, | 101 | item_id: Some(self.file_item_id), |
102 | }; | 102 | }; |
103 | let syntax = db.file_item(source_item_id); | 103 | let syntax = db.file_item(source_item_id); |
104 | let offset = syntax.borrowed().range().start(); | 104 | let offset = syntax.borrowed().range().start(); |
@@ -281,7 +281,7 @@ where | |||
281 | module_id, | 281 | module_id, |
282 | source_item_id: SourceItemId { | 282 | source_item_id: SourceItemId { |
283 | file_id, | 283 | file_id, |
284 | item_id: item.id, | 284 | item_id: Some(item.id), |
285 | }, | 285 | }, |
286 | }; | 286 | }; |
287 | let def_id = def_loc.id(self.db); | 287 | let def_id = def_loc.id(self.db); |