hollow out ConstrainableImports

This commit is contained in:
Folkert 2022-03-11 21:29:50 +01:00
parent 364bc81dc4
commit 20ae9ff1e3
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
2 changed files with 43 additions and 64 deletions

View file

@ -164,8 +164,7 @@ pub fn constrain_imports(
}
pub struct ConstrainableImports {
pub imported_symbols: Vec<Import>,
pub imported_aliases: MutMap<Symbol, Alias>,
pub imported_builtins: Vec<Import>,
pub unused_imports: MutMap<ModuleId, Region>,
}
@ -182,7 +181,6 @@ pub fn pre_constrain_imports(
stdlib: &StdLib,
) -> ConstrainableImports {
let mut imported_symbols = Vec::with_capacity(references.len());
let mut imported_aliases = MutMap::default();
let mut unused_imports = imported_modules; // We'll remove these as we encounter them.
// Translate referenced symbols into constraints. We do this on the main
@ -260,8 +258,7 @@ pub fn pre_constrain_imports(
}
ConstrainableImports {
imported_symbols,
imported_aliases,
imported_builtins: imported_symbols,
unused_imports,
}
}