about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2022-11-13 12:14:59 +0100
committerRalf Jung <post@ralfj.de>2022-11-13 12:23:53 +0100
commit358419cc25a86cfc48bbf30041f29b955bd2c881 (patch)
treee93d6cb6676c6fa88506962b17c1e472ab0cab20
parent87237cb69935730623917aa4674901270b938c26 (diff)
add is_sized method on Abi and Layout, and use it
-rw-r--r--src/type_.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/type_.rs b/src/type_.rs
index 862ed62c68b..bdf7318ce48 100644
--- a/src/type_.rs
+++ b/src/type_.rs
@@ -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);
         }