-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
repr(transparent): it's fine if the one non-1-ZST field is a ZST #115334
Conversation
r? @TaKO8Ki (rustbot has picked a reviewer for you, use r? to override) |
Nominating for T-lang since this is a change in public behavior on stable -- but we already had an FCP blessing this so I don't think we need a full FCP again. |
d6098c3
to
6d8c9b8
Compare
6d8c9b8
to
a6ccd26
Compare
Yes that should be fixed by this PR. |
I agree that this doesn't need another lang sign-off since it's what was explicitly FCP'd before. (Sadly we didn't get to it in the meeting today, so I'm only speaking for me.) |
We discussed this briefly in the lang triage meeting today, and the meeting was in agreement that the previous FCP applies, and that we're happy to see this addressed. |
@TaKO8Ki the ball is in your court then. :) |
This has lang team approval so for the review I suppose it's a t-compiler job. |
LGTM @bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (203c57d): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 635.505s -> 634.064s (-0.23%) |
This code currently gets rejected:
That clearly seems like a bug to me:
repr(transparent)
got defined 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.