aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-04-11 13:58:00 +0100
committerAleksey Kladov <[email protected]>2019-04-11 14:29:33 +0100
commit07cc047b4ffe3049dfe95fc5cd59383336976e2d (patch)
tree69a1df4df350890544b5e6e1fcff9da68f1af351 /crates/ra_ide_api
parentb6809b6695f9c4cec82ff98d73f7ff24f96cbecf (diff)
minimize the API
Diffstat (limited to 'crates/ra_ide_api')
-rw-r--r--crates/ra_ide_api/src/goto_definition.rs6
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