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

Change vec::{head,tail,init,last} to return references #5213

Closed
wants to merge 9 commits into from

Conversation

erickt
Copy link
Contributor

@erickt erickt commented Mar 3, 2013

This patch series changes a handful of vec functions to return references instead of copies. The one downside with making this change is that these functions aren't usable in a couple cases now due to some purity complaints. For example, this change. I couldn't figure out a way to get last to work on a @mut ~[...] type, so I ended up having to use *crate_cache[crate_cache.len() - 1].metas.

@graydon
Copy link
Contributor

graydon commented Mar 4, 2013

r+

@erickt
Copy link
Contributor Author

erickt commented Mar 6, 2013

@kud1ing: thanks for catching that. I'll fix it.

@erickt
Copy link
Contributor Author

erickt commented Mar 6, 2013

I think this should work now. Unfortunately http://buildbot.rust-lang.org is down, so I can't confirm. Can it be retried again?

bors added a commit that referenced this pull request Mar 6, 2013
This patch series changes a handful of vec functions to return references instead of copies. The one downside with making this change is that these functions aren't usable in a couple cases now due to some purity complaints. For example, this [change](erickt@c31e81a#L1R87). I couldn't figure out a way to get `last` to work on a `@mut ~[...]` type, so I ended up having to use `*crate_cache[crate_cache.len() - 1].metas`.
@bors bors closed this Mar 6, 2013
bors added a commit to rust-lang-ci/rust that referenced this pull request May 2, 2020
Use generator own DefId

Fixes rust-lang#5207

changelog: Fix ICE in `missing_errors_doc`
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.

None yet

3 participants