Skip to content

Commit

Permalink
add is_sized method on Abi and Layout, and use it
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Nov 13, 2022
1 parent 87237cb commit 358419c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/type_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ pub fn struct_fields<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, layout: TyAndLayout
offset = target_offset + field.size;
prev_effective_align = effective_field_align;
}
if !layout.is_unsized() && field_count > 0 {
if layout.is_sized() && field_count > 0 {
if offset > layout.size {
bug!("layout: {:#?} stride: {:?} offset: {:?}", layout, layout.size, offset);
}
Expand Down

0 comments on commit 358419c

Please sign in to comment.