mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
Report accurate regions in unused imports
This commit is contained in:
parent
860b120037
commit
0b620539ef
2 changed files with 22 additions and 25 deletions
|
@ -18,7 +18,7 @@ pub enum ExposedModuleTypes {
|
|||
}
|
||||
|
||||
pub struct ConstrainedModule {
|
||||
pub unused_imports: MutSet<ModuleId>,
|
||||
pub unused_imports: MutMap<ModuleId, Region>,
|
||||
pub constraint: Constraint,
|
||||
}
|
||||
|
||||
|
@ -132,7 +132,7 @@ pub fn constrain_imports(
|
|||
pub struct ConstrainableImports {
|
||||
pub imported_symbols: Vec<Import>,
|
||||
pub imported_aliases: MutMap<Symbol, Alias>,
|
||||
pub unused_imports: MutSet<ModuleId>,
|
||||
pub unused_imports: MutMap<ModuleId, Region>,
|
||||
}
|
||||
|
||||
/// Run this before constraining imports.
|
||||
|
@ -143,7 +143,7 @@ pub struct ConstrainableImports {
|
|||
pub fn pre_constrain_imports(
|
||||
home: ModuleId,
|
||||
references: &MutSet<Symbol>,
|
||||
imported_modules: MutSet<ModuleId>,
|
||||
imported_modules: MutMap<ModuleId, Region>,
|
||||
exposed_types: &mut SubsByModule,
|
||||
stdlib: &StdLib,
|
||||
) -> ConstrainableImports {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue