Skip to content

Commit f8016b8

Browse files
Merge #3996
3996: Fix path for proc-macro in nightly / stable release r=matklad a=edwin0cheng I messed up that I forget we use different executable names for nightly / stable release, I changed to use the current executable name instead. Co-authored-by: Edwin Cheng <[email protected]>
2 parents 69f0cb6 + ef6ee16 commit f8016b8

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

crates/rust-analyzer/src/cli/load_cargo.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,7 @@ pub(crate) fn load_cargo(
7575
let proc_macro_client = if !with_proc_macro {
7676
ProcMacroClient::dummy()
7777
} else {
78-
let mut path = std::env::current_exe()?;
79-
path.pop();
80-
path.push("rust-analyzer");
78+
let path = std::env::current_exe()?;
8179
ProcMacroClient::extern_process(&path, &["proc-macro"]).unwrap()
8280
};
8381
let host = load(&source_roots, ws, &mut vfs, receiver, extern_dirs, &proc_macro_client);

crates/rust-analyzer/src/config.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,7 @@ impl Config {
134134

135135
match get::<bool>(value, "/procMacro/enabled") {
136136
Some(true) => {
137-
if let Ok(mut path) = std::env::current_exe() {
138-
path.pop();
139-
path.push("rust-analyzer");
137+
if let Ok(path) = std::env::current_exe() {
140138
self.proc_macro_srv = Some((path.to_string_lossy().to_string(), vec!["proc-macro".to_string()]));
141139
}
142140
}

0 commit comments

Comments
 (0)