Skip to content

Commit

Permalink
report shift right error instead of shift left error on right shift
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Apr 26, 2016
1 parent cfae4de commit ee98323
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc_const_math/int.rs
Expand Up @@ -503,7 +503,7 @@ impl ::std::ops::Shr<ConstInt> for ConstInt {
I8(a) => Ok(I8(overflowing!(a.overflowing_shr(b), Op::Shr))),
I16(a) => Ok(I16(overflowing!(a.overflowing_shr(b), Op::Shr))),
I32(a) => Ok(I32(overflowing!(a.overflowing_shr(b), Op::Shr))),
I64(a) => Ok(I64(overflowing!(a.overflowing_shr(b), Op::Shl))),
I64(a) => Ok(I64(overflowing!(a.overflowing_shr(b), Op::Shr))),
Isize(Is32(a)) => Ok(Isize(Is32(overflowing!(a.overflowing_shr(b), Op::Shr)))),
Isize(Is64(a)) => Ok(Isize(Is64(overflowing!(a.overflowing_shr(b), Op::Shr)))),
U8(a) => Ok(U8(overflowing!(a.overflowing_shr(b), Op::Shr))),
Expand Down

0 comments on commit ee98323

Please sign in to comment.