{
  "id": 11407567,
  "title": "Generic Const Args and You",
  "url": "https://urgent.news/2026/10/02/generic-const-args-and-you",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-02T09:20:42.000Z",
  "source": {
    "name": "Lobsters",
    "slug": "lobsters",
    "url": "https://blog.rust-lang.org/inside-rust/2026/10/02/generic-const-args-and-you/"
  },
  "original_language": "en",
  "account": "In June 2024, during RustFest Zürich, the Const Generics project group discussed a new design for enhancing the capabilities of generic parameters within Const Generics. Over time, they have refined this design and implemented it as a set of features known as Generic Const Arguments (GCA). These features aim to replace the existing generic_const_exprs feature, which has been available since the stabilization of min_const_generics in 2021.\n\nGCA introduces various expressions that can be used within Const Generics, each adding specific support for certain types of expressions. To date, there are several features within the GCA family, including gca_adts, adt_const_params, and gca_const_items. Each feature enables different kinds of expressions involving generic parameters.\n\nGCA features require expressions to be enclosed within a gca! macro call, which poses ergonomic challenges but has been implemented to support the new functionalities. GCA arguments have distinct semantics compared to regular Const Arguments, allowing for the use of generic parameters within them. However, they support fewer expression types, such as preventing arithmetic or function calls.\n\nThe gca_adts feature supports constructing arrays, tuples, and algebraic data types (ADTs) involving generic parameters. This enables the creation of more complex data structures and abstractions. The gca_const_items feature allows the use of const items in the type system, enabling arbitrary expressions to be used within the type system. This supports associated constant bindings and traits with associated constants being dyn compatible.\n\nThe introduction of GCA features addresses limitations in Const Generics, allowing for more expressive and flexible code. With these enhancements, developers can now leverage a wider range of expressions and abstractions in their codebase, ultimately leading to more efficient and concise Rust code.",
  "summary": null,
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}