diff options
Diffstat (limited to 'src/ir/context.rs')
-rw-r--r-- | src/ir/context.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/ir/context.rs b/src/ir/context.rs index 4faf6cd1..72ce06b1 100644 --- a/src/ir/context.rs +++ b/src/ir/context.rs @@ -981,12 +981,11 @@ If you encounter an error missing from this list, please file an issue or a PR!" mem::replace(&mut self.need_bitfield_allocation, vec![]); for id in need_bitfield_allocation { self.with_loaned_item(id, |ctx, item| { - item.kind_mut() - .as_type_mut() - .unwrap() - .as_comp_mut() + let ty = item.kind_mut().as_type_mut().unwrap(); + let layout = ty.layout(ctx); + ty.as_comp_mut() .unwrap() - .compute_bitfield_units(ctx); + .compute_bitfield_units(ctx, layout.as_ref()); }); } } |