Compiler panic when using associated constants for array length #52808
Labels
A-associated-items
Area: Associated items (types, constants & functions)
A-lazy-normalization
Area: Lazy normalization (tracking issue: #60471)
C-bug
Category: This is a bug.
glacier
ICE tracked in rust-lang/glacier.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The following code causes a compiler panic:
Error:
Using the constant on the right hand side as in
let arr = [&(); Self::LEN];
causes the same error.The lifetimes are required. If I replace the struct with
struct Foo([&'static (); 2])
the code compiles fine.Rustc version:
rustc 1.29.0-nightly (6a1c0637c 2018-07-23)
.Also panics on 1.27.2-stable.
Backtrace:
The text was updated successfully, but these errors were encountered: