]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/borrowck-unary-move.rs
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / 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 }