const X: usize = 7;
let x: RectangularArray<i32, 2, 4>;
let y: RectangularArray<i32, X, {2 * 2}>;
Simple cases are fine, but i suspect a lot of real-world use of const generics are going to require blocks.AIUI, this is only because <> was chosen as the container for type arguments, and > is also a legal operator in expressions. So, for example, if Rust had used Scala-esque [] for type arguments, this would not be a problem.
[1] https://rust-lang.github.io/rfcs/2000-const-generics.html#ap...