Change HasChildSource::ChildId assoc item to generic param

This commit is contained in:
Lukas Wirth 2020-12-14 17:11:27 +01:00
parent 34f7b5383a
commit 2c67a4abe4
4 changed files with 37 additions and 23 deletions

View file

@ -36,8 +36,7 @@ impl<N: ItemTreeNode> HasSource for ItemLoc<N> {
}
}
pub trait HasChildSource {
type ChildId;
pub trait HasChildSource<ChildId> {
type Value;
fn child_source(&self, db: &dyn DefDatabase) -> InFile<ArenaMap<Self::ChildId, Self::Value>>;
fn child_source(&self, db: &dyn DefDatabase) -> InFile<ArenaMap<ChildId, Self::Value>>;
}