Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 71d49d3

Browse files
committed
Auto merge of rust-lang#12044 - tedinski:fix_rustc_workspace, r=jonas-schievink
fix: index the correct CargoWorkspace with rustc_private I believe this fixes rust-lang#12043, but I'm not sufficiently setup/familiar with working on rust-analyzer to test it locally. :/ This section of code is iterating on `rustc_workspace.packages()` but then indexes `cargo[pkg]`, which is likely the source of the bug.
2 parents f83dce0 + ecb1368 commit 71d49d3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

crates/project_model/src/workspace.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,9 @@ fn handle_rustc_crates(
759759

760760
let overrides = match override_cfg {
761761
CfgOverrides::Wildcard(cfg_diff) => Some(cfg_diff),
762-
CfgOverrides::Selective(cfg_overrides) => cfg_overrides.get(&cargo[pkg].name),
762+
CfgOverrides::Selective(cfg_overrides) => {
763+
cfg_overrides.get(&rustc_workspace[pkg].name)
764+
}
763765
};
764766

765767
if let Some(overrides) = overrides {

0 commit comments

Comments
 (0)