2019-12-02 09:48:18 -06:00
|
|
|
// ignore-windows: Unwind panicking does not currently work on Windows
|
2017-07-12 02:29:18 -05:00
|
|
|
fn main() {
|
|
|
|
#[cfg(target_pointer_width="64")]
|
|
|
|
let bad = unsafe {
|
|
|
|
std::mem::transmute::<u128, &[u8]>(42)
|
|
|
|
};
|
|
|
|
#[cfg(target_pointer_width="32")]
|
|
|
|
let bad = unsafe {
|
|
|
|
std::mem::transmute::<u64, &[u8]>(42)
|
|
|
|
};
|
2019-11-29 06:18:54 -06:00
|
|
|
bad[0];
|
2017-07-12 02:29:18 -05:00
|
|
|
}
|