rust/tests/ui/borrowck/borrowck-move-from-unsafe-ptr.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

8 lines
163 B
Rust
Raw Normal View History

unsafe fn foo(x: *const Box<isize>) -> Box<isize> {
let y = *x; //~ ERROR cannot move out of `*x` which is behind a raw pointer
2012-08-01 19:30:05 -05:00
return y;
}
fn main() {
}