You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pubenumFoo{
a,
b,CAPACITY,}fnmain(){let arr = [0;Foo::CAPACITYasusize];}
<anon>:8:19: 8:41 error: expected constant integer for repeat count, but non-constant path in constant expression [E0307]
<anon>:8 let arr = [0; Foo::CAPACITY as usize];
^~~~~~~~~~~~~~~~~~~~~~
The text was updated successfully, but these errors were encountered:
@Kingsquee: Quick triage: this looks to be an issue in how the compiler generates and assigns the discriminant (0, 1, 2, etc.) for each field. If you specify these yourself (see below) it will compile just fine.
The text was updated successfully, but these errors were encountered: