fork/rust
git clone https://git.julia.blue/fork/rust
73528e339aa
1.40.0
1error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable 2 --> $DIR/get_default.rs:32:17 3 | 4LL | fn err(map: &mut Map) -> &String { 5 | - let's call the lifetime of this reference `'1` 6LL | loop { 7LL | match map.get() { 8 | --- immutable borrow occurs here 9LL | Some(v) => { 10LL | map.set(String::new()); // Both AST and MIR error here 11 | ^^^ mutable borrow occurs here 12LL | 13LL | return v; 14 | - returning this value requires that `*map` is borrowed for `'1` 15 16error: aborting due to previous error 17 18For more information about this error, try `rustc --explain E0502`.