make repr_transparent_non_zst_fields a hard error#155299
Open
RalfJung wants to merge 1 commit intorust-lang:mainfrom
Open
make repr_transparent_non_zst_fields a hard error#155299RalfJung wants to merge 1 commit intorust-lang:mainfrom
RalfJung wants to merge 1 commit intorust-lang:mainfrom
Conversation
Collaborator
|
rustbot has assigned @jdonszelmann. Use Why was this reviewer chosen?The reviewer was selected based on:
|
Member
Author
|
@bors try |
This comment has been minimized.
This comment has been minimized.
rust-bors bot
pushed a commit
that referenced
this pull request
Apr 14, 2026
…try> make repr_transparent_non_zst_fields a hard error
This comment has been minimized.
This comment has been minimized.
5b074cf to
3bb6c15
Compare
Contributor
Member
Author
|
@craterbot check |
Collaborator
|
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This was a deny-by-default FCW since #147185, which landed almost 6 months ago and shipped with Rust 1.93. (If this PR lands now it will ship with 1.96.) Already back then we found hardly any crater impact. The tracking issue has had no new relevant backrefs since that PR landed.
So, I think it is time to make this a hard error. Will nominate for t-lang once the crater run is complete.
Fixes #78586 (tracking issue)
Fixes rust-lang/unsafe-code-guidelines#552 because this means the
repr(transparent)ABI compatibility rule no longer ever "ignores"repr(C)fields.