ICE when type parameter and const generic are in wrong order #68868
Labels
A-const-generics
Area: const generics (parameters and arguments)
C-bug
Category: This is a bug.
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.
When a const generic not in curly braces appears before a type parameter, rustc panics.
Code
Replacing
u8: Foo<X, u16>
withu8: Foo<u32, X>
fixes the problem.Replacing it with
u8: Foo<{ X }, u16>
produces an informative error message.Commenting out
0u8.foo();
also prevents the ICE.This is not urgent, it is merely a matter of uninformative compiler errors.
Full Logs
Meta
The text was updated successfully, but these errors were encountered: