The Rust Const Generics Project Group announces a new design called Generic Const Arguments (GCA), intended to replace the long-standing generic_const_exprs feature. GCA introduces a family of features that progressively enable increasingly complex expressions in const generics, such as [u8; N + 1] and [u8; T::NUM_BYTES], which are currently unsupported on stable Rust.
Background
Rust's const generics have been a highly requested feature since 2018, with incremental stabilization beginning in 2021 via min_const_generics. The generic_const_exprs nightly feature has allowed some complex expressions but remained unstable and limited.
- Source
- Lobsters
- Published
- Oct 2, 2026 at 05:20 PM
- Score
- 8.0 / 10