about summary refs log tree commit diff
diff options
context:
space:
mode:
authorkenta7777 <k.hasegw7@gmail.com>2019-01-20 10:45:25 +0900
committerkenta7777 <k.hasegw7@gmail.com>2019-01-20 23:49:49 +0900
commitb80332ed4c142496096ff2bf9aa378cc6b3bf806 (patch)
tree81464459c19d57f2b478617c50993b9c373f60ab
parenta3383514d9db48295124b349323379952c33a2c4 (diff)
downloadrust-b80332ed4c142496096ff2bf9aa378cc6b3bf806.tar.gz
rust-b80332ed4c142496096ff2bf9aa378cc6b3bf806.zip
cast the sign_extend result to i128.
-rw-r--r--src/librustc_lint/types.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_lint/types.rs b/src/librustc_lint/types.rs
index 6e394f78226..9d3275ffde2 100644
--- a/src/librustc_lint/types.rs
+++ b/src/librustc_lint/types.rs
@@ -371,7 +371,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for TypeLimits {
                 ty::Int(t) => {
                     let ity = attr::IntType::SignedInt(t);
                     let size = layout::Integer::from_attr(&cx.tcx, ity).size();
-                    let actually = sign_extend(val, size);
+                    let actually = sign_extend(val, size) as i128;
                     (format!("{:?}", t), actually.to_string())
                 }
                 ty::Uint(t) => {