Skip to content

Commit ce8510a

Browse files
committed
fix tests
1 parent f621f89 commit ce8510a

14 files changed

+78
-55
lines changed

src/test/ui/consts/issue-55878.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
// error-pattern: the type `[u8; 18446744073709551615]` is too big for the current architecture
1+
// normalize-stderr-64bit "18446744073709551615" -> "SIZE"
2+
// normalize-stderr-32bit "4294967295" -> "SIZE"
3+
4+
// error-pattern: is too big for the current architecture
25
fn main() {
36
println!("Size: {}", std::mem::size_of::<[u8; std::u64::MAX as usize]>());
47
}

src/test/ui/consts/issue-55878.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
error[E0080]: the type `[u8; 18446744073709551615]` is too big for the current architecture
1+
error[E0080]: the type `[u8; SIZE]` is too big for the current architecture
22
--> $SRC_DIR/libcore/mem/mod.rs:LL:COL
33
|
44
LL | intrinsics::size_of::<T>()
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
7-
::: $DIR/issue-55878.rs:3:26
7+
::: $DIR/issue-55878.rs:6:26
88
|
99
LL | println!("Size: {}", std::mem::size_of::<[u8; std::u64::MAX as usize]>());
1010
| ---------------------------------------------------

src/test/ui/huge-array-simple-32.rs

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// ignore-32bit
2+
3+
// FIXME https://github.com/rust-lang/rust/issues/59774
4+
// normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> ""
5+
// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> ""
6+
#![allow(exceeding_bitshifts)]
7+
8+
fn main() {
9+
let _fat: [u8; (1<<61)+(1<<31)] = //~ ERROR too big for the current architecture
10+
[0; (1u64<<61) as usize +(1u64<<31) as usize];
11+
}
+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
error: the type `[u8; 2305843011361177600]` is too big for the current architecture
2+
--> $DIR/huge-array-simple-32.rs:9:9
3+
|
4+
LL | let _fat: [u8; (1<<61)+(1<<31)] =
5+
| ^^^^
6+
7+
error: aborting due to previous error
8+

src/test/ui/huge-array-simple-64.rs

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// ignore-64bit
2+
3+
// FIXME https://github.com/rust-lang/rust/issues/59774
4+
// normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> ""
5+
// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> ""
6+
#![allow(exceeding_bitshifts)]
7+
8+
fn main() {
9+
let _fat: [u8; (1<<31)+(1<<15)] = //~ ERROR too big for the current architecture
10+
[0; (1u32<<31) as usize +(1u32<<15) as usize];
11+
}
+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
error: the type `[u8; 2147516416]` is too big for the current architecture
2+
--> $DIR/huge-array-simple-64.rs:9:9
3+
|
4+
LL | let _fat: [u8; (1<<31)+(1<<15)] =
5+
| ^^^^
6+
7+
error: aborting due to previous error
8+

src/test/ui/huge-array-simple.rs

-20
This file was deleted.

src/test/ui/huge-array-simple.stderr

-8
This file was deleted.

src/test/ui/issues/issue-15919-32.rs

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// ignore-64bit
2+
3+
// FIXME https://github.com/rust-lang/rust/issues/59774
4+
// normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> ""
5+
// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> ""
6+
7+
fn main() {
8+
let x = [0usize; 0xffff_ffff]; //~ ERROR too big
9+
}
+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
error: the type `[usize; 4294967295]` is too big for the current architecture
2+
--> $DIR/issue-15919-32.rs:8:9
3+
|
4+
LL | let x = [0usize; 0xffff_ffff];
5+
| ^
6+
7+
error: aborting due to previous error
8+

src/test/ui/issues/issue-15919-64.rs

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// ignore-32bit
2+
3+
// FIXME https://github.com/rust-lang/rust/issues/59774
4+
// normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> ""
5+
// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> ""
6+
7+
fn main() {
8+
let x = [0usize; 0xffff_ffff_ffff_ffff]; //~ ERROR too big
9+
}
+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
error: the type `[usize; 18446744073709551615]` is too big for the current architecture
2+
--> $DIR/issue-15919-64.rs:8:9
3+
|
4+
LL | let x = [0usize; 0xffff_ffff_ffff_ffff];
5+
| ^
6+
7+
error: aborting due to previous error
8+

src/test/ui/issues/issue-15919.rs

-16
This file was deleted.

src/test/ui/issues/issue-15919.stderr

-8
This file was deleted.

0 commit comments

Comments
 (0)