Skip to content

Commit 64d6da5

Browse files
authored
Merge pull request rust-lang#1476 from taiki-e/unchecked-shift
Fix ICE on unchecked shift
2 parents d9f29fa + 4e4de3f commit 64d6da5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/num.rs

+1-1
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)