Skip to content

Commit ee98323

Browse files
committed
report shift right error instead of shift left error on right shift
1 parent cfae4de commit ee98323

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_const_math/int.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ impl ::std::ops::Shr<ConstInt> for ConstInt {
503503
I8(a) => Ok(I8(overflowing!(a.overflowing_shr(b), Op::Shr))),
504504
I16(a) => Ok(I16(overflowing!(a.overflowing_shr(b), Op::Shr))),
505505
I32(a) => Ok(I32(overflowing!(a.overflowing_shr(b), Op::Shr))),
506-
I64(a) => Ok(I64(overflowing!(a.overflowing_shr(b), Op::Shl))),
506+
I64(a) => Ok(I64(overflowing!(a.overflowing_shr(b), Op::Shr))),
507507
Isize(Is32(a)) => Ok(Isize(Is32(overflowing!(a.overflowing_shr(b), Op::Shr)))),
508508
Isize(Is64(a)) => Ok(Isize(Is64(overflowing!(a.overflowing_shr(b), Op::Shr)))),
509509
U8(a) => Ok(U8(overflowing!(a.overflowing_shr(b), Op::Shr))),

0 commit comments

Comments
 (0)