Fix apparent bug in Layout::is_refcounted

It contradicts build_tag in compiler/gen_llvm/src/llvm/build.rs,
where we create a NonNullableUnwrapped by calling
reserve_with_refcount_union_as_block_of_memory
This commit is contained in:
Brian Carroll 2021-12-10 23:09:05 +00:00
parent f3ca3be507
commit 211a5d9bf3

View file

@ -968,14 +968,9 @@ impl<'a> Layout<'a> {
use Layout::*;
match self {
Union(variant) => {
use UnionLayout::*;
Union(UnionLayout::NonRecursive(_)) => false,
matches!(
variant,
Recursive(_) | NullableWrapped { .. } | NullableUnwrapped { .. }
)
}
Union(_) => true,
RecursivePointer => true,