]> git.lizzy.rs Git - rust.git/commitdiff
cast the sign_extend result to i128.
authorkenta7777 <k.hasegw7@gmail.com>
Sun, 20 Jan 2019 01:45:25 +0000 (10:45 +0900)
committerkenta7777 <k.hasegw7@gmail.com>
Sun, 20 Jan 2019 14:49:49 +0000 (23:49 +0900)
src/librustc_lint/types.rs

index 6e394f78226cdb211179038809a796f9fecafa73..9d3275ffde2c0a3f6000bcf760bdce386f5bbaae 100644 (file)
@@ -371,7 +371,7 @@ fn report_bin_hex_error(
                 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) => {