Stop reexporting hir_def's ItemInNs from HIR

This commit is contained in:
Jonas Schievink 2021-07-28 17:39:04 +02:00
parent 1662c3470d
commit 18f86baa62
6 changed files with 60 additions and 27 deletions

View file

@ -620,6 +620,5 @@ fn path_import_candidate(
}
fn item_as_assoc(db: &RootDatabase, item: ItemInNs) -> Option<AssocItem> {
item.as_module_def_id()
.and_then(|module_def_id| ModuleDef::from(module_def_id).as_assoc_item(db))
item.as_module_def().and_then(|module_def| module_def.as_assoc_item(db))
}