ICE w/ const_generics when trying to use the size of an associated type size as an array length #67739
Labels
A-const-generics
Area: const generics (parameters and arguments)
A-lazy-normalization
Area: Lazy normalization (tracking issue: #60471)
C-bug
Category: This is a bug.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
F-const_generics
`#![feature(const_generics)]`
glacier
ICE tracked in rust-lang/glacier.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
requires-nightly
This issue requires a nightly compiler in some way.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
results in:
Removing the const_generics feature flag gets the expected error message:
(IIUC that itself is a bug related to #43408)
Using
mem::size_of::<Self::Associated>()
directly outside of a const-context works, which I guess is something const_generics enables that isn't otherwise allowed.Finally, the error message is the same whether or not the code is in a provided method or a impl block; I actually ran into the bug in the later.
The text was updated successfully, but these errors were encountered: