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 get_mut for [T] #14750

Merged
merged 1 commit into from
Jun 14, 2014
Merged

Add get_mut for [T] #14750

merged 1 commit into from
Jun 14, 2014

Conversation

bachm
Copy link

@bachm bachm commented Jun 8, 2014

This adds the missing get_mut method to the MutableVector trait, and implements it for &'a mut [T].

@alexcrichton
Copy link
Member

Could you squash the commits together, expand the description, and add a test for this functionality?

@bachm
Copy link
Author

bachm commented Jun 8, 2014

@alexcrichton sure, where should I put the test?

@alexcrichton
Copy link
Member

For now you can put the slice tests in collections::slice. They should move into libcore at some point, but that has not happened yet.

@bachm
Copy link
Author

bachm commented Jun 10, 2014

@alexcrichton What is going wrong here? (I'm a git newbie and may have inadvertently made an error)

@alexcrichton
Copy link
Member

Ah you seem to have added an extra merge commit to this and bors hasn't picked it up as a result. Could you rebase to master?

@bachm
Copy link
Author

bachm commented Jun 13, 2014

@alexcrichton It should work now.

bors added a commit that referenced this pull request Jun 13, 2014
This adds the missing `get_mut` method to the `MutableVector` trait, and implements it for `&'a mut [T]`.
@bors bors closed this Jun 14, 2014
@bors bors merged commit 78053f0 into rust-lang:master Jun 14, 2014
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 5, 2023
…albasi

fix: ignore impls with `#[rustc_reservation_impl]`

Fixes rust-lang#12247
Fixes rust-lang#14279

Currently core has two blanket impls for `From`: `impl<T> From<T> for T` and `impl<T> From<!> for T`. These are conflicting and thus chalk cannot uniquely solve `S: From<?0>` for any type `S`.

The latter impl is actually a reservation impl and should not be considered during trait selection. More generally, impls attributed with perma-unstable `#[rustc_reservation_impl]` attribute should be disregarded except for coherence checks. See rust-lang#64631 and rust-lang#64715 for details.

I chose to entirely ignore them in hir-ty because we don't do coherence checks.
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.

3 participants