2018-10-16 17:10:04 +02:00
|
|
|
error[E0382]: borrow of moved value: `start`
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/walk-struct-literal-with.rs:16:20
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2019-01-24 10:53:43 -08:00
|
|
|
LL | let start = Mine{test:"Foo".to_string(), other_val:0};
|
|
|
|
| ----- move occurs because `start` has type `Mine`, which does not implement the `Copy` trait
|
2018-08-08 14:28:26 +02:00
|
|
|
LL | let end = Mine{other_val:1, ..start.make_string_bar()};
|
|
|
|
| ----- value moved here
|
2019-03-11 23:18:35 +03:00
|
|
|
LL | println!("{}", start.test);
|
2018-08-08 14:28:26 +02:00
|
|
|
| ^^^^^^^^^^ value borrowed here after move
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0382`.
|