IssueRaiser

Tracking Issue for complex generic constants: `feature(generic_const_exprs)`

This is a tracking issue for complex generic expressions in constants which is still highly experimental. The feature gate for the issue is `#![feature(generic_const_exprs)]`. On stable all const generic arguments must be either: - A fully concrete expression using no generic parameters, e.g. `Foo<{ bar(1 + 2) }>` - A bare usage of a const parameter, e.g. `Foo<{ N }>` This feature allows arbitrary usage of generic parameters in const generic arguments such that `Foo<{ bar(N + 2) }>` is now legal. Initial proposal: https://github.com/rust-lang/compiler-team/issues/340 Design document: [HackMD document](https://hackmd.io/OZG_XiLFRs2Xmw5s39jRzA?view) ### About tracking issues Tracking issues are used to record the overall progress of implementation. They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions. A tracking issue is however *not* meant for large scale discussion, questions, or bug reports about a feature. Instead, open a dedicated issue for the specific matter and add the relevant feature gate label. ### Status The design questions and implementation challenges are collected in the [project-const-generics repository](https://github.com/rust-lang/project-const-generics/issues?q=is%3Aissue+is%3Aopen+label%3AC-design-docs+label%3AA-generic-exprs). The implementation is still far from ready but already available for experimentation.

Posted by lcnr on Sep 10, 2020, 7:35 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.3,000 issues0 comments

github (Software)

Tracking Issue for complex generic constants: `feature(generic_const_exprs)`

lcnrSep 10, 2020, 7:35 AM

This is a tracking issue for complex generic expressions in constants which is still highly experimental. The feature gate for the issue is `#![feature(generic_const_exprs)]`. On stable all const generic arguments must be either: - A fully concrete expression using no generic parameters, e.g. `Foo<{ bar(1 + 2) }>` - A bare usage of a const parameter, e.g. `Foo<{ N }>` This feature allows arbitrary usage of generic parameters in const generic arguments such that `Foo<{ bar(N + 2) }>` is now legal. Initial proposal: https://github.com/rust-lang/compiler-team/issues/340 Design document: [HackMD document](https://hackmd.io/OZG_XiLFRs2Xmw5s39jRzA?view) ### About tracking issues Tracking issues are used to record the overall progress of implementation. They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions. A tracking issue is however *not* meant for large scale discussion, questions, or bug reports about a feature. Instead, open a dedicated issue for the specific matter and add the relevant feature gate label. ### Status The design questions and implementation challenges are collected in the [project-const-generics repository](https://github.com/rust-lang/project-const-generics/issues?q=is%3Aissue+is%3Aopen+label%3AC-design-docs+label%3AA-generic-exprs). The implementation is still far from ready but already available for experimentation.

Comments (0)

No comments yet. Start the discussion.

Comment on this issue