mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 14:51:48 +00:00
Remove node function in NavTarget
This commit is contained in:
parent
bb55111c20
commit
d46278d320
5 changed files with 94 additions and 88 deletions
|
@ -72,7 +72,7 @@ pub(crate) fn reference_definition(
|
|||
}
|
||||
}
|
||||
Some(Pat(pat)) => return Exact(NavigationTarget::from_pat(db, file_id, pat)),
|
||||
Some(SelfParam(par)) => return Exact(NavigationTarget::from_self_param(file_id, par)),
|
||||
Some(SelfParam(par)) => return Exact(NavigationTarget::from_self_param(db, file_id, par)),
|
||||
Some(GenericParam(_)) => {
|
||||
// FIXME: go to the generic param def
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ pub(crate) fn reference_definition(
|
|||
// Fallback index based approach:
|
||||
let navs = crate::symbol_index::index_resolve(db, name_ref)
|
||||
.into_iter()
|
||||
.map(NavigationTarget::from_symbol)
|
||||
.map(|s| NavigationTarget::from_symbol(db, s))
|
||||
.collect();
|
||||
Approximate(navs)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue