Skip to content

Conversation

asomers
Copy link
Contributor

@asomers asomers commented Mar 23, 2024

It was originally defined back before rust could represent C unions. So instead of defining the union field correctly, it simply defined that union's most useful field. Define it correctly now.

Remove traits that can't be safely implemented on a union: PartialEq, Eq, and Hash. Define Debug, but exclude the union field. Leave Clone in place.

This PR is a rebase of #2813 that eschews all of the backwards-compatibility parts.

@rustbot
Copy link
Collaborator

rustbot commented Mar 23, 2024

r? @JohnTitor

rustbot has assigned @JohnTitor.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@JohnTitor
Copy link
Member

@asomers
Copy link
Contributor Author

asomers commented May 13, 2024

@JohnTitor I fixed the build failure on musl and rebased on main

@asomers
Copy link
Contributor Author

asomers commented May 13, 2024

The Sparc failure is not due to this PR.

@SteveLauC
Copy link
Contributor

Considering the main branch is for version 1.0, which allows breaking changes, I think we can move this forward.

@bors
Copy link
Contributor

bors commented Nov 14, 2024

☔ The latest upstream changes (presumably #3962) made this pull request unmergeable. Please resolve the merge conflicts.

@tgross35
Copy link
Contributor

tgross35 commented Nov 19, 2024

@asomers mind rebasing this when you get the chance? We can get this into main.

@rustbot author

@asomers
Copy link
Contributor Author

asomers commented Nov 19, 2024

Rebased, @tgross35

@asomers
Copy link
Contributor Author

asomers commented Nov 19, 2024

I think the build failure on s390x is unrelated.

@tgross35
Copy link
Contributor

That job seems to fail a lot, I wrote up #4112.

Thanks for the changes, I'll take a look today.

@tgross35
Copy link
Contributor

I went through line by line, everything looks correct here but I left a handful of consistency comments.

@bors
Copy link
Contributor

bors commented Nov 24, 2024

☔ The latest upstream changes (presumably #3978) made this pull request unmergeable. Please resolve the merge conflicts.

@asomers
Copy link
Contributor Author

asomers commented Nov 24, 2024

I applied your suggestions, @tgross35 , and rebased. But I did not squash the final commit.

Copy link
Contributor

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does #3630 (comment) work? If not, a FIXME(ctest) like the other expressions would be good.

I'll merge tomorrow either way, please squash when you get the chance.

@rustbot label stable-declined (breakage)

@rustbot

This comment was marked as off-topic.

@tgross35 tgross35 added the stable-declined This change is breaking, difficult to backport, low priority, or otherwise not relevant for 0.2 label Nov 25, 2024
@asomers
Copy link
Contributor Author

asomers commented Nov 25, 2024

Does #3630 (comment) work? If not, a FIXME(ctest) like the other expressions would be good.

I'll merge tomorrow either way, please squash when you get the chance.

@rustbot label stable-declined (breakage)

Whoops. I missed that comment. I've fixed it now.

It was originally defined back before rust could represent C unions.  So
instead of defining the union field correctly, it simply defined that
union's most useful field.  Define it correctly now.

Remove traits that can't be safely implemented on a union: PartialEq,
Eq, and Hash.  Define Debug, but exclude the union field.
@tgross35
Copy link
Contributor

Thanks!

@tgross35 tgross35 added this pull request to the merge queue Nov 25, 2024
Merged via the queue into rust-lang:main with commit 0808995 Nov 25, 2024
45 checks passed
@asomers asomers deleted the sigevent2 branch November 25, 2024 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breakage-candidate O-gnu O-linux O-linux-like O-musl O-unix S-waiting-on-ci S-waiting-on-review stable-declined This change is breaking, difficult to backport, low priority, or otherwise not relevant for 0.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants