diff options
| author | Lukas Wirth <lukastw97@gmail.com> | 2024-03-21 16:55:42 +0100 |
|---|---|---|
| committer | Lukas Wirth <lukastw97@gmail.com> | 2024-03-21 16:55:42 +0100 |
| commit | 2ad14b806924600eafef2cdb62ca59de16d54568 (patch) | |
| tree | 71d5b94a826f50630f548f47965f2b0d77fc3efd | |
| parent | 83f9cc677fcf97a181a4478435ec87f7d58634eb (diff) | |
| download | rust-2ad14b806924600eafef2cdb62ca59de16d54568.tar.gz rust-2ad14b806924600eafef2cdb62ca59de16d54568.zip | |
fix: Fix projects depending on rustc_private hanging
| -rw-r--r-- | crates/project-model/src/workspace.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/project-model/src/workspace.rs b/crates/project-model/src/workspace.rs index 1556e9b5490..ce9f292fd41 100644 --- a/crates/project-model/src/workspace.rs +++ b/crates/project-model/src/workspace.rs @@ -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); } } } |
