2017-07-28 16:48:43 +02:00
|
|
|
// error-pattern: tried to deallocate Stack memory but gave Machine(Rust) as the kind
|
2017-07-13 19:10:14 +02:00
|
|
|
|
2017-07-12 14:51:47 +02:00
|
|
|
fn main() {
|
|
|
|
let x = 42;
|
|
|
|
let bad_box = unsafe { std::mem::transmute::<&i32, Box<i32>>(&x) };
|
2017-07-13 19:10:14 +02:00
|
|
|
drop(bad_box);
|
2017-07-12 14:51:47 +02:00
|
|
|
}
|