Simplify completion config path resolutions

This commit is contained in:
Lukas Wirth 2025-01-01 14:26:10 +01:00
parent 45954ebaa4
commit c5bda0d3f7
3 changed files with 49 additions and 94 deletions

View file

@ -2060,6 +2060,11 @@ impl SemanticsScope<'_> {
)
}
pub fn resolve_mod_path(&self, path: &ModPath) -> impl Iterator<Item = ItemInNs> {
let items = self.resolver.resolve_module_path_in_items(self.db.upcast(), path);
items.iter_items().map(|(item, _)| item.into())
}
/// Iterates over associated types that may be specified after the given path (using
/// `Ty::Assoc` syntax).
pub fn assoc_type_shorthand_candidates<R>(