1 error[E0502]: cannot borrow `s` as immutable because it is also borrowed as mutable
2 --> $DIR/borrowck-overloaded-index-ref-index.rs:62:22
5 | ------ mutable borrow occurs here
6 LL | println!("{}", f[&s]);
7 | ^^ immutable borrow occurs here
10 | -- borrow later used here
12 error[E0502]: cannot borrow `s` as immutable because it is also borrowed as mutable
13 --> $DIR/borrowck-overloaded-index-ref-index.rs:65:7
16 | ------ mutable borrow occurs here
19 | ^^ immutable borrow occurs here
22 | -- borrow later used here
24 error[E0594]: cannot assign to data in a `&` reference
25 --> $DIR/borrowck-overloaded-index-ref-index.rs:71:5
28 | ^^^^^^^^^ cannot assign
30 error: aborting due to 3 previous errors
32 Some errors occurred: E0502, E0594.
33 For more information about an error, try `rustc --explain E0502`.