remove a wrapped

This commit is contained in:
Folkert 2021-06-21 20:35:00 +02:00
parent 1c8a21e42c
commit 95c952a1ae
2 changed files with 11 additions and 6 deletions

View file

@ -171,6 +171,16 @@ impl<'a> UnionLayout<'a> {
}
}
}
pub fn stores_tag(&self) -> bool {
match self {
UnionLayout::NonRecursive(_) => true,
UnionLayout::Recursive(_) => true,
UnionLayout::NonNullableUnwrapped(_) => false,
UnionLayout::NullableWrapped { .. } => true,
UnionLayout::NullableUnwrapped { .. } => false,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]