-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Regression in lint for non-exhaustive ZST in repr(Transparent) #115922
Copy link
Copy link
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Lifted from #78586
I believe this future compatibility warning was badly affected by #115334. Minimal repro:
As far as I understand what this issue is about, this code should be 100% fine. This issue is about preventing a previously-accepted
repr(transparent)struct from ending up with contents which a transparent struct is not allowed to have, after a permissible size increase of a non-exhaustive formerly-ZST from a different crate.That's not possible in the code above.
Transparentcontinues to be a validrepr(transparent)struct ifZeroSizedNonExhaustiveincreases in size.Regression in nightly-2023-09-18:
@RalfJung @compiler-errors
Originally posted by @dtolnay in #78586 (comment)