-
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 with const expression in array length #61368
Comments
|
repr(C)
and const generics
Also occurs with other math operations (i.e. it is not related to division only): #![feature(const_generics)]
pub struct S<const N: usize>([u8; N*0]); This produces:
|
Some code that also triggers this: playground link |
Just going to note that this is currently a blocker for implementing constant bit arrays (and probably, though I haven't checked, the storage for NxM matrices). |
This is an instance of #43408, please use that as the canonical issue. |
It seems ICE has been fixed in latest nightly, could someone confirm it? |
The snippet in the OP doesn't ICE on |
Probably fixed by #67906, which has similar test case. |
As the test case in #67906 was essentially the same as the original issue here, I don't think we need another one. |
results in:
The text was updated successfully, but these errors were encountered: