mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-24 20:42:29 +00:00
format and clippy
This commit is contained in:
parent
190c88e886
commit
7d3df10921
1 changed files with 10 additions and 8 deletions
|
@ -112,17 +112,19 @@ pub fn report_problems(
|
|||
}
|
||||
}
|
||||
|
||||
// Shadowing errors often cause cryptic type errors. To make it easy to spot the root cause,
|
||||
// Shadowing errors often cause cryptic type errors. To make it easy to spot the root cause,
|
||||
// we print the shadowing errors last.
|
||||
let problems = can_problems.remove(home).unwrap_or_default();
|
||||
let (shadowing_errs, mut ordered): (Vec<Problem>, Vec<Problem>) =
|
||||
problems.into_iter().partition(|p| match p {
|
||||
Problem::Shadowing {
|
||||
original_region: _,
|
||||
shadow: _,
|
||||
kind: _,
|
||||
} => true,
|
||||
_ => false,
|
||||
problems.into_iter().partition(|p| {
|
||||
matches!(
|
||||
p,
|
||||
Problem::Shadowing {
|
||||
original_region: _,
|
||||
shadow: _,
|
||||
kind: _,
|
||||
}
|
||||
)
|
||||
});
|
||||
ordered.extend(shadowing_errs);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue