]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/borrowck-partial-reinit-1.stderr
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / ui / borrowck / borrowck-partial-reinit-1.stderr
1 error[E0382]: assign of moved value: `t`
2   --> $DIR/borrowck-partial-reinit-1.rs:27:5
3    |
4 LL |     let mut t = Test2 { b: None };
5    |         ----- move occurs because `t` has type `Test2`, which does not implement the `Copy` trait
6 LL |     let u = Test;
7 LL |     drop(t);
8    |          - value moved here
9 LL |     t.b = Some(u);
10    |     ^^^ value assigned here after move
11
12 error[E0382]: assign of moved value: `t`
13   --> $DIR/borrowck-partial-reinit-1.rs:33:5
14    |
15 LL |     let mut t = Test3(None);
16    |         ----- move occurs because `t` has type `Test3`, which does not implement the `Copy` trait
17 LL |     let u = Test;
18 LL |     drop(t);
19    |          - value moved here
20 LL |     t.0 = Some(u);
21    |     ^^^ value assigned here after move
22
23 error: aborting due to 2 previous errors
24
25 For more information about this error, try `rustc --explain E0382`.