Resolve associated types

This commit is contained in:
Lukas Wirth 2021-04-01 18:01:18 +02:00
parent 75011bbccb
commit 444f6caaba
4 changed files with 64 additions and 5 deletions

View file

@ -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())
})
}
}