Array types

Syntax
ArrayType → [ Type ; ConstValue ]

An array type specifies an element type and a ConstValue length. The element type can be any supported concrete type. Length typing follows constant contexts, and equality of array types follows type identity.

Zero lengths are syntactically permitted, but evaluating expressions that access zero-sized array data exhibits undefined behavior. See types and inference and constant contexts.

let buffer: [u32; 16] = [0u32; 16];      // array of 16 u32 values
let matrix: [[i32; 4]; 4] = [[0; 4]; 4]; // 4x4 nested array of i32 values