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/binding/issue-53114-borrow-checks.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/binding/issue-53114-borrow-checks.stderr')
-rw-r--r-- | src/test/ui/binding/issue-53114-borrow-checks.stderr | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/src/test/ui/binding/issue-53114-borrow-checks.stderr b/src/test/ui/binding/issue-53114-borrow-checks.stderr new file mode 100644 index 000000000..489bf70d9 --- /dev/null +++ b/src/test/ui/binding/issue-53114-borrow-checks.stderr @@ -0,0 +1,65 @@ +error[E0382]: use of moved value: `m` + --> $DIR/issue-53114-borrow-checks.rs:22:11 + | +LL | let m = M; + | - move occurs because `m` has type `M`, which does not implement the `Copy` trait +LL | drop(m); + | - value moved here +LL | match m { _ => { } } // #53114: should eventually be accepted too + | ^ value used here after move + +error[E0382]: use of partially moved value: `mm` + --> $DIR/issue-53114-borrow-checks.rs:27:11 + | +LL | match mm { (_x, _) => { } } + | -- value partially moved here +LL | match mm { (_, _y) => { } } + | ^^ value used here after partial move + | + = note: partial move occurs because `mm.0` has type `M`, which does not implement the `Copy` trait + +error[E0382]: use of partially moved value: `mm` + --> $DIR/issue-53114-borrow-checks.rs:29:11 + | +LL | match mm { (_, _y) => { } } + | -- value partially moved here +LL | +LL | match mm { (_, _) => { } } + | ^^ value used here after partial move + | + = note: partial move occurs because `mm.1` has type `M`, which does not implement the `Copy` trait + +error[E0382]: use of moved value: `m` + --> $DIR/issue-53114-borrow-checks.rs:36:16 + | +LL | let m = M; + | - move occurs because `m` has type `M`, which does not implement the `Copy` trait +LL | drop(m); + | - value moved here +LL | if let _ = m { } // #53114: should eventually be accepted too + | ^ value used here after move + +error[E0382]: use of partially moved value: `mm` + --> $DIR/issue-53114-borrow-checks.rs:41:22 + | +LL | if let (_x, _) = mm { } + | -- value partially moved here +LL | if let (_, _y) = mm { } + | ^^ value used here after partial move + | + = note: partial move occurs because `mm.0` has type `M`, which does not implement the `Copy` trait + +error[E0382]: use of partially moved value: `mm` + --> $DIR/issue-53114-borrow-checks.rs:43:21 + | +LL | if let (_, _y) = mm { } + | -- value partially moved here +LL | +LL | if let (_, _) = mm { } + | ^^ value used here after partial move + | + = note: partial move occurs because `mm.1` has type `M`, which does not implement the `Copy` trait + +error: aborting due to 6 previous errors + +For more information about this error, try `rustc --explain E0382`. |