Closed
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
Area: const generics (parameters and arguments)Area: Lazy normalization (tracking issue: #60471)Category: An issue proposing an enhancement or a PR with one.`#![feature(const_generics)]`Relevant to the compiler team, which will review and decide on the PR/issue.This issue requires a nightly compiler in some way.