]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-unary-move.rs
Auto merge of #101768 - sunfishcode:sunfishcode/wasi-stdio-lock-asfd, r=joshtriplett
[rust.git] / src / test / ui / borrowck / borrowck-unary-move.rs
1 fn foo(x: Box<isize>) -> isize {
2     let y = &*x;
3     free(x); //~ ERROR cannot move out of `x` because it is borrowed
4     *y
5 }
6
7 fn free(_x: Box<isize>) {
8 }
9
10 fn main() {
11 }