]> git.proxmox.com Git - rustc.git/blob - src/test/ui/borrowck/borrowck-uninit-field-access.ast.nll.stderr
97eb83d0f14efedb1c37a26edfa8a6f608ab338a
[rustc.git] / src / test / ui / borrowck / borrowck-uninit-field-access.ast.nll.stderr
1 error[E0381]: use of possibly uninitialized variable: `a`
2 --> $DIR/borrowck-uninit-field-access.rs:34:13
3 |
4 LL | let _ = a.x + 1; //[ast]~ ERROR use of possibly uninitialized variable: `a.x`
5 | ^^^ use of possibly uninitialized `a.x`
6
7 error[E0382]: use of moved value: `line1.origin`
8 --> $DIR/borrowck-uninit-field-access.rs:39:13
9 |
10 LL | let _moved = line1.origin;
11 | ------------ value moved here
12 LL | let _ = line1.origin.x + 1; //[ast]~ ERROR use of moved value: `line1.origin.x`
13 | ^^^^^^^^^^^^^^ value used here after move
14 |
15 = note: move occurs because `line1.origin` has type `Point`, which does not implement the `Copy` trait
16
17 error[E0382]: use of moved value: `line2`
18 --> $DIR/borrowck-uninit-field-access.rs:44:5
19 |
20 LL | let _moved = (line2.origin, line2.middle);
21 | ------------ value moved here
22 LL | line2.consume(); //[ast]~ ERROR use of partially moved value: `line2` [E0382]
23 | ^^^^^ value used here after move
24 |
25 = note: move occurs because `line2.middle` has type `Point`, which does not implement the `Copy` trait
26
27 error: aborting due to 3 previous errors
28
29 Some errors occurred: E0381, E0382.
30 For more information about an error, try `rustc --explain E0381`.