summaryrefslogtreecommitdiffstats
path: root/tests/ui/rfcs/rfc-2294-if-let-guard
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
commitef24de24a82fe681581cc130f342363c47c0969a (patch)
tree0d494f7e1a38b95c92426f58fe6eaa877303a86c /tests/ui/rfcs/rfc-2294-if-let-guard
parentReleasing progress-linux version 1.74.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-ef24de24a82fe681581cc130f342363c47c0969a.tar.xz
rustc-ef24de24a82fe681581cc130f342363c47c0969a.zip
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/rfcs/rfc-2294-if-let-guard')
-rw-r--r--tests/ui/rfcs/rfc-2294-if-let-guard/move-guard-if-let-chain.stderr14
1 files changed, 6 insertions, 8 deletions
diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/move-guard-if-let-chain.stderr b/tests/ui/rfcs/rfc-2294-if-let-guard/move-guard-if-let-chain.stderr
index d27fde582..087e54244 100644
--- a/tests/ui/rfcs/rfc-2294-if-let-guard/move-guard-if-let-chain.stderr
+++ b/tests/ui/rfcs/rfc-2294-if-let-guard/move-guard-if-let-chain.stderr
@@ -1,5 +1,5 @@
error[E0382]: use of moved value: `x`
- --> $DIR/move-guard-if-let-chain.rs:12:27
+ --> $DIR/move-guard-if-let-chain.rs:12:23
|
LL | let x: Box<_> = Box::new(1);
| - move occurs because `x` has type `Box<i32>`, which does not implement the `Copy` trait
@@ -7,7 +7,7 @@ LL | let x: Box<_> = Box::new(1);
LL | (1, 2) if let y = x && c => (),
| - value moved here
LL | (1, 2) if let z = x => (),
- | ^ value used here after move
+ | ^ value used here after move
|
help: borrow this binding in the pattern to avoid moving the value
|
@@ -15,7 +15,7 @@ LL | (1, 2) if let ref y = x && c => (),
| +++
error[E0382]: use of moved value: `x`
- --> $DIR/move-guard-if-let-chain.rs:36:27
+ --> $DIR/move-guard-if-let-chain.rs:36:23
|
LL | let x: Box<_> = Box::new(1);
| - move occurs because `x` has type `Box<i32>`, which does not implement the `Copy` trait
@@ -23,7 +23,7 @@ LL | let x: Box<_> = Box::new(1);
LL | (1, _) if let y = x && c => (),
| - value moved here
LL | (_, 2) if let z = x => (),
- | ^ value used here after move
+ | ^ value used here after move
|
help: borrow this binding in the pattern to avoid moving the value
|
@@ -31,15 +31,13 @@ LL | (1, _) if let ref y = x && c => (),
| +++
error[E0382]: use of moved value: `x`
- --> $DIR/move-guard-if-let-chain.rs:59:36
+ --> $DIR/move-guard-if-let-chain.rs:59:32
|
LL | let x: Box<_> = Box::new(1);
| - move occurs because `x` has type `Box<i32>`, which does not implement the `Copy` trait
...
LL | (1, _) | (_, 2) if let y = x && c => (),
- | - ^ value used here after move
- | |
- | value moved here
+ | ^ value used here after move
|
help: borrow this binding in the pattern to avoid moving the value
|