1 error[E0505]: cannot move out of `s` because it is borrowed
2 --> $DIR/borrowck-overloaded-index-move-index.rs:50:22
4 LL | let mut s = "hello".to_string();
5 | ----- binding `s` declared here
7 | ------ borrow of `s` occurs here
9 LL | println!("{}", f[s]);
10 | ^ move out of `s` occurs here
13 | -- borrow later used here
15 error[E0505]: cannot move out of `s` because it is borrowed
16 --> $DIR/borrowck-overloaded-index-move-index.rs:53:7
18 LL | let mut s = "hello".to_string();
19 | ----- binding `s` declared here
21 | ------ borrow of `s` occurs here
24 | ^ move out of `s` occurs here
27 | -- borrow later used here
29 error[E0382]: use of moved value: `s`
30 --> $DIR/borrowck-overloaded-index-move-index.rs:53:7
32 LL | let mut s = "hello".to_string();
33 | ----- move occurs because `s` has type `String`, which does not implement the `Copy` trait
35 LL | println!("{}", f[s]);
39 | ^ value used here after move
41 help: consider cloning the value if the performance cost is acceptable
43 LL | println!("{}", f[s.clone()]);
46 error: aborting due to 3 previous errors
48 Some errors have detailed explanations: E0382, E0505.
49 For more information about an error, try `rustc --explain E0382`.