Skip extern prelude path resolution in block def maps

This commit is contained in:
Lukas Wirth 2023-06-01 17:58:08 +02:00
parent 54e3ef658a
commit 11b937177b
4 changed files with 21 additions and 32 deletions

View file

@ -81,7 +81,7 @@ fn find_path_inner(
}
let def_map = from.def_map(db);
let crate_root = def_map.crate_root(db);
let crate_root = def_map.crate_root();
// - if the item is a module, jump straight to module search
if let ItemInNs::Types(ModuleDefId::ModuleId(module_id)) = item {
let mut visited_modules = FxHashSet::default();
@ -454,7 +454,7 @@ fn find_local_import_locations(
worklist.push(ancestor);
}
let def_map = def_map.crate_root(db).def_map(db);
let def_map = def_map.crate_root().def_map(db);
let mut seen: FxHashSet<_> = FxHashSet::default();