Skip to content

Commit 2ad14b8

Browse files
committed
fix: Fix projects depending on rustc_private hanging
1 parent 83f9cc6 commit 2ad14b8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crates/project-model/src/workspace.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1250,6 +1250,7 @@ fn handle_rustc_crates(
12501250
let kind @ TargetKind::Lib { is_proc_macro } = rustc_workspace[tgt].kind else {
12511251
continue;
12521252
};
1253+
let pkg_crates = &mut rustc_pkg_crates.entry(pkg).or_insert_with(Vec::new);
12531254
if let Some(file_id) = load(&rustc_workspace[tgt].root) {
12541255
let crate_id = add_target_crate_root(
12551256
crate_graph,
@@ -1268,7 +1269,7 @@ fn handle_rustc_crates(
12681269
if let Some(proc_macro) = libproc_macro {
12691270
add_proc_macro_dep(crate_graph, crate_id, proc_macro, is_proc_macro);
12701271
}
1271-
rustc_pkg_crates.entry(pkg).or_insert_with(Vec::new).push(crate_id);
1272+
pkg_crates.push(crate_id);
12721273
}
12731274
}
12741275
}

0 commit comments

Comments
 (0)