rust/src/test/ui/borrowck/borrowck-uninit-field-access.mir.stderr

31 lines
1.1 KiB
Plaintext
Raw Normal View History

2018-10-16 15:08:59 +00:00
error[E0381]: use of possibly uninitialized variable: `a`
2018-12-25 15:56:47 +00:00
--> $DIR/borrowck-uninit-field-access.rs:24:13
2018-08-08 12:28:26 +00:00
|
LL | let _ = a.x + 1;
2018-08-08 12:28:26 +00:00
| ^^^ use of possibly uninitialized `a.x`
2018-10-16 15:08:59 +00:00
error[E0382]: use of moved value: `line1.origin`
2018-12-25 15:56:47 +00:00
--> $DIR/borrowck-uninit-field-access.rs:29:13
2018-08-08 12:28:26 +00:00
|
LL | let _moved = line1.origin;
| ------------ value moved here
LL | let _ = line1.origin.x + 1;
2018-08-08 12:28:26 +00:00
| ^^^^^^^^^^^^^^ 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`
2018-12-25 15:56:47 +00:00
--> $DIR/borrowck-uninit-field-access.rs:34:5
2018-08-08 12:28:26 +00:00
|
LL | let _moved = (line2.origin, line2.middle);
| ------------ value moved here
LL | line2.consume();
| ^^^^^ value used here after partial move
2018-08-08 12:28:26 +00:00
|
= 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`.