-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Followup work from making ValTree recurse through ty::Const #150624
Copy link
Copy link
Open
Labels
A-const-genericsArea: const generics (parameters and arguments)Area: const generics (parameters and arguments)E-needs-designThis issue needs exploration and design to see how and if we can fix/implement itThis issue needs exploration and design to see how and if we can fix/implement itF-min_generic_const_args`#![feature(min_generic_const_args)]``#![feature(min_generic_const_args)]`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.
Metadata
Metadata
Assignees
Labels
A-const-genericsArea: const generics (parameters and arguments)Area: const generics (parameters and arguments)E-needs-designThis issue needs exploration and design to see how and if we can fix/implement itThis issue needs exploration and design to see how and if we can fix/implement itF-min_generic_const_args`#![feature(min_generic_const_args)]``#![feature(min_generic_const_args)]`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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
After #149114
ValTree'sBranchesvariant stores a list ofty::Constinstead of a list ofValTrees. See the PR description and associated zulip thread (#project-const-generics > Valtrees that can contain generic params) for a motivation for this.This has left us with two problems:
Valueis kinda confusing :) These are in some sense not full values. It may be desirable to renameConstKind::Value,ty::Value,ty::ValTreeandty::ValTreeKindto something different now that they don't represent full values.Tyin a fully evaluateValTree. This is likely bad for performance. Though more importantly it means that when CTFE evaluates something to aValTreeit has to pick types for all the nested nodes in aValTree. This is effectively impossible for CTFE to do correctly as it doesn't have lifetime information so we wind up with a bunch of erased lifetimes entering the type system.The second point can be observed by looking at debug logs for this code example:
Assigning myself as I'm partially through fixing this second point.