in theory allow non-function effects values

this does not work due to limitations with functions in tag unions
This commit is contained in:
Folkert 2020-11-08 02:29:43 +01:00
parent 9ad960cdb1
commit 3d092cb9b7
5 changed files with 126 additions and 74 deletions

View file

@ -20,6 +20,10 @@ pub enum LayoutProblem {
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub enum Layout<'a> {
Builtin(Builtin<'a>),
/// A layout that is empty (turns into the empty struct in LLVM IR
/// but for our purposes, not zero-sized, so it does not get dropped from data structures
/// this is important for closures that capture zero-sized values
// PhantomEmptyStruct,
Struct(&'a [Layout<'a>]),
Union(&'a [&'a [Layout<'a>]]),
RecursiveUnion(&'a [&'a [Layout<'a>]]),