Skip to content
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

Add syntax for multiple lifetimes #25883

Merged
merged 1 commit into from
May 30, 2015
Merged

Conversation

steveklabnik
Copy link
Member

Fixes #25417

@rust-highfive
Copy link
Collaborator

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

If you have multiple references, you can use the same lifetime multiple times:

```rust
fn x_or_y<’a>(x: &‘a str, y: &‘a str) -> &‘a str {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is using the fancy single quote instead of the normal one?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(same below)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ugh i am bad at git, fixing

@alexcrichton
Copy link
Member

r=me with just a minor nit

@steveklabnik
Copy link
Member Author

@bors: r=alexcrichton rollup

@bors
Copy link
Contributor

bors commented May 29, 2015

📌 Commit 5e94187 has been approved by alexcrichton

steveklabnik added a commit to steveklabnik/rust that referenced this pull request May 29, 2015
steveklabnik added a commit to steveklabnik/rust that referenced this pull request May 29, 2015
bors added a commit that referenced this pull request May 29, 2015
@bors bors merged commit 5e94187 into rust-lang:master May 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lifetime documentation should include an example where the lifetime of a return is dependent on two arguments
4 participants