Update compiler/rustc_target/src/abi/mod.rs

Co-authored-by: Ralf Jung <post@ralfj.de>
This commit is contained in:
Oli Scherer 2020-11-04 15:12:44 +01:00 committed by GitHub
parent 6e6c8a86e9
commit 5f087f089f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -319,7 +319,7 @@ impl Size {
// Sign-extend it.
let shift = 128 - size;
// Shift the unsigned value to the left, then shift back to the right as signed
// (essentially fills with FF on the left).
// (essentially fills with sign bit on the left).
(((value << shift) as i128) >> shift) as u128
}