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