rust/src/test/ui/in-band-lifetimes/mut_while_borrow.stderr
2017-11-24 11:32:35 +01:00

11 lines
341 B
Plaintext

error[E0506]: cannot assign to `p` because it is borrowed
--> $DIR/mut_while_borrow.rs:19:5
|
18 | let r = foo(&p);
| - borrow of `p` occurs here
19 | p += 1; //~ ERROR cannot assign to `p` because it is borrowed
| ^^^^^^ assignment to borrowed `p` occurs here
error: aborting due to previous error