]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/nll/closure-access-spans.stderr
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / nll / closure-access-spans.stderr
index e9d7ca953d65b6fd80717ad37d3c1c03bfc34e07..0a09353b8ec0a52f941f11331dd54b180b04e1e7 100644 (file)
@@ -67,6 +67,11 @@ LL |     || x.len();
    |     ^^ - borrow occurs due to use in closure
    |     |
    |     value borrowed here after move
+   |
+help: consider cloning the value if the performance cost is acceptable
+   |
+LL |     let r = x.clone();
+   |              ++++++++
 
 error[E0382]: borrow of moved value: `x`
   --> $DIR/closure-access-spans.rs:40:5
@@ -79,6 +84,11 @@ LL |     || x = String::new();
    |     ^^ - borrow occurs due to use in closure
    |     |
    |     value borrowed here after move
+   |
+help: consider cloning the value if the performance cost is acceptable
+   |
+LL |     let r = x.clone();
+   |              ++++++++
 
 error[E0382]: borrow of moved value: `x`
   --> $DIR/closure-access-spans.rs:45:5