use opt var in cycle marks

This commit is contained in:
Folkert 2022-05-15 13:12:13 +02:00
parent d26f6f600f
commit 69e7d0a378
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
3 changed files with 23 additions and 18 deletions

View file

@ -814,10 +814,7 @@ pub(crate) fn sort_can_defs(
debug_assert!(!is_specialization, "Self-recursive specializations can only be determined during solving - but it was determined for {:?} now, that's a bug!", def);
// this function calls itself, and must be typechecked as a recursive def
Declaration::DeclareRec(
vec![mark_def_recursive(def)],
IllegalCycleMark::new(var_store),
)
Declaration::DeclareRec(vec![mark_def_recursive(def)], IllegalCycleMark::empty())
} else {
Declaration::Declare(def)
};