blob: f96ff9dd4e6740b7137abfa18c71fd0c23c4cc3b [file] [log] [blame]
error[E0506]: cannot assign to `p` because it is borrowed
--> $DIR/mut_while_borrow.rs:9:5
|
LL | let r = foo(&p);
| -- borrow of `p` occurs here
LL | p += 1;
| ^^^^^^ 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`.