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

Remove outdated note about non-Copy union fields #1239

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

Conversation

GoldsteinE
Copy link
Contributor

Unions with non-Copy fields are now stable.

@Mark-Simulacrum
Copy link
Member

I think this isn't quite right - only a small sunset of non-Copy types is permitted, and probably should be documented here.

@GoldsteinE
Copy link
Contributor Author

I thought any non-Copy types without custom destructors are allowed? I’m going to re-read that issue, thanks for correction.

@ehuss
Copy link
Contributor

ehuss commented Jul 19, 2022

We recently changed the documentation for union drop requirements (#1238). I think it would be fine to keep some kind of note here, just as a reminder as to why derive(Copy) is included in the example. Perhaps it could be something like:

Note: Union fields are restricted to a certain subset of types, such as deriving Copy in this example. See Unions for more information.

Also, there are two identical notes in this chapter that need to be updated.

@ehuss ehuss added the S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author. label Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants