]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-move-subcomponent.stderr
Merge commit 'e9d1a0a7b0b28dd422f1a790ccde532acafbf193' into sync_cg_clif-2022-08-24
[rust.git] / src / test / ui / borrowck / borrowck-move-subcomponent.stderr
1 error[E0505]: cannot move out of `a.x` because it is borrowed
2   --> $DIR/borrowck-move-subcomponent.rs:15:14
3    |
4 LL |   let pb = &a;
5    |            -- borrow of `a` occurs here
6 LL |   let S { x: ax } = a;
7    |              ^^ move out of `a.x` occurs here
8 LL |   f(pb);
9    |     -- borrow later used here
10
11 error: aborting due to previous error
12
13 For more information about this error, try `rustc --explain E0505`.