]> git.proxmox.com Git - rustc.git/blob - tests/ui/borrowck/borrowck-move-from-unsafe-ptr.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / borrowck / borrowck-move-from-unsafe-ptr.rs
1 unsafe fn foo(x: *const Box<isize>) -> Box<isize> {
2 let y = *x; //~ ERROR cannot move out of `*x` which is behind a raw pointer
3 return y;
4 }
5
6 fn main() {
7 }