Skip to content

Commit 222e920

Browse files
committed
Bless output of test borrowck/return-local-binding-from-desugaring.rs for Polonius
1 parent 9f4351d commit 222e920

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
error[E0716]: temporary value dropped while borrowed
2+
--> $DIR/return-local-binding-from-desugaring.rs:26:18
3+
|
4+
LL | for ref x in xs {
5+
| ^^ creates a temporary which is freed while still in use
6+
...
7+
LL | }
8+
| - temporary value is freed at the end of this statement
9+
LL | result
10+
| ------ borrow later used here
11+
|
12+
= note: consider using a `let` binding to create a longer lived value
13+
14+
error: aborting due to previous error
15+
16+
For more information about this error, try `rustc --explain E0716`.

0 commit comments

Comments
 (0)