-
Notifications
You must be signed in to change notification settings - Fork 108
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
C-STRUCT-PRIVATE guideline incomplete #203
Comments
cc @ibabushkin - this might be relevant for rust-semverver. |
This seems like a reasonable amendment to me. We should probably include some description of what an aggregate is so users browsing the guidelines know we're talking about |
This comment has been minimized.
This comment has been minimized.
We’re still getting an idea of what kinds of amendments need to run through an FCP or not. On a second reading, this update seems reasonable and uncontentious enough to me to not need one. |
The C-STRUCT-PRIVATE recommendation talks about a single struct field being public or private.
It does not mention what happens when all fields of a struct are public, e.g., in that particular case, users can exhaustively pattern-match the struct, which means that adding a new field to the struct, even a private one, is a breaking change.
Now that enums are also going to be able to have private fields, I think this guideline should also drop the "struct" part. Maybe the guideline could be replaced with something like this:
There was a bit of discussion about this here: rust-lang/rust#44109 (comment)
The text was updated successfully, but these errors were encountered: