Skip to content

Commit 364f130

Browse files
authored
replace pwd in rust-project.json output #1 (#2272)
The generated content uses ${pwd} and in the rust-analyzer server output I see error logs saying can't find dir with ${pwd} references Though I'm not sure if this actually affect anything as it seems work fine most of the time, but I think it maybe good to not have rust-analyzer errors
1 parent e3dd170 commit 364f130

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/rust_analyzer/rust_project.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ pub fn write_rust_project(
208208
// Render the `rust-project.json` file and replace the exec root
209209
// placeholders with the path to the local exec root.
210210
let rust_project_content = serde_json::to_string(rust_project)?
211+
.replace("${pwd}", execution_root)
211212
.replace("__EXEC_ROOT__", execution_root)
212213
.replace("__OUTPUT_BASE__", output_base);
213214

0 commit comments

Comments
 (0)