Get rid of passing target_info a bunch

This commit is contained in:
Ayaz Hafiz 2023-06-16 21:38:30 -05:00
parent 8495f3b085
commit bc41db2a34
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
18 changed files with 154 additions and 287 deletions

View file

@ -1314,8 +1314,7 @@ fn get_reuse_layout_info<'a, 'i>(
layout_interner: &'i STLayoutInterner<'a>,
union_layout: UnionLayout<'a>,
) -> TokenLayout {
let (size, alignment) =
union_layout.data_size_and_alignment(layout_interner, layout_interner.target_info());
let (size, alignment) = union_layout.data_size_and_alignment(layout_interner);
let has_tag = match union_layout {
UnionLayout::NonRecursive(_) => unreachable!("Non recursive unions should not be reused."),
// The memory for union layouts that has a tag_id can be reused for new allocations with tag_id.