Hacker News new | ask | show | jobs
by royjacobs 748 days ago
I'm wondering why the lifetimes as described in steps 2 and 3 need to be so explicit. Why shouldn't the borrow checker be able to infer them?
2 comments

It probably could, but then you'd get incredibly confusing error messages if you got it wrong (and potentially when modifying code in a completely different part of the code base).
Probably for the sake of explanation, to show how the new "lifetimes" and types would work from a user's perspective, even if they could be inferred in practice.