Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-def/src/find_path.rs')
-rw-r--r--crates/hir-def/src/find_path.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/hir-def/src/find_path.rs b/crates/hir-def/src/find_path.rs
index 26247ba5b5..0cd4a5db8c 100644
--- a/crates/hir-def/src/find_path.rs
+++ b/crates/hir-def/src/find_path.rs
@@ -611,8 +611,10 @@ mod tests {
let parsed_path_file = syntax::SourceFile::parse(&format!("use {path};"));
let ast_path =
parsed_path_file.syntax_node().descendants().find_map(syntax::ast::Path::cast).unwrap();
- let mod_path =
- ModPath::from_src(&db, ast_path, db.span_map(pos.file_id.into()).as_ref()).unwrap();
+ let mod_path = ModPath::from_src(&db, ast_path, &mut |range| {
+ db.span_map(pos.file_id.into()).as_ref().span_for_range(range).ctx
+ })
+ .unwrap();
let def_map = module.def_map(&db);
let resolved = def_map