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
{{ message }}
Repository navigation
dropck: track order of destruction for r-value temporaries #22323
Tracking order of destruction for r-value temporaries would (probably) allow us to resume writing code like this from RFC 769:
for line in old_io::stdin().lock().lines(){
...}
which is currently disallowed because the region inference system does not know that the temporary yielded by stdin() will outlive the temporary from stdin().lock().
(But note that it might also have fallout, potentially worse than that of #21657)
I investigated. NLL does fix the problem described in this issue.
My earlier comments regarding cases that don't work are instances of misclassification on my part; they should have been associated with #46413 and perhaps #21114
Activity
pnkfelix commentedon Feb 14, 2015
cc #22321
steveklabnik commentedon May 24, 2016
Triage: not aware of any changes here, but it's also not an area I'm super familiar with.
pnkfelix commentedon May 25, 2016
I assume MIR and non lexical lifetimes will likely resolve this directly
pnkfelix commentedon Jul 30, 2018
According to
rust/src/test/ui/span/issue-23338-locals-die-before-temps-of-body.nll.stderr
Line 1 in 54628c8
Update (circa September 2018): Oh, that test is an instance of #46413, not this.
pnkfelix commentedon Jul 30, 2018
(which is ... okay, but a little surprising, and perhaps worth investigation after we've taken care of the other bigger problems in NLL.)
pnkfelix commentedon Jul 30, 2018
I'm just going to throw in a reference to the NLL tracking issue #43234 in the hopes that we remember to look at this again later.
4 remaining items
pnkfelix commentedon Sep 19, 2018
I investigated. NLL does fix the problem described in this issue.
My earlier comments regarding cases that don't work are instances of misclassification on my part; they should have been associated with #46413 and perhaps #21114
Auto merge of #54355 - pnkfelix:issue-22323-regression-test, r=davidtwco
pnkfelix commentedon Nov 8, 2018
Visited for T-compiler triage. Removing NLL-fixed-by-NLL issues from the Release milestone, but continue to leave them open as issues themselves.
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
Merge pull request rust-lang#22323 from Shourya742/2026-05-08-migrate…