2018-08-30 14:18:55 +02:00
|
|
|
// run-pass
|
|
|
|
|
2015-03-22 13:13:15 -07:00
|
|
|
|
2014-11-06 21:30:49 -05:00
|
|
|
use std::mem::size_of;
|
|
|
|
|
2015-01-16 17:01:02 +02:00
|
|
|
#[cfg(target_pointer_width = "32")]
|
2014-11-06 21:30:49 -05:00
|
|
|
pub fn main() {
|
2014-12-20 15:20:51 +13:00
|
|
|
assert_eq!(size_of::<[u8; (1 << 31) - 1]>(), (1 << 31) - 1);
|
2014-11-06 21:30:49 -05:00
|
|
|
}
|
|
|
|
|
2015-01-16 17:01:02 +02:00
|
|
|
#[cfg(target_pointer_width = "64")]
|
2014-11-06 21:30:49 -05:00
|
|
|
pub fn main() {
|
2014-12-20 15:20:51 +13:00
|
|
|
assert_eq!(size_of::<[u8; (1 << 47) - 1]>(), (1 << 47) - 1);
|
2014-11-06 21:30:49 -05:00
|
|
|
}
|