summaryrefslogtreecommitdiff
path: root/tests/ui/borrowck/borrowck-move-from-unsafe-ptr.rs
blob: 824da5ceb07a0dee07baec16d1e011c158693a37 (plain)
1
2
3
4
5
6
7
unsafe fn foo(x: *const Box<isize>) -> Box<isize> {
    let y = *x; //~ ERROR cannot move out of `*x` which is behind a raw pointer
    return y;
}

fn main() {
}