Hacker News new | ask | show | jobs
by oconnor663 1312 days ago
It's not always so bad :) https://play.rust-lang.org/?version=stable&mode=debug&editio...
1 comments

Now try to actually do that in a larger program without static lifetimes...
It shouldn't be too bad as long as you keep in mind that it is a reference to an item in that slice, so whatever that slice is pointing to needs to stick around as long as you're using elements from it. I don't often encounter borrow checker issues anymore, because once you program Rust long enough you know what things need to live for what lifetimes, and you architect your "larger programs" around that.