diff options
| author | Ralf Jung <post@ralfj.de> | 2022-11-13 12:14:59 +0100 |
|---|---|---|
| committer | Antoni Boucher <bouanto@zoho.com> | 2023-02-28 19:22:27 -0500 |
| commit | fb747d0e24a38422d7b7f6b9372dd2ecfe6f408f (patch) | |
| tree | 860d16f57fbc5f6ec4da081abc81359410970eaf | |
| parent | a8978641504ba90aaaa41b2acb72578ea7bb328c (diff) | |
| download | rust-fb747d0e24a38422d7b7f6b9372dd2ecfe6f408f.tar.gz rust-fb747d0e24a38422d7b7f6b9372dd2ecfe6f408f.zip | |
add is_sized method on Abi and Layout, and use it
| -rw-r--r-- | src/type_.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/type_.rs b/src/type_.rs index 58d4f290060..55e4d0c6289 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); } |
