]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/span/regionck-unboxed-closure-lifetimes.stderr
New upstream version 1.25.0+dfsg1
[rustc.git] / src / test / ui / span / regionck-unboxed-closure-lifetimes.stderr
index 9c369e03e33ab8fdeee92b50327180907be3fb02..ca453c22cce4fb989271fc5411ca258d0f40f601 100644 (file)
@@ -1,12 +1,12 @@
-error: `c` does not live long enough
-  --> $DIR/regionck-unboxed-closure-lifetimes.rs:19:5
+error[E0597]: `c` does not live long enough
+  --> $DIR/regionck-unboxed-closure-lifetimes.rs:17:22
    |
-17 |         let c_ref = &c; //~ ERROR `c` does not live long enough
-   |                      - borrow occurs here
-18 |         f = move |a: isize, b: isize| { a + b + *c_ref };
-19 |     }
-   |     ^ `c` dropped here while still borrowed
-20 | }
+17 |         let c_ref = &c;
+   |                      ^ borrowed value does not live long enough
+...
+20 |     }
+   |     - `c` dropped here while still borrowed
+21 | }
    | - borrowed value needs to live until here
 
 error: aborting due to previous error