Merged
Conversation
658cc74 to
1f09d37
Compare
1f09d37 to
c01ee9c
Compare
Implement struct-of-arrays transformation for enums with discriminant-based storage. Enums are decomposed into a separate discriminant array and union arrays for each field position. Features: - Generate discriminant-only enum with preserved explicit values - Create union types for each field position across variants - Support named and unnamed variant fields - Support unit variants and explicit discriminant expressions - Preserve enum visibility (pub, pub(crate), private) Safety: - Discriminant fields kept private in helper structs - Safe get_discriminant() accessor methods - Unsafe get_discriminant_mut() requires caller to maintain invariants - Prevents unsound discriminant/union field mismatches Tests added for discriminant access, named fields, and visibility.
c01ee9c to
7dbf507
Compare
aapoalas
reviewed
Nov 17, 2025
This was referenced Nov 17, 2025
Closed
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.
No description provided.