]>
Commit | Line | Data |
---|---|---|
0731742a | 1 | // only-x86_64 |
48663c56 XL |
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" -> "" | |
0731742a XL |
6 | const HUGE_SIZE: usize = !0usize / 8; |
7 | ||
8 | ||
9 | pub struct TooBigArray { | |
10 | arr: [u8; HUGE_SIZE], | |
11 | } | |
12 | ||
13 | impl TooBigArray { | |
14 | pub const fn new() -> Self { | |
15 | TooBigArray { arr: [0x00; HUGE_SIZE], } | |
16 | } | |
17 | } | |
18 | ||
19 | static MY_TOO_BIG_ARRAY_1: TooBigArray = TooBigArray::new(); | |
fc512014 | 20 | //~^ ERROR values of the type `[u8; 2305843009213693951]` are too big |
0731742a | 21 | static MY_TOO_BIG_ARRAY_2: [u8; HUGE_SIZE] = [0x00; HUGE_SIZE]; |
fc512014 | 22 | //~^ ERROR values of the type `[u8; 2305843009213693951]` are too big |
0731742a XL |
23 | |
24 | fn main() { } |