summaryrefslogtreecommitdiffstats
path: root/src/test/ui/unsized-locals/double-move.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/unsized-locals/double-move.stderr')
-rw-r--r--src/test/ui/unsized-locals/double-move.stderr8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/ui/unsized-locals/double-move.stderr b/src/test/ui/unsized-locals/double-move.stderr
index dfae6cc75..715348181 100644
--- a/src/test/ui/unsized-locals/double-move.stderr
+++ b/src/test/ui/unsized-locals/double-move.stderr
@@ -16,6 +16,14 @@ LL | drop_unsized(y);
| - value moved here
LL | drop_unsized(y);
| ^ value used here after move
+ |
+note: consider changing this parameter type in function `drop_unsized` to borrow instead if owning the value isn't necessary
+ --> $DIR/double-move.rs:14:31
+ |
+LL | fn drop_unsized<T: ?Sized>(_: T) {}
+ | ------------ ^ this parameter takes ownership of the value
+ | |
+ | in this function
error[E0382]: use of moved value: `x`
--> $DIR/double-move.rs:27:22