Skip to content

core::vec is missing methods for mutable slices #6780

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

Closed
wants to merge 1 commit into from

Conversation

june0cho
Copy link
Contributor

Fix #5984. Also, I found a problem on type inference and left a comment.

@brson
Copy link
Contributor

brson commented May 28, 2013

@june0cho Thanks! Can you file an issue about the method inference problem?

@nikomatsakis
Copy link
Contributor

I don't believe the failure to find a method is a bug, but rather the impl definitions in the PR are not quite right. In particular, the mut_slice method is defined as:

 +    fn mut_slice(&mut self, start: uint, end: uint) -> &'self mut [T] {...}

but the receiver type is &mut [T]. Really the mut_slice method should therefore just take self, I should think. (Once dynamically sized types lands, the current self type would be the correct one, because the impl type would be [T] not &mut [T]).

@bors bors closed this May 29, 2013
@june0cho
Copy link
Contributor Author

@nikomatsakis you are right. I corrected as you commented and the error does not occur anymore.
I'll update it !

@june0cho june0cho mentioned this pull request May 29, 2013
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.

4 participants