fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #69854 - pietroalbini:stable-next, r=Centrilb8cedc00407

1.42.0
1.1 KiB30 linesraw
1error[E0381]: use of possibly-uninitialized variable: `a`
2  --> $DIR/borrowck-uninit-field-access.rs:21:13
3   |
4LL |     let _ = a.x + 1;
5   |             ^^^ use of possibly-uninitialized `a.x`
6
7error[E0382]: use of moved value: `line1.origin`
8  --> $DIR/borrowck-uninit-field-access.rs:25:13
9   |
10LL |     let _moved = line1.origin;
11   |                  ------------ value moved here
12LL |     let _ = line1.origin.x + 1;
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
17error[E0382]: use of moved value: `line2`
18  --> $DIR/borrowck-uninit-field-access.rs:29:5
19   |
20LL |     let _moved = (line2.origin, line2.middle);
21   |                                 ------------ value moved here
22LL |     line2.consume();
23   |     ^^^^^ value used here after partial move
24   |
25   = note: move occurs because `line2.middle` has type `Point`, which does not implement the `Copy` trait
26
27error: aborting due to 3 previous errors
28
29Some errors have detailed explanations: E0381, E0382.
30For more information about an error, try `rustc --explain E0381`.