]> git.lizzy.rs Git - rust.git/blob - src/test/ui/in-band-lifetimes/mut_while_borrow.stderr
Rollup merge of #82259 - osa1:issue82156, r=petrochenkov
[rust.git] / src / test / ui / in-band-lifetimes / mut_while_borrow.stderr
1 error[E0506]: cannot assign to `p` because it is borrowed
2   --> $DIR/mut_while_borrow.rs:9:5
3    |
4 LL |     let r = foo(&p);
5    |                 -- borrow of `p` occurs here
6 LL |     p += 1;
7    |     ^^^^^^ assignment to borrowed `p` occurs here
8 LL |     println!("{}", r);
9    |                    - borrow later used here
10
11 error: aborting due to previous error
12
13 For more information about this error, try `rustc --explain E0506`.