mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
internal: Remove PathResolution::AssocItem
This commit is contained in:
parent
a1d684e951
commit
c290e68ff9
7 changed files with 28 additions and 36 deletions
|
@ -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()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue