blob: 82420730644c1d9a1819a8cb5cccbd347cdf7638 [file] [log] [blame]
error[E0382]: borrow of moved value: `x`
--> $DIR/moves-based-on-type-distribute-copy-over-paren.rs:21:11
|
LL | let _y = Foo { f:x };
| - value moved here
LL | //~^ NOTE value moved here
LL | touch(&x); //~ ERROR use of moved value: `x`
| ^^ value borrowed here after move
|
= note: move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait
error[E0382]: borrow of moved value: `x`
--> $DIR/moves-based-on-type-distribute-copy-over-paren.rs:30:11
|
LL | let _y = Foo { f:(((x))) };
| ------- value moved here
LL | //~^ NOTE value moved here
LL | touch(&x); //~ ERROR use of moved value: `x`
| ^^ value borrowed here after move
|
= note: move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0382`.