diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/rust-analyzer/src/cli/load_cargo.rs | 4 | ||||
-rw-r--r-- | crates/rust-analyzer/src/config.rs | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/crates/rust-analyzer/src/cli/load_cargo.rs b/crates/rust-analyzer/src/cli/load_cargo.rs index 32a9ee339..018be70ee 100644 --- a/crates/rust-analyzer/src/cli/load_cargo.rs +++ b/crates/rust-analyzer/src/cli/load_cargo.rs | |||
@@ -73,9 +73,7 @@ pub(crate) fn load_cargo( | |||
73 | let proc_macro_client = if !with_proc_macro { | 73 | let proc_macro_client = if !with_proc_macro { |
74 | ProcMacroClient::dummy() | 74 | ProcMacroClient::dummy() |
75 | } else { | 75 | } else { |
76 | let mut path = std::env::current_exe()?; | 76 | let path = std::env::current_exe()?; |
77 | path.pop(); | ||
78 | path.push("rust-analyzer"); | ||
79 | ProcMacroClient::extern_process(&path, &["proc-macro"]).unwrap() | 77 | ProcMacroClient::extern_process(&path, &["proc-macro"]).unwrap() |
80 | }; | 78 | }; |
81 | let host = load(&source_roots, ws, &mut vfs, receiver, extern_dirs, &proc_macro_client); | 79 | let host = load(&source_roots, ws, &mut vfs, receiver, extern_dirs, &proc_macro_client); |
diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs index 2b45f1310..3597a14e3 100644 --- a/crates/rust-analyzer/src/config.rs +++ b/crates/rust-analyzer/src/config.rs | |||
@@ -134,9 +134,7 @@ impl Config { | |||
134 | 134 | ||
135 | match get::<bool>(value, "/procMacro/enabled") { | 135 | match get::<bool>(value, "/procMacro/enabled") { |
136 | Some(true) => { | 136 | Some(true) => { |
137 | if let Ok(mut path) = std::env::current_exe() { | 137 | if let Ok(path) = std::env::current_exe() { |
138 | path.pop(); | ||
139 | path.push("rust-analyzer"); | ||
140 | self.proc_macro_srv = Some((path.to_string_lossy().to_string(), vec!["proc-macro".to_string()])); | 138 | self.proc_macro_srv = Some((path.to_string_lossy().to_string(), vec!["proc-macro".to_string()])); |
141 | } | 139 | } |
142 | } | 140 | } |