Unnamed repository; edit this file 'description' to name the repository.
Add ProjectJsonTargetSpec.project_root
Needed to support flychecking in a later diff
Cormac Relf 4 months ago
parent 870d845 · commit 11c8e3f
-rw-r--r--crates/rust-analyzer/src/global_state.rs1
-rw-r--r--crates/rust-analyzer/src/target_spec.rs1
2 files changed, 2 insertions, 0 deletions
diff --git a/crates/rust-analyzer/src/global_state.rs b/crates/rust-analyzer/src/global_state.rs
index 9beab3c0e4..81d60179cc 100644
--- a/crates/rust-analyzer/src/global_state.rs
+++ b/crates/rust-analyzer/src/global_state.rs
@@ -833,6 +833,7 @@ impl GlobalStateSnapshot {
label: build.label,
target_kind: build.target_kind,
shell_runnables: project.runnables().to_owned(),
+ project_root: project.project_root().to_owned(),
}));
}
ProjectWorkspaceKind::DetachedFile { .. } => {}
diff --git a/crates/rust-analyzer/src/target_spec.rs b/crates/rust-analyzer/src/target_spec.rs
index e0f95a7830..8452b6493e 100644
--- a/crates/rust-analyzer/src/target_spec.rs
+++ b/crates/rust-analyzer/src/target_spec.rs
@@ -68,6 +68,7 @@ pub(crate) struct ProjectJsonTargetSpec {
pub(crate) label: String,
pub(crate) target_kind: TargetKind,
pub(crate) shell_runnables: Vec<Runnable>,
+ pub(crate) project_root: AbsPathBuf,
}
impl ProjectJsonTargetSpec {