Invalid assignment in a while loop causes an ICE #93727
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.
Code
Playground
When running on the most recent stable rust, I get
On beta, the compiler doesn't crash, but rustc does give a questionable recommendation to fix the issue:
On nightly(2022-02-06 as the time of writing) it compiles fine, giving the expected error message:
The text was updated successfully, but these errors were encountered: