2020-04-14 03:03:10 -05:00
|
|
|
// Make sure we catch this even without Stacked Borrows
|
|
|
|
// compile-flags: -Zmiri-disable-stacked-borrows
|
2018-10-19 11:38:23 -05:00
|
|
|
use std::mem;
|
|
|
|
|
|
|
|
fn main() {
|
2020-03-08 17:34:54 -05:00
|
|
|
let _x: &i32 = unsafe { mem::transmute(16usize) }; //~ ERROR reference to unallocated address 16
|
2018-10-19 11:38:23 -05:00
|
|
|
}
|