diff options
Diffstat (limited to 'crates/ra_hir/src/module/nameres.rs')
-rw-r--r-- | crates/ra_hir/src/module/nameres.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/ra_hir/src/module/nameres.rs b/crates/ra_hir/src/module/nameres.rs index c2b380a80..61a1acfe6 100644 --- a/crates/ra_hir/src/module/nameres.rs +++ b/crates/ra_hir/src/module/nameres.rs | |||
@@ -363,7 +363,9 @@ mod tests { | |||
363 | fn item_map(fixture: &str) -> (Arc<hir::ItemMap>, hir::ModuleId) { | 363 | fn item_map(fixture: &str) -> (Arc<hir::ItemMap>, hir::ModuleId) { |
364 | let (db, pos) = MockDatabase::with_position(fixture); | 364 | let (db, pos) = MockDatabase::with_position(fixture); |
365 | let source_root = db.file_source_root(pos.file_id); | 365 | let source_root = db.file_source_root(pos.file_id); |
366 | let module = hir::Module::guess_from_position(&db, pos).unwrap().unwrap(); | 366 | let module = hir::source_binder::module_from_position(&db, pos) |
367 | .unwrap() | ||
368 | .unwrap(); | ||
367 | let module_id = module.module_id; | 369 | let module_id = module.module_id; |
368 | (db.item_map(source_root).unwrap(), module_id) | 370 | (db.item_map(source_root).unwrap(), module_id) |
369 | } | 371 | } |