Fix size_of_val and support min_align_of_val

This commit is contained in:
hkalbasi 2023-07-06 15:41:52 +03:30
parent 537f9b311d
commit 171ae2ee5d
7 changed files with 221 additions and 89 deletions

View file

@ -105,7 +105,7 @@ pub fn layout_of_adt_query(
&& variants
.iter()
.next()
.and_then(|x| x.last().map(|x| x.is_unsized()))
.and_then(|x| x.last().map(|x| !x.is_unsized()))
.unwrap_or(true),
)
.ok_or(LayoutError::SizeOverflow)?