blob: 546d7b0ed5c8a4cfe1f4061a94baa700b7559098 [file] [log] [blame]
error[E0506]: cannot assign to `p` because it is borrowed
--> $DIR/mut_while_borrow.rs:19:5
|
LL | let r = foo(&p);
| -- borrow of `p` occurs here
LL | p += 1; //~ ERROR cannot assign to `p` because it is borrowed
| ^^^^^^ assignment to borrowed `p` occurs here
LL | println!("{}", r);
| - borrow later used here
error: aborting due to previous error
For more information about this error, try `rustc --explain E0506`.