]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-partial-reinit-2.stderr
Merge commit '5988bbd24aa87732bfa1d111ba00bcdaa22c481a' into sync_cg_clif-2020-11-27
[rust.git] / src / test / ui / borrowck / borrowck-partial-reinit-2.stderr
1 error[E0382]: assign of moved value: `t`
2   --> $DIR/borrowck-partial-reinit-2.rs:15:5
3    |
4 LL |     let mut t = Test { a: 1, b: None};
5    |         ----- move occurs because `t` has type `Test`, which does not implement the `Copy` trait
6 LL |     let mut u = Test { a: 2, b: Some(Box::new(t))};
7    |                                               - value moved here
8 LL |     t.b = Some(Box::new(u));
9    |     ^^^ value assigned here after move
10
11 error: aborting due to previous error
12
13 For more information about this error, try `rustc --explain E0382`.