Unnamed repository; edit this file 'description' to name the repository.
Merge pull request #20835 from ShoyuVanilla/ra-ra
minor: Fix creating `rust-analyzer/rust-analyzer` under target-dir
Chayim Refael Friedman 6 months ago
parent 6d4b234 · parent 26eb637 · commit 8747cf8
-rw-r--r--crates/rust-analyzer/src/flycheck.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/crates/rust-analyzer/src/flycheck.rs b/crates/rust-analyzer/src/flycheck.rs
index b545106fe1..73a51bba3d 100644
--- a/crates/rust-analyzer/src/flycheck.rs
+++ b/crates/rust-analyzer/src/flycheck.rs
@@ -12,7 +12,7 @@ use cargo_metadata::PackageId;
use crossbeam_channel::{Receiver, Sender, select_biased, unbounded};
use ide_db::FxHashSet;
use itertools::Itertools;
-use paths::{AbsPath, AbsPathBuf, Utf8PathBuf};
+use paths::{AbsPath, AbsPathBuf, Utf8Path, Utf8PathBuf};
use rustc_hash::FxHashMap;
use serde::Deserialize as _;
use serde_derive::Deserialize;
@@ -432,8 +432,10 @@ impl FlycheckActor {
options
.target_dir
.as_deref()
- .unwrap_or("target".as_ref())
- .join(format!("rust-analyzer/flycheck{}", self.id)),
+ .unwrap_or(
+ Utf8Path::new("target").join("rust-analyzer").as_path(),
+ )
+ .join(format!("flycheck{}", self.id)),
),
_ => None,
},