Skip to content

Commit b80332e

Browse files
committed
cast the sign_extend result to i128.
1 parent a338351 commit b80332e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_lint/types.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for TypeLimits {
371371
ty::Int(t) => {
372372
let ity = attr::IntType::SignedInt(t);
373373
let size = layout::Integer::from_attr(&cx.tcx, ity).size();
374-
let actually = sign_extend(val, size);
374+
let actually = sign_extend(val, size) as i128;
375375
(format!("{:?}", t), actually.to_string())
376376
}
377377
ty::Uint(t) => {

0 commit comments

Comments
 (0)