Skip to content

Commit 358419c

Browse files
committed
add is_sized method on Abi and Layout, and use it
1 parent 87237cb commit 358419c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/type_.rs

+1-1
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)