Make dependency_formats an FxIndexMap rather than a list of tuples

It is treated as a map already. This is using FxIndexMap rather than
UnordMap because the latter doesn't provide an api to pick a single
value iff all values are equal, which each_linked_rlib depends on.
This commit is contained in:
bjorn3 2024-12-12 14:44:18 +00:00
parent ea9e8c13dc
commit 3198496385
7 changed files with 21 additions and 37 deletions

View file

@ -1749,7 +1749,7 @@ fn for_each_exported_symbols_include_dep<'tcx>(
}
let formats = tcx.dependency_formats(());
let deps = formats.iter().find_map(|(t, list)| (*t == crate_type).then_some(list)).unwrap();
let deps = &formats[&crate_type];
for (index, dep_format) in deps.iter().enumerate() {
let cnum = CrateNum::new(index + 1);