aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-01-05 10:23:34 +0000
committerAleksey Kladov <[email protected]>2019-01-05 16:30:49 +0000
commit4551155073d8e12dd7aa467f6cd90e8705a115b3 (patch)
tree1980a42d5b690fb95ba3d407687f8dc66bc75cfb /crates/ra_analysis/src
parentad2a5da259aba485150cb3c3a8395c18be12cba7 (diff)
introduce separate goto_defenition
Diffstat (limited to 'crates/ra_analysis/src')
-rw-r--r--crates/ra_analysis/src/lib.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/ra_analysis/src/lib.rs b/crates/ra_analysis/src/lib.rs
index b068119d2..70ee448fc 100644
--- a/crates/ra_analysis/src/lib.rs
+++ b/crates/ra_analysis/src/lib.rs
@@ -392,6 +392,13 @@ impl Analysis {
392 .collect(); 392 .collect();
393 Ok(res) 393 Ok(res)
394 } 394 }
395 pub fn goto_defenition(
396 &self,
397 position: FilePosition,
398 ) -> Cancelable<Option<Vec<NavigationTarget>>> {
399 let r = self.approximately_resolve_symbol(position)?;
400 Ok(r.map(|it| it.resolves_to))
401 }
395 /// Resolves reference to definition, but does not gurantee correctness. 402 /// Resolves reference to definition, but does not gurantee correctness.
396 pub fn approximately_resolve_symbol( 403 pub fn approximately_resolve_symbol(
397 &self, 404 &self,