Hacker News new | past | comments | ask | show | jobs | submit login

Also, the borrow checker doesn't do global analysis. Not doing so is an important design decision in Rust, and is part of the reason why we don't infer type signatures, including lifetimes generally. You want to keep things easy to compute.

That said, you're right that the current borrow checker ("non-lexial lifetimes") is built off of a control flow analysis, absolutely. But it still operates only within bodies, not globally.




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

Search: