unsafe fn foo(x: *const Box) -> Box { let y = *x; //~ ERROR cannot move out of dereference of raw pointer return y; } fn main() { }