Generic Const Args and You
3 hours ago
- The Generic Const Arguments (GCA) family of features in Rust aims to replace the existing `generic_const_exprs` feature, enabling more complex constant generic expressions with generic parameters.
- Key features include `gca_adts` for constructing structs, enums, tuples, and arrays; `gca_const_items` for using const items in the type system; and `gca_min_const_items` for a limited subset that requires explicit `gca!()` expressions.
- Currently, all new expressions must be wrapped in a `gca!()` macro, which may be made implicit in the future via experimental `gca_macroless_args` and `gca_macroless_items` features.
- The GCA features are not yet stable, and the Rust team seeks feedback on usability and design issues.