fork/rust

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

borsAuto merge of #71868 - Mark-Simulacrum:stable-1.43.1, r=pietroalbini8d69840ab92

1.43.1
562 B15 linesraw
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`.