mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 21:13:37 +00:00
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.
This commit is contained in:
commit
b551482c41
1 changed files with 1 additions and 1 deletions
|
@ -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![],
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue