blob: c818379762c9df661067128c0557dfab0b019a0b [file] [log] [blame]
error[E0716]: temporary value dropped while borrowed
--> $DIR/return-local-binding-from-desugaring.rs:26:18
|
LL | for ref x in xs {
| ^^ creates a temporary which is freed while still in use
...
LL | }
| - temporary value is freed at the end of this statement
LL | result
| ------ borrow later used here
|
= note: consider using a `let` binding to create a longer lived value
error: aborting due to previous error
For more information about this error, try `rustc --explain E0716`.