fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0502]: cannot borrow `s` as immutable because it is also borrowed as mutable 2 --> $DIR/borrowck-overloaded-call.rs:59:5 3 | 4LL | let sp = &mut s; 5 | ------ mutable borrow occurs here 6LL | s(3); 7 | ^ immutable borrow occurs here 8LL | use_mut(sp); 9 | -- mutable borrow later used here 10 11error[E0596]: cannot borrow `s` as mutable, as it is not declared as mutable 12 --> $DIR/borrowck-overloaded-call.rs:67:5 13 | 14LL | s(3); 15 | ^ cannot borrow as mutable 16 | 17help: consider changing this to be mutable 18 | 19LL | let mut s = SFnMut { 20 | +++ 21 22error[E0382]: use of moved value: `s` 23 --> $DIR/borrowck-overloaded-call.rs:75:5 24 | 25LL | let s = SFnOnce { 26 | - move occurs because `s` has type `SFnOnce`, which does not implement the `Copy` trait 27... 28LL | s(" world".to_string()); 29 | - value moved here 30LL | s(" world".to_string()); 31 | ^ value used here after move 32 33error: aborting due to 3 previous errors 34 35Some errors have detailed explanations: E0382, E0502, E0596. 36For more information about an error, try `rustc --explain E0382`.