]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/borrowck-move-mut-base-ptr.stderr
Auto merge of #107663 - matthiaskrgr:107423-point-at-EOF-code, r=compiler-errors
[rust.git] / tests / ui / borrowck / borrowck-move-mut-base-ptr.stderr
1 error[E0505]: cannot move out of `t0` because it is borrowed
2   --> $DIR/borrowck-move-mut-base-ptr.rs:10:14
3    |
4 LL | fn foo(t0: &mut isize) {
5    |        -- binding `t0` declared here
6 LL |     let p: &isize = &*t0; // Freezes `*t0`
7    |                     ---- borrow of `*t0` occurs here
8 LL |     let t1 = t0;
9    |              ^^ move out of `t0` occurs here
10 LL |     *t1 = 22;
11 LL |     p.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`.