mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
fix tests
This commit is contained in:
parent
f621f890a6
commit
ce8510a214
@ -1,4 +1,7 @@
|
||||
// error-pattern: the type `[u8; 18446744073709551615]` is too big for the current architecture
|
||||
// normalize-stderr-64bit "18446744073709551615" -> "SIZE"
|
||||
// normalize-stderr-32bit "4294967295" -> "SIZE"
|
||||
|
||||
// error-pattern: is too big for the current architecture
|
||||
fn main() {
|
||||
println!("Size: {}", std::mem::size_of::<[u8; std::u64::MAX as usize]>());
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
error[E0080]: the type `[u8; 18446744073709551615]` is too big for the current architecture
|
||||
error[E0080]: the type `[u8; SIZE]` is too big for the current architecture
|
||||
--> $SRC_DIR/libcore/mem/mod.rs:LL:COL
|
||||
|
|
||||
LL | intrinsics::size_of::<T>()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
::: $DIR/issue-55878.rs:3:26
|
||||
::: $DIR/issue-55878.rs:6:26
|
||||
|
|
||||
LL | println!("Size: {}", std::mem::size_of::<[u8; std::u64::MAX as usize]>());
|
||||
| ---------------------------------------------------
|
||||
|
11
src/test/ui/huge-array-simple-32.rs
Normal file
11
src/test/ui/huge-array-simple-32.rs
Normal file
@ -0,0 +1,11 @@
|
||||
// ignore-32bit
|
||||
|
||||
// FIXME https://github.com/rust-lang/rust/issues/59774
|
||||
// normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> ""
|
||||
// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> ""
|
||||
#![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];
|
||||
}
|
8
src/test/ui/huge-array-simple-32.stderr
Normal file
8
src/test/ui/huge-array-simple-32.stderr
Normal file
@ -0,0 +1,8 @@
|
||||
error: the type `[u8; 2305843011361177600]` is too big for the current architecture
|
||||
--> $DIR/huge-array-simple-32.rs:9:9
|
||||
|
|
||||
LL | let _fat: [u8; (1<<61)+(1<<31)] =
|
||||
| ^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
11
src/test/ui/huge-array-simple-64.rs
Normal file
11
src/test/ui/huge-array-simple-64.rs
Normal file
@ -0,0 +1,11 @@
|
||||
// ignore-64bit
|
||||
|
||||
// FIXME https://github.com/rust-lang/rust/issues/59774
|
||||
// normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> ""
|
||||
// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> ""
|
||||
#![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];
|
||||
}
|
8
src/test/ui/huge-array-simple-64.stderr
Normal file
8
src/test/ui/huge-array-simple-64.stderr
Normal file
@ -0,0 +1,8 @@
|
||||
error: the type `[u8; 2147516416]` is too big for the current architecture
|
||||
--> $DIR/huge-array-simple-64.rs:9:9
|
||||
|
|
||||
LL | let _fat: [u8; (1<<31)+(1<<15)] =
|
||||
| ^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
@ -1,20 +0,0 @@
|
||||
// error-pattern: too big for the current architecture
|
||||
|
||||
// normalize-stderr-test "; \d+]" -> "; N]"
|
||||
|
||||
// FIXME https://github.com/rust-lang/rust/issues/59774
|
||||
// normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> ""
|
||||
// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> ""
|
||||
#![allow(exceeding_bitshifts)]
|
||||
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
fn main() {
|
||||
let _fat : [u8; (1<<61)+(1<<31)] =
|
||||
[0; (1u64<<61) as usize +(1u64<<31) as usize];
|
||||
}
|
||||
|
||||
#[cfg(target_pointer_width = "32")]
|
||||
fn main() {
|
||||
let _fat : [u8; (1<<31)+(1<<15)] =
|
||||
[0; (1u32<<31) as usize +(1u32<<15) as usize];
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
error: the type `[u8; N]` is too big for the current architecture
|
||||
--> $DIR/huge-array-simple.rs:12:9
|
||||
|
|
||||
LL | let _fat : [u8; (1<<61)+(1<<31)] =
|
||||
| ^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
9
src/test/ui/issues/issue-15919-32.rs
Normal file
9
src/test/ui/issues/issue-15919-32.rs
Normal file
@ -0,0 +1,9 @@
|
||||
// ignore-64bit
|
||||
|
||||
// FIXME https://github.com/rust-lang/rust/issues/59774
|
||||
// normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> ""
|
||||
// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> ""
|
||||
|
||||
fn main() {
|
||||
let x = [0usize; 0xffff_ffff]; //~ ERROR too big
|
||||
}
|
8
src/test/ui/issues/issue-15919-32.stderr
Normal file
8
src/test/ui/issues/issue-15919-32.stderr
Normal file
@ -0,0 +1,8 @@
|
||||
error: the type `[usize; 4294967295]` is too big for the current architecture
|
||||
--> $DIR/issue-15919-32.rs:8:9
|
||||
|
|
||||
LL | let x = [0usize; 0xffff_ffff];
|
||||
| ^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
9
src/test/ui/issues/issue-15919-64.rs
Normal file
9
src/test/ui/issues/issue-15919-64.rs
Normal file
@ -0,0 +1,9 @@
|
||||
// ignore-32bit
|
||||
|
||||
// FIXME https://github.com/rust-lang/rust/issues/59774
|
||||
// normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> ""
|
||||
// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> ""
|
||||
|
||||
fn main() {
|
||||
let x = [0usize; 0xffff_ffff_ffff_ffff]; //~ ERROR too big
|
||||
}
|
8
src/test/ui/issues/issue-15919-64.stderr
Normal file
8
src/test/ui/issues/issue-15919-64.stderr
Normal file
@ -0,0 +1,8 @@
|
||||
error: the type `[usize; 18446744073709551615]` is too big for the current architecture
|
||||
--> $DIR/issue-15919-64.rs:8:9
|
||||
|
|
||||
LL | let x = [0usize; 0xffff_ffff_ffff_ffff];
|
||||
| ^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
@ -1,16 +0,0 @@
|
||||
// error-pattern: too big for the current architecture
|
||||
// normalize-stderr-test "\[usize; \d+\]" -> "[usize; N]"
|
||||
|
||||
// FIXME https://github.com/rust-lang/rust/issues/59774
|
||||
// normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> ""
|
||||
// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> ""
|
||||
|
||||
#[cfg(target_pointer_width = "32")]
|
||||
fn main() {
|
||||
let x = [0usize; 0xffff_ffff];
|
||||
}
|
||||
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
fn main() {
|
||||
let x = [0usize; 0xffff_ffff_ffff_ffff];
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
error: the type `[usize; N]` is too big for the current architecture
|
||||
--> $DIR/issue-15919.rs:15:9
|
||||
|
|
||||
LL | let x = [0usize; 0xffff_ffff_ffff_ffff];
|
||||
| ^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
Loading…
Reference in New Issue
Block a user