mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +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.
|
// we print the shadowing errors last.
|
||||||
let problems = can_problems.remove(home).unwrap_or_default();
|
let problems = can_problems.remove(home).unwrap_or_default();
|
||||||
let (shadowing_errs, mut ordered): (Vec<Problem>, Vec<Problem>) =
|
let (shadowing_errs, mut ordered): (Vec<Problem>, Vec<Problem>) =
|
||||||
problems.into_iter().partition(|p| match p {
|
problems.into_iter().partition(|p| {
|
||||||
Problem::Shadowing {
|
matches!(
|
||||||
original_region: _,
|
p,
|
||||||
shadow: _,
|
Problem::Shadowing {
|
||||||
kind: _,
|
original_region: _,
|
||||||
} => true,
|
shadow: _,
|
||||||
_ => false,
|
kind: _,
|
||||||
|
}
|
||||||
|
)
|
||||||
});
|
});
|
||||||
ordered.extend(shadowing_errs);
|
ordered.extend(shadowing_errs);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue