blob: 98762a0f6cfffd52ce58a613b4eac0ade01128e6 [file] [log] [blame]
error[E0382]: use of moved value: `x`
--> $DIR/binop-move-semantics.rs:18:5
|
LL | x
| - value moved here
LL | +
LL | x; //~ ERROR: use of moved value
| ^ value used here after move
|
= note: move occurs because `x` has type `T`, which does not implement the `Copy` trait
error[E0382]: borrow of moved value: `x`
--> $DIR/binop-move-semantics.rs:24:5
|
LL | x
| - value moved here
LL | +
LL | x.clone(); //~ ERROR: use of moved value
| ^ value borrowed here after move
|
= note: move occurs because `x` has type `T`, which does not implement the `Copy` trait
error[E0507]: cannot move out of borrowed content
--> $DIR/binop-move-semantics.rs:40:5
|
LL | *m //~ ERROR: cannot move out of borrowed content
| ^^ cannot move out of borrowed content
error[E0507]: cannot move out of borrowed content
--> $DIR/binop-move-semantics.rs:42:5
|
LL | *n; //~ ERROR: cannot move out of borrowed content
| ^^ cannot move out of borrowed content
error[E0502]: cannot borrow `f` as immutable because it is also borrowed as mutable
--> $DIR/binop-move-semantics.rs:64:5
|
LL | &mut f
| ------
| |
| _____mutable borrow occurs here
| |
LL | | +
LL | | &f; //~ ERROR: cannot borrow `f` as immutable because it is also borrowed as mutable
| | ^-
| |_____||
| |borrow later used here
| immutable borrow occurs here
error[E0502]: cannot borrow `f` as mutable because it is also borrowed as immutable
--> $DIR/binop-move-semantics.rs:72:5
|
LL | &f
| --
| |
| _____immutable borrow occurs here
| |
LL | | +
LL | | &mut f; //~ ERROR: cannot borrow `f` as mutable because it is also borrowed as immutable
| | ^^^^^-
| |_____|____|
| | borrow later used here
| mutable borrow occurs here
error: aborting due to 6 previous errors
Some errors occurred: E0382, E0502, E0507.
For more information about an error, try `rustc --explain E0382`.