]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/borrowck/borrowck-unboxed-closures.nll.stderr
New upstream version 1.34.2+dfsg1
[rustc.git] / src / test / ui / borrowck / borrowck-unboxed-closures.nll.stderr
index 86baa0db961219d2b6fd0c38043c17123ecbb7ed..363a5a69a07e394db6db4c63cf3706125b45473a 100644 (file)
@@ -19,12 +19,14 @@ LL |     f(1, 2);    //~ ERROR cannot borrow immutable argument
 error[E0382]: use of moved value: `f`
   --> $DIR/borrowck-unboxed-closures.rs:12:5
    |
+LL | fn c<F:FnOnce(isize, isize) -> isize>(f: F) {
+   |      -                                - move occurs because `f` has type `F`, which does not implement the `Copy` trait
+   |      |
+   |      consider adding a `Copy` constraint to this type argument
 LL |     f(1, 2);
    |     - value moved here
 LL |     f(1, 2);    //~ ERROR use of moved value
    |     ^ value used here after move
-   |
-   = note: move occurs because `f` has type `F`, which does not implement the `Copy` trait
 
 error: aborting due to 3 previous errors