fork/rust

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

borsAuto merge of #69854 - pietroalbini:stable-next, r=Centrilb8cedc00407

1.42.0
555 B14 linesraw
1error[E0502]: cannot borrow `foo` as mutable because it is also borrowed as immutable
2  --> $DIR/borrowck-issue-49631.rs:20:9
3   |
4LL |     while let Some(Ok(string)) = foo.get() {
5   |                                  --- immutable borrow occurs here
6LL |         foo.mutate();
7   |         ^^^ mutable borrow occurs here
8LL |
9LL |         println!("foo={:?}", *string);
10   |                              ------- immutable borrow later used here
11
12error: aborting due to previous error
13
14For more information about this error, try `rustc --explain E0502`.