-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Forbid generic parameters in the type of const generic parameters #74152
Copy link
Copy link
Closed
Labels
A-const-genericsArea: const generics (parameters and arguments)Area: const generics (parameters and arguments)A-lazy-normalizationArea: Lazy normalization (tracking issue: #60471)Area: Lazy normalization (tracking issue: #60471)C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.F-const_generics`#![feature(const_generics)]``#![feature(const_generics)]`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.requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.This issue requires a nightly compiler in some way. When possible, use a F-* label instead.
Metadata
Metadata
Assignees
Labels
A-const-genericsArea: const generics (parameters and arguments)Area: const generics (parameters and arguments)A-lazy-normalizationArea: Lazy normalization (tracking issue: #60471)Area: Lazy normalization (tracking issue: #60471)C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.F-const_generics`#![feature(const_generics)]``#![feature(const_generics)]`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.requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.This issue requires a nightly compiler in some way. When possible, use a F-* label instead.
Type
Fields
Give feedbackNo fields configured for issues without a type.
e.g. do not allow
fn foo<T, const N: T>()andfoo<const N: usize, const M: [u8; N]>().While we may want to support this in the future, this should not be part of the MVP and causes a lot of problems
with our current approach. It causes both ICE ICE baby and breaks
foo<const N: [u8; { 1+ 4 }]>()because{ 1 + 4 }containsNitself in its substitutions.What probably has to done here:
generics_of.cc @eddyb @varkor @yodaldevoid