mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
minimize the API
This commit is contained in:
parent
b6809b6695
commit
07cc047b4f
2 changed files with 11 additions and 23 deletions
|
@ -90,10 +90,8 @@ pub(crate) fn reference_definition(
|
|||
match resolved {
|
||||
hir::PathResolution::Def(def) => return Exact(NavigationTarget::from_def(db, def)),
|
||||
hir::PathResolution::LocalBinding(pat) => {
|
||||
if let Some(pat) = analyzer.pat_syntax(db, pat) {
|
||||
let nav = NavigationTarget::from_pat(db, file_id, pat);
|
||||
return Exact(nav);
|
||||
}
|
||||
let nav = NavigationTarget::from_pat(db, file_id, pat);
|
||||
return Exact(nav);
|
||||
}
|
||||
hir::PathResolution::GenericParam(..) => {
|
||||
// FIXME: go to the generic param def
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue