about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2024-04-03 19:54:56 +0200
committerGitHub <noreply@github.com>2024-04-03 19:54:56 +0200
commit64d6da5cda286b083fe0c02b81baeaf7855b99cd (patch)
tree10a27697d9ccc4079aaefc47122e8eda6f107364
parentd9f29fa018b7534e14f7452f41667dec3d67e1b7 (diff)
parent4e4de3f5b771cac99593f2421a122a7bc6e06ffb (diff)
downloadrust-64d6da5cda286b083fe0c02b81baeaf7855b99cd.tar.gz
rust-64d6da5cda286b083fe0c02b81baeaf7855b99cd.zip
Merge pull request #1476 from taiki-e/unchecked-shift
Fix ICE on unchecked shift
-rw-r--r--src/num.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/num.rs b/src/num.rs
index 8992f40fb90..fd665d5932f 100644
--- a/src/num.rs
+++ b/src/num.rs
@@ -110,7 +110,7 @@ pub(crate) fn codegen_int_binop<'tcx>(
     in_lhs: CValue<'tcx>,
     in_rhs: CValue<'tcx>,
 ) -> CValue<'tcx> {
-    if bin_op != BinOp::Shl && bin_op != BinOp::Shr {
+    if !matches!(bin_op, BinOp::Shl | BinOp::ShlUnchecked | BinOp::Shr | BinOp::ShrUnchecked) {
         assert_eq!(
             in_lhs.layout().ty,
             in_rhs.layout().ty,