about summary refs log tree commit diff
path: root/tests/ui/span
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-07-26 14:32:19 -0400
committerMichael Goulet <michael@errs.io>2024-07-26 14:41:56 -0400
commit91acacf85b9f81aeb41901f8918128bfe02946c8 (patch)
tree24f38bf31ef9f15930e66da7d4e187a73d7ed932 /tests/ui/span
parente7eae5370e304fb1534c1964852a6c127f1f09f8 (diff)
downloadrust-91acacf85b9f81aeb41901f8918128bfe02946c8.tar.gz
rust-91acacf85b9f81aeb41901f8918128bfe02946c8.zip
Peel off explicit (or implicit) deref before suggesting clone on move error in borrowck
Diffstat (limited to 'tests/ui/span')
-rw-r--r--tests/ui/span/send-is-not-static-std-sync.stderr6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/ui/span/send-is-not-static-std-sync.stderr b/tests/ui/span/send-is-not-static-std-sync.stderr
index 50b8ffe0114..6bc3ed8d24f 100644
--- a/tests/ui/span/send-is-not-static-std-sync.stderr
+++ b/tests/ui/span/send-is-not-static-std-sync.stderr
@@ -15,7 +15,7 @@ LL |         *lock.lock().unwrap() = &z;
 help: consider cloning the value if the performance cost is acceptable
    |
 LL -     *lock.lock().unwrap() = &*y;
-LL +     *lock.lock().unwrap() = y.clone();
+LL +     *lock.lock().unwrap() = &y.clone();
    |
 
 error[E0597]: `z` does not live long enough
@@ -48,7 +48,7 @@ LL |         *lock.write().unwrap() = &z;
 help: consider cloning the value if the performance cost is acceptable
    |
 LL -     *lock.write().unwrap() = &*y;
-LL +     *lock.write().unwrap() = y.clone();
+LL +     *lock.write().unwrap() = &y.clone();
    |
 
 error[E0597]: `z` does not live long enough
@@ -81,7 +81,7 @@ LL |         tx.send(&z).unwrap();
 help: consider cloning the value if the performance cost is acceptable
    |
 LL -     tx.send(&*y);
-LL +     tx.send(y.clone());
+LL +     tx.send(&y.clone());
    |
 
 error[E0597]: `z` does not live long enough