diff options
author | Benjamin Coenen <[email protected]> | 2020-04-18 16:14:24 +0100 |
---|---|---|
committer | Benjamin Coenen <[email protected]> | 2020-04-18 16:14:24 +0100 |
commit | af3c19e85f55db9277ce9ad5b784df2ccfe3c9e4 (patch) | |
tree | 7a777f22f5fa79704b8d2c9aa8d67255d12123be /crates/rust-analyzer | |
parent | 379787858bbfb2691e134942d94fcbc70c5d1d7f (diff) | |
parent | 84e3304a9bf0d68e30d58b1e37a6db2e9ec97525 (diff) |
Merge branch 'master' of github.com:rust-analyzer/rust-analyzer
Diffstat (limited to 'crates/rust-analyzer')
-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 | } |