diff --git a/src/test/ui/huge-array-simple-32.rs b/src/test/ui/huge-array-simple-32.rs index f72d69ee747b8..9f98f4d753190 100644 --- a/src/test/ui/huge-array-simple-32.rs +++ b/src/test/ui/huge-array-simple-32.rs @@ -1,4 +1,4 @@ -// ignore-32bit +// ignore-64bit // FIXME https://github.com/rust-lang/rust/issues/59774 // normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> "" @@ -6,6 +6,6 @@ #![allow(exceeding_bitshifts)] fn main() { - let _fat: [u8; (1<<61)+(1<<31)] = //~ ERROR too big for the current architecture - [0; (1u64<<61) as usize +(1u64<<31) as usize]; + let _fat: [u8; (1<<31)+(1<<15)] = //~ ERROR too big for the current architecture + [0; (1u32<<31) as usize +(1u32<<15) as usize]; } diff --git a/src/test/ui/huge-array-simple-32.stderr b/src/test/ui/huge-array-simple-32.stderr index 70d9194ea55c5..16372b02750ae 100644 --- a/src/test/ui/huge-array-simple-32.stderr +++ b/src/test/ui/huge-array-simple-32.stderr @@ -1,7 +1,7 @@ -error: the type `[u8; 2305843011361177600]` is too big for the current architecture +error: the type `[u8; 2147516416]` is too big for the current architecture --> $DIR/huge-array-simple-32.rs:9:9 | -LL | let _fat: [u8; (1<<61)+(1<<31)] = +LL | let _fat: [u8; (1<<31)+(1<<15)] = | ^^^^ error: aborting due to previous error diff --git a/src/test/ui/huge-array-simple-64.rs b/src/test/ui/huge-array-simple-64.rs index 9f98f4d753190..f72d69ee747b8 100644 --- a/src/test/ui/huge-array-simple-64.rs +++ b/src/test/ui/huge-array-simple-64.rs @@ -1,4 +1,4 @@ -// ignore-64bit +// ignore-32bit // FIXME https://github.com/rust-lang/rust/issues/59774 // normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> "" @@ -6,6 +6,6 @@ #![allow(exceeding_bitshifts)] fn main() { - let _fat: [u8; (1<<31)+(1<<15)] = //~ ERROR too big for the current architecture - [0; (1u32<<31) as usize +(1u32<<15) as usize]; + let _fat: [u8; (1<<61)+(1<<31)] = //~ ERROR too big for the current architecture + [0; (1u64<<61) as usize +(1u64<<31) as usize]; } diff --git a/src/test/ui/huge-array-simple-64.stderr b/src/test/ui/huge-array-simple-64.stderr index 3f8e79e5b0b6e..6ed89269f0fb8 100644 --- a/src/test/ui/huge-array-simple-64.stderr +++ b/src/test/ui/huge-array-simple-64.stderr @@ -1,7 +1,7 @@ -error: the type `[u8; 2147516416]` is too big for the current architecture +error: the type `[u8; 2305843011361177600]` is too big for the current architecture --> $DIR/huge-array-simple-64.rs:9:9 | -LL | let _fat: [u8; (1<<31)+(1<<15)] = +LL | let _fat: [u8; (1<<61)+(1<<31)] = | ^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-15919-32.rs b/src/test/ui/issues/issue-15919-32.rs index 92394a4e54e9e..0b66c13aee52e 100644 --- a/src/test/ui/issues/issue-15919-32.rs +++ b/src/test/ui/issues/issue-15919-32.rs @@ -7,3 +7,6 @@ fn main() { let x = [0usize; 0xffff_ffff]; //~ ERROR too big } + +// These two tests need to have different literals, as we can't rely on conditional compilation +// for them while retaining the same spans/lines. diff --git a/src/test/ui/issues/issue-15919-64.rs b/src/test/ui/issues/issue-15919-64.rs index 938ee92e2f256..a3b01fa048df6 100644 --- a/src/test/ui/issues/issue-15919-64.rs +++ b/src/test/ui/issues/issue-15919-64.rs @@ -7,3 +7,6 @@ fn main() { let x = [0usize; 0xffff_ffff_ffff_ffff]; //~ ERROR too big } + +// These two tests need to have different literals, as we can't rely on conditional compilation +// for them while retaining the same spans/lines.