diff --git a/src/test/run-pass/big-literals.rs b/src/test/run-pass/big-literals.rs index b73eac0c714..ab9d892ce2b 100644 --- a/src/test/run-pass/big-literals.rs +++ b/src/test/run-pass/big-literals.rs @@ -16,10 +16,10 @@ #![deny(overflowing_literals)] pub fn main() { - assert_eq!(0xffffffff, (-1 as u32)); - assert_eq!(4294967295, (-1 as u32)); - assert_eq!(0xffffffffffffffff, (-1 as u64)); - assert_eq!(18446744073709551615, (-1 as u64)); + assert_eq!(0xffffffff, (!0 as u32)); + assert_eq!(4294967295, (!0 as u32)); + assert_eq!(0xffffffffffffffff, (!0 as u64)); + assert_eq!(18446744073709551615, (!0 as u64)); assert_eq!((-2147483648i32).wrapping_sub(1), 2147483647); } diff --git a/src/test/run-pass/bitwise.rs b/src/test/run-pass/bitwise.rs index d6117a04e35..a9f19c12b02 100644 --- a/src/test/run-pass/bitwise.rs +++ b/src/test/run-pass/bitwise.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(negate_unsigned)] #[cfg(any(target_arch = "x86", target_arch = "arm"))] fn target() { diff --git a/src/test/run-pass/intrinsics-integer.rs b/src/test/run-pass/intrinsics-integer.rs index a4661410ad6..15dbe796ef5 100644 --- a/src/test/run-pass/intrinsics-integer.rs +++ b/src/test/run-pass/intrinsics-integer.rs @@ -10,6 +10,7 @@ // pretty-expanded FIXME #23616 +#![feature(negate_unsigned)] #![feature(intrinsics)] mod rusti { diff --git a/src/test/run-pass/issue-17074.rs b/src/test/run-pass/issue-17074.rs index 31f6a4209de..08c313ab0a4 100644 --- a/src/test/run-pass/issue-17074.rs +++ b/src/test/run-pass/issue-17074.rs @@ -10,10 +10,10 @@ // pretty-expanded FIXME #23616 -static X2: u64 = -1 as u16 as u64; -static Y2: u64 = -1 as u32 as u64; -const X: u64 = -1 as u16 as u64; -const Y: u64 = -1 as u32 as u64; +static X2: u64 = !0 as u16 as u64; +static Y2: u64 = !0 as u32 as u64; +const X: u64 = !0 as u16 as u64; +const Y: u64 = !0 as u32 as u64; fn main() { assert_eq!(match 1 {