summary refs log tree commit diff
path: root/src/test/compile-fail/non-copyable-void.rs
blob: eaba1d8611967f078150d4f0ea16d9ec56191b68 (plain)
1
2
3
4
5
6
7
8
fn main() {
    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
    }
}