cast the sign_extend result to i128.

This commit is contained in:
kenta7777 2019-01-20 10:45:25 +09:00
parent a3383514d9
commit b80332ed4c

View file

@ -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) => {