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