diff options
Diffstat (limited to 'crates/ra_hir/src/module')
-rw-r--r-- | crates/ra_hir/src/module/nameres.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/module/nameres.rs b/crates/ra_hir/src/module/nameres.rs index 61a1acfe6..6511359d0 100644 --- a/crates/ra_hir/src/module/nameres.rs +++ b/crates/ra_hir/src/module/nameres.rs | |||
@@ -168,7 +168,7 @@ impl InputModuleItems { | |||
168 | } | 168 | } |
169 | 169 | ||
170 | fn add_use_item(&mut self, file_items: &SourceFileItems, item: ast::UseItem) { | 170 | fn add_use_item(&mut self, file_items: &SourceFileItems, item: ast::UseItem) { |
171 | let file_item_id = file_items.id_of(item.syntax()); | 171 | let file_item_id = file_items.id_of_unchecked(item.syntax()); |
172 | let start_offset = item.syntax().range().start(); | 172 | let start_offset = item.syntax().range().start(); |
173 | Path::expand_use_item(item, |path, range| { | 173 | Path::expand_use_item(item, |path, range| { |
174 | let kind = match range { | 174 | let kind = match range { |
@@ -188,7 +188,7 @@ impl ModuleItem { | |||
188 | let name = item.name()?.text(); | 188 | let name = item.name()?.text(); |
189 | let kind = item.syntax().kind(); | 189 | let kind = item.syntax().kind(); |
190 | let vis = Vis::Other; | 190 | let vis = Vis::Other; |
191 | let id = file_items.id_of(item.syntax()); | 191 | let id = file_items.id_of_unchecked(item.syntax()); |
192 | let res = ModuleItem { | 192 | let res = ModuleItem { |
193 | id, | 193 | id, |
194 | name, | 194 | name, |