Uh oh!
There was an error while loading. Please reload this page.
Make vec::Drain and binary_heap::Drain covariant - #34951
Conversation
rust-highfive
commented
Jul 21, 2016
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. |
Thanks for the PR! Alas, there are a few issues that need to be resolved before we can merge it:
If the libs team decides that making these types covariant is worthwhile, the change will likely just involve using alternate types for |
tomgarcia
commented
Jul 22, 2016
Okay, fixed it. It's now basically the same as the original code, but with different types. |
brson
commented
Jul 25, 2016
@bors r+ |
bors
commented
Jul 25, 2016
📌 Commit d1e2a93 has been approved by |
bors
commented
Jul 25, 2016
⌛ Testing commit d1e2a93 with merge 24143b9... |
bors
commented
Jul 25, 2016
💔 Test failed - auto-win-gnu-32-opt |
alexcrichton
commented
Jul 25, 2016
@bors: retry On Mon, Jul 25, 2016 at 3:03 PM, bors notifications@github.com wrote:
|
tomgarcia
commented
Jul 26, 2016
@alexcrichton How do I interpret the error log from the build? The log seems to imply the error was in building llvm, but my changes did not touch llvm. |
TimNN
commented
Jul 26, 2016
@tomgarcia There's nothing wrong with this PR, @bors is just having some problems at the moment and will retry this PR at some point (thats what the |
tomgarcia
commented
Jul 26, 2016
Okay, thanks. |
bors
commented
Jul 26, 2016
⌛ Testing commit d1e2a93 with merge cb23f63... |
bors
commented
Jul 26, 2016
💔 Test failed - auto-win-msvc-64-opt-rustbuild |
alexcrichton
commented
Jul 26, 2016
@bors: retry On Tue, Jul 26, 2016 at 3:29 AM, bors notifications@github.com wrote:
|
bors
commented
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)?
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)?
bors
commented
Jul 28, 2016
apasel422
commented
Jul 28, 2016
@tomgarcia Any interest in making a similar change to |
tomgarcia
commented
Jul 28, 2016
Yes, I was planning to fix the other Drains. I just started with vec::Drain to make sure I knew what I was doing. |
…cottmcm Remove incorrect comment in `Vec::drain` r? `@scottmcm` Turns out this comment wasn't correct for 6 years, since rust-lang#34951, which switched from using `slice::IterMut` into using `slice::Iter`.
…cottmcm Remove incorrect comment in `Vec::drain` r? ``@scottmcm`` Turns out this comment wasn't correct for 6 years, since rust-lang#34951, which switched from using `slice::IterMut` into using `slice::Iter`.
#30642
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)?