]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/borrowck-partial-reinit-2.stderr
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / 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`.