-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
cycle errors for unevaluated constants in the param env #79356
Copy link
Copy link
Open
Labels
A-const-genericsArea: const generics (parameters and arguments)Area: const generics (parameters and arguments)C-bugCategory: This is a bug.Category: This is a bug.F-generic_const_exprs`#![feature(generic_const_exprs)]``#![feature(generic_const_exprs)]`I-cycleIssue: A query cycle occurred while none was expectedIssue: A query cycle occurred while none was expectedP-lowLow priorityLow priorityT-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)C-bugCategory: This is a bug.Category: This is a bug.F-generic_const_exprs`#![feature(generic_const_exprs)]``#![feature(generic_const_exprs)]`I-cycleIssue: A query cycle occurred while none was expectedIssue: A query cycle occurred while none was expectedP-lowLow priorityLow priorityT-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.
ends up failing with
The cycle happens while typechecking the outer array length. This happens because
Foo<[u8; 3 + 4]>requires[u8; 3 + 4]to be sized. While trying to fulfill this we see the[u8; ...]: Sizedbound in the param_env and try to unify these two. This causes us to evaluate both constants which once again relies on typechecking them.*This test succeeds with
min_const_genericsand currently fails withconst_generics.