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