correct alignment calculation in RC code

This commit is contained in:
Folkert 2023-04-17 13:53:54 +02:00
parent 412e199939
commit e0b5a76a04
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
2 changed files with 15 additions and 15 deletions

View file

@ -2661,9 +2661,7 @@ impl<'a> Layout<'a> {
Layout::RecursivePointer(_) => {
unreachable!("should be looked up to get an actual layout")
}
Layout::Boxed(inner) => interner
.get(*inner)
.allocation_alignment_bytes(interner, target_info),
Layout::Boxed(inner) => Ord::max(ptr_width, interner.get(*inner).alignment_bytes(interner, target_info)),
}
}