-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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.This issue requires a nightly compiler in some way.
Description
e.g. do not allow fn foo<T, const N: T>()
and foo<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 }
contains N
itself in its substitutions.
What probably has to done here:
- change name resolution to forbid mentions of parameters.
- stop using the parent generics in
generics_of
.
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.This issue requires a nightly compiler in some way.