]> git.proxmox.com Git - rustc.git/blame - src/test/ui/hashmap/hashmap-iter-value-lifetime.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / hashmap / hashmap-iter-value-lifetime.stderr
CommitLineData
b7449926 1error[E0502]: cannot borrow `my_stuff` as mutable because it is also borrowed as immutable
0731742a 2 --> $DIR/hashmap-iter-value-lifetime.rs:7:5
b7449926
XL
3 |
4LL | let (_, thing) = my_stuff.iter().next().unwrap();
c295e0f8 5 | --------------- immutable borrow occurs here
923072b8 6LL |
532ac7d7 7LL | my_stuff.clear();
48663c56 8 | ^^^^^^^^^^^^^^^^ mutable borrow occurs here
923072b8 9LL |
48663c56
XL
10LL | println!("{}", *thing);
11 | ------ immutable borrow later used here
b7449926
XL
12
13error: aborting due to previous error
14
15For more information about this error, try `rustc --explain E0502`.