From 4547b622d8d29df964fa2914213088b148c498fc Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:18:32 +0200 Subject: Merging upstream version 1.67.1+dfsg1. Signed-off-by: Daniel Baumann --- .../default-binding-modes-both-sides-independent.stderr | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/test/ui/pattern/bindings-after-at/default-binding-modes-both-sides-independent.stderr') diff --git a/src/test/ui/pattern/bindings-after-at/default-binding-modes-both-sides-independent.stderr b/src/test/ui/pattern/bindings-after-at/default-binding-modes-both-sides-independent.stderr index 840a513d6..638bdd6db 100644 --- a/src/test/ui/pattern/bindings-after-at/default-binding-modes-both-sides-independent.stderr +++ b/src/test/ui/pattern/bindings-after-at/default-binding-modes-both-sides-independent.stderr @@ -34,6 +34,11 @@ LL | Ok(ref a @ b) | Err(b @ ref a) => { | | value borrowed here after move | value moved into `b` here | move occurs because `b` has type `NotCopy` which does not implement the `Copy` trait + | +help: borrow this binding in the pattern to avoid moving the value + | +LL | Ok(ref a @ b) | Err(ref b @ ref a) => { + | +++ error: cannot move out of value because it is borrowed --> $DIR/default-binding-modes-both-sides-independent.rs:42:9 @@ -52,6 +57,11 @@ LL | let ref mut a @ b = NotCopy; | | | | | value moved here | value borrowed here after move + | +help: borrow this binding in the pattern to avoid moving the value + | +LL | let ref mut a @ ref b = NotCopy; + | +++ error: aborting due to 6 previous errors -- cgit v1.2.3