ICE when specifying wrong return type for closure in static item #130858
Labels
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
S-has-mcve
Status: A Minimal Complete and Verifiable Example has been found for this issue
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
This is a pretty minor ICE that I can only reproduce in code that shouldn't compile anyway. If I specify the wrong return type for a closure used in a static item, I get an ICE instead of a normal build error.
Possibly related to #125655
Code
Add this to any
main.rs
:Meta
rustc --version --verbose
:I can also reproduce this on latest nightly (
rustc 1.83.0-nightly (363ae4188 2024-09-24)
I believe, ran it withcargo +nightly run
).Error output
Backtrace
The text was updated successfully, but these errors were encountered: