Skip to content

Remove the ability of the go! macro to create enum variants#741

Merged
mrobinson merged 1 commit into
mainfrom
remove-variant-construction-macro
May 17, 2026
Merged

Remove the ability of the go! macro to create enum variants#741
mrobinson merged 1 commit into
mainfrom
remove-variant-construction-macro

Conversation

@mrobinson
Copy link
Copy Markdown
Member

@mrobinson mrobinson commented May 17, 2026

This is incredibly confusing when reading the code as it is hard to see
that go! to Enum Variant1 VariantA constructs
Enum(Variant1(VariantA)). This kind of non-standard Rust makes the
code hard to read by new contributors. In addition, constructing the
variants like this interferes with our ability to make changes using
rust-analyzer which is a very useful tool.

This change removes this feature in favor of just writing out the enum
variant directly and starts using the fully qualified name of the state
enum in more places.

This is incredibly confusing when reading the code as it is hard to see
that `go! to Enum Variant1 VariantA` constructs
`Enum(Variant1(VariantA))`. This kind of non-standard Rust makes the
code hard to read by new contributors. In addition, constructing the
variants like this interferes with our ability to make changes using
`rust-analyzer` which is a very useful tool.

This change removes this feature in favor of just writing out the enum
variant directly and starts using the fully qualified name of the state
enum in more places.

Signed-off-by: Martin Robinson <martin@abandonedwig.info>
@github-actions github-actions Bot added the V-non-breaking A non-breaking change label May 17, 2026
Copy link
Copy Markdown
Member

@simonwuelker simonwuelker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would be very happy if we could get rid of go! altogether

@mrobinson mrobinson added this pull request to the merge queue May 17, 2026
Merged via the queue into main with commit 7aad7a4 May 17, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

V-non-breaking A non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants