]> git.lizzy.rs Git - rust.git/blob - src/test/ui/huge-array-simple.rs
Auto merge of #62339 - pnkfelix:issue-61188-use-visitor-for-structural-match-check...
[rust.git] / src / test / ui / huge-array-simple.rs
1 // error-pattern: too big for the current architecture
2
3 // normalize-stderr-test "; \d+]" -> "; N]"
4
5 // FIXME https://github.com/rust-lang/rust/issues/59774
6 // normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> ""
7 // normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> ""
8 #![allow(exceeding_bitshifts)]
9
10 #[cfg(target_pointer_width = "64")]
11 fn main() {
12     let _fat : [u8; (1<<61)+(1<<31)] =
13         [0; (1u64<<61) as usize +(1u64<<31) as usize];
14 }
15
16 #[cfg(target_pointer_width = "32")]
17 fn main() {
18     let _fat : [u8; (1<<31)+(1<<15)] =
19         [0; (1u32<<31) as usize +(1u32<<15) as usize];
20 }