feat: Load sysroot library via cargo metadata

This commit is contained in:
Lukas Wirth 2024-08-05 12:18:19 +02:00
parent 670a5ab4a9
commit f053b1aa6a
16 changed files with 156 additions and 212 deletions

View file

@ -16,7 +16,7 @@ use ide_db::{
use itertools::Itertools;
use proc_macro_api::{MacroDylib, ProcMacroServer};
use project_model::{
CargoConfig, ManifestPath, PackageRoot, ProjectManifest, ProjectWorkspace, ProjectWorkspaceKind,
CargoConfig, PackageRoot, ProjectManifest, ProjectWorkspace, ProjectWorkspaceKind,
};
use span::Span;
use vfs::{file_set::FileSetConfig, loader::Handle, AbsPath, AbsPathBuf, VfsPath};
@ -247,7 +247,7 @@ impl ProjectFolders {
let mut file_set_roots: Vec<VfsPath> = vec![];
let mut entries = vec![];
if let Some(manifest) = ws.manifest().map(ManifestPath::as_ref) {
if let Some(manifest) = ws.manifest().map(|it| it.to_path_buf()) {
file_set_roots.push(VfsPath::from(manifest.to_owned()));
entries.push(manifest.to_owned());
}