Bless output of test borrowck/return-local-binding-from-desugaring.rs for Polonius
This commit is contained in:
parent
9f4351d406
commit
222e920151
1 changed files with 16 additions and 0 deletions
|
@ -0,0 +1,16 @@
|
|||
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`.
|
Loading…
Reference in a new issue