]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_codegen_gcc/src/type_.rs
Auto merge of #99814 - aliemjay:patch-2, r=jackh726
[rust.git] / compiler / rustc_codegen_gcc / src / type_.rs
index 862ed62c68b2ab9124e9ef04252819839e34a78c..bdf7318ce48c9505887b2287c0201bf66742bc54 100644 (file)
@@ -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);
         }