fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0502]: cannot borrow `my_stuff` as mutable because it is also borrowed as immutable 2 --> $DIR/hashmap-iter-value-lifetime.rs:7:5 3 | 4LL | let (_, thing) = my_stuff.iter().next().unwrap(); 5 | -------- immutable borrow occurs here 6LL | 7LL | my_stuff.clear(); 8 | ^^^^^^^^^^^^^^^^ mutable borrow occurs here 9LL | 10LL | println!("{}", *thing); 11 | ------ immutable borrow later used here 12 13error: aborting due to previous error 14 15For more information about this error, try `rustc --explain E0502`.