mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
Merge branch 'trunk' into clippy
This commit is contained in:
commit
391f5b5e17
16 changed files with 988 additions and 916 deletions
|
@ -463,21 +463,35 @@ fn solve(
|
|||
let visit_mark = young_mark.next();
|
||||
let final_mark = visit_mark.next();
|
||||
|
||||
debug_assert!({
|
||||
next_pools
|
||||
.get(next_rank)
|
||||
.iter()
|
||||
.filter(|var| {
|
||||
subs.get_without_compacting(roc_types::subs::Variable::clone(
|
||||
var,
|
||||
))
|
||||
.rank
|
||||
.into_usize()
|
||||
> next_rank.into_usize()
|
||||
})
|
||||
.count()
|
||||
== 0
|
||||
});
|
||||
debug_assert_eq!(
|
||||
{
|
||||
let offenders = next_pools
|
||||
.get(next_rank)
|
||||
.iter()
|
||||
.filter(|var| {
|
||||
let current = subs.get_without_compacting(
|
||||
roc_types::subs::Variable::clone(var),
|
||||
);
|
||||
|
||||
current.rank.into_usize() > next_rank.into_usize()
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let result = offenders.len();
|
||||
|
||||
if result > 0 {
|
||||
dbg!(
|
||||
&subs,
|
||||
&offenders,
|
||||
&let_con.def_types,
|
||||
&let_con.def_aliases
|
||||
);
|
||||
}
|
||||
|
||||
result
|
||||
},
|
||||
0
|
||||
);
|
||||
|
||||
// pop pool
|
||||
generalize(subs, young_mark, visit_mark, next_rank, next_pools);
|
||||
|
@ -1207,8 +1221,6 @@ fn instantiate_rigids_help(
|
|||
|
||||
if let Some(copy) = desc.copy.into_variable() {
|
||||
return copy;
|
||||
} else if desc.rank != Rank::NONE {
|
||||
return var;
|
||||
}
|
||||
|
||||
let make_descriptor = |content| Descriptor {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue