Skip to content

Remove outdated comment about non-copy unions #1872

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented Jun 27, 2025

I'm not sure when exactly this was removed, but non-copy union fields aren't allowed, and there is no nightly feature to allow them AFAIK.

There was various discussion in the tracking issue rust-lang/rust#55149 and various changes like rust-lang/rust#97995 on what is allowed, but I did not dig down to find the exact change that closed the door.

The allowed field kinds are described in items.union.field-restrictions.

Also, in general the reference shouldn't be referring to unstable features.

I'm not sure when exactly this was removed, but non-copy union fields
aren't allowed, and there is no nightly feature to allow them AFAIK.

There was various discussion in the tracking issue
rust-lang/rust#55149 and various changes like
rust-lang/rust#97995 on what is allowed, but I
did not dig down to find the exact change that closed the door.

The allowed field kinds are described in items.union.field-restrictions.

Also, in general the reference shouldn't be referring to unstable
features.
@rustbot rustbot added the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Jun 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: The marked PR is awaiting review from a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants