diff options
| author | bors <bors@rust-lang.org> | 2024-10-12 07:30:26 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-10-12 07:30:26 +0000 |
| commit | 7562b175e35cd4f838fc623b15dda2b9cb5555c0 (patch) | |
| tree | b3af065c7a4f0c61abd787b763ca1f3f6ce30354 | |
| parent | ee7c8b9a90921928458b46e48a95b7b5f0a4ed7b (diff) | |
| parent | 0865296a277c2248e90c69f19eb84c1d8442f161 (diff) | |
| download | rust-7562b175e35cd4f838fc623b15dda2b9cb5555c0.tar.gz rust-7562b175e35cd4f838fc623b15dda2b9cb5555c0.zip | |
Auto merge of #18289 - darichey:fix-relative-buildfiles, r=lnicola
Fix panic when json project has relative buildfile paths The `build_file` path may be relative to the workspace root.
| -rw-r--r-- | src/tools/rust-analyzer/crates/project-model/src/workspace.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/rust-analyzer/crates/project-model/src/workspace.rs b/src/tools/rust-analyzer/crates/project-model/src/workspace.rs index 71b9b61e205..d1ee579c0d8 100644 --- a/src/tools/rust-analyzer/crates/project-model/src/workspace.rs +++ b/src/tools/rust-analyzer/crates/project-model/src/workspace.rs @@ -553,7 +553,7 @@ impl ProjectWorkspace { ProjectWorkspaceKind::Json(project) => project .crates() .filter_map(|(_, krate)| krate.build.as_ref().map(|build| build.build_file.clone())) - .map(AbsPathBuf::assert) + .map(|build_file| self.workspace_root().join(build_file)) .collect(), _ => vec![], } |
