fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
431 B13 linesraw
1error[E0506]: cannot assign to `p` because it is borrowed
2  --> $DIR/mut_while_borrow.rs:9:5
3   |
4LL |     let r = foo(&p);
5   |                 -- borrow of `p` occurs here
6LL |     p += 1;
7   |     ^^^^^^ assignment to borrowed `p` occurs here
8LL |     println!("{}", r);
9   |                    - borrow later used here
10
11error: aborting due to previous error
12
13For more information about this error, try `rustc --explain E0506`.