Skip to content

Commit

Permalink
don't inhibit random field reordering on repr(packed(1))
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed May 21, 2024
1 parent acf38f8 commit a14ca60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clippy_lints/src/transmute/transmute_undefined_repr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a14ca60

Please sign in to comment.