internal: Remove PathResolution::AssocItem

This commit is contained in:
Lukas Wirth 2022-04-01 18:32:05 +02:00
parent a1d684e951
commit c290e68ff9
7 changed files with 28 additions and 36 deletions

View file

@ -482,14 +482,6 @@ impl From<PathResolution> for Definition {
fn from(path_resolution: PathResolution) -> Self {
match path_resolution {
PathResolution::Def(def) => def.into(),
PathResolution::AssocItem(item) => {
let def: ModuleDef = match item {
hir::AssocItem::Function(it) => it.into(),
hir::AssocItem::Const(it) => it.into(),
hir::AssocItem::TypeAlias(it) => it.into(),
};
def.into()
}
PathResolution::Local(local) => Definition::Local(local),
PathResolution::TypeParam(par) => Definition::GenericParam(par.into()),
PathResolution::ConstParam(par) => Definition::GenericParam(par.into()),