Panic in rustc
when casting invalid enum discriminant
#131902
Labels
A-MIR
Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html
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.
If a
#[repr(u8)]
enum contains more than 256 entries, then attempting to cast an overflowed discriminant triggers a panic.Code
Meta
rustc --version --verbose
:This also happens with the latest nightly build.
Error output
Backtrace
The text was updated successfully, but these errors were encountered: