1 error[E0502]: cannot borrow `s` as immutable because it is also borrowed as mutable
2 --> $DIR/borrowck-overloaded-index-ref-index.rs:49:22
5 | ------ mutable borrow occurs here
6 LL | println!("{}", f[&s]);
7 | ^^ immutable borrow occurs here
10 | -- mutable 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:51:7
16 | ------ mutable borrow occurs here
19 | ^^ immutable borrow occurs here
22 | -- mutable borrow later used here
24 error[E0594]: cannot assign to data in an index of `Bar`
25 --> $DIR/borrowck-overloaded-index-ref-index.rs:56:5
28 | ^^^^^^^^^ cannot assign
30 = help: trait `IndexMut` is required to modify indexed content, but it is not implemented for `Bar`
32 error: aborting due to 3 previous errors
34 Some errors have detailed explanations: E0502, E0594.
35 For more information about an error, try `rustc --explain E0502`.