2018-09-15 15:29:29 +00:00
|
|
|
error[E0382]: borrow of moved value: `a.b`
|
2019-04-07 15:07:36 +00:00
|
|
|
--> $DIR/issue-52669.rs:13:5
|
2018-09-15 15:29:29 +00:00
|
|
|
|
|
2019-01-03 00:43:08 +00: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 15:29:29 +00:00
|
|
|
LL | foo(a);
|
|
|
|
| - value moved here
|
|
|
|
LL | a.b.clone()
|
2023-06-22 20:30:23 +00:00
|
|
|
| ^^^ value borrowed here after move
|
2018-09-15 15:29:29 +00:00
|
|
|
|
2023-11-21 15:44:16 +00:00
|
|
|
error: aborting due to 1 previous error
|
2018-09-15 15:29:29 +00:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0382`.
|