rust/src/test/compile-fail/non-copyable-void.rs

9 lines
196 B
Rust
Raw Normal View History

fn main() {
2012-10-03 16:38:01 -05:00
let x : *~[int] = ptr::addr_of(&~[1,2,3]);
let y : *libc::c_void = x as *libc::c_void;
unsafe {
let _z = *y;
//~^ ERROR copying a noncopyable value
}
}