-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Description
This is a tracking issue for opaque generic const arguments, an experimental feature that can support many of the same use cases as the current implementation of generic_const_exprs (#76560), but based on the machinery developed for min_generic_const_args (#132980). Unlike in GCE, OGCA expressions are only allowed as the right-hand side of const items. Uses of these const items are then treated opaquely, based on "definitional equality".
The feature gate for the issue is #![feature(opaque_generic_const_args)].
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.
Discussion comments will get marked as off-topic or deleted.
Repeated discussions on the tracking issue may lead to the tracking issue getting locked.
Steps
- Implement the feature (Implement MVP for opaque generic const arguments #150823)
- Fix normalization for consts (needed to handle coherence properly for OGCA)
- Adjust documentation (see instructions on rustc-dev-guide)
- Style updates for any new syntax (nightly-style-procedure)
- Style team decision on new formatting
- Formatting for new syntax has been added to the Style Guide
- (non-blocking) Formatting has been implemented in
rustfmt
- Stabilization PR (see instructions on rustc-dev-guide)
Unresolved Questions
- How can we make sure to support opaque GCA while being forwards-compatible with more sophisticated equality support (e.g. commutativity in arithmetic)? This is especially tricky with regard to things like coherence.
- How do we avoid rough edges at the boundary of semantic/sophisticated equality vs opaque definitional equality?