mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 00:24:34 +00:00
turn unused module into a warning
This commit is contained in:
parent
a5e93cc21b
commit
407f8b9321
2 changed files with 36 additions and 17 deletions
|
@ -28,15 +28,22 @@ pub fn can_problem<'b>(
|
|||
.append(alloc.reflow(line)),
|
||||
])
|
||||
}
|
||||
Problem::UnusedImport(module_id, region) => alloc.concat(vec![
|
||||
alloc.reflow("Nothing from "),
|
||||
alloc.module(module_id),
|
||||
alloc.reflow(" is used in this module."),
|
||||
alloc.region(region),
|
||||
alloc.reflow("Since "),
|
||||
alloc.module(module_id),
|
||||
alloc.reflow(" isn't used, you don't need to import it."),
|
||||
]),
|
||||
Problem::UnusedImport(module_id, region) => {
|
||||
alloc.stack(vec![
|
||||
alloc.concat(vec![
|
||||
alloc.reflow("Nothing from "),
|
||||
alloc.module(module_id),
|
||||
alloc.reflow(" is used in this module."),
|
||||
]),
|
||||
alloc.region(region),
|
||||
alloc.concat(vec![
|
||||
alloc.reflow("Since "),
|
||||
alloc.module(module_id),
|
||||
alloc.reflow(" isn't used, you don't need to import it."),
|
||||
])
|
||||
])
|
||||
|
||||
}
|
||||
Problem::ExposedButNotDefined(symbol) => {
|
||||
alloc.stack(vec![
|
||||
alloc
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue