]> git.lizzy.rs Git - rust.git/blob - src/doc/unstable-book/src/language-features/const-in-array-repeat-expressions.md
Update const_forget.rs
[rust.git] / src / doc / unstable-book / src / language-features / const-in-array-repeat-expressions.md
1 # `const_in_array_repeat_expressions`
2
3 The tracking issue for this feature is: [#49147]
4
5 [#44109]: https://github.com/rust-lang/rust/issues/49147
6
7 ------------------------
8
9 Relaxes the rules for repeat expressions, `[x; N]` such that `x` may also be `const` (strictly
10 speaking rvalue promotable), in addition to `typeof(x): Copy`. The result of `[x; N]` where `x` is
11 `const` is itself also `const`.