diff options
Diffstat (limited to 'crates/ra_ide_api')
-rw-r--r-- | crates/ra_ide_api/src/goto_definition.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/crates/ra_ide_api/src/goto_definition.rs b/crates/ra_ide_api/src/goto_definition.rs index 1f1a8d126..abcc682e7 100644 --- a/crates/ra_ide_api/src/goto_definition.rs +++ b/crates/ra_ide_api/src/goto_definition.rs | |||
@@ -90,10 +90,8 @@ pub(crate) fn reference_definition( | |||
90 | match resolved { | 90 | match resolved { |
91 | hir::PathResolution::Def(def) => return Exact(NavigationTarget::from_def(db, def)), | 91 | hir::PathResolution::Def(def) => return Exact(NavigationTarget::from_def(db, def)), |
92 | hir::PathResolution::LocalBinding(pat) => { | 92 | hir::PathResolution::LocalBinding(pat) => { |
93 | if let Some(pat) = analyzer.pat_syntax(db, pat) { | 93 | let nav = NavigationTarget::from_pat(db, file_id, pat); |
94 | let nav = NavigationTarget::from_pat(db, file_id, pat); | 94 | return Exact(nav); |
95 | return Exact(nav); | ||
96 | } | ||
97 | } | 95 | } |
98 | hir::PathResolution::GenericParam(..) => { | 96 | hir::PathResolution::GenericParam(..) => { |
99 | // FIXME: go to the generic param def | 97 | // FIXME: go to the generic param def |