Skip to content

Commit

Permalink
cast the sign_extend result to i128.
Browse files Browse the repository at this point in the history
  • Loading branch information
kenta7777 committed Jan 20, 2019
1 parent a338351 commit b80332e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc_lint/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit b80332e

Please sign in to comment.