diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
commit | 698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch) | |
tree | 173a775858bd501c378080a10dca74132f05bc50 /src/test/ui/borrowck/borrowck-uninit-field-access.stderr | |
parent | Initial commit. (diff) | |
download | rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip |
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/borrowck/borrowck-uninit-field-access.stderr')
-rw-r--r-- | src/test/ui/borrowck/borrowck-uninit-field-access.stderr | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/test/ui/borrowck/borrowck-uninit-field-access.stderr b/src/test/ui/borrowck/borrowck-uninit-field-access.stderr new file mode 100644 index 000000000..6a38a7989 --- /dev/null +++ b/src/test/ui/borrowck/borrowck-uninit-field-access.stderr @@ -0,0 +1,32 @@ +error[E0381]: used binding `a` isn't initialized + --> $DIR/borrowck-uninit-field-access.rs:21:13 + | +LL | let mut a: Point; + | ----- binding declared here but left uninitialized +LL | let _ = a.x + 1; + | ^^^ `a.x` used here but it isn't initialized + +error[E0382]: use of moved value: `line1.origin` + --> $DIR/borrowck-uninit-field-access.rs:25:13 + | +LL | let _moved = line1.origin; + | ------------ value moved here +LL | let _ = line1.origin.x + 1; + | ^^^^^^^^^^^^^^ 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 partially moved value: `line2` + --> $DIR/borrowck-uninit-field-access.rs:29:5 + | +LL | let _moved = (line2.origin, line2.middle); + | ------------ value partially moved here +LL | line2.consume(); + | ^^^^^ value used here after partial move + | + = note: partial move occurs because `line2.middle` has type `Point`, which does not implement the `Copy` trait + +error: aborting due to 3 previous errors + +Some errors have detailed explanations: E0381, E0382. +For more information about an error, try `rustc --explain E0381`. |