Use the term struct-like data instead of anonymous structs for data of struct-like enum variants#152530
Open
orzechow wants to merge 1 commit intorust-lang:mainfrom
Open
Use the term struct-like data instead of anonymous structs for data of struct-like enum variants#152530orzechow wants to merge 1 commit intorust-lang:mainfrom
orzechow wants to merge 1 commit intorust-lang:mainfrom
Conversation
…-like enum variants This closer follows the terminology used in the Rust Book and Reference. [Rust Book](https://doc.rust-lang.org/stable/book/ch06-01-defining-an-enum.html#listing-6-2): > named fields, like a struct [Reference](https://doc.rust-lang.org/stable/reference/items/enumerations.html#r-items.enum.constructor): > struct-like enum variant
Collaborator
|
r? @ChrisDenton rustbot has assigned @ChrisDenton. Use Why was this reviewer chosen?The reviewer was selected based on:
|
Member
|
To me "struct-like data" still seems a bit jargony without it being defined.
I think that would be my preference if you're able to rephrase it. At least the reference (which is linked) contains that exact phrase so it should be clear what's meant. |
Member
|
@rustbot author |
Collaborator
|
Reminder, once the PR becomes ready for a review, use |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The current term in the docs
anonymous structsseems to be outdated.I'd suggest
struct-like dataor rephrasing the whole sentence to usestruct-like variant.The terminology used in the Rust Book on enums is
The Reference on enums uses
The term
anonymous structon the other hand is neither mentioned in the Rust book on structs or enums, nor the references on structs or enums.