1 error[E0502]: cannot borrow `s` as immutable because it is also borrowed as mutable
2 --> $DIR/borrowck-overloaded-call.rs:59:5
5 | ------ mutable borrow occurs here
7 | ^ immutable borrow occurs here
9 | -- mutable borrow later used here
11 error[E0596]: cannot borrow `s` as mutable, as it is not declared as mutable
12 --> $DIR/borrowck-overloaded-call.rs:67:5
15 | ^ cannot borrow as mutable
17 help: consider changing this to be mutable
19 LL | let mut s = SFnMut {
22 error[E0382]: use of moved value: `s`
23 --> $DIR/borrowck-overloaded-call.rs:75:5
25 LL | let s = SFnOnce {
26 | - move occurs because `s` has type `SFnOnce`, which does not implement the `Copy` trait
28 LL | s(" world".to_string());
30 LL | s(" world".to_string());
31 | ^ value used here after move
33 error: aborting due to 3 previous errors
35 Some errors have detailed explanations: E0382, E0502, E0596.
36 For more information about an error, try `rustc --explain E0382`.