Skip to content

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
orzechow:struct_like_enum_variants_docs
Open

Use the term struct-like data instead of anonymous structs for data of struct-like enum variants#152530
orzechow wants to merge 1 commit intorust-lang:mainfrom
orzechow:struct_like_enum_variants_docs

Conversation

@orzechow
Copy link

The current term in the docs anonymous structs seems to be outdated.
I'd suggest struct-like data or rephrasing the whole sentence to use struct-like variant.

The terminology used in the Rust Book on enums is

named fields, like a struct

The Reference on enums uses

struct-like enum variant

The term anonymous struct on the other hand is neither mentioned in the Rust book on structs or enums, nor the references on structs or enums.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Feb 12, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 12, 2026

r? @ChrisDenton

rustbot has assigned @ChrisDenton.
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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ChrisDenton, libs
  • @ChrisDenton, libs expanded to 8 candidates
  • Random selection from ChrisDenton, Mark-Simulacrum

@ChrisDenton
Copy link
Member

To me "struct-like data" still seems a bit jargony without it being defined.

or rephrasing the whole sentence to use struct-like variant.

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.

@ChrisDenton
Copy link
Member

@rustbot author

@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 3, 2026
@rustbot
Copy link
Collaborator

rustbot commented Mar 3, 2026

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@rustbot rustbot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants