aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_analysis')
-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,