-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
ICE: "index is not an integer-constant expression" using enum as array index. #23513
Labels
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Comments
The following modifications eliminate the ICE:
|
steveklabnik
added
the
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
label
Mar 19, 2015
Possibly related to #5873 |
bors
added a commit
that referenced
this issue
Jul 9, 2015
Fixes #23302. Note that there's an odd situation regarding the following, most likely due to some inadequacy in `const_eval`: ```rust enum Y { A = 1usize, B, } ``` In this case, `Y::B as usize` might be considered a constant expression in some cases, but not others. (See #23513, for a related problem where there is only one variant, with no discriminant, and it doesn't behave nicely as a constant expression either.) Most of the complexity in this PR is basically future-proofing, to ensure that when `Y::B as usize` is fully made to be a constant expression, it can't be used to set `Y::A`, and thus indirectly itself.
Visiting for triage: this is still an issue |
Closed
bltavares
added a commit
to bltavares/glacier
that referenced
this issue
Oct 31, 2015
Reference rust-lang/rust#23513
Merged
This was fixed by #30714 👍 |
steveklabnik
added a commit
to rust-lang/glacier
that referenced
this issue
Feb 17, 2016
This was fixed by rust-lang/rust#23513
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Code:
playpen
Error message:
The text was updated successfully, but these errors were encountered: