]> git.lizzy.rs Git - rust.git/blob - tests/ui/array-slice-vec/huge-largest-array.rs
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / ui / array-slice-vec / huge-largest-array.rs
1 // run-pass
2
3
4 use std::mem::size_of;
5
6 #[cfg(target_pointer_width = "32")]
7 pub fn main() {
8     assert_eq!(size_of::<[u8; (1 << 31) - 1]>(), (1 << 31) - 1);
9 }
10
11 #[cfg(target_pointer_width = "64")]
12 pub fn main() {
13     assert_eq!(size_of::<[u8; (1 << 47) - 1]>(), (1 << 47) - 1);
14 }