summaryrefslogtreecommitdiffstats
path: root/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.stderr
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.stderr (renamed from src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.stderr)7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.stderr b/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.stderr
index 70cdd6446..e32a4dd44 100644
--- a/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.stderr
+++ b/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.stderr
@@ -1,5 +1,5 @@
error[E0509]: cannot move out of type `X`, which implements the `Drop` trait
- --> $DIR/disallowed-deconstructing-destructing-struct-match.rs:14:11
+ --> $DIR/disallowed-deconstructing-destructing-struct-match.rs:15:11
|
LL | match x {
| ^ cannot move out of here
@@ -9,6 +9,11 @@ LL | X { x: y } => println!("contents: {}", y)
| |
| data moved here
| move occurs because `y` has type `String`, which does not implement the `Copy` trait
+ |
+help: consider borrowing the pattern binding
+ |
+LL | X { x: ref y } => println!("contents: {}", y)
+ | +++
error: aborting due to previous error