]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/borrowck-unary-move.stderr
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[rust.git] / tests / ui / borrowck / borrowck-unary-move.stderr
1 error[E0505]: cannot move out of `x` because it is borrowed
2   --> $DIR/borrowck-unary-move.rs:3:10
3    |
4 LL | fn foo(x: Box<isize>) -> isize {
5    |        - binding `x` declared here
6 LL |     let y = &*x;
7    |             --- borrow of `*x` occurs here
8 LL |     free(x);
9    |          ^ move out of `x` occurs here
10 LL |     *y
11    |     -- borrow later used here
12
13 error: aborting due to previous error
14
15 For more information about this error, try `rustc --explain E0505`.