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

Field-less enums: an issue potentially introduced with the version bump to 1.79 #1339

Open
y1ca1 opened this issue Nov 8, 2024 · 1 comment

Comments

@y1ca1
Copy link
Contributor

y1ca1 commented Nov 8, 2024

I'm pretty excited about this version bump as Rust 1.79 stabilized the inline const expressions. Thanks for the efforts!

However, my existing codebase breaks at a field-less enum declaration:

 enum FieldLess {
    A = 0,
    B = 1,
    C = 2,
}

Verus reports:

error: constant evaluation of enum discriminant resulted in non-integer

A repro link to the playground: https://aurorar8-eb5c.andrew.cmu.edu/?version=stable&mode=basic&edition=2021&gist=e87455afc0f418ffddbf2d5b7a2bb149

Hope this is fairly straightforward to resolve!

@tjhance
Copy link
Collaborator

tjhance commented Nov 8, 2024

probably the same root cause as: #1334

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

No branches or pull requests

2 participants