parity with old implementation

This commit is contained in:
Folkert 2020-03-16 16:19:44 +01:00
parent d875f8bfce
commit e742b77e0b
6 changed files with 345 additions and 303 deletions

View file

@ -98,7 +98,7 @@ impl<'a> Layout<'a> {
// But for one-tag unions, we don't store the tag, so 0 bytes
let mut sum = (fields.len() > 1) as u32;
for (_, tag_layout) in *fields {
for tag_layout in fields.values() {
for field_layout in *tag_layout {
sum += field_layout.stack_size(pointer_size);
}