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 eb9ac32c3..762f776fe 100644 --- a/crates/rust-analyzer/src/cli/load_cargo.rs +++ b/crates/rust-analyzer/src/cli/load_cargo.rs | |||
@@ -75,9 +75,7 @@ pub(crate) fn load_cargo( | |||
75 | let proc_macro_client = if !with_proc_macro { | 75 | let proc_macro_client = if !with_proc_macro { |
76 | ProcMacroClient::dummy() | 76 | ProcMacroClient::dummy() |
77 | } else { | 77 | } else { |
78 | let mut path = std::env::current_exe()?; | 78 | let path = std::env::current_exe()?; |
79 | path.pop(); | ||
80 | path.push("rust-analyzer"); | ||
81 | ProcMacroClient::extern_process(&path, &["proc-macro"]).unwrap() | 79 | ProcMacroClient::extern_process(&path, &["proc-macro"]).unwrap() |
82 | }; | 80 | }; |
83 | let host = load(&source_roots, ws, &mut vfs, receiver, extern_dirs, &proc_macro_client); | 81 | 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 | } |