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

Use lifetime elision in libcore #28188

Merged
merged 1 commit into from
Sep 4, 2015
Merged

Conversation

Manishearth
Copy link
Member

Makes things more greppable.

This change was made automatically by clippy + bash scripts, though I will run test passes, please review carefully.

@rust-highfive
Copy link
Collaborator

r? @alexcrichton

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

@bluss
Copy link
Member

bluss commented Sep 3, 2015

I agree the loss of lifetime params where we return structs is unfortunate ((&self) -> Iter<T>), but I think the elision rules force our hand there. This is a win for consistency in both code and documentation.

r=me, but maybe you want to squash the two latter commits together, or give them less WIP-sounding commit logs?

@Manishearth
Copy link
Member Author

Squashed, they were split for reviewability.

@eddyb wanted me to wait on this until we can reach consensus on what is and isn't okay to elide.

@alexcrichton
Copy link
Member

Currently the standard library and collections and such all pretty aggressively use lifetime elision, and to the best of my knowledge these are all just signatures that haven't been updated since after lifetime elision was added. No new API written uses an explicit lifetime unless necessary, so I agree with @bluss that this is more consistent.

@bors: r+ a520568

Manishearth added a commit to Manishearth/rust that referenced this pull request Sep 3, 2015
Makes things more greppable.

This change was made automatically by clippy + bash scripts, though I will run test passes, please review carefully.
Manishearth added a commit to Manishearth/rust that referenced this pull request Sep 3, 2015
Makes things more greppable.

This change was made automatically by clippy + bash scripts, though I will run test passes, please review carefully.
bors added a commit that referenced this pull request Sep 3, 2015
@bors bors merged commit a520568 into rust-lang:master Sep 4, 2015
@Manishearth Manishearth deleted the elide-core branch December 2, 2016 19:03
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.

5 participants