Skip to content

Commit 617db49

Browse files
Woops, concat is only for literals
1 parent e3dca51 commit 617db49

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

crates/rust-analyzer/src/reload.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ pub(crate) enum BuildDataProgress {
4848
End((Arc<Vec<ProjectWorkspace>>, Vec<anyhow::Result<WorkspaceBuildScripts>>)),
4949
}
5050

51-
const STANDALONE_PROC_MACRO_SERVER_NAME: &str =
52-
concat!("rust-analyzer-proc-macro-srv", std::env::consts::EXE_SUFFIX);
53-
5451
impl GlobalState {
5552
pub(crate) fn is_quiescent(&self) -> bool {
5653
!(self.fetch_workspaces_queue.op_in_progress()
@@ -306,6 +303,9 @@ impl GlobalState {
306303
let files_config = self.config.files();
307304
let project_folders = ProjectFolders::new(&self.workspaces, &files_config.exclude);
308305

306+
let standalone_server_name =
307+
format!("rust-analyzer-proc-macro-srv{}", std::env::consts::EXE_SUFFIX);
308+
309309
if self.proc_macro_clients.is_empty() {
310310
if let Some((path, args)) = self.config.proc_macro_srv() {
311311
self.proc_macro_clients = self
@@ -319,10 +319,8 @@ impl GlobalState {
319319
tracing::info!("Found a cargo workspace...");
320320
if let Some(sysroot) = sysroot.as_ref() {
321321
tracing::info!("Found a cargo workspace with a sysroot...");
322-
let server_path = sysroot
323-
.root()
324-
.join("libexec")
325-
.join(STANDALONE_PROC_MACRO_SERVER_NAME);
322+
let server_path =
323+
sysroot.root().join("libexec").join(&standalone_server_name);
326324
if std::fs::metadata(&server_path).is_ok() {
327325
tracing::info!(
328326
"And the server exists at {}",

0 commit comments

Comments
 (0)