Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit fb747d0

Browse files
RalfJungantoyo
authored andcommitted
add is_sized method on Abi and Layout, and use it
1 parent a897864 commit fb747d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/type_.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ pub fn struct_fields<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, layout: TyAndLayout
277277
offset = target_offset + field.size;
278278
prev_effective_align = effective_field_align;
279279
}
280-
if !layout.is_unsized() && field_count > 0 {
280+
if layout.is_sized() && field_count > 0 {
281281
if offset > layout.size {
282282
bug!("layout: {:#?} stride: {:?} offset: {:?}", layout, layout.size, offset);
283283
}

0 commit comments

Comments
 (0)