mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-22 20:47:48 +00:00

previously we moved to the target block *before* calling a function, so when inspecting the stack, it appeared as if we were in the first statement of the next block.
10 lines
213 B
Rust
10 lines
213 B
Rust
#![feature(box_syntax)]
|
|
|
|
fn main() {
|
|
let x = box 42;
|
|
unsafe {
|
|
let f = std::mem::transmute::<Box<i32>, fn()>(x);
|
|
f() //~ ERROR: tried to treat a memory pointer as a function pointer
|
|
}
|
|
}
|