E1083: array capacity is not a positive constant
Array[T, N] holds exactly N elements in storage whose size is fixed when the program is compiled (ADR-0042).
Array[T, N] holds exactly N elements in storage whose size is fixed when
the program is compiled (ADR-0042). N must be a positive integer literal,
a positive constant of type Usize, or a const generic parameter. Zero is
rejected because the array would have no slot, and a runtime binding is
rejected because its value is not known at compile time. The message names
the capacity that was written. The error points at the capacity in
the type.
Example
actus
actus
Fix
Use a positive literal or a named constant for the capacity.
actus
actus
Run actus explain E1083 in your terminal to read this entry offline. Browse Ownership & types or all error codes.