mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-01 12:24:29 +00:00
Simplify completion config path resolutions
This commit is contained in:
parent
45954ebaa4
commit
c5bda0d3f7
3 changed files with 49 additions and 94 deletions
|
|
@ -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>(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue