represent empty closure as unit (not void)

This commit is contained in:
Folkert 2021-09-24 15:41:00 +02:00
parent 1fba3702a8
commit f43c10373f
2 changed files with 29 additions and 1 deletions

View file

@ -599,7 +599,7 @@ impl<'a> LambdaSet<'a> {
// this can happen when there is a type error somewhere
Ok(LambdaSet {
set: &[],
representation: arena.alloc(Layout::Union(UnionLayout::NonRecursive(&[]))),
representation: arena.alloc(Layout::Struct(&[])),
})
}
_ => panic!("called LambdaSet.from_var on invalid input"),