]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/borrowck-loan-blocks-move.stderr
Rollup merge of #107304 - Nilstrieb:ᐸTy as PartialEqᐳ::eq because what else are we...
[rust.git] / tests / ui / borrowck / borrowck-loan-blocks-move.stderr
1 error[E0505]: cannot move out of `v` because it is borrowed
2   --> $DIR/borrowck-loan-blocks-move.rs:11:10
3    |
4 LL |     let v = Box::new(3);
5    |         - binding `v` declared here
6 LL |     let w = &v;
7    |             -- borrow of `v` occurs here
8 LL |     take(v);
9    |          ^ move out of `v` occurs here
10 LL |     w.use_ref();
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`.