1
Fork 0

Auto merge of #12044 - tedinski:fix_rustc_workspace, r=jonas-schievink

fix: index the correct CargoWorkspace with rustc_private

I believe this fixes #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.
This commit is contained in:
bors 2022-04-21 14:03:37 +00:00
commit 71d49d31bb

View file

@ -759,7 +759,9 @@ fn handle_rustc_crates(
let overrides = match override_cfg {
CfgOverrides::Wildcard(cfg_diff) => Some(cfg_diff),
CfgOverrides::Selective(cfg_overrides) => cfg_overrides.get(&cargo[pkg].name),
CfgOverrides::Selective(cfg_overrides) => {
cfg_overrides.get(&rustc_workspace[pkg].name)
}
};
if let Some(overrides) = overrides {