]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/issues/issue-46472.stderr
Auto merge of #54624 - arielb1:evaluate-outlives, r=nikomatsakis
[rust.git] / src / test / ui / issues / issue-46472.stderr
index 9e5acf56d26ca97286a39cf5389d2d241add2fde..4c0e6544a93939d32798fc29b37a521c6bf5b6b5 100644 (file)
@@ -13,14 +13,14 @@ note: borrowed value must be valid for the lifetime 'a as defined on the functio
 LL | fn bar<'a>() -> &'a mut u32 {
    |        ^^
 
-error[E0597]: borrowed value does not live long enough (Mir)
+error[E0716]: temporary value dropped while borrowed (Mir)
   --> $DIR/issue-46472.rs:14:10
    |
 LL |     &mut 4
-   |          ^ temporary value does not live long enough
+   |          ^ creates a temporary which is freed while still in use
 ...
 LL | }
-   | - temporary value only lives until here
+   | - temporary value is freed at the end of this statement
    |
 note: borrowed value must be valid for the lifetime 'a as defined on the function body at 13:8...
   --> $DIR/issue-46472.rs:13:8
@@ -30,4 +30,5 @@ LL | fn bar<'a>() -> &'a mut u32 {
 
 error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0597`.
+Some errors occurred: E0597, E0716.
+For more information about an error, try `rustc --explain E0597`.