aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/goto_definition.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api/src/goto_definition.rs')
-rw-r--r--crates/ra_ide_api/src/goto_definition.rs15
1 files changed, 2 insertions, 13 deletions
diff --git a/crates/ra_ide_api/src/goto_definition.rs b/crates/ra_ide_api/src/goto_definition.rs
index 3b66483cb..f16c3bda4 100644
--- a/crates/ra_ide_api/src/goto_definition.rs
+++ b/crates/ra_ide_api/src/goto_definition.rs
@@ -5,7 +5,7 @@ use ra_syntax::{
5 SyntaxNode, 5 SyntaxNode,
6}; 6};
7use test_utils::tested_by; 7use test_utils::tested_by;
8use hir::{ImplItem, Resolution}; 8use hir::Resolution;
9 9
10use crate::{FilePosition, NavigationTarget, db::RootDatabase, RangeInfo}; 10use crate::{FilePosition, NavigationTarget, db::RootDatabase, RangeInfo};
11 11
@@ -138,18 +138,7 @@ pub(crate) fn reference_definition(
138 .node_expr(expr) 138 .node_expr(expr)
139 .and_then(|it| infer_result.assoc_resolutions(it.into())) 139 .and_then(|it| infer_result.assoc_resolutions(it.into()))
140 { 140 {
141 match res { 141 return Exact(NavigationTarget::from_impl_item(db, res));
142 ImplItem::Method(f) => {
143 return Exact(NavigationTarget::from_function(db, f));
144 }
145 ImplItem::Const(c) => {
146 let (file, node) = c.source(db);
147 let file = file.original_file(db);
148 let node = &*node;
149 return Exact(NavigationTarget::from_named(file, node));
150 }
151 _ => {}
152 }
153 } 142 }
154 } 143 }
155 } 144 }