make a layout for the empty tag union

This commit is contained in:
Folkert 2021-11-21 22:24:35 +01:00
parent e4d630108c
commit 5415f458b1

View file

@ -1555,9 +1555,7 @@ fn layout_from_flat_type<'a>(
Ok(Layout::Union(union_layout))
}
EmptyTagUnion => {
panic!("TODO make Layout for empty Tag Union");
}
EmptyTagUnion => Ok(Layout::Union(UnionLayout::NonRecursive(&[]))),
Erroneous(_) => Err(LayoutProblem::Erroneous),
EmptyRecord => Ok(Layout::Struct(&[])),
}