]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/issue-21232-partial-init-and-erroneous-use.stderr
fix merge conflicts
[rust.git] / src / test / ui / nll / issue-21232-partial-init-and-erroneous-use.stderr
1 error[E0381]: assign of possibly uninitialized variable: `d`
2   --> $DIR/issue-21232-partial-init-and-erroneous-use.rs:28:5
3    |
4 LL |     d.x = 10;
5    |     ^^^^^^^^ use of possibly uninitialized `d`
6
7 error[E0381]: assign of possibly uninitialized variable: `d`
8   --> $DIR/issue-21232-partial-init-and-erroneous-use.rs:34:5
9    |
10 LL |     d.x = 10;
11    |     ^^^^^^^^ use of possibly uninitialized `d`
12
13 error[E0382]: assign of moved value: `d`
14   --> $DIR/issue-21232-partial-init-and-erroneous-use.rs:41:5
15    |
16 LL |     let mut d = D { x: 0, s: S{ y: 0, z: 0 } };
17    |         ----- move occurs because `d` has type `D`, which does not implement the `Copy` trait
18 LL |     drop(d);
19    |          - value moved here
20 LL |     d.x = 10;
21    |     ^^^^^^^^ value assigned here after move
22
23 error[E0381]: assign to part of possibly uninitialized variable: `d`
24   --> $DIR/issue-21232-partial-init-and-erroneous-use.rs:47:5
25    |
26 LL |     d.s.y = 20;
27    |     ^^^^^^^^^^ use of possibly uninitialized `d.s`
28
29 error[E0381]: assign to part of possibly uninitialized variable: `d`
30   --> $DIR/issue-21232-partial-init-and-erroneous-use.rs:53:5
31    |
32 LL |     d.s.y = 20;
33    |     ^^^^^^^^^^ use of possibly uninitialized `d.s`
34
35 error[E0382]: assign to part of moved value: `d`
36   --> $DIR/issue-21232-partial-init-and-erroneous-use.rs:60:5
37    |
38 LL |     let mut d = D { x: 0, s: S{ y: 0, z: 0} };
39    |         ----- move occurs because `d` has type `D`, which does not implement the `Copy` trait
40 LL |     drop(d);
41    |          - value moved here
42 LL |     d.s.y = 20;
43    |     ^^^^^^^^^^ value partially assigned here after move
44
45 error: aborting due to 6 previous errors
46
47 Some errors have detailed explanations: E0381, E0382.
48 For more information about an error, try `rustc --explain E0381`.