mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 02:03:53 +00:00
Fix path for proc-macro in nightly / stable build
This commit is contained in:
parent
10d8cb913c
commit
ef6ee16006
@ -73,9 +73,7 @@ pub(crate) fn load_cargo(
|
|||||||
let proc_macro_client = if !with_proc_macro {
|
let proc_macro_client = if !with_proc_macro {
|
||||||
ProcMacroClient::dummy()
|
ProcMacroClient::dummy()
|
||||||
} else {
|
} else {
|
||||||
let mut path = std::env::current_exe()?;
|
let path = std::env::current_exe()?;
|
||||||
path.pop();
|
|
||||||
path.push("rust-analyzer");
|
|
||||||
ProcMacroClient::extern_process(&path, &["proc-macro"]).unwrap()
|
ProcMacroClient::extern_process(&path, &["proc-macro"]).unwrap()
|
||||||
};
|
};
|
||||||
let host = load(&source_roots, ws, &mut vfs, receiver, extern_dirs, &proc_macro_client);
|
let host = load(&source_roots, ws, &mut vfs, receiver, extern_dirs, &proc_macro_client);
|
||||||
|
@ -134,9 +134,7 @@ impl Config {
|
|||||||
|
|
||||||
match get::<bool>(value, "/procMacro/enabled") {
|
match get::<bool>(value, "/procMacro/enabled") {
|
||||||
Some(true) => {
|
Some(true) => {
|
||||||
if let Ok(mut path) = std::env::current_exe() {
|
if let Ok(path) = std::env::current_exe() {
|
||||||
path.pop();
|
|
||||||
path.push("rust-analyzer");
|
|
||||||
self.proc_macro_srv = Some((path.to_string_lossy().to_string(), vec!["proc-macro".to_string()]));
|
self.proc_macro_srv = Some((path.to_string_lossy().to_string(), vec!["proc-macro".to_string()]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user