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
Also, the functionsyntax hadn't come up previously [to the Lifetimes chapter], so it would be nice to expand on that.
The Lifetimes chapter currently has:
Before we get to that, though, let’s break the explicit example down:
fn bar<'a>(...)
This part declares our lifetimes. This says that bar has one lifetime, 'a. If we had two reference parameters, it would look like this:
fn bar<'a, 'b>(...)
Then in our parameter list, we use the lifetimes we’ve named:
which does say "declares our lifetimes", so maybe further explanation isn't appropriate here, but it looks like the Functions chapter is sticking to the bare minimum.
I'm not sure where this would fit, but I think the < > could use another sentence or two of explanation-- "This is where you declare lifetime and generic type parameters that this function is going to use" and link to the appropriate chapters for that perhaps?