remove MultiTagUnion

This commit is contained in:
Folkert 2021-06-21 21:03:37 +02:00
parent 8a36c20559
commit 65f4ff9663
4 changed files with 7 additions and 25 deletions

View file

@ -1021,7 +1021,6 @@ pub enum Wrapped {
RecordOrSingleTagUnion,
/// Like a rose tree; recursive, but only one tag
LikeARoseTree,
MultiTagUnion,
}
impl Wrapped {
@ -1033,14 +1032,7 @@ impl Wrapped {
}
pub fn is_indexable(layout: &Layout<'_>) -> bool {
match layout {
Layout::Struct(fields) => match fields.len() {
_ => true,
},
Layout::Union(variant) => true,
_ => false,
}
matches!(layout, Layout::Struct(_) | Layout::Union(_))
}
pub fn opt_from_layout(layout: &Layout<'_>) -> Option<Self> {
@ -2141,8 +2133,6 @@ fn specialize_external<'a>(
(Some(closure_layout), CapturedSymbols::Captured(captured)) => {
// debug_assert!(!captured.is_empty());
let wrapped = closure_layout.get_wrapped();
match closure_layout.layout_for_member(proc_name) {
ClosureRepresentation::Union {
tag_layout: field_layouts,