From 4551155073d8e12dd7aa467f6cd90e8705a115b3 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 5 Jan 2019 13:23:34 +0300 Subject: introduce separate goto_defenition --- crates/ra_lsp_server/src/main_loop/handlers.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'crates/ra_lsp_server/src') diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs index ffca3f51c..1baed73ad 100644 --- a/crates/ra_lsp_server/src/main_loop/handlers.rs +++ b/crates/ra_lsp_server/src/main_loop/handlers.rs @@ -207,12 +207,11 @@ pub fn handle_goto_definition( params: req::TextDocumentPositionParams, ) -> Result> { let position = params.try_conv_with(&world)?; - let rr = match world.analysis().approximately_resolve_symbol(position)? { + let navs = match world.analysis().goto_defenition(position)? { None => return Ok(None), Some(it) => it, }; - let res = rr - .resolves_to + let res = navs .into_iter() .map(|nav| nav.try_conv_with(&world)) .collect::>>()?; -- cgit v1.2.3