2019-04-22 02:40:08 -05:00
|
|
|
error[E0382]: assign of moved value: `t`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/borrowck-partial-reinit-1.rs:27:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-04-22 02:40:08 -05:00
|
|
|
LL | let mut t = Test2 { b: None };
|
|
|
|
| ----- move occurs because `t` has type `Test2`, which does not implement the `Copy` trait
|
|
|
|
LL | let u = Test;
|
|
|
|
LL | drop(t);
|
|
|
|
| - value moved here
|
2018-08-08 07:28:26 -05:00
|
|
|
LL | t.b = Some(u);
|
2019-04-22 02:40:08 -05:00
|
|
|
| ^^^ value assigned here after move
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2019-04-22 02:40:08 -05:00
|
|
|
error[E0382]: assign of moved value: `t`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/borrowck-partial-reinit-1.rs:33:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-04-22 02:40:08 -05:00
|
|
|
LL | let mut t = Test3(None);
|
|
|
|
| ----- move occurs because `t` has type `Test3`, which does not implement the `Copy` trait
|
|
|
|
LL | let u = Test;
|
|
|
|
LL | drop(t);
|
|
|
|
| - value moved here
|
2018-08-08 07:28:26 -05:00
|
|
|
LL | t.0 = Some(u);
|
2019-04-22 02:40:08 -05:00
|
|
|
| ^^^ value assigned here after move
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
2019-04-22 02:40:08 -05:00
|
|
|
For more information about this error, try `rustc --explain E0382`.
|