Skip to content

collections: Convert SliceConcatExt to use associated types #25120

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

Merged
merged 1 commit into from
May 6, 2015

Conversation

bluss
Copy link
Member

@bluss bluss commented May 5, 2015

collections: Convert SliceConcatExt to use associated types

Coherence now allows this, we have SliceConcatExt<T> for [V] where T: Sized + Clone andSliceConcatExt<str> for [S], these don't conflict because
str is never Sized.

@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see CONTRIBUTING.md for more information.

@bluss
Copy link
Member Author

bluss commented May 5, 2015

This is a change to stable methods of an unstable trait in the prelude, intended to be non-breaking. I guess that it should allow more code to infer correctly.

Coherence now allows this, we have SliceConcatExt<T> for [V] where T: Sized
+ Clone and SliceConcatExt<str> for [S], these don't conflict because
str is never Sized.
@bluss bluss force-pushed the sliceconcatext branch from dbb778c to 2ca77f1 Compare May 5, 2015 14:39
@alexcrichton
Copy link
Member

@bors: r+ 2ca77f1

Thanks! I agree that this should not be a breaking change, and we can consider stabilization of the trait soon as well.

@bors
Copy link
Collaborator

bors commented May 6, 2015

⌛ Testing commit 2ca77f1 with merge 5a83fa2...

bors added a commit that referenced this pull request May 6, 2015
collections: Convert SliceConcatExt to use associated types

Coherence now allows this, we have `SliceConcatExt<T> for [V] where T: Sized + Clone` and` SliceConcatExt<str> for [S]`, these don't conflict because
str is never Sized.
@bors bors merged commit 2ca77f1 into rust-lang:master May 6, 2015
@bluss bluss deleted the sliceconcatext branch May 6, 2015 16:15
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