From ee983230c965de4f45032a1bdb852a23dae0dbad Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Tue, 26 Apr 2016 11:17:32 +0200 Subject: [PATCH] report shift right error instead of shift left error on right shift --- src/librustc_const_math/int.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustc_const_math/int.rs b/src/librustc_const_math/int.rs index 658d4d9a6d2fa..64f03be3b5f07 100644 --- a/src/librustc_const_math/int.rs +++ b/src/librustc_const_math/int.rs @@ -503,7 +503,7 @@ impl ::std::ops::Shr 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))),