Skip to content

Commit 4e4de3f

Browse files
committed
Fix ICE on unchecked shift
1 parent d9f29fa commit 4e4de3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/num.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ pub(crate) fn codegen_int_binop<'tcx>(
110110
in_lhs: CValue<'tcx>,
111111
in_rhs: CValue<'tcx>,
112112
) -> CValue<'tcx> {
113-
if bin_op != BinOp::Shl && bin_op != BinOp::Shr {
113+
if !matches!(bin_op, BinOp::Shl | BinOp::ShlUnchecked | BinOp::Shr | BinOp::ShrUnchecked) {
114114
assert_eq!(
115115
in_lhs.layout().ty,
116116
in_rhs.layout().ty,

0 commit comments

Comments
 (0)