Open
Description
openedon Mar 21, 2022
This is a tracking issue for allowing more const parameter types.
The feature gate for this issue is #![feature(adt_const_params)]
.
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.
Steps
Most of the work here will be coordinated in the #project-const-generics
stream on zulip.
- Implement
valtrees
- deal with structural equality
- Figure out which types should be allowed as const parameter types and how
- Investigate ICEs around not-wf const arguments (e.g. ICE:
expected int of size 8, but got size 1
inrustc_middle/src/ty/consts/int.rs
with featureadt_const_params
#131052 ICE:InterpErrorInfo(InterpErrorInfoInner { kind: UndefinedBehavior(BoundsCheckFailed
#129095 ICE:unable to construct a valtree for the unevaluated constant
#128232) - Ensure no forwards compatibility issues with
min_generic_const_args
- Finalize symbol mangling decision for values of arbitrary types (Value mangling #61486 [RFC2603] Extend
<const>
to includestr
and structural constants. rfcs#3161) - Document feature
- Stabilization report with lang FCP explaining all the differences between rfc and current impl
Unresolved Questions
- Is the v0 mangling setup for
adt_const_params
forwards compatible withunsized_const_params
(Tracking Issue for unsized const parameter types:feature(unsized_const_params)
#128028)
cc @rust-lang/project-const-generics
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment