-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Tracking Issue for complex generic constants: feature(generic_const_exprs) #76560
Copy link
Copy link
Open
Labels
A-const-genericsArea: const generics (parameters and arguments)Area: const generics (parameters and arguments)C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCF-generic_const_exprs`#![feature(generic_const_exprs)]``#![feature(generic_const_exprs)]`S-tracking-impl-incompleteStatus: The implementation is incomplete.Status: The implementation is incomplete.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language teamT-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-const-genericsArea: const generics (parameters and arguments)Area: const generics (parameters and arguments)C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCF-generic_const_exprs`#![feature(generic_const_exprs)]``#![feature(generic_const_exprs)]`S-tracking-impl-incompleteStatus: The implementation is incomplete.Status: The implementation is incomplete.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language teamT-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
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:
Foo<{ bar(1 + 2) }>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: rust-lang/compiler-team#340
Design document: HackMD document
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. The implementation is still far from ready but already available for experimentation.