Bless output of test borrowck/return-local-binding-from-desugaring.rs for Polonius

This commit is contained in:
lqd 2019-09-17 19:30:34 +02:00
parent 9f4351d406
commit 222e920151

View file

@ -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`.