This commit is contained in:
Ayaz Hafiz 2022-05-10 18:23:04 -04:00
parent 75f7f6e681
commit 3f0449292d
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
2 changed files with 2 additions and 3 deletions

View file

@ -74,7 +74,7 @@ pub fn load_types(
vec![def] vec![def]
} }
Declaration::DeclareRec(defs, cycle_mark) => { Declaration::DeclareRec(defs, cycle_mark) => {
if cycle_mark.is_illegal(&subs) { if cycle_mark.is_illegal(subs) {
vec![] vec![]
} else { } else {
defs defs

View file

@ -2137,11 +2137,10 @@ pub fn rec_defs_help(
let ((symbols, symbol_regions), expr_regions): ((Vec<_>, Vec<_>), Vec<_>) = defs let ((symbols, symbol_regions), expr_regions): ((Vec<_>, Vec<_>), Vec<_>) = defs
.iter() .iter()
.map(|def| { .flat_map(|def| {
symbols_introduced_from_pattern(&def.loc_pattern) symbols_introduced_from_pattern(&def.loc_pattern)
.map(move |loc_symbol| ((loc_symbol.value, loc_symbol.region), def.loc_expr.region)) .map(move |loc_symbol| ((loc_symbol.value, loc_symbol.region), def.loc_expr.region))
}) })
.flatten()
.unzip(); .unzip();
let cycle_constraint = let cycle_constraint =