gccrs
gccrs copied to clipboard
Error when evaluating an enum discriminant containing arithmetic operations
Summary
An error occurs when evaluating an enum discriminant containing arithmetic operations.
Reproducer
I tried this code:
enum Foo {
Bar = 3 + 12,
}
fn main() {
let x = Foo::Bar;
}
Does the code make use of any (1.49) nightly feature ?
- [ ] Nightly
Godbolt link
No response
Actual behavior
crab1: error: the value of 'RUSTTMP.1' is not usable in a constant expression
Expected behavior
success
GCC Version
gccrs version: b79c452e07c
Could you assign this issue to me?