Closed
Description
fn test<const N: usize>() {
let array = [0; N];
}
currently fails with error: array lengths can't depend on generic parameters
, because we can't tell what concrete value N
should take here. This is an artificial limitation: when producing a Rvalue::Repeat
, we currently need to provide the length of the array, which is impossible at this stage.
cc #43408 (comment)