-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lifetime documentation should include an example where the lifetime of a return is dependent on two arguments #25417
Comments
There is an example of the syntax in the elision section, but you're right that more and better examples would be good here, for sure. |
What example were you thinking of? I couldn't see one. |
Oh, two of the same! I was looking at
which has two lifetimes, they're just different ones |
Yes, two of the same. I guessed the syntax would be: but I was wrong :-) |
steveklabnik
added a commit
to steveklabnik/rust
that referenced
this issue
May 29, 2015
steveklabnik
added a commit
to steveklabnik/rust
that referenced
this issue
May 29, 2015
steveklabnik
added a commit
to steveklabnik/rust
that referenced
this issue
May 29, 2015
steveklabnik
added a commit
to steveklabnik/rust
that referenced
this issue
May 29, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The document page:
https://doc.rust-lang.org/book/lifetimes.html
For example:
fn <'a>a_or_b(a : &'a str, b : &'a str) -> &'a str
The text was updated successfully, but these errors were encountered: