]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/borrowck-move-from-subpath-of-borrowed-path.stderr
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[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 a: Box<Box<_>> = Box::new(Box::new(2));
5    |         - binding `a` declared here
6 LL |     let b = &a;
7    |             -- borrow of `a` occurs here
8 LL |
9 LL |     let z = *a;
10    |             ^^ move out of `*a` occurs here
11 LL |     b.use_ref();
12    |     ----------- borrow later used here
13
14 error: aborting due to previous error
15
16 For more information about this error, try `rustc --explain E0505`.