mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Resolve associated types
This commit is contained in:
parent
75011bbccb
commit
444f6caaba
4 changed files with 64 additions and 5 deletions
|
@ -76,9 +76,11 @@ impl PathResolution {
|
|||
pub fn assoc_type_shorthand_candidates<R>(
|
||||
&self,
|
||||
db: &dyn HirDatabase,
|
||||
mut cb: impl FnMut(TypeAlias) -> Option<R>,
|
||||
mut cb: impl FnMut(&Name, TypeAlias) -> Option<R>,
|
||||
) -> Option<R> {
|
||||
associated_type_shorthand_candidates(db, self.in_type_ns()?, |_, _, id| cb(id.into()))
|
||||
associated_type_shorthand_candidates(db, self.in_type_ns()?, |name, _, id| {
|
||||
cb(name, id.into())
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue