mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 05:45:12 +00:00
Refactor a bit to prepare for resolving trait assoc items
This commit is contained in:
parent
913ab1ec0a
commit
828d60574f
10 changed files with 85 additions and 54 deletions
|
@ -117,9 +117,9 @@ pub(crate) fn hover(db: &RootDatabase, position: FilePosition) -> Option<RangeIn
|
|||
}
|
||||
}
|
||||
Some(AssocItem(it)) => res.extend(match it {
|
||||
hir::ImplItem::Method(it) => from_def_source(db, it),
|
||||
hir::ImplItem::Const(it) => from_def_source(db, it),
|
||||
hir::ImplItem::TypeAlias(it) => from_def_source(db, it),
|
||||
hir::AssocItem::Function(it) => from_def_source(db, it),
|
||||
hir::AssocItem::Const(it) => from_def_source(db, it),
|
||||
hir::AssocItem::TypeAlias(it) => from_def_source(db, it),
|
||||
}),
|
||||
Some(Def(it)) => {
|
||||
match it {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue