mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
14 lines
278 B
Rust
14 lines
278 B
Rust
//@ 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);
|
|
}
|