From e8923713c51bc3484bd98085ad620713959bbc0d Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 10 Jan 2019 20:13:08 +0300 Subject: add sysroot boilerplate --- crates/ra_lsp_server/src/main_loop/handlers.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/ra_lsp_server/src/main_loop') diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs index 069e7f932..0dda9548a 100644 --- a/crates/ra_lsp_server/src/main_loop/handlers.rs +++ b/crates/ra_lsp_server/src/main_loop/handlers.rs @@ -347,11 +347,11 @@ pub fn handle_runnables( .read() .file2path(ra_vfs::VfsFile(file_id.0.into())); let res = world.workspaces.iter().find_map(|ws| { - let tgt = ws.target_by_root(&path)?; + let tgt = ws.cargo.target_by_root(&path)?; let res = CargoTargetSpec { - package: tgt.package(ws).name(ws).to_string(), - target: tgt.name(ws).to_string(), - target_kind: tgt.kind(ws), + package: tgt.package(&ws.cargo).name(&ws.cargo).to_string(), + target: tgt.name(&ws.cargo).to_string(), + target_kind: tgt.kind(&ws.cargo), }; Some(res) }); -- cgit v1.2.3