Report sysroot and rustc crate loading errors

This commit is contained in:
Lukas Wirth 2023-03-15 11:35:34 +01:00
parent e2ab0ff124
commit d9c7d28e0d
11 changed files with 134 additions and 139 deletions

View file

@ -24,8 +24,8 @@ fn load_cargo_with_overrides(file: &str, cfg_overrides: CfgOverrides) -> CrateGr
let project_workspace = ProjectWorkspace::Cargo {
cargo: cargo_workspace,
build_scripts: WorkspaceBuildScripts::default(),
sysroot: None,
rustc: None,
sysroot: Err(None),
rustc: Err(None),
rustc_cfg: Vec::new(),
cfg_overrides,
toolchain: None,
@ -37,7 +37,7 @@ fn load_cargo_with_overrides(file: &str, cfg_overrides: CfgOverrides) -> CrateGr
fn load_rust_project(file: &str) -> CrateGraph {
let data = get_test_json_file(file);
let project = rooted_project_json(data);
let sysroot = Some(get_fake_sysroot());
let sysroot = Ok(get_fake_sysroot());
let project_workspace = ProjectWorkspace::Json { project, sysroot, rustc_cfg: Vec::new() };
to_crate_graph(project_workspace)
}