]> git.lizzy.rs Git - rust.git/blob - tests/ui/limits/issue-56762.rs
Rollup merge of #106715 - BoxyUwU:new_solver_triagebot, r=lcnr
[rust.git] / tests / ui / limits / issue-56762.rs
1 // only-x86_64
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 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();
20 //~^ ERROR values of the type `[u8; 2305843009213693951]` are too big
21 static MY_TOO_BIG_ARRAY_2: [u8; HUGE_SIZE] = [0x00; HUGE_SIZE];
22 //~^ ERROR values of the type `[u8; 2305843009213693951]` are too big
23
24 fn main() { }