Skip to content
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

Permit zero non-zero-field on transparent types #86279

Merged
merged 2 commits into from
Jun 24, 2021

Conversation

JohnTitor
Copy link
Member

Fixes #77841

This makes the transparent fields meet the below:

  • A repr(transparent) type T must meet the following rules:
    • It may have any number of 1-ZST fields
    • In addition, it may have at most one other field of type U

r? @nikomatsakis

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 13, 2021
@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Jun 23, 2021

📌 Commit 4e755a9 has been approved by nikomatsakis

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 23, 2021
@bors
Copy link
Contributor

bors commented Jun 24, 2021

⌛ Testing commit 4e755a9 with merge 456a032...

@bors
Copy link
Contributor

bors commented Jun 24, 2021

☀️ Test successful - checks-actions
Approved by: nikomatsakis
Pushing 456a032 to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

repr(transparent) on generic type skips "exactly one non-zero-sized field" check
5 participants