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
11 | |_____value used here after move
12 | `x` moved due to usage in operator
14 note: calling this operator moves the left-hand side
15 --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
16 help: consider further restricting this bound
18 LL | fn double_move<T: Add<Output=()> + Copy>(x: T) {
21 error[E0382]: borrow of moved value: `x`
22 --> $DIR/binop-move-semantics.rs:14:5
24 LL | fn move_then_borrow<T: Add<Output=()> + Clone>(x: T) {
25 | - move occurs because `x` has type `T`, which does not implement the `Copy` trait
30 | ^^^^^^^^^ value borrowed here after move
32 help: consider cloning the value if the performance cost is acceptable
36 help: consider further restricting this bound
38 LL | fn move_then_borrow<T: Add<Output=()> + Clone + Copy>(x: T) {
41 error[E0505]: cannot move out of `x` because it is borrowed
42 --> $DIR/binop-move-semantics.rs:21:5
45 | -- borrow of `x` occurs here
48 | ^ move out of `x` occurs here
50 LL | use_mut(n); use_imm(m);
51 | - borrow later used here
53 error[E0505]: cannot move out of `y` because it is borrowed
54 --> $DIR/binop-move-semantics.rs:23:5
57 | ------ borrow of `y` occurs here
60 | ^ move out of `y` occurs here
61 LL | use_mut(n); use_imm(m);
62 | - borrow later used here
64 error[E0507]: cannot move out of `*m` which is behind a mutable reference
65 --> $DIR/binop-move-semantics.rs:30:5
70 | _____move occurs because `*m` has type `T`, which does not implement the `Copy` trait
74 | |______- `*m` moved due to usage in operator
76 note: calling this operator moves the left-hand side
77 --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
79 error[E0507]: cannot move out of `*n` which is behind a shared reference
80 --> $DIR/binop-move-semantics.rs:32:5
83 | ^^ move occurs because `*n` has type `T`, which does not implement the `Copy` trait
85 error[E0502]: cannot borrow `f` as immutable because it is also borrowed as mutable
86 --> $DIR/binop-move-semantics.rs:54:5
91 | _____mutable borrow occurs here
97 | |mutable borrow later used here
98 | immutable borrow occurs here
100 error[E0502]: cannot borrow `f` as mutable because it is also borrowed as immutable
101 --> $DIR/binop-move-semantics.rs:62:5
106 | _____immutable borrow occurs here
112 | | immutable borrow later used here
113 | mutable borrow occurs here
115 error: aborting due to 8 previous errors
117 Some errors have detailed explanations: E0382, E0502, E0505, E0507.
118 For more information about an error, try `rustc --explain E0382`.