fix: Fix projects depending on rustc_private hanging

This commit is contained in:
Lukas Wirth 2024-03-21 16:55:42 +01:00
parent 83f9cc677f
commit 2ad14b8069

View file

@ -1250,6 +1250,7 @@ fn handle_rustc_crates(
let kind @ TargetKind::Lib { is_proc_macro } = rustc_workspace[tgt].kind else {
continue;
};
let pkg_crates = &mut rustc_pkg_crates.entry(pkg).or_insert_with(Vec::new);
if let Some(file_id) = load(&rustc_workspace[tgt].root) {
let crate_id = add_target_crate_root(
crate_graph,
@ -1268,7 +1269,7 @@ fn handle_rustc_crates(
if let Some(proc_macro) = libproc_macro {
add_proc_macro_dep(crate_graph, crate_id, proc_macro, is_proc_macro);
}
rustc_pkg_crates.entry(pkg).or_insert_with(Vec::new).push(crate_id);
pkg_crates.push(crate_id);
}
}
}