Skip to content

Commit cd36fcf

Browse files
committed
Updated test added from PR #54229 to account for changes added by PR #54164.
1 parent a675fd8 commit cd36fcf

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/test/ui/nll/issue-52534-1.stderr

+5-4
Original file line numberDiff line numberDiff 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
|
5858
LL | &&x
59-
| ^^ temporary value does not live long enough
59+
| ^^ creates a temporary which is freed while still in use
6060
LL | }
61-
| - temporary value only lives until here
61+
| - temporary value is freed at the end of this statement
6262
|
6363
note: 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

138138
error: 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`.

0 commit comments

Comments
 (0)