1 error[E0382]: use of moved value: `x`
2 --> $DIR/binop-move-semantics.rs:8:5
4 LL | fn double_move<T: Add<Output=()>>(x: T) {
5 | - move occurs because `x` has type `T`, which does not implement the `Copy` trait
10 | ^ value used here after move
12 help: consider further restricting this bound
14 LL | fn double_move<T: Add<Output=()> + Copy>(x: T) {
17 error[E0382]: borrow of moved value: `x`
18 --> $DIR/binop-move-semantics.rs:14:5
20 LL | fn move_then_borrow<T: Add<Output=()> + Clone>(x: T) {
21 | - move occurs because `x` has type `T`, which does not implement the `Copy` trait
26 | ^ value borrowed here after move
28 help: consider further restricting this bound
30 LL | fn move_then_borrow<T: Add<Output=()> + Clone + Copy>(x: T) {
33 error[E0505]: cannot move out of `x` because it is borrowed
34 --> $DIR/binop-move-semantics.rs:21:5
37 | -- borrow of `x` occurs here
40 | ^ move out of `x` occurs here
42 LL | use_mut(n); use_imm(m);
43 | - borrow later used here
45 error[E0505]: cannot move out of `y` because it is borrowed
46 --> $DIR/binop-move-semantics.rs:23:5
49 | ------ borrow of `y` occurs here
52 | ^ move out of `y` occurs here
53 LL | use_mut(n); use_imm(m);
54 | - borrow later used here
56 error[E0507]: cannot move out of `*m` which is behind a mutable reference
57 --> $DIR/binop-move-semantics.rs:30:5
60 | ^^ move occurs because `*m` has type `T`, which does not implement the `Copy` trait
62 error[E0507]: cannot move out of `*n` which is behind a shared reference
63 --> $DIR/binop-move-semantics.rs:32:5
66 | ^^ move occurs because `*n` has type `T`, which does not implement the `Copy` trait
68 error[E0502]: cannot borrow `f` as immutable because it is also borrowed as mutable
69 --> $DIR/binop-move-semantics.rs:54:5
74 | _____mutable borrow occurs here
80 | |mutable borrow later used here
81 | immutable borrow occurs here
83 error[E0502]: cannot borrow `f` as mutable because it is also borrowed as immutable
84 --> $DIR/binop-move-semantics.rs:62:5
89 | _____immutable borrow occurs here
95 | | immutable borrow later used here
96 | mutable borrow occurs here
98 error: aborting due to 8 previous errors
100 Some errors have detailed explanations: E0382, E0502, E0505, E0507.
101 For more information about an error, try `rustc --explain E0382`.