Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crucible-mir: Handle repr(transparent) enums appropriately #1141

Merged
merged 1 commit into from
Dec 8, 2023

Conversation

RyanGlScott
Copy link
Contributor

There were two places in the code where repr(transparent) enums ought to have been treated specially, but weren't:

  • In the ConstEnum case for transConstVal.
  • In the AdtAg case of transRval, which handles enum variant assignments.

I've now added the appropriate special-casing and added a conc_eval/enum/repr_transparent.rs test case in the crux-mir test suite to ensure that it works as expected.

Fixes #1140.

There were two places in the code where `repr(transparent)` enums ought to have
been treated specially, but weren't:

* In the `ConstEnum` case for `transConstVal`.
* In the `AdtAg` case of `transRval`, which handles enum variant assignments.

I've now added the appropriate special-casing and added a
`conc_eval/enum/repr_transparent.rs` test case in the `crux-mir` test suite to
ensure that it works as expected.

Fixes #1140.
@RyanGlScott RyanGlScott merged commit bb50c0d into master Dec 8, 2023
31 checks passed
@RyanGlScott RyanGlScott deleted the T1140 branch December 8, 2023 12:46
RyanGlScott added a commit that referenced this pull request Feb 1, 2024
RyanGlScott added a commit that referenced this pull request Feb 6, 2024
(cherry picked from commit 5fb4da5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

crucible-mir: Translation error on repr(transparent) enum
2 participants