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

Make HashMap, HashSet, and their iterators properly covariant #32635

Merged
merged 3 commits into from
Apr 1, 2016

Conversation

gereeter
Copy link
Contributor

See #30642. Drain is the only type left invariant.

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (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. Due to 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 the contribution instructions for more information.

@alexcrichton
Copy link
Member

@bors: r+ 589108b

Thanks!

@bors
Copy link
Contributor

bors commented Apr 1, 2016

⌛ Testing commit 589108b with merge 53498ec...

bors added a commit that referenced this pull request Apr 1, 2016
Make HashMap, HashSet, and their iterators properly covariant

See #30642. `Drain` is the only type left invariant.
@bors bors merged commit 589108b into rust-lang:master Apr 1, 2016
bors added a commit that referenced this pull request Jul 28, 2016
Make vec::Drain and binary_heap::Drain covariant

I removed all mutable pointers/references, and added covariance tests similar to the ones in #32635. It builds and passes the tests, but I noticed that there weren't any tests of Drain's behaviour (at least not in libcollectionstest), so I'm not sure if my changes accidently broke Drain's behaviour. Should I add some tests for that (and if so, what should the tests include)?
Manishearth added a commit to Manishearth/rust that referenced this pull request Jul 28, 2016
Make vec::Drain and binary_heap::Drain covariant

I removed all mutable pointers/references, and added covariance tests similar to the ones in rust-lang#32635. It builds and passes the tests, but I noticed that there weren't any tests of Drain's behaviour (at least not in libcollectionstest), so I'm not sure if my changes accidently broke Drain's behaviour. Should I add some tests for that (and if so, what should the tests include)?
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