summaryrefslogtreecommitdiffstats
path: root/tests/ui/array-slice-vec/huge-largest-array.rs
blob: 9e78162c8136b0bcf409d99cb96ab0010b0083ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// run-pass


use std::mem::size_of;

#[cfg(target_pointer_width = "32")]
pub fn main() {
    assert_eq!(size_of::<[u8; (1 << 31) - 1]>(), (1 << 31) - 1);
}

#[cfg(target_pointer_width = "64")]
pub fn main() {
    assert_eq!(size_of::<[u8; (1 << 47) - 1]>(), (1 << 47) - 1);
}