don't inhibit random field reordering on repr(packed(1))

This commit is contained in:
Ralf Jung 2024-05-21 14:07:02 +02:00
parent acf38f8466
commit a14ca6005c

View file

@ -278,7 +278,7 @@ fn reduce_ty<'tcx>(cx: &LateContext<'tcx>, mut ty: Ty<'tcx>) -> ReducedTy<'tcx>
ty = sized_ty;
continue;
}
if def.repr().inhibit_struct_field_reordering_opt() {
if def.repr().inhibit_struct_field_reordering() {
ReducedTy::OrderedFields(Some(sized_ty))
} else {
ReducedTy::UnorderedFields(ty)