Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm also excited about the possibilities MIR opens up. As I recall, non-lexical lifetimes depended on MIR. Does anybody know what the current ETA is for that feature?


It's still in the pre-RFC phase, so there's no solid ETA. This was in fact one of the largest blockers, though, so we'll see how it goes. To make the status of MIR more clear:

  * 1.11: "old trans" by default, MIR with a flag
  * 1.12: MIR by default, "old trans" with a flag
  * 1.13: MIR only, "old trans" is gone
Given that we've had 6 weeks so far with MIR-by-default, everything is looking good, but in theory, making it more widely available might turn up issues. If something catastrophic happens, in theory, old trans could be brought back. So we'll see how the next few weeks goes.

That doesn't mean _no_ work has been done on non-lexical lifetimes, see http://smallcultfollowing.com/babysteps/blog/2016/05/09/non-... (that's a link to the last of three posts). But there's still work to write an actual RFC, discuss it, and then land it.


The information about lifetimes will be available to IDEs? So may be possible to identify lifetimes by the color from each variable https://medium.com/@evnbr/coding-in-color-3a6db2743a1e#.lu50...


Now that MIR has landed, lifetime improvements are now blocked on porting the borrow checker to use the MIR directly, which also involves shuffling it after the MIR phase of the compiler. It's definitely a priority for the near future, but in the immediate term I think most of the focus of the devs is going to be on getting incremental recompilation to a usable state.


There is a postponed issue regarding them here: https://github.com/rust-lang/rfcs/issues/811

(Edited after @steveklabnik corrected me)


Nit: that's not an RFC, it's just an issue in the RFC repo.

PRs in that repo are a much bigger deal than issues: issues are a place to talk in a general sense and see if others are interested in the feature, but converting that into an actual, actionable RFC is a lot of work. I'm not aware of any actual RFC for non-lexical lifetimes, because everyone who would do such a thing knew we had to wait for MIR to shake out before they were realistically possible, and so writing an RFC before then would mostly be a waste of time.


Ah, you're right, sorry. Corrected.


It's all good! I only even make the nitpick because this is an _incredibly_ anticipated feature, and I don't want people to have unrealistic expectations about how far along it is. I considered not even saying anything.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: