Compiler Panic on Missing Type Annotation for Static LazyLock Variable #128993
Labels
C-bug
Category: This is a bug.
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.
When declaring a static variable of type LazyLock in Rust without providing an explicit type annotation, the Rust compiler panics with an internal error. Providing a type annotation for the LazyLock variable however resolves the issue.
Code
Meta
(Same error on nightly as well! rustc 1.82.0-nightly (e57f309 2024-08-05))
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: