Skip to content

Tracking Issue for Opaque Generic Const Arguments #151972

@camelid

Description

@camelid

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

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?

Implementation history

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-const-genericsArea: const generics (parameters and arguments)C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamT-typesRelevant to the types team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions