File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -52,13 +52,13 @@ LL | }
5252 = note: functions cannot return a borrow to data owned within the function's scope, functions can only return borrows to data passed as arguments
5353 = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch04-02-references-and-borrowing.html#dangling-references>
5454
55- error[E0597 ]: borrowed value does not live long enough
55+ error[E0714 ]: temporary value dropped while borrowed
5656 --> $DIR/issue-52534-1.rs:30:6
5757 |
5858LL | &&x
59- | ^^ temporary value does not live long enough
59+ | ^^ creates a temporary which is freed while still in use
6060LL | }
61- | - temporary value only lives until here
61+ | - temporary value is freed at the end of this statement
6262 |
6363note: borrowed value must be valid for the anonymous lifetime #1 defined on the function body at 28:1...
6464 --> $DIR/issue-52534-1.rs:28:1
@@ -137,4 +137,5 @@ LL | }
137137
138138error: aborting due to 8 previous errors
139139
140- For more information about this error, try `rustc --explain E0597`.
140+ Some errors occurred: E0597, E0714.
141+ For more information about an error, try `rustc --explain E0597`.
You can’t perform that action at this time.
0 commit comments