]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/borrowck-move-from-subpath-of-borrowed-path.stderr
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / ui / borrowck / borrowck-move-from-subpath-of-borrowed-path.stderr
1 error[E0505]: cannot move out of `*a` because it is borrowed
2   --> $DIR/borrowck-move-from-subpath-of-borrowed-path.rs:12:13
3    |
4 LL |     let b = &a;
5    |             -- borrow of `a` occurs here
6 LL |
7 LL |     let z = *a;
8    |             ^^ move out of `*a` occurs here
9 LL |     b.use_ref();
10    |     ----------- borrow later used here
11
12 error: aborting due to previous error
13
14 For more information about this error, try `rustc --explain E0505`.