You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error[E0597]: borrowed value does not live long enough
--> src/main.rs:9:21
|
9 | let a: Vec<_> = files.write().unwrap().drain(..1).collect();
| ^^^^^^^^^^^^^^^^^^^^^^ - temporary value dropped here while still borrowed
| |
| temporary value does not live long enough
|
= note: values in a scope are dropped in the opposite order they are created
= note: consider using a `let` binding to increase its lifetime
Reopening: Our current policy is if the 2015 edition alone suffers from a bug that is scheduled to be fixed by NLL (i.e. tagged NLL-fixed-by-NLL) then we leave such issues open until NLL is turned on in the 2015 edition.
Activity
[-]Compiler gets lifetime scope wrong in an oneliner[/-][+]Compiler gets lifetime scope wrong[/+]steveklabnik commentedon Nov 11, 2015
@gankro is this the expected behavior of drian?
Gankra commentedon Nov 12, 2015
Nothin' to do with Drain in particular. Just the compiler being suboptimal with temporary lifetimes.
steveklabnik commentedon Apr 30, 2017
Triage: no change, still reproduces
memoryruins commentedon Jan 30, 2019
Triage: now compiles on 2018.
2015 errors:
rustc: 1.32.0pnkfelix commentedon Feb 27, 2019
Reopening: Our current policy is if the 2015 edition alone suffers from a bug that is scheduled to be fixed by NLL (i.e. tagged NLL-fixed-by-NLL) then we leave such issues open until NLL is turned on in the 2015 edition.
Auto merge of #59114 - matthewjasper:enable-migate-2015, r=<try>
Auto merge of #59114 - matthewjasper:enable-migate-2015, r=pnkfelix
Auto merge of #59114 - matthewjasper:enable-migate-2015, r=pnkfelix