Closed
Description
The following code ICEs when compiled with a rustc with debug-assertions enabled:
const X: i16 = 0i16.rotate_left(124);
The problem is in the implementation of rotate_left
, specifically in this line:
rust/src/librustc_mir/interpret/intrinsics.rs
Line 197 in 75f4644
The subtraction overflows here.
Cc @oli-obk
Metadata
Metadata
Assignees
Labels
Category: This is a bug.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Relevant to the compiler team, which will review and decide on the PR/issue.