N.B. Tracking issue for RFC 2203, "Constants in array repeat expressions" · Issue #49147 · rust-lang/rust · GitHub, which is probably closer to being fully implemented, will change this such that [const_expr; SIZE]. will work -- However, String::new() isn't a constant expression just yet.
1 Like