diff options
Diffstat (limited to 'crates/ra_hir/src/module.rs')
-rw-r--r-- | crates/ra_hir/src/module.rs | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/crates/ra_hir/src/module.rs b/crates/ra_hir/src/module.rs index 43413acb8..24c346984 100644 --- a/crates/ra_hir/src/module.rs +++ b/crates/ra_hir/src/module.rs | |||
@@ -13,8 +13,8 @@ use ra_db::{SourceRootId, FileId, Cancelable}; | |||
13 | use relative_path::RelativePathBuf; | 13 | use relative_path::RelativePathBuf; |
14 | 14 | ||
15 | use crate::{ | 15 | use crate::{ |
16 | DefKind, DefLoc, DefId, Path, PathKind, HirDatabase, SourceItemId, SourceFileItemId, Crate, | 16 | Def, DefKind, DefLoc, DefId, |
17 | Name, | 17 | Name, Path, PathKind, HirDatabase, SourceItemId, SourceFileItemId, Crate, |
18 | arena::{Arena, Id}, | 18 | arena::{Arena, Id}, |
19 | }; | 19 | }; |
20 | 20 | ||
@@ -139,13 +139,8 @@ impl Module { | |||
139 | } else { | 139 | } else { |
140 | return Ok(PerNs::none()); | 140 | return Ok(PerNs::none()); |
141 | }; | 141 | }; |
142 | let module = match curr.loc(db) { | 142 | let module = match curr.resolve(db)? { |
143 | DefLoc { | 143 | Def::Module(it) => it, |
144 | kind: DefKind::Module, | ||
145 | source_root_id, | ||
146 | module_id, | ||
147 | .. | ||
148 | } => Module::new(db, source_root_id, module_id)?, | ||
149 | // TODO here would be the place to handle enum variants... | 144 | // TODO here would be the place to handle enum variants... |
150 | _ => return Ok(PerNs::none()), | 145 | _ => return Ok(PerNs::none()), |
151 | }; | 146 | }; |