]> git.lizzy.rs Git - rust.git/commitdiff
rename variable and add test directive for #58030
authorPatrick McCarter <p.mccarter@gmail.com>
Mon, 11 Feb 2019 16:20:50 +0000 (11:20 -0500)
committerPatrick McCarter <p.mccarter@gmail.com>
Mon, 11 Feb 2019 16:20:50 +0000 (11:20 -0500)
src/librustc_mir/interpret/intrinsics.rs
src/test/run-pass/const-int-saturating-arith.rs

index 48fa8568396024449be11709f94c2c98a7651bee..dcbf6a52ba9f5fc033dda40caff245626e1c2c77 100644 (file)
@@ -139,8 +139,8 @@ pub fn emulate_intrinsic(
                         // the fact that the operation has overflowed (if either is 0 no
                         // overflow can occur)
                         let first_term: u128 = l.to_scalar()?.to_bits(l.layout.size)?;
-                        let first_term_pos = first_term & (1 << (num_bits-1)) == 0;
-                        if first_term_pos {
+                        let first_term_positive = first_term & (1 << (num_bits-1)) == 0;
+                        if first_term_positive {
                             // Negative overflow not possible since the positive first term
                             // can only increase an (in range) negative term for addition
                             // or corresponding negated positive term for subtraction
index 4f586a276f0d259f3f5d4bae6761ad43da1510cb..dae4c7216b2c03c61005621d3cecc7b898ea32a8 100644 (file)
@@ -1,3 +1,4 @@
+// ignore-emscripten no i128 support
 #![feature(const_saturating_int_methods)]
 
 const INT_U32_NO: u32 = (42 as u32).saturating_add(2);