Fix type errors

This commit is contained in:
Ayaz Hafiz 2022-05-11 14:51:11 -04:00
parent fe2f2b2027
commit 28d6f30cc7
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
4 changed files with 41 additions and 20 deletions

View file

@ -3679,22 +3679,19 @@ fn run_solve_solve(
// STORE ABILITIES
let module_id = module.module_id;
let known_specializations =
abilities_store
.get_known_specializations()
.filter(|(member, typ)| {
// This module solved this specialization if either the member or the type comes from the
// module.
member.module_id() == module_id || typ.module_id() == module_id
});
let solved_specializations: SolvedSpecializations = abilities_store
.iter_specializations()
.filter(|((member, typ), _)| {
// This module solved this specialization if either the member or the type comes from the
// module.
member.module_id() == module_id || typ.module_id() == module_id
})
.collect();
let mut solved_specializations: SolvedSpecializations = VecMap::default();
let mut specialization_symbols = VecSet::default();
for (member, typ) in known_specializations {
let specialization = abilities_store.get_specialization(member, typ).unwrap();
specialization_symbols.insert(specialization.symbol);
solved_specializations.insert((member, typ), specialization);
}
let specialization_symbols: VecSet<_> = solved_specializations
.values()
.map(|ms| ms.symbol)
.collect();
// END STORE ABILITIES
// Expose anything that is explicitly exposed by the header, or is a specialization of an