Skip to content

Commit 8729601

Browse files
committed
Auto merge of #115334 - RalfJung:transparent-aligned-zst, r=compiler-errors
repr(transparent): it's fine if the one non-1-ZST field is a ZST This code currently gets rejected: ```rust #[repr(transparent)] struct MyType([u16; 0]) ``` That clearly seems like a bug to me: `repr(transparent)` [got defined ](rust-lang/rust#77841 (comment)) as having any number of 1-ZST fields plus optionally one more field; `MyType` clearly satisfies that definition. This PR changes the `repr(transparent)` logic to actually match that definition.
2 parents 1fd0b0b + 4931165 commit 8729601

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)