Skip to content

Conversation

@asukaminato0721
Copy link
Contributor

@asukaminato0721 asukaminato0721 commented Nov 20, 2025

fix #19666

Added convert_record_struct_to_unit_struct to rewrite empty record structs/variants into unit forms, updating constructors, patterns, and all referenced files via Definition::Adt usages.

Added convert_unit_struct_to_record_struct so unit structs/variants become empty record forms, including constructor/pattern rewrites even for bare identifier patterns.

Registered both assists in so they surface in the assist list alongside the existing tuple/named converters.

Added convert_record_struct_to_unit_struct to rewrite empty record
structs/variants into unit forms, updating constructors, patterns, and
all referenced files via Definition::Adt usages.

Added convert_unit_struct_to_record_struct so unit structs/variants
become empty record forms, including constructor/pattern rewrites even
for bare identifier patterns.

Registered both assists in so they surface in the assist list alongside
the existing tuple/named converters.
@asukaminato0721 asukaminato0721 marked this pull request as ready for review November 21, 2025 12:27
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Code action to convert between struct types

2 participants