2018-09-15 10:29:29 -05:00
|
|
|
error[E0382]: borrow of moved value: `a.b`
|
2019-04-07 10:07:36 -05:00
|
|
|
--> $DIR/issue-52669.rs:13:5
|
2018-09-15 10:29:29 -05:00
|
|
|
|
|
2019-01-02 18:43:08 -06:00
|
|
|
LL | fn bar(mut a: A) -> B {
|
|
|
|
| ----- move occurs because `a` has type `A`, which does not implement the `Copy` trait
|
|
|
|
LL | a.b = B;
|
2018-09-15 10:29:29 -05:00
|
|
|
LL | foo(a);
|
|
|
|
| - value moved here
|
|
|
|
LL | a.b.clone()
|
2023-06-22 15:30:23 -05:00
|
|
|
| ^^^ value borrowed here after move
|
2018-09-15 10:29:29 -05:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0382`.
|