bless issue-56762.rs as huge-static.rs
This commit is contained in:
parent
42dbf29b48
commit
d6383b4605
@ -2718,7 +2718,6 @@ ui/limits/issue-15919-32.rs
|
||||
ui/limits/issue-15919-64.rs
|
||||
ui/limits/issue-17913.rs
|
||||
ui/limits/issue-55878.rs
|
||||
ui/limits/issue-56762.rs
|
||||
ui/limits/issue-69485-var-size-diffs-too-large.rs
|
||||
ui/limits/issue-75158-64.rs
|
||||
ui/linkage-attr/auxiliary/issue-12133-dylib.rs
|
||||
|
@ -1,6 +1,9 @@
|
||||
//@ only-x86_64
|
||||
//@ only-64bit
|
||||
|
||||
const HUGE_SIZE: usize = !0usize / 8;
|
||||
// This test validates we gracefully fail computing a const or static of absurdly large size.
|
||||
// The oddly-specific number is because of LLVM measuring object sizes in bits.
|
||||
|
||||
const HUGE_SIZE: usize = 1 << 61;
|
||||
|
||||
|
||||
pub struct TooBigArray {
|
@ -1,14 +1,14 @@
|
||||
error[E0080]: could not evaluate static initializer
|
||||
--> $DIR/issue-56762.rs:16:1
|
||||
--> $DIR/huge-static.rs:19:1
|
||||
|
|
||||
LL | static MY_TOO_BIG_ARRAY_1: TooBigArray = TooBigArray::new();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ values of the type `[u8; 2305843009213693951]` are too big for the current architecture
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ values of the type `[u8; 2305843009213693952]` are too big for the current architecture
|
||||
|
||||
error[E0080]: could not evaluate static initializer
|
||||
--> $DIR/issue-56762.rs:19:1
|
||||
--> $DIR/huge-static.rs:22:1
|
||||
|
|
||||
LL | static MY_TOO_BIG_ARRAY_2: [u8; HUGE_SIZE] = [0x00; HUGE_SIZE];
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ values of the type `[u8; 2305843009213693951]` are too big for the current architecture
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ values of the type `[u8; 2305843009213693952]` are too big for the current architecture
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
Loading…
Reference in New Issue
Block a user