11 lines
341 B
Plaintext
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
|
|
|