Skip to content

Mention Drop in enum discriminant coercion entry. - #2392

Open
obi1kenobi wants to merge 1 commit into
rust-lang:masterfrom
obi1kenobi:patch-2
Open

obi1kenobi wants to merge 1 commit into
rust-lang:masterfrom
obi1kenobi:patch-2

Conversation

@obi1kenobi

Copy link
Copy Markdown
Member

Per the reference entry for as casts, fieldless enums must also not implement Drop for casting to be allowed.

This PR updates the enumerations page to reflect that.

Per [the reference entry for `as` casts](https://doc.rust-lang.org/reference/expressions/operator-expr.html#r-expr.as.enum.no-drop), fieldless enums must also not implement `Drop` for casting to be allowed.

Update the enumerations page to reflect that.
@rustbot rustbot added the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Oct 20, 2026
@obi1kenobi

Copy link
Copy Markdown
Member Author

I've also noticed that this page and the as casts entry are inconsistent in their choice of spelling "fieldless" vs "field-less". I have no preference for anything other than consistency, and would be happy to open a separate PR if that would be welcome :)

This branch has not been deployed

No deployments
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