]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-latebound-regions.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / lifetimes / lifetime-errors / ex3-both-anon-regions-latebound-regions.stderr
index 2c87f8dbd2c2b0e09971e5c0376273a3fe21ae4a..1e24032fc1ce26eece85a83f9e015737c46a5311 100644 (file)
@@ -1,11 +1,14 @@
-error[E0623]: lifetime mismatch
-  --> $DIR/ex3-both-anon-regions-latebound-regions.rs:2:12
+error: lifetime may not live long enough
+  --> $DIR/ex3-both-anon-regions-latebound-regions.rs:2:5
    |
 LL | fn foo<'a,'b>(x: &mut Vec<&'a u8>, y: &'b u8) {
-   |                           ------      ------ these two types are declared with different lifetimes...
+   |        -- -- lifetime `'b` defined here
+   |        |
+   |        lifetime `'a` defined here
 LL |     x.push(y);
-   |            ^ ...but data from `y` flows into `x` here
+   |     ^^^^^^^^^ argument requires that `'b` must outlive `'a`
+   |
+   = help: consider adding the following bound: `'b: 'a`
 
 error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0623`.