make match exhaustive

This commit is contained in:
Folkert 2021-01-21 20:37:05 +01:00
parent 4e6aac760a
commit ef89ff15a1

View file

@ -344,12 +344,10 @@ pub fn decrement_refcount_layout<'a, 'ctx, 'env>(
) )
} }
} }
PhantomEmptyStruct => {}
Struct(layouts) => { Struct(layouts) => {
modify_refcount_struct(env, parent, layout_ids, value, layouts, Mode::Dec); modify_refcount_struct(env, parent, layout_ids, value, layouts, Mode::Dec);
} }
RecursivePointer => todo!("TODO implement decrement layout of recursive tag union"),
Union(variant) => { Union(variant) => {
use UnionLayout::*; use UnionLayout::*;
@ -388,6 +386,10 @@ pub fn decrement_refcount_layout<'a, 'ctx, 'env>(
} }
} }
PhantomEmptyStruct => {}
RecursivePointer => todo!("TODO implement decrement layout of recursive tag union"),
FunctionPointer(_, _) | Pointer(_) => {} FunctionPointer(_, _) | Pointer(_) => {}
} }
} }
@ -525,7 +527,11 @@ pub fn increment_refcount_layout<'a, 'ctx, 'env>(
modify_refcount_struct(env, parent, layout_ids, value, layouts, Mode::Inc); modify_refcount_struct(env, parent, layout_ids, value, layouts, Mode::Inc);
} }
_ => {} PhantomEmptyStruct => {}
RecursivePointer => todo!("TODO implement decrement layout of recursive tag union"),
FunctionPointer(_, _) | Pointer(_) => {}
} }
} }